USBIP C library 0.7.0
Virtual USB devices & host drivers over USB/IP
Loading...
Searching...
No Matches

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.
 

Detailed Description

UVC configuration: frame geometry, advertised formats, and a frame source.

Field Documentation

◆ width

uint16_t uvc_opts::width

◆ height

uint16_t uvc_opts::height

Frame size, e.g.

320x240

◆ fps

uint32_t uvc_opts::fps

Nominal frame rate.

◆ formats

unsigned uvc_opts::formats

UVC_HAS_YUYV | UVC_HAS_MJPEG (0 -> YUYV)

◆ next_frame

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).

Parameters
userthe user pointer.
bufoutput buffer.
capcapacity of buf in bytes.
fmtrequested format: 'Y' = packed YUYV (width×height×2 bytes), 'M' = a JPEG/MJPEG frame.
indexframe counter since streaming started.
Returns
the frame length in bytes, or < 0 for the built-in generator.

◆ on_event

void(* uvc_opts::on_event) (void *user, const char *text)

Human-readable log hook (optional).

Parameters
userthe user pointer.
texta NUL-terminated description.

◆ user

void* uvc_opts::user

Opaque pointer passed to the callbacks above.


The documentation for this struct was generated from the following file: