Adding support for USB UVC devices #483
nickverlinden
started this conversation in
Development
Replies: 1 comment 8 replies
-
This looks complicated. Because this device uses isochronous endpoints, there may be some similarity with the USB audio streaming driver. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am thinking about trying to add some basic support for UVC devices to capture video frames from low res web cams or video capture devices over USB. I looked at some example code for libusb and it doesn't look so complicated. Converting YUV frames to RGB is also relatively simple. Recently i did something with an rgb buffer and arm neon instructions using Circle on a pi4 and it seems to be up to speed processing wise. I'm not super familiar with C++, most of the code i write is plain old C. Usually i look at similar examples to try and figure out with I need to do. I briefly looked at some of the usb stuff in Circle, but it does not seem to be that simple (like the libusb functions in the example code below). Do you have a good suggestion to look at inside the Circle source repo to get me started?
This code is untested, but at first glance it seems to be quite simple to set up using libusb.
I can see that the usb device descriptor for a composite video capture device is like this, and it seems that it only returns MJPEG frames, which is fine too. There is source for embedded mjpeg decoders out there.
Beta Was this translation helpful? Give feedback.
All reactions