libuvc
|
Data Structures | |
struct | uvc_frame |
An image frame received from the UVC device. More... | |
struct | uvc_stream_ctrl |
Streaming mode, includes all information needed to select stream. More... | |
Typedefs | |
typedef struct uvc_frame | uvc_frame_t |
An image frame received from the UVC device. | |
typedef void | uvc_frame_callback_t(struct uvc_frame *frame, void *user_ptr) |
A callback function to handle incoming assembled UVC frames. | |
typedef struct uvc_stream_ctrl | uvc_stream_ctrl_t |
Streaming mode, includes all information needed to select stream. | |
Enumerations | |
enum | uvc_frame_format { } |
Color coding of stream, transport-independent. More... | |
Functions | |
uvc_error_t | uvc_trigger_still (uvc_device_handle_t *devh, uvc_still_ctrl_t *still_ctrl) |
Initiate a method 2 (in stream) still capture. | |
uvc_error_t | uvc_stream_ctrl (uvc_stream_handle_t *strmh, uvc_stream_ctrl_t *ctrl) |
Reconfigure stream with a new stream format. | |
uvc_error_t | uvc_get_stream_ctrl_format_size (uvc_device_handle_t *devh, uvc_stream_ctrl_t *ctrl, enum uvc_frame_format cf, int width, int height, int fps) |
Get a negotiated streaming control block for some common parameters. | |
uvc_error_t | uvc_get_still_ctrl_format_size (uvc_device_handle_t *devh, uvc_stream_ctrl_t *ctrl, uvc_still_ctrl_t *still_ctrl, int width, int height) |
Get a negotiated still control block for some common parameters. | |
uvc_error_t | uvc_start_streaming (uvc_device_handle_t *devh, uvc_stream_ctrl_t *ctrl, uvc_frame_callback_t *cb, void *user_ptr, uint8_t flags) |
Begin streaming video from the camera into the callback function. | |
uvc_error_t | uvc_start_iso_streaming (uvc_device_handle_t *devh, uvc_stream_ctrl_t *ctrl, uvc_frame_callback_t *cb, void *user_ptr) |
Begin streaming video from the camera into the callback function. | |
uvc_error_t | uvc_stream_open_ctrl (uvc_device_handle_t *devh, uvc_stream_handle_t **strmhp, uvc_stream_ctrl_t *ctrl) |
Open a new video stream. | |
uvc_error_t | uvc_stream_start (uvc_stream_handle_t *strmh, uvc_frame_callback_t *cb, void *user_ptr, uint8_t flags) |
Begin streaming video from the stream into the callback function. | |
uvc_error_t | uvc_stream_start_iso (uvc_stream_handle_t *strmh, uvc_frame_callback_t *cb, void *user_ptr) |
Begin streaming video from the stream into the callback function. | |
uvc_error_t | uvc_stream_get_frame (uvc_stream_handle_t *strmh, uvc_frame_t **frame, int32_t timeout_us) |
Poll for a frame. | |
void | uvc_stop_streaming (uvc_device_handle_t *devh) |
Stop streaming video. | |
uvc_error_t | uvc_stream_stop (uvc_stream_handle_t *strmh) |
Stop stream. | |
void | uvc_stream_close (uvc_stream_handle_t *strmh) |
Close stream. | |
Tools for creating, managing and consuming video streams
enum uvc_frame_format |
Color coding of stream, transport-independent.
uvc_error_t uvc_trigger_still | ( | uvc_device_handle_t * | devh, |
uvc_still_ctrl_t * | still_ctrl ) |
Initiate a method 2 (in stream) still capture.
[in] | devh | Device handle |
[in] | still_ctrl | Still capture control block |
uvc_error_t uvc_stream_ctrl | ( | uvc_stream_handle_t * | strmh, |
uvc_stream_ctrl_t * | ctrl ) |
Reconfigure stream with a new stream format.
This may be executed whether or not the stream is running.
[in] | strmh | Stream handle |
[in] | ctrl | Control block, processed using {uvc_probe_stream_ctrl} or {uvc_get_stream_ctrl_format_size} |
uvc_error_t uvc_get_stream_ctrl_format_size | ( | uvc_device_handle_t * | devh, |
uvc_stream_ctrl_t * | ctrl, | ||
enum uvc_frame_format | cf, | ||
int | width, | ||
int | height, | ||
int | fps ) |
Get a negotiated streaming control block for some common parameters.
[in] | devh | Device handle |
[in,out] | ctrl | Control block |
[in] | format_class | Type of streaming format |
[in] | width | Desired frame width |
[in] | height | Desired frame height |
[in] | fps | Frame rate, frames per second |
uvc_error_t uvc_get_still_ctrl_format_size | ( | uvc_device_handle_t * | devh, |
uvc_stream_ctrl_t * | ctrl, | ||
uvc_still_ctrl_t * | still_ctrl, | ||
int | width, | ||
int | height ) |
Get a negotiated still control block for some common parameters.
[in] | devh | Device handle |
[in] | ctrl | Control block |
[in,out] | still_ctrl | Still capture control block |
[in] | width | Desired frame width |
[in] | height | Desired frame height |
uvc_error_t uvc_start_streaming | ( | uvc_device_handle_t * | devh, |
uvc_stream_ctrl_t * | ctrl, | ||
uvc_frame_callback_t * | cb, | ||
void * | user_ptr, | ||
uint8_t | flags ) |
Begin streaming video from the camera into the callback function.
devh | UVC device |
ctrl | Control block, processed using {uvc_probe_stream_ctrl} or {uvc_get_stream_ctrl_format_size} |
cb | User callback function. See {uvc_frame_callback_t} for restrictions. |
flags | Stream setup flags, currently undefined. Set this to zero. The lower bit is reserved for backward compatibility. |
uvc_error_t uvc_start_iso_streaming | ( | uvc_device_handle_t * | devh, |
uvc_stream_ctrl_t * | ctrl, | ||
uvc_frame_callback_t * | cb, | ||
void * | user_ptr ) |
Begin streaming video from the camera into the callback function.
devh | UVC device |
ctrl | Control block, processed using {uvc_probe_stream_ctrl} or {uvc_get_stream_ctrl_format_size} |
cb | User callback function. See {uvc_frame_callback_t} for restrictions. |
uvc_error_t uvc_stream_open_ctrl | ( | uvc_device_handle_t * | devh, |
uvc_stream_handle_t ** | strmhp, | ||
uvc_stream_ctrl_t * | ctrl ) |
Open a new video stream.
devh | UVC device |
ctrl | Control block, processed using {uvc_probe_stream_ctrl} or {uvc_get_stream_ctrl_format_size} |
uvc_error_t uvc_stream_start | ( | uvc_stream_handle_t * | strmh, |
uvc_frame_callback_t * | cb, | ||
void * | user_ptr, | ||
uint8_t | flags ) |
Begin streaming video from the stream into the callback function.
strmh | UVC stream |
cb | User callback function. See {uvc_frame_callback_t} for restrictions. |
flags | Stream setup flags, currently undefined. Set this to zero. The lower bit is reserved for backward compatibility. |
uvc_error_t uvc_stream_start_iso | ( | uvc_stream_handle_t * | strmh, |
uvc_frame_callback_t * | cb, | ||
void * | user_ptr ) |
Begin streaming video from the stream into the callback function.
strmh | UVC stream |
cb | User callback function. See {uvc_frame_callback_t} for restrictions. |
uvc_error_t uvc_stream_get_frame | ( | uvc_stream_handle_t * | strmh, |
uvc_frame_t ** | frame, | ||
int32_t | timeout_us ) |
Poll for a frame.
devh | UVC device | |
[out] | frame | Location to store pointer to captured frame (NULL on error) |
timeout_us | >0: Wait at most N microseconds; 0: Wait indefinitely; -1: return immediately |
void uvc_stop_streaming | ( | uvc_device_handle_t * | devh | ) |
Stop streaming video.
Closes all streams, ends threads and cancels pollers
devh | UVC device |
uvc_error_t uvc_stream_stop | ( | uvc_stream_handle_t * | strmh | ) |
Stop stream.
Stops stream, ends threads and cancels pollers
devh | UVC device |
void uvc_stream_close | ( | uvc_stream_handle_t * | strmh | ) |
Close stream.
Closes stream, frees handle and all streaming resources.
strmh | UVC stream handle |