Feat/bytes video decode#25
Draft
XiDianZuoYun wants to merge 2 commits into
Draft
Conversation
XiDianZuoYun
commented
Jun 1, 2026
| } | ||
| return AVERROR(ENOSYS); | ||
| } | ||
| virtual int64_t Size() const { return -1; } |
Contributor
Author
There was a problem hiding this comment.
这里应该是unimplentmented error
ab6f4f5 to
9d10693
Compare
9d10693 to
44270a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This change adds bytes-like buffer support to the on-demand video decoder GOP workflows.
Specifically, it:
SharedGopStore.put()to acceptbytes,bytearray, andmemoryviewdirectly, in addition tonumpy.ndarray.DecodeFromGOP,DecodeFromGOPRGB,DecodeFromGOPListRGB, andDecodeFromPacketListRGBto accept generic Python bytes-like buffers viapy::buffer.This is needed for data pipelines where video/GOP packet data is already available as raw bytes, for example from record files, mmap slices, shared-memory buffers, or custom storage backends. It avoids
requiring callers to wrap those payloads into numpy arrays before caching or decoding.
Affected components:
accvlab.on_demand_video_decoderSharedGopStorePyNvGopDecoderPython bindings for GOP/packet decode pathsType of Change 选这个:
Testing 可以写:
scripts/run_tests.shAdded
SharedGopStoretests forbytes,bytearray,memoryview, and empty byte payload validation.Validation performed locally:
git diff --checkSharedGopStore.put()pathstd::vector<py::buffer>and nested buffer-list castingFull repository test runner was not executed because this local environment is missing pytest and the full native extension build is blocked by missing FFmpeg headers.
Documentation / Code Quality 可以填:
Documentation, Examples, Tutorials, Demos
Updated pybind API docstrings to mention bytes-like inputs. No examples or performance docs were needed.
Code Quality
pyproject.tomlif/as neededNo dependency changes were required.
git diff --checkpassed.