Classes | Typedefs | Functions
Streaming control functions

Tools for creating, managing and consuming video streams. More...

Classes

struct  uvc_frame
 
struct  uvc_stream_ctrl
 

Typedefs

typedef voiduvc_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. More...
 
void uvc_stream_close (uvc_stream_handle_t *strmh)
 Close stream.Closes stream, frees handle and all streaming resources. More...
 
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. More...
 
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. More...
 

Detailed Description

Tools for creating, managing and consuming video streams.

Typedef Documentation

typedef void( uvc_frame_callback_t) (struct uvc_frame *frame, void *user_ptr)

A callback function to handle incoming assembled UVC frames

Definition at line 396 of file libuvc.h.

typedef struct uvc_frame uvc_frame_t

An image frame received from the UVC device

Streaming mode, includes all information needed to select stream

Function Documentation

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 
)

Get a negotiated streaming control block for some common parameters.

Parameters
[in]devhDevice handle
[in,out]ctrlControl block
[in]format_classType of streaming format
[in]widthDesired frame width
[in]heightDesired frame height
[in]fpsFrame rate, frames per second

Definition at line 268 of file stream.c.

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 
)

Begin streaming video from the camera into the callback function.

Parameters
devhUVC device
ctrlControl block, processed using {uvc_probe_stream_ctrl} or {uvc_get_stream_ctrl_format_size}
cbUser callback function. See {uvc_frame_callback_t} for restrictions.
flagsStream setup flags, currently undefined. Set this to zero. The lower bit is reserved for backward compatibility.

Definition at line 581 of file stream.c.

void uvc_stop_streaming ( uvc_device_handle_t devh)

Stop streaming videoCloses all streams, ends threads and cancels pollers.

Parameters
devhUVC device

Definition at line 1043 of file stream.c.

void uvc_stream_close ( uvc_stream_handle_t strmh)

Close stream.Closes stream, frees handle and all streaming resources.

Parameters
strmhUVC stream handle

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]strmhStream handle
[in]ctrlControl block, processed using {uvc_probe_stream_ctrl} or {uvc_get_stream_ctrl_format_size}

Definition at line 190 of file stream.c.

uvc_error_t uvc_stream_get_frame ( uvc_stream_handle_t strmh,
uvc_frame_t **  frame,
int32_t  timeout_us 
)

Poll for a frame

Parameters
devhUVC device
[out]frameLocation 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.

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.

Parameters
devhUVC device
ctrlControl 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.

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 
)

Begin streaming video from the stream into the callback function.

Parameters
strmhUVC stream
cbUser callback function. See {uvc_frame_callback_t} for restrictions.
flagsStream setup flags, currently undefined. Set this to zero. The lower bit is reserved for backward compatibility.

Definition at line 704 of file stream.c.

uvc_error_t uvc_stream_stop ( uvc_stream_handle_t strmh)

Stop stream.Stops stream, ends threads and cancels pollers.

Parameters
devhUVC device
Todo:
stop the actual stream, camera side?

Definition at line 1058 of file stream.c.



librealsense
Author(s): Sergey Dorodnicov , Mark Horn , Reagan Lopez
autogenerated on Fri Mar 13 2020 03:16:19