libuvc
Functions
Library initialization/deinitialization

Setup routines used to construct UVC access contexts. More...

Functions

uvc_error_t uvc_init (uvc_context_t **pctx, struct libusb_context *usb_ctx)
 Initializes the UVC context. More...
 
void uvc_exit (uvc_context_t *ctx)
 Closes the UVC context, shutting down any active cameras. More...
 

Detailed Description

Setup routines used to construct UVC access contexts.

Function Documentation

◆ uvc_init()

uvc_error_t uvc_init ( uvc_context_t **  pctx,
struct libusb_context *  usb_ctx 
)

Initializes the UVC context.

Note
If you provide your own USB context, you must handle libusb event processing using a function such as libusb_handle_events.
Parameters
[out]pctxThe location where the context reference should be stored.
[in]usb_ctxOptional USB context to use
Returns
Error opening context or UVC_SUCCESS

◆ uvc_exit()

void uvc_exit ( uvc_context_t *  ctx)

Closes the UVC context, shutting down any active cameras.

Note
This function invalides any existing references to the context's cameras.

If no USB context was provided to uvc_init, the UVC-specific USB context will be destroyed.

Parameters
ctxUVC context to shut down