Classes | Typedefs | Enumerations | Functions
libuvc.h File Reference
#include <stdio.h>
#include <errno.h>
#include <libusb.h>
#include <sys/time.h>
#include "libuvc_config.h"
Include dependency graph for libuvc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  uvc_device_descriptor
 
struct  uvc_extension_unit
 
struct  uvc_format_desc
 
struct  uvc_frame
 
struct  uvc_frame_desc
 
struct  uvc_input_terminal
 
struct  uvc_output_terminal
 
struct  uvc_processing_unit
 
struct  uvc_stream_ctrl
 

Typedefs

typedef struct uvc_context uvc_context_t
 
typedef struct uvc_device_descriptor uvc_device_descriptor_t
 
typedef struct uvc_device_handle uvc_device_handle_t
 
typedef struct uvc_device uvc_device_t
 
typedef enum uvc_error uvc_error_t
 
typedef struct uvc_extension_unit uvc_extension_unit_t
 
typedef struct uvc_format_desc uvc_format_desc_t
 
typedef voiduvc_frame_callback_t) (struct uvc_frame *frame, void *user_ptr)
 
typedef struct uvc_frame_desc uvc_frame_desc_t
 
typedef struct uvc_frame uvc_frame_t
 
typedef struct uvc_input_terminal uvc_input_terminal_t
 
typedef struct uvc_output_terminal uvc_output_terminal_t
 
typedef struct uvc_processing_unit uvc_processing_unit_t
 
typedef voiduvc_status_callback_t) (enum uvc_status_class status_class, int event, int selector, enum uvc_status_attribute status_attribute, void *data, size_t data_len, void *user_ptr)
 
typedef struct uvc_stream_ctrl uvc_stream_ctrl_t
 
typedef struct uvc_stream_handle uvc_stream_handle_t
 

Enumerations

enum  uvc_ct_ctrl_selector {
  UVC_CT_CONTROL_UNDEFINED = 0x00, UVC_CT_SCANNING_MODE_CONTROL = 0x01, UVC_CT_AE_MODE_CONTROL = 0x02, UVC_CT_AE_PRIORITY_CONTROL = 0x03,
  UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL = 0x04, UVC_CT_EXPOSURE_TIME_RELATIVE_CONTROL = 0x05, UVC_CT_FOCUS_ABSOLUTE_CONTROL = 0x06, UVC_CT_FOCUS_RELATIVE_CONTROL = 0x07,
  UVC_CT_FOCUS_AUTO_CONTROL = 0x08, UVC_CT_IRIS_ABSOLUTE_CONTROL = 0x09, UVC_CT_IRIS_RELATIVE_CONTROL = 0x0a, UVC_CT_ZOOM_ABSOLUTE_CONTROL = 0x0b,
  UVC_CT_ZOOM_RELATIVE_CONTROL = 0x0c, UVC_CT_PANTILT_ABSOLUTE_CONTROL = 0x0d, UVC_CT_PANTILT_RELATIVE_CONTROL = 0x0e, UVC_CT_ROLL_ABSOLUTE_CONTROL = 0x0f,
  UVC_CT_ROLL_RELATIVE_CONTROL = 0x10, UVC_CT_PRIVACY_CONTROL = 0x11, UVC_CT_FOCUS_SIMPLE_CONTROL = 0x12, UVC_CT_DIGITAL_WINDOW_CONTROL = 0x13,
  UVC_CT_REGION_OF_INTEREST_CONTROL = 0x14
}
 
enum  uvc_device_power_mode { UVC_VC_VIDEO_POWER_MODE_FULL = 0x000b, UVC_VC_VIDEO_POWER_MODE_DEVICE_DEPENDENT = 0x001b }
 
enum  uvc_error {
  UVC_SUCCESS = 0, UVC_ERROR_IO = -1, UVC_ERROR_INVALID_PARAM = -2, UVC_ERROR_ACCESS = -3,
  UVC_ERROR_NO_DEVICE = -4, UVC_ERROR_NOT_FOUND = -5, UVC_ERROR_BUSY = -6, UVC_ERROR_TIMEOUT = -7,
  UVC_ERROR_OVERFLOW = -8, UVC_ERROR_PIPE = -9, UVC_ERROR_INTERRUPTED = -10, UVC_ERROR_NO_MEM = -11,
  UVC_ERROR_NOT_SUPPORTED = -12, UVC_ERROR_INVALID_DEVICE = -50, UVC_ERROR_INVALID_MODE = -51, UVC_ERROR_CALLBACK_EXISTS = -52,
  UVC_ERROR_OTHER = -99
}
 
enum  uvc_et_type { UVC_EXTERNAL_VENDOR_SPECIFIC = 0x0400, UVC_COMPOSITE_CONNECTOR = 0x0401, UVC_SVIDEO_CONNECTOR = 0x0402, UVC_COMPONENT_CONNECTOR = 0x0403 }
 
enum  uvc_it_type { UVC_ITT_VENDOR_SPECIFIC = 0x0200, UVC_ITT_CAMERA = 0x0201, UVC_ITT_MEDIA_TRANSPORT_INPUT = 0x0202 }
 
enum  uvc_ot_type { UVC_OTT_VENDOR_SPECIFIC = 0x0300, UVC_OTT_DISPLAY = 0x0301, UVC_OTT_MEDIA_TRANSPORT_OUTPUT = 0x0302 }
 
enum  uvc_pu_ctrl_selector {
  UVC_PU_CONTROL_UNDEFINED = 0x00, UVC_PU_BACKLIGHT_COMPENSATION_CONTROL = 0x01, UVC_PU_BRIGHTNESS_CONTROL = 0x02, UVC_PU_CONTRAST_CONTROL = 0x03,
  UVC_PU_GAIN_CONTROL = 0x04, UVC_PU_POWER_LINE_FREQUENCY_CONTROL = 0x05, UVC_PU_HUE_CONTROL = 0x06, UVC_PU_SATURATION_CONTROL = 0x07,
  UVC_PU_SHARPNESS_CONTROL = 0x08, UVC_PU_GAMMA_CONTROL = 0x09, UVC_PU_WHITE_BALANCE_TEMPERATURE_CONTROL = 0x0a, UVC_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL = 0x0b,
  UVC_PU_WHITE_BALANCE_COMPONENT_CONTROL = 0x0c, UVC_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL = 0x0d, UVC_PU_DIGITAL_MULTIPLIER_CONTROL = 0x0e, UVC_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL = 0x0f,
  UVC_PU_HUE_AUTO_CONTROL = 0x10, UVC_PU_ANALOG_VIDEO_STANDARD_CONTROL = 0x11, UVC_PU_ANALOG_LOCK_STATUS_CONTROL = 0x12, UVC_PU_CONTRAST_AUTO_CONTROL = 0x13
}
 
enum  uvc_req_code {
  UVC_RC_UNDEFINED = 0x00, UVC_SET_CUR = 0x01, UVC_GET_CUR = 0x81, UVC_GET_MIN = 0x82,
  UVC_GET_MAX = 0x83, UVC_GET_RES = 0x84, UVC_GET_LEN = 0x85, UVC_GET_INFO = 0x86,
  UVC_GET_DEF = 0x87
}
 
enum  uvc_status_attribute { UVC_STATUS_ATTRIBUTE_VALUE_CHANGE = 0x00, UVC_STATUS_ATTRIBUTE_INFO_CHANGE = 0x01, UVC_STATUS_ATTRIBUTE_FAILURE_CHANGE = 0x02, UVC_STATUS_ATTRIBUTE_UNKNOWN = 0xff }
 
enum  uvc_status_class { UVC_STATUS_CLASS_CONTROL = 0x10, UVC_STATUS_CLASS_CONTROL_CAMERA = 0x11, UVC_STATUS_CLASS_CONTROL_PROCESSING = 0x12 }
 
enum  uvc_term_type { UVC_TT_VENDOR_SPECIFIC = 0x0100, UVC_TT_STREAMING = 0x0101 }
 
enum  uvc_vs_desc_subtype {
  UVC_VS_UNDEFINED = 0x00, UVC_VS_INPUT_HEADER = 0x01, UVC_VS_OUTPUT_HEADER = 0x02, UVC_VS_STILL_IMAGE_FRAME = 0x03,
  UVC_VS_FORMAT_UNCOMPRESSED = 0x04, UVC_VS_FRAME_UNCOMPRESSED = 0x05, UVC_VS_FORMAT_MJPEG = 0x06, UVC_VS_FRAME_MJPEG = 0x07,
  UVC_VS_FORMAT_MPEG2TS = 0x0a, UVC_VS_FORMAT_DV = 0x0c, UVC_VS_COLORFORMAT = 0x0d, UVC_VS_FORMAT_FRAME_BASED = 0x10,
  UVC_VS_FRAME_FRAME_BASED = 0x11, UVC_VS_FORMAT_STREAM_BASED = 0x12
}
 

Functions

uvc_frame_tuvc_allocate_frame (size_t data_bytes)
 Allocate a frame structure. More...
 
void uvc_close (uvc_device_handle_t *devh)
 Close a device. More...
 
uvc_error_t uvc_duplicate_frame (uvc_frame_t *in, uvc_frame_t *out)
 Duplicate a frame, preserving color format. More...
 
void uvc_exit (uvc_context_t *ctx)
 Closes the UVC context, shutting down any active cameras. More...
 
uvc_error_t uvc_find_device (uvc_context_t *ctx, uvc_device_t **dev, int vid, int pid, const char *sn)
 Finds a camera identified by vendor, product and/or serial number. More...
 
void uvc_free_device_descriptor (uvc_device_descriptor_t *desc)
 Frees a device descriptor created with uvc_get_device_descriptor. More...
 
void uvc_free_device_list (uvc_device_t **list, uint8_t unref_devices)
 Frees a list of device structures created with uvc_get_device_list. More...
 
void uvc_free_frame (uvc_frame_t *frame)
 Free a frame structure. More...
 
uvc_error_t uvc_get_ae_mode (uvc_device_handle_t *devh, uint8_t *mode, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_ae_priority (uvc_device_handle_t *devh, uint8_t *priority, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_analog_video_lock_status (uvc_device_handle_t *devh, uint8_t *status, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_analog_video_standard (uvc_device_handle_t *devh, uint8_t *video_standard, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_backlight_compensation (uvc_device_handle_t *devh, uint16_t *backlight_compensation, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_brightness (uvc_device_handle_t *devh, int16_t *brightness, enum uvc_req_code req_code)
 
uint8_t uvc_get_bus_number (uvc_device_t *dev)
 Get the number of the bus to which the device is attached. More...
 
uvc_error_t uvc_get_contrast (uvc_device_handle_t *devh, uint16_t *contrast, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_contrast_auto (uvc_device_handle_t *devh, uint8_t *contrast_auto, enum uvc_req_code req_code)
 
int uvc_get_ctrl (uvc_device_handle_t *devh, uint8_t unit, uint8_t ctrl, void *data, int len, enum uvc_req_code req_code)
 Perform a GET_* request from an extension unit. More...
 
int uvc_get_ctrl_len (uvc_device_handle_t *devh, uint8_t unit, uint8_t ctrl)
 Get the length of a control on a terminal or unit. More...
 
uvc_device_tuvc_get_device (uvc_device_handle_t *devh)
 Get the uvc_device_t corresponding to an open device. More...
 
uint8_t uvc_get_device_address (uvc_device_t *dev)
 Get the number assigned to the device within its bus. More...
 
uvc_error_t uvc_get_device_descriptor (uvc_device_t *dev, uvc_device_descriptor_t **desc)
 Get a descriptor that contains the general information about a deviceFree *desc with uvc_free_device_descriptor when you're done. More...
 
uvc_error_t uvc_get_device_list (uvc_context_t *ctx, uvc_device_t ***list)
 Get a list of the UVC devices attached to the system. More...
 
uvc_error_t uvc_get_digital_multiplier (uvc_device_handle_t *devh, uint16_t *multiplier_step, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_digital_multiplier_limit (uvc_device_handle_t *devh, uint16_t *multiplier_step, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_digital_roi (uvc_device_handle_t *devh, uint16_t *roi_top, uint16_t *roi_left, uint16_t *roi_bottom, uint16_t *roi_right, uint16_t *auto_controls, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_digital_window (uvc_device_handle_t *devh, uint16_t *window_top, uint16_t *window_left, uint16_t *window_bottom, uint16_t *window_right, uint16_t *num_steps, uint16_t *num_steps_units, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_exposure_abs (uvc_device_handle_t *devh, uint32_t *time, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_exposure_rel (uvc_device_handle_t *devh, int8_t *step, enum uvc_req_code req_code)
 
const uvc_extension_unit_tuvc_get_extension_units (uvc_device_handle_t *devh)
 Get extension unit descriptors for the open device. More...
 
uvc_error_t uvc_get_focus_abs (uvc_device_handle_t *devh, uint16_t *focus, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_focus_auto (uvc_device_handle_t *devh, uint8_t *state, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_focus_rel (uvc_device_handle_t *devh, int8_t *focus_rel, uint8_t *speed, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_focus_simple_range (uvc_device_handle_t *devh, uint8_t *focus, enum uvc_req_code req_code)
 
const uvc_format_desc_tuvc_get_format_descs (uvc_device_handle_t *)
 Get format descriptions for the open device. More...
 
uvc_error_t uvc_get_gain (uvc_device_handle_t *devh, uint16_t *gain, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_gamma (uvc_device_handle_t *devh, uint16_t *gamma, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_hue (uvc_device_handle_t *devh, int16_t *hue, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_hue_auto (uvc_device_handle_t *devh, uint8_t *hue_auto, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_input_select (uvc_device_handle_t *devh, uint8_t *selector, enum uvc_req_code req_code)
 
const uvc_input_terminal_tuvc_get_input_terminals (uvc_device_handle_t *devh)
 Get input terminal descriptors for the open device. More...
 
uvc_error_t uvc_get_iris_abs (uvc_device_handle_t *devh, uint16_t *iris, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_iris_rel (uvc_device_handle_t *devh, uint8_t *iris_rel, enum uvc_req_code req_code)
 
libusb_device_handle * uvc_get_libusb_handle (uvc_device_handle_t *devh)
 Get the underlying libusb device handle for an open deviceThis can be used to access other interfaces on the same device, e.g. a webcam microphone. More...
 
const uvc_output_terminal_tuvc_get_output_terminals (uvc_device_handle_t *devh)
 Get output terminal descriptors for the open device. More...
 
uvc_error_t uvc_get_pantilt_abs (uvc_device_handle_t *devh, int32_t *pan, int32_t *tilt, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_pantilt_rel (uvc_device_handle_t *devh, int8_t *pan_rel, uint8_t *pan_speed, int8_t *tilt_rel, uint8_t *tilt_speed, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_power_line_frequency (uvc_device_handle_t *devh, uint8_t *power_line_frequency, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_power_mode (uvc_device_handle_t *devh, enum uvc_device_power_mode *mode, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_privacy (uvc_device_handle_t *devh, uint8_t *privacy, enum uvc_req_code req_code)
 
const uvc_processing_unit_tuvc_get_processing_units (uvc_device_handle_t *devh)
 Get processing unit descriptors for the open device. More...
 
uvc_error_t uvc_get_roll_abs (uvc_device_handle_t *devh, int16_t *roll, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_roll_rel (uvc_device_handle_t *devh, int8_t *roll_rel, uint8_t *speed, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_saturation (uvc_device_handle_t *devh, uint16_t *saturation, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_scanning_mode (uvc_device_handle_t *devh, uint8_t *mode, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_sharpness (uvc_device_handle_t *devh, uint16_t *sharpness, enum uvc_req_code req_code)
 
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_get_white_balance_component (uvc_device_handle_t *devh, uint16_t *blue, uint16_t *red, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_white_balance_component_auto (uvc_device_handle_t *devh, uint8_t *white_balance_component_auto, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_white_balance_temperature (uvc_device_handle_t *devh, uint16_t *temperature, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_white_balance_temperature_auto (uvc_device_handle_t *devh, uint8_t *temperature_auto, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_zoom_abs (uvc_device_handle_t *devh, uint16_t *focal_length, enum uvc_req_code req_code)
 
uvc_error_t uvc_get_zoom_rel (uvc_device_handle_t *devh, int8_t *zoom_rel, uint8_t *digital_zoom, uint8_t *speed, enum uvc_req_code req_code)
 
uvc_error_t uvc_init (uvc_context_t **ctx, struct libusb_context *usb_ctx)
 Initializes the UVC context. More...
 
uvc_error_t uvc_open (uvc_device_t *dev, uvc_device_handle_t **devh)
 Open a UVC device, defaulting to the first interface found. More...
 
uvc_error_t uvc_open2 (uvc_device_t *dev, uvc_device_handle_t **devh, int camera_number)
 Open a UVC device, specifying the camera number, zero-based. More...
 
void uvc_perror (uvc_error_t err, const char *msg)
 Print a message explaining an error in the UVC driver. More...
 
void uvc_print_diag (uvc_device_handle_t *devh, FILE *stream)
 Print camera capabilities and configuration. More...
 
void uvc_print_stream_ctrl (uvc_stream_ctrl_t *ctrl, FILE *stream)
 Print the values in a stream control block. More...
 
uvc_error_t uvc_probe_stream_ctrl (uvc_device_handle_t *devh, uvc_stream_ctrl_t *ctrl)
 
void uvc_ref_device (uvc_device_t *dev)
 Increment the reference count for a device. More...
 
uvc_error_t uvc_set_ae_mode (uvc_device_handle_t *devh, uint8_t mode)
 
uvc_error_t uvc_set_ae_priority (uvc_device_handle_t *devh, uint8_t priority)
 
uvc_error_t uvc_set_analog_video_lock_status (uvc_device_handle_t *devh, uint8_t status)
 
uvc_error_t uvc_set_analog_video_standard (uvc_device_handle_t *devh, uint8_t video_standard)
 
uvc_error_t uvc_set_backlight_compensation (uvc_device_handle_t *devh, uint16_t backlight_compensation)
 
uvc_error_t uvc_set_brightness (uvc_device_handle_t *devh, int16_t brightness)
 
uvc_error_t uvc_set_contrast (uvc_device_handle_t *devh, uint16_t contrast)
 
uvc_error_t uvc_set_contrast_auto (uvc_device_handle_t *devh, uint8_t contrast_auto)
 
int uvc_set_ctrl (uvc_device_handle_t *devh, uint8_t unit, uint8_t ctrl, void *data, int len)
 Perform a SET_CUR request to a terminal or unit. More...
 
uvc_error_t uvc_set_digital_multiplier (uvc_device_handle_t *devh, uint16_t multiplier_step)
 
uvc_error_t uvc_set_digital_multiplier_limit (uvc_device_handle_t *devh, uint16_t multiplier_step)
 
uvc_error_t uvc_set_digital_roi (uvc_device_handle_t *devh, uint16_t roi_top, uint16_t roi_left, uint16_t roi_bottom, uint16_t roi_right, uint16_t auto_controls)
 
uvc_error_t uvc_set_digital_window (uvc_device_handle_t *devh, uint16_t window_top, uint16_t window_left, uint16_t window_bottom, uint16_t window_right, uint16_t num_steps, uint16_t num_steps_units)
 
uvc_error_t uvc_set_exposure_abs (uvc_device_handle_t *devh, uint32_t time)
 
uvc_error_t uvc_set_exposure_rel (uvc_device_handle_t *devh, int8_t step)
 
uvc_error_t uvc_set_focus_abs (uvc_device_handle_t *devh, uint16_t focus)
 
uvc_error_t uvc_set_focus_auto (uvc_device_handle_t *devh, uint8_t state)
 
uvc_error_t uvc_set_focus_rel (uvc_device_handle_t *devh, int8_t focus_rel, uint8_t speed)
 
uvc_error_t uvc_set_focus_simple_range (uvc_device_handle_t *devh, uint8_t focus)
 
uvc_error_t uvc_set_gain (uvc_device_handle_t *devh, uint16_t gain)
 
uvc_error_t uvc_set_gamma (uvc_device_handle_t *devh, uint16_t gamma)
 
uvc_error_t uvc_set_hue (uvc_device_handle_t *devh, int16_t hue)
 
uvc_error_t uvc_set_hue_auto (uvc_device_handle_t *devh, uint8_t hue_auto)
 
uvc_error_t uvc_set_input_select (uvc_device_handle_t *devh, uint8_t selector)
 
uvc_error_t uvc_set_iris_abs (uvc_device_handle_t *devh, uint16_t iris)
 
uvc_error_t uvc_set_iris_rel (uvc_device_handle_t *devh, uint8_t iris_rel)
 
uvc_error_t uvc_set_pantilt_abs (uvc_device_handle_t *devh, int32_t pan, int32_t tilt)
 
uvc_error_t uvc_set_pantilt_rel (uvc_device_handle_t *devh, int8_t pan_rel, uint8_t pan_speed, int8_t tilt_rel, uint8_t tilt_speed)
 
uvc_error_t uvc_set_power_line_frequency (uvc_device_handle_t *devh, uint8_t power_line_frequency)
 
uvc_error_t uvc_set_power_mode (uvc_device_handle_t *devh, enum uvc_device_power_mode mode)
 
uvc_error_t uvc_set_privacy (uvc_device_handle_t *devh, uint8_t privacy)
 
uvc_error_t uvc_set_roll_abs (uvc_device_handle_t *devh, int16_t roll)
 
uvc_error_t uvc_set_roll_rel (uvc_device_handle_t *devh, int8_t roll_rel, uint8_t speed)
 
uvc_error_t uvc_set_saturation (uvc_device_handle_t *devh, uint16_t saturation)
 
uvc_error_t uvc_set_scanning_mode (uvc_device_handle_t *devh, uint8_t mode)
 
uvc_error_t uvc_set_sharpness (uvc_device_handle_t *devh, uint16_t sharpness)
 
void uvc_set_status_callback (uvc_device_handle_t *devh, uvc_status_callback_t cb, void *user_ptr)
 Set a callback function to receive status updates. More...
 
uvc_error_t uvc_set_white_balance_component (uvc_device_handle_t *devh, uint16_t blue, uint16_t red)
 
uvc_error_t uvc_set_white_balance_component_auto (uvc_device_handle_t *devh, uint8_t white_balance_component_auto)
 
uvc_error_t uvc_set_white_balance_temperature (uvc_device_handle_t *devh, uint16_t temperature)
 
uvc_error_t uvc_set_white_balance_temperature_auto (uvc_device_handle_t *devh, uint8_t temperature_auto)
 
uvc_error_t uvc_set_zoom_abs (uvc_device_handle_t *devh, uint16_t focal_length)
 
uvc_error_t uvc_set_zoom_rel (uvc_device_handle_t *devh, int8_t zoom_rel, uint8_t digital_zoom, uint8_t speed)
 
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)
 
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 **strmh, 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_start_iso (uvc_stream_handle_t *strmh, uvc_frame_callback_t *cb, void *user_ptr)
 
uvc_error_t uvc_stream_stop (uvc_stream_handle_t *strmh)
 Stop stream.Stops stream, ends threads and cancels pollers. More...
 
const char * uvc_strerror (uvc_error_t err)
 Return a string explaining an error in the UVC driver. More...
 
void uvc_unref_device (uvc_device_t *dev)
 Decrement the reference count for a device device. More...
 

Typedef Documentation

typedef struct uvc_context uvc_context_t

Definition at line 253 of file libuvc.h.

Structure representing a UVC device descriptor.

(This isn't a standard structure.)

typedef struct uvc_device_handle uvc_device_handle_t

Definition at line 268 of file libuvc.h.

typedef struct uvc_device uvc_device_t

Definition at line 260 of file libuvc.h.

Custom processing or camera-control functions

Format descriptor

A "format" determines a stream's image type (e.g., raw YUYV or JPEG) and includes many "frame" configurations.

Frame descriptor

A "frame" is a configuration of a streaming format for a particular image size at one of possibly several available frame rates.

Representation of the interface that brings data into the UVC device

Represents post-capture processing functions

typedef struct uvc_stream_handle uvc_stream_handle_t

Definition at line 276 of file libuvc.h.

Enumeration Type Documentation

Camera terminal control selector (A.9.4)

Enumerator
UVC_CT_CONTROL_UNDEFINED 
UVC_CT_SCANNING_MODE_CONTROL 
UVC_CT_AE_MODE_CONTROL 
UVC_CT_AE_PRIORITY_CONTROL 
UVC_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 
UVC_CT_EXPOSURE_TIME_RELATIVE_CONTROL 
UVC_CT_FOCUS_ABSOLUTE_CONTROL 
UVC_CT_FOCUS_RELATIVE_CONTROL 
UVC_CT_FOCUS_AUTO_CONTROL 
UVC_CT_IRIS_ABSOLUTE_CONTROL 
UVC_CT_IRIS_RELATIVE_CONTROL 
UVC_CT_ZOOM_ABSOLUTE_CONTROL 
UVC_CT_ZOOM_RELATIVE_CONTROL 
UVC_CT_PANTILT_ABSOLUTE_CONTROL 
UVC_CT_PANTILT_RELATIVE_CONTROL 
UVC_CT_ROLL_ABSOLUTE_CONTROL 
UVC_CT_ROLL_RELATIVE_CONTROL 
UVC_CT_PRIVACY_CONTROL 
UVC_CT_FOCUS_SIMPLE_CONTROL 
UVC_CT_DIGITAL_WINDOW_CONTROL 
UVC_CT_REGION_OF_INTEREST_CONTROL 

Definition at line 170 of file libuvc.h.

Enumerator
UVC_VC_VIDEO_POWER_MODE_FULL 
UVC_VC_VIDEO_POWER_MODE_DEVICE_DEPENDENT 

Definition at line 164 of file libuvc.h.

External terminal type (B.4)

Enumerator
UVC_EXTERNAL_VENDOR_SPECIFIC 
UVC_COMPOSITE_CONNECTOR 
UVC_SVIDEO_CONNECTOR 
UVC_COMPONENT_CONNECTOR 

Definition at line 239 of file libuvc.h.

Input terminal type (B.2)

Enumerator
UVC_ITT_VENDOR_SPECIFIC 
UVC_ITT_CAMERA 
UVC_ITT_MEDIA_TRANSPORT_INPUT 

Definition at line 225 of file libuvc.h.

Output terminal type (B.3)

Enumerator
UVC_OTT_VENDOR_SPECIFIC 
UVC_OTT_DISPLAY 
UVC_OTT_MEDIA_TRANSPORT_OUTPUT 

Definition at line 232 of file libuvc.h.

Processing unit control selector (A.9.5)

Enumerator
UVC_PU_CONTROL_UNDEFINED 
UVC_PU_BACKLIGHT_COMPENSATION_CONTROL 
UVC_PU_BRIGHTNESS_CONTROL 
UVC_PU_CONTRAST_CONTROL 
UVC_PU_GAIN_CONTROL 
UVC_PU_POWER_LINE_FREQUENCY_CONTROL 
UVC_PU_HUE_CONTROL 
UVC_PU_SATURATION_CONTROL 
UVC_PU_SHARPNESS_CONTROL 
UVC_PU_GAMMA_CONTROL 
UVC_PU_WHITE_BALANCE_TEMPERATURE_CONTROL 
UVC_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 
UVC_PU_WHITE_BALANCE_COMPONENT_CONTROL 
UVC_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 
UVC_PU_DIGITAL_MULTIPLIER_CONTROL 
UVC_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 
UVC_PU_HUE_AUTO_CONTROL 
UVC_PU_ANALOG_VIDEO_STANDARD_CONTROL 
UVC_PU_ANALOG_LOCK_STATUS_CONTROL 
UVC_PU_CONTRAST_AUTO_CONTROL 

Definition at line 195 of file libuvc.h.

UVC request code (A.8)

Enumerator
UVC_RC_UNDEFINED 
UVC_SET_CUR 
UVC_GET_CUR 
UVC_GET_MIN 
UVC_GET_MAX 
UVC_GET_RES 
UVC_GET_LEN 
UVC_GET_INFO 
UVC_GET_DEF 

Definition at line 152 of file libuvc.h.

Enumerator
UVC_STATUS_ATTRIBUTE_VALUE_CHANGE 
UVC_STATUS_ATTRIBUTE_INFO_CHANGE 
UVC_STATUS_ATTRIBUTE_FAILURE_CHANGE 
UVC_STATUS_ATTRIBUTE_UNKNOWN 

Definition at line 325 of file libuvc.h.

Enumerator
UVC_STATUS_CLASS_CONTROL 
UVC_STATUS_CLASS_CONTROL_CAMERA 
UVC_STATUS_CLASS_CONTROL_PROCESSING 

Definition at line 319 of file libuvc.h.

USB terminal type (B.1)

Enumerator
UVC_TT_VENDOR_SPECIFIC 
UVC_TT_STREAMING 

Definition at line 219 of file libuvc.h.

VideoStreaming interface descriptor subtype (A.6)

Enumerator
UVC_VS_UNDEFINED 
UVC_VS_INPUT_HEADER 
UVC_VS_OUTPUT_HEADER 
UVC_VS_STILL_IMAGE_FRAME 
UVC_VS_FORMAT_UNCOMPRESSED 
UVC_VS_FRAME_UNCOMPRESSED 
UVC_VS_FORMAT_MJPEG 
UVC_VS_FRAME_MJPEG 
UVC_VS_FORMAT_MPEG2TS 
UVC_VS_FORMAT_DV 
UVC_VS_COLORFORMAT 
UVC_VS_FORMAT_FRAME_BASED 
UVC_VS_FRAME_FRAME_BASED 
UVC_VS_FORMAT_STREAM_BASED 

Definition at line 55 of file libuvc.h.

Function Documentation

uvc_error_t uvc_get_ae_mode ( uvc_device_handle_t devh,
uint8_t *  mode,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_ae_priority ( uvc_device_handle_t devh,
uint8_t *  priority,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_analog_video_lock_status ( uvc_device_handle_t devh,
uint8_t *  status,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_analog_video_standard ( uvc_device_handle_t devh,
uint8_t *  video_standard,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_backlight_compensation ( uvc_device_handle_t devh,
uint16_t *  backlight_compensation,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_brightness ( uvc_device_handle_t devh,
int16_t *  brightness,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_contrast ( uvc_device_handle_t devh,
uint16_t *  contrast,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_contrast_auto ( uvc_device_handle_t devh,
uint8_t *  contrast_auto,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_digital_multiplier ( uvc_device_handle_t devh,
uint16_t *  multiplier_step,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_digital_multiplier_limit ( uvc_device_handle_t devh,
uint16_t *  multiplier_step,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_digital_roi ( uvc_device_handle_t devh,
uint16_t *  roi_top,
uint16_t *  roi_left,
uint16_t *  roi_bottom,
uint16_t *  roi_right,
uint16_t *  auto_controls,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_digital_window ( uvc_device_handle_t devh,
uint16_t *  window_top,
uint16_t *  window_left,
uint16_t *  window_bottom,
uint16_t *  window_right,
uint16_t *  num_steps,
uint16_t *  num_steps_units,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_exposure_abs ( uvc_device_handle_t devh,
uint32_t *  time,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_exposure_rel ( uvc_device_handle_t devh,
int8_t *  step,
enum uvc_req_code  req_code 
)
const uvc_extension_unit_t* uvc_get_extension_units ( uvc_device_handle_t devh)

Get extension unit descriptors for the open device.

Note
Do not modify the returned structure.
The returned structure is part of a linked list. Iterate through it by using the 'next' pointers.
Parameters
devhDevice handle to an open UVC device

Definition at line 737 of file dev.c.

uvc_error_t uvc_get_focus_abs ( uvc_device_handle_t devh,
uint16_t *  focus,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_focus_auto ( uvc_device_handle_t devh,
uint8_t *  state,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_focus_rel ( uvc_device_handle_t devh,
int8_t *  focus_rel,
uint8_t *  speed,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_focus_simple_range ( uvc_device_handle_t devh,
uint8_t *  focus,
enum uvc_req_code  req_code 
)
const uvc_format_desc_t* uvc_get_format_descs ( uvc_device_handle_t devh)

Get format descriptions for the open device.

Note
Do not modify the returned structure.
Parameters
devhDevice handle to an open UVC device

Definition at line 1614 of file dev.c.

uvc_error_t uvc_get_gain ( uvc_device_handle_t devh,
uint16_t *  gain,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_gamma ( uvc_device_handle_t devh,
uint16_t *  gamma,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_hue ( uvc_device_handle_t devh,
int16_t *  hue,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_hue_auto ( uvc_device_handle_t devh,
uint8_t *  hue_auto,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_input_select ( uvc_device_handle_t devh,
uint8_t *  selector,
enum uvc_req_code  req_code 
)
const uvc_input_terminal_t* uvc_get_input_terminals ( uvc_device_handle_t devh)

Get input terminal descriptors for the open device.

Note
Do not modify the returned structure.
The returned structure is part of a linked list. Iterate through it by using the 'next' pointers.
Parameters
devhDevice handle to an open UVC device

Definition at line 698 of file dev.c.

uvc_error_t uvc_get_iris_abs ( uvc_device_handle_t devh,
uint16_t *  iris,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_iris_rel ( uvc_device_handle_t devh,
uint8_t *  iris_rel,
enum uvc_req_code  req_code 
)
const uvc_output_terminal_t* uvc_get_output_terminals ( uvc_device_handle_t devh)

Get output terminal descriptors for the open device.

Note
Do not modify the returned structure.
The returned structure is part of a linked list. Iterate through it by using the 'next' pointers.
Parameters
devhDevice handle to an open UVC device

Definition at line 711 of file dev.c.

uvc_error_t uvc_get_pantilt_abs ( uvc_device_handle_t devh,
int32_t *  pan,
int32_t *  tilt,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_pantilt_rel ( uvc_device_handle_t devh,
int8_t *  pan_rel,
uint8_t *  pan_speed,
int8_t *  tilt_rel,
uint8_t *  tilt_speed,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_power_line_frequency ( uvc_device_handle_t devh,
uint8_t *  power_line_frequency,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_power_mode ( uvc_device_handle_t devh,
enum uvc_device_power_mode mode,
enum uvc_req_code  req_code 
)

Definition at line 125 of file ctrl.c.

uvc_error_t uvc_get_privacy ( uvc_device_handle_t devh,
uint8_t *  privacy,
enum uvc_req_code  req_code 
)
const uvc_processing_unit_t* uvc_get_processing_units ( uvc_device_handle_t devh)

Get processing unit descriptors for the open device.

Note
Do not modify the returned structure.
The returned structure is part of a linked list. Iterate through it by using the 'next' pointers.
Parameters
devhDevice handle to an open UVC device

Definition at line 724 of file dev.c.

uvc_error_t uvc_get_roll_abs ( uvc_device_handle_t devh,
int16_t *  roll,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_roll_rel ( uvc_device_handle_t devh,
int8_t *  roll_rel,
uint8_t *  speed,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_saturation ( uvc_device_handle_t devh,
uint16_t *  saturation,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_scanning_mode ( uvc_device_handle_t devh,
uint8_t *  mode,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_sharpness ( uvc_device_handle_t devh,
uint16_t *  sharpness,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_white_balance_component ( uvc_device_handle_t devh,
uint16_t *  blue,
uint16_t *  red,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_white_balance_component_auto ( uvc_device_handle_t devh,
uint8_t *  white_balance_component_auto,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_white_balance_temperature ( uvc_device_handle_t devh,
uint16_t *  temperature,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_white_balance_temperature_auto ( uvc_device_handle_t devh,
uint8_t *  temperature_auto,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_zoom_abs ( uvc_device_handle_t devh,
uint16_t *  focal_length,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_get_zoom_rel ( uvc_device_handle_t devh,
int8_t *  zoom_rel,
uint8_t *  digital_zoom,
uint8_t *  speed,
enum uvc_req_code  req_code 
)
uvc_error_t uvc_probe_stream_ctrl ( uvc_device_handle_t devh,
uvc_stream_ctrl_t ctrl 
)
Todo:
make sure that worked

Definition at line 349 of file stream.c.

uvc_error_t uvc_set_ae_mode ( uvc_device_handle_t devh,
uint8_t  mode 
)
uvc_error_t uvc_set_ae_priority ( uvc_device_handle_t devh,
uint8_t  priority 
)
uvc_error_t uvc_set_analog_video_lock_status ( uvc_device_handle_t devh,
uint8_t  status 
)
uvc_error_t uvc_set_analog_video_standard ( uvc_device_handle_t devh,
uint8_t  video_standard 
)
uvc_error_t uvc_set_backlight_compensation ( uvc_device_handle_t devh,
uint16_t  backlight_compensation 
)
uvc_error_t uvc_set_brightness ( uvc_device_handle_t devh,
int16_t  brightness 
)
uvc_error_t uvc_set_contrast ( uvc_device_handle_t devh,
uint16_t  contrast 
)
uvc_error_t uvc_set_contrast_auto ( uvc_device_handle_t devh,
uint8_t  contrast_auto 
)
uvc_error_t uvc_set_digital_multiplier ( uvc_device_handle_t devh,
uint16_t  multiplier_step 
)
uvc_error_t uvc_set_digital_multiplier_limit ( uvc_device_handle_t devh,
uint16_t  multiplier_step 
)
uvc_error_t uvc_set_digital_roi ( uvc_device_handle_t devh,
uint16_t  roi_top,
uint16_t  roi_left,
uint16_t  roi_bottom,
uint16_t  roi_right,
uint16_t  auto_controls 
)
uvc_error_t uvc_set_digital_window ( uvc_device_handle_t devh,
uint16_t  window_top,
uint16_t  window_left,
uint16_t  window_bottom,
uint16_t  window_right,
uint16_t  num_steps,
uint16_t  num_steps_units 
)
uvc_error_t uvc_set_exposure_abs ( uvc_device_handle_t devh,
uint32_t  time 
)
uvc_error_t uvc_set_exposure_rel ( uvc_device_handle_t devh,
int8_t  step 
)
uvc_error_t uvc_set_focus_abs ( uvc_device_handle_t devh,
uint16_t  focus 
)
uvc_error_t uvc_set_focus_auto ( uvc_device_handle_t devh,
uint8_t  state 
)
uvc_error_t uvc_set_focus_rel ( uvc_device_handle_t devh,
int8_t  focus_rel,
uint8_t  speed 
)
uvc_error_t uvc_set_focus_simple_range ( uvc_device_handle_t devh,
uint8_t  focus 
)
uvc_error_t uvc_set_gain ( uvc_device_handle_t devh,
uint16_t  gain 
)
uvc_error_t uvc_set_gamma ( uvc_device_handle_t devh,
uint16_t  gamma 
)
uvc_error_t uvc_set_hue ( uvc_device_handle_t devh,
int16_t  hue 
)
uvc_error_t uvc_set_hue_auto ( uvc_device_handle_t devh,
uint8_t  hue_auto 
)
uvc_error_t uvc_set_input_select ( uvc_device_handle_t devh,
uint8_t  selector 
)
uvc_error_t uvc_set_iris_abs ( uvc_device_handle_t devh,
uint16_t  iris 
)
uvc_error_t uvc_set_iris_rel ( uvc_device_handle_t devh,
uint8_t  iris_rel 
)
uvc_error_t uvc_set_pantilt_abs ( uvc_device_handle_t devh,
int32_t  pan,
int32_t  tilt 
)
uvc_error_t uvc_set_pantilt_rel ( uvc_device_handle_t devh,
int8_t  pan_rel,
uint8_t  pan_speed,
int8_t  tilt_rel,
uint8_t  tilt_speed 
)
uvc_error_t uvc_set_power_line_frequency ( uvc_device_handle_t devh,
uint8_t  power_line_frequency 
)
uvc_error_t uvc_set_power_mode ( uvc_device_handle_t devh,
enum uvc_device_power_mode  mode 
)

Definition at line 146 of file ctrl.c.

uvc_error_t uvc_set_privacy ( uvc_device_handle_t devh,
uint8_t  privacy 
)
uvc_error_t uvc_set_roll_abs ( uvc_device_handle_t devh,
int16_t  roll 
)
uvc_error_t uvc_set_roll_rel ( uvc_device_handle_t devh,
int8_t  roll_rel,
uint8_t  speed 
)
uvc_error_t uvc_set_saturation ( uvc_device_handle_t devh,
uint16_t  saturation 
)
uvc_error_t uvc_set_scanning_mode ( uvc_device_handle_t devh,
uint8_t  mode 
)
uvc_error_t uvc_set_sharpness ( uvc_device_handle_t devh,
uint16_t  sharpness 
)
uvc_error_t uvc_set_white_balance_component ( uvc_device_handle_t devh,
uint16_t  blue,
uint16_t  red 
)
uvc_error_t uvc_set_white_balance_component_auto ( uvc_device_handle_t devh,
uint8_t  white_balance_component_auto 
)
uvc_error_t uvc_set_white_balance_temperature ( uvc_device_handle_t devh,
uint16_t  temperature 
)
uvc_error_t uvc_set_white_balance_temperature_auto ( uvc_device_handle_t devh,
uint8_t  temperature_auto 
)
uvc_error_t uvc_set_zoom_abs ( uvc_device_handle_t devh,
uint16_t  focal_length 
)
uvc_error_t uvc_set_zoom_rel ( uvc_device_handle_t devh,
int8_t  zoom_rel,
uint8_t  digital_zoom,
uint8_t  speed 
)
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 
)
uvc_error_t uvc_stream_start_iso ( uvc_stream_handle_t strmh,
uvc_frame_callback_t cb,
void user_ptr 
)
void uvc_unref_device ( uvc_device_t dev)

Decrement the reference count for a device device.

Note
If the count reaches zero, the device will be discarded
Parameters
devDevice to unreference

Definition at line 763 of file dev.c.



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