|
USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
|
Collaboration diagram for UVC - USB Video Class (webcam):Files | |
| file | uvc.h |
| USB Video Class (webcam) device class, app API. | |
Data Structures | |
| struct | uvc_opts |
| UVC configuration: frame geometry, advertised formats, and a frame source. More... | |
Macros | |
| #define | UVC_HAS_YUYV |
| opts.formats bit: advertise packed YUYV | |
| #define | UVC_HAS_MJPEG |
| opts.formats bit: advertise MJPEG | |
Typedefs | |
| typedef struct uvc_cam | uvc_cam |
| One UVC camera function: a single instance of the class on a device. | |
Functions | |
| uvc_cam * | uvc_add (usbip_device *dev, const uvc_opts *opts) |
| Add a UVC camera interface to a device. | |
| void | uvc_color_bars_yuyv (uint8_t *buf, int width, int height, uint32_t index) |
| Render one frame of the built-in animated color-bar test pattern (packed YUYV). | |
Variables | |
| const usbip_device_class | usbip_device_uvc |
| The UVC video class, for usbip_device_add_class() | |
| #define UVC_HAS_YUYV |
opts.formats bit: advertise packed YUYV
| #define UVC_HAS_MJPEG |
opts.formats bit: advertise MJPEG
One UVC camera function: a single instance of the class on a device.
Opaque - create one with uvc_add() and use the functions below. Distinct from the other classes' handles, so mixing them up is a compile error rather than a misread state block.
| uvc_cam * uvc_add | ( | usbip_device * | dev, |
| const uvc_opts * | opts | ||
| ) |
Add a UVC camera interface to a device.
Sets the device class to USB_CLASS_MISC / USB_SUBCLASS_COMMON / USB_PROTOCOL_IAD (0xEF/0x02/0x01).
| dev | the device. |
| opts | frame geometry, advertised formats and a frame source (see uvc_opts). |
NULL on error. | void uvc_color_bars_yuyv | ( | uint8_t * | buf, |
| int | width, | ||
| int | height, | ||
| uint32_t | index | ||
| ) |
Render one frame of the built-in animated color-bar test pattern (packed YUYV).
Exposed so an app's next_frame can build pixels to encode (e.g. to MJPEG).
| buf | output buffer (>= width * height * 2 bytes). |
| width | frame width in pixels. |
| height | frame height in pixels. |
| index | running frame counter (animates the bars). |
|
extern |
The UVC video class, for usbip_device_add_class()