Skip to content

Investigate refactoring how we return AVIOFileLikeContext #896

@scotts

Description

@scotts

PR #889 refactored how we create decoders that take a file-like object. See the PR for full details. The state the code was left in, though, still has a not-great quirk that we're doing this:

  1. C++ creates object in pybind_ops.cpp, does a reinterpret_cast<int64_t> and returns that value to Python layer.
  2. Python layer accepts the int and forwards that int decoder creation in custom_ops.cpp.
  3. C++ in custom_ops.cpp does a reinterpet_cast<AVIOFileLikeContext*> on the int.

That's not great. The purpose of this issue is to investigate if defining an actual pybind object that wraps AVIOFileLikeContext is better.

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