Skip to content

Cleanup the naming of filtergraph and swscale constructs in CpuDeviceInterface #925

@scotts

Description

@scotts

From the code itself:

// TODO: The names of these fields is confusing, as the actual color
// conversion object for Sws has "context" in the name, and we use
// "context" for the structs we store to know if we need to recreate a
// color conversion object. We should clean that up.
std::unique_ptr<FilterGraph> filterGraph_;
FiltersContext prevFiltersContext_;
UniqueSwsContext swsContext_;
SwsFrameContext prevSwsFrameContext_;

Part of the problem here is that "context" is an overused term. We've used it to mean "the values for the current version of filtergraph or swscale that let us know if we can reuse it," but context is also commonly used in FFmpeg for the names of objects that control access to a thing.

Because "context" is so pervasive in FFmpeg type names, we should probably not use it our type names. This does mean we'll probably also want to rename FiltersContext as well as SwsFrameContext

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactorImproves code itself, but does not fix a bug or add new functionality.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions