Tools for creating, managing and consuming video streams.
More...
Classes |
struct | uvc_frame |
struct | uvc_stream_ctrl |
Typedefs |
typedef void( | uvc_frame_callback_t )(struct uvc_frame *frame, void *user_ptr) |
typedef struct uvc_frame | uvc_frame_t |
typedef struct uvc_stream_ctrl | uvc_stream_ctrl_t |
Functions |
uvc_error_t | uvc_get_stream_ctrl_format_size (uvc_device_handle_t *devh, uvc_stream_ctrl_t *ctrl, uint32_t fourcc, int width, int height, int fps) |
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, int num_transfer_buffers) |
void | uvc_stop_streaming (uvc_device_handle_t *devh) |
| Stop streaming videoCloses all streams, ends threads and cancels pollers.
|
void | uvc_stream_close (uvc_stream_handle_t *strmh) |
| Close stream.Closes stream, frees handle and all streaming resources.
|
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.
|
uvc_error_t | uvc_stream_get_frame (uvc_stream_handle_t *strmh, uvc_frame_t **frame, int32_t timeout_us) |
uvc_error_t | uvc_stream_open_ctrl (uvc_device_handle_t *devh, uvc_stream_handle_t **strmhp, uvc_stream_ctrl_t *ctrl) |
uvc_error_t | uvc_stream_start (uvc_stream_handle_t *strmh, uvc_frame_callback_t *cb, void *user_ptr, uint8_t flags, int num_transfer_buffers) |
uvc_error_t | uvc_stream_stop (uvc_stream_handle_t *strmh) |
| Stop stream.Stops stream, ends threads and cancels pollers.
|
Detailed Description
Tools for creating, managing and consuming video streams.
Typedef Documentation
A callback function to handle incoming assembled UVC frames
Definition at line 396 of file libuvc.h.
An image frame received from the UVC device
Streaming mode, includes all information needed to select stream
Function Documentation
Get a negotiated streaming control block for some common parameters.
- 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 |
Definition at line 268 of file stream.c.
Begin streaming video from the camera into the callback function.
- Parameters:
-
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. |
Definition at line 581 of file stream.c.
Stop streaming videoCloses all streams, ends threads and cancels pollers.
- Parameters:
-
Definition at line 1043 of file stream.c.
Close stream.Closes stream, frees handle and all streaming resources.
- Parameters:
-
Definition at line 1137 of file stream.c.
Reconfigure stream with a new stream format.This may be executed whether or not the stream is running.
- Parameters:
-
[in] | strmh | Stream handle |
[in] | ctrl | Control block, processed using {uvc_probe_stream_ctrl} or {uvc_get_stream_ctrl_format_size} |
Definition at line 190 of file stream.c.
Poll for a frame
- Parameters:
-
| 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 |
Definition at line 977 of file stream.c.
Open a new video stream.
- Parameters:
-
devh | UVC device |
ctrl | Control block, processed using {uvc_probe_stream_ctrl} or {uvc_get_stream_ctrl_format_size} |
- Todo:
- take only what we need
Definition at line 637 of file stream.c.
Begin streaming video from the stream into the callback function.
- Parameters:
-
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. |
Definition at line 704 of file stream.c.
Stop stream.Stops stream, ends threads and cancels pollers.
- Parameters:
-
- Todo:
- stop the actual stream, camera side?
Definition at line 1058 of file stream.c.