Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • P PyAV
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 37
    • Issues 37
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 26
    • Merge requests 26
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyAV
  • PyAV
  • Merge requests
  • !718

Implement custom io_open/io_close support in container

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/philipnbbc/philipn-custom-io-in-format-context into main Nov 10, 2020
  • Overview 14
  • Commits 12
  • Pipelines 0
  • Changes 9

Created by: philipnbbc

This PR adds an io_open option to av.open() which allows a client to provide a custom I/O. The io_open function is called with parameters url, flags, and options when a new file needs to be opened.

The existing file I/O was factored out into the PyIOFile class, with the addition of the fclose method. This class is used for the main file as well as for any files opened by the container.

Custom I/O has been used with the FFmpeg DASH encoder and could be used with containers that uses the io_open and io_close callbacks in the AVFormatContext. The test shows how it can be used with the DASH encoder by using a CUSTOM_IO_PROTOCOL prefix to direct the DASH encoder to use the custom I/O.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/philipnbbc/philipn-custom-io-in-format-context