[WIP] Add get_video_metadata() and associated dataclasses #48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR Implements https://docs.google.com/document/d/1OislJC2eeaI2X38Ufy8fDRJDrEj1lcSNtZ-8L-CeQm8/edit from @scotts.
Main changes:
Add the dataclasses from the design doc, all untouched
Added 2 new private custom ops:
_get_container_json_metadata(decoder)
_get_stream_json_metadata(decoder, stream_index)
This is needed because the existing
get_json_metadata()
just returns the stream metadata of the best stream, but we want theVideoMetadata
dataclass to provide the metadata of all existing streams.Some thoughts / remarks:
get_json_metadata()
C++ and Python functions untouched. This is because it's currently in use internally, and it'll be easier to migrate that internal code in a separate diff.Not done yet:
probe_video_metadata_headers()
. LMK if you prefer it to be done here, or in a follow-up PR.