feat(usb_host_uvc): add support for user-provided frame buffers #316
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
frame_id. In some cameras, we encountered this situation. Perhaps it was because the USB transfer speed was insufficient that some data packets were lost inside the camera.Backward Compatibility
The new
user_frame_buffersfield is optional and defaults to NULL. If you don't set it, everything works exactly as before - no code changes needed.However, out of caution, I've bumped the minor version to 2.4.0. While this shouldn't technically break anything (it's an additive change), the buffer management behavior does change when the new field is used. Better safe than sorry - this gives users a clear signal that something noteworthy was added.
Related
Testing
Checklist
Before submitting a Pull Request, please ensure the following:
Note
Adds zero-copy streaming via user-provided frame buffers and fixes bulk handling for unexpected frame_id, with tests and version bump to 2.4.0.
advanced.user_frame_bufferstouvc_host_stream_config_tfor user-provided frame buffers.uvc_frame_allocate()to acceptuser_frame_buffers.user_provided_fband avoid freeing user buffers inuvc_frame_free().uvc_host_stream_open()and pass intouvc_frame_allocate().frame_idas errors and skip the frame (instead of asserting).uvc_frame_allocate()signature.2.4.0and updateCHANGELOG.md.Written by Cursor Bugbot for commit bf96b6f. This will update automatically on new commits. Configure here.