-
Notifications
You must be signed in to change notification settings - Fork 38
feat(usb_host_uvc): add support for user-provided frame buffers #316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(usb_host_uvc): add support for user-provided frame buffers #316
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR is being reviewed by Cursor Bugbot
Details
Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.
To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.
afe693e to
bf96b6f
Compare
tore-espressif
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@leeebo thank for this feature!
I left two of nit-picky comments.
You can also consider writing something to arch_notes.md or FAQ.md about this new feature. Although this is not a blocker, I plan to improve the docs of UVC driver soon
peter-marcisovsky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, tested on HW.
bf96b6f to
c1ac999
Compare
c1ac999 to
70f9013
Compare
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 support via user-supplied frame buffers and skips frames with unexpected frame_id at EoF; updates API, tests, docs, and bumps version to 2.4.0.
advanced.user_frame_bufferstouvc_host_stream_config_t; validate buffers inuvc_host_stream_open().uvc_frame_allocate()to accept user buffers and trackuser_provided_fb; free buffers conditionally inuvc_frame_free().bmHeaderInfo.errororframe_idmismatch instead of asserting.uvc_frame_allocate(..., NULL)and set.user_frame_buffers = NULLin opening tests.test_app.docs/FAQ.mdanddocs/arch_notes.md.2.4.0and updateCHANGELOG.md.Written by Cursor Bugbot for commit 70f9013. This will update automatically on new commits. Configure here.