|
USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
|
UVC configuration: frame geometry, advertised formats, and a frame source. More...
#include <classes/uvc.h>
Data Fields | |
| uint16_t | width |
| uint16_t | height |
| Frame size, e.g. | |
| uint32_t | fps |
| Nominal frame rate. | |
| unsigned | formats |
| UVC_HAS_YUYV | UVC_HAS_MJPEG (0 -> YUYV) | |
| int(* | next_frame )(void *user, uint8_t *buf, int cap, char fmt, uint32_t index) |
| Frame source (optional). | |
| void(* | on_event )(void *user, const char *text) |
| Human-readable log hook (optional). | |
| void * | user |
| Opaque pointer passed to the callbacks above. | |
UVC configuration: frame geometry, advertised formats, and a frame source.
| uint16_t uvc_opts::width |
| uint16_t uvc_opts::height |
Frame size, e.g.
320x240
| uint32_t uvc_opts::fps |
Nominal frame rate.
| unsigned uvc_opts::formats |
UVC_HAS_YUYV | UVC_HAS_MJPEG (0 -> YUYV)
| int(* uvc_opts::next_frame) (void *user, uint8_t *buf, int cap, char fmt, uint32_t index) |
Frame source (optional).
Fill buf with ONE frame and return its length; return < 0 to use the built-in synthetic YUYV color-bar generator.
The class only synthesizes YUYV; to advertise MJPEG (UVC_HAS_MJPEG) you must supply 'M' frames here (MJPEG encoding is application code - see the example).
| user | the user pointer. |
| buf | output buffer. |
| cap | capacity of buf in bytes. |
| fmt | requested format: 'Y' = packed YUYV (width×height×2 bytes), 'M' = a JPEG/MJPEG frame. |
| index | frame counter since streaming started. |
| void(* uvc_opts::on_event) (void *user, const char *text) |
Human-readable log hook (optional).
| user | the user pointer. |
| text | a NUL-terminated description. |
| void* uvc_opts::user |
Opaque pointer passed to the callbacks above.