libuvc
Functions
Video capture and processing controls

Functions for manipulating device settings and stream parameters. More...

Functions

uvc_error_t uvc_get_scanning_mode (uvc_device_handle_t *devh, uint8_t *mode, enum uvc_req_code req_code)
 Reads the SCANNING_MODE control. More...
 
uvc_error_t uvc_set_scanning_mode (uvc_device_handle_t *devh, uint8_t mode)
 Sets the SCANNING_MODE control. More...
 
uvc_error_t uvc_get_ae_mode (uvc_device_handle_t *devh, uint8_t *mode, enum uvc_req_code req_code)
 Reads camera's auto-exposure mode. More...
 
uvc_error_t uvc_set_ae_mode (uvc_device_handle_t *devh, uint8_t mode)
 Sets camera's auto-exposure mode. More...
 
uvc_error_t uvc_get_ae_priority (uvc_device_handle_t *devh, uint8_t *priority, enum uvc_req_code req_code)
 Checks whether the camera may vary the frame rate for exposure control reasons. More...
 
uvc_error_t uvc_set_ae_priority (uvc_device_handle_t *devh, uint8_t priority)
 Chooses whether the camera may vary the frame rate for exposure control reasons. More...
 
uvc_error_t uvc_get_exposure_abs (uvc_device_handle_t *devh, uint32_t *time, enum uvc_req_code req_code)
 Gets the absolute exposure time. More...
 
uvc_error_t uvc_set_exposure_abs (uvc_device_handle_t *devh, uint32_t time)
 Sets the absolute exposure time. More...
 
uvc_error_t uvc_get_exposure_rel (uvc_device_handle_t *devh, int8_t *step, enum uvc_req_code req_code)
 Reads the exposure time relative to the current setting. More...
 
uvc_error_t uvc_set_exposure_rel (uvc_device_handle_t *devh, int8_t step)
 Sets the exposure time relative to the current setting. More...
 
uvc_error_t uvc_get_focus_abs (uvc_device_handle_t *devh, uint16_t *focus, enum uvc_req_code req_code)
 Reads the distance at which an object is optimally focused. More...
 
uvc_error_t uvc_set_focus_abs (uvc_device_handle_t *devh, uint16_t focus)
 Sets the distance at which an object is optimally focused. More...
 
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)
 Reads the FOCUS_RELATIVE control. More...
 
uvc_error_t uvc_set_focus_rel (uvc_device_handle_t *devh, int8_t focus_rel, uint8_t speed)
 Sets the FOCUS_RELATIVE control. More...
 
uvc_error_t uvc_get_focus_simple_range (uvc_device_handle_t *devh, uint8_t *focus, enum uvc_req_code req_code)
 Reads the FOCUS_SIMPLE control. More...
 
uvc_error_t uvc_set_focus_simple_range (uvc_device_handle_t *devh, uint8_t focus)
 Sets the FOCUS_SIMPLE control. More...
 
uvc_error_t uvc_get_focus_auto (uvc_device_handle_t *devh, uint8_t *state, enum uvc_req_code req_code)
 Reads the FOCUS_AUTO control. More...
 
uvc_error_t uvc_set_focus_auto (uvc_device_handle_t *devh, uint8_t state)
 Sets the FOCUS_AUTO control. More...
 
uvc_error_t uvc_get_iris_abs (uvc_device_handle_t *devh, uint16_t *iris, enum uvc_req_code req_code)
 Reads the IRIS_ABSOLUTE control. More...
 
uvc_error_t uvc_set_iris_abs (uvc_device_handle_t *devh, uint16_t iris)
 Sets the IRIS_ABSOLUTE control. More...
 
uvc_error_t uvc_get_iris_rel (uvc_device_handle_t *devh, uint8_t *iris_rel, enum uvc_req_code req_code)
 Reads the IRIS_RELATIVE control. More...
 
uvc_error_t uvc_set_iris_rel (uvc_device_handle_t *devh, uint8_t iris_rel)
 Sets the IRIS_RELATIVE control. More...
 
uvc_error_t uvc_get_zoom_abs (uvc_device_handle_t *devh, uint16_t *focal_length, enum uvc_req_code req_code)
 Reads the ZOOM_ABSOLUTE control. More...
 
uvc_error_t uvc_set_zoom_abs (uvc_device_handle_t *devh, uint16_t focal_length)
 Sets the ZOOM_ABSOLUTE control. More...
 
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)
 Reads the ZOOM_RELATIVE control. More...
 
uvc_error_t uvc_set_zoom_rel (uvc_device_handle_t *devh, int8_t zoom_rel, uint8_t digital_zoom, uint8_t speed)
 Sets the ZOOM_RELATIVE control. 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)
 Reads the PANTILT_ABSOLUTE control. More...
 
uvc_error_t uvc_set_pantilt_abs (uvc_device_handle_t *devh, int32_t pan, int32_t tilt)
 Sets the PANTILT_ABSOLUTE control. More...
 
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)
 Reads the PANTILT_RELATIVE control. More...
 
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)
 Sets the PANTILT_RELATIVE control. More...
 
uvc_error_t uvc_get_roll_abs (uvc_device_handle_t *devh, int16_t *roll, enum uvc_req_code req_code)
 Reads the ROLL_ABSOLUTE control. More...
 
uvc_error_t uvc_set_roll_abs (uvc_device_handle_t *devh, int16_t roll)
 Sets the ROLL_ABSOLUTE control. More...
 
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)
 Reads the ROLL_RELATIVE control. More...
 
uvc_error_t uvc_set_roll_rel (uvc_device_handle_t *devh, int8_t roll_rel, uint8_t speed)
 Sets the ROLL_RELATIVE control. More...
 
uvc_error_t uvc_get_privacy (uvc_device_handle_t *devh, uint8_t *privacy, enum uvc_req_code req_code)
 Reads the PRIVACY control. More...
 
uvc_error_t uvc_set_privacy (uvc_device_handle_t *devh, uint8_t privacy)
 Sets the PRIVACY control. More...
 
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)
 Reads the DIGITAL_WINDOW control. More...
 
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)
 Sets the DIGITAL_WINDOW control. More...
 
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)
 Reads the REGION_OF_INTEREST control. More...
 
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)
 Sets the REGION_OF_INTEREST control. More...
 
uvc_error_t uvc_get_backlight_compensation (uvc_device_handle_t *devh, uint16_t *backlight_compensation, enum uvc_req_code req_code)
 Reads the BACKLIGHT_COMPENSATION control. More...
 
uvc_error_t uvc_set_backlight_compensation (uvc_device_handle_t *devh, uint16_t backlight_compensation)
 Sets the BACKLIGHT_COMPENSATION control. More...
 
uvc_error_t uvc_get_brightness (uvc_device_handle_t *devh, int16_t *brightness, enum uvc_req_code req_code)
 Reads the BRIGHTNESS control. More...
 
uvc_error_t uvc_set_brightness (uvc_device_handle_t *devh, int16_t brightness)
 Sets the BRIGHTNESS control. More...
 
uvc_error_t uvc_get_contrast (uvc_device_handle_t *devh, uint16_t *contrast, enum uvc_req_code req_code)
 Reads the CONTRAST control. More...
 
uvc_error_t uvc_set_contrast (uvc_device_handle_t *devh, uint16_t contrast)
 Sets the CONTRAST control. More...
 
uvc_error_t uvc_get_contrast_auto (uvc_device_handle_t *devh, uint8_t *contrast_auto, enum uvc_req_code req_code)
 Reads the CONTRAST_AUTO control. More...
 
uvc_error_t uvc_set_contrast_auto (uvc_device_handle_t *devh, uint8_t contrast_auto)
 Sets the CONTRAST_AUTO control. More...
 
uvc_error_t uvc_get_gain (uvc_device_handle_t *devh, uint16_t *gain, enum uvc_req_code req_code)
 Reads the GAIN control. More...
 
uvc_error_t uvc_set_gain (uvc_device_handle_t *devh, uint16_t gain)
 Sets the GAIN control. More...
 
uvc_error_t uvc_get_power_line_frequency (uvc_device_handle_t *devh, uint8_t *power_line_frequency, enum uvc_req_code req_code)
 Reads the POWER_LINE_FREQUENCY control. More...
 
uvc_error_t uvc_set_power_line_frequency (uvc_device_handle_t *devh, uint8_t power_line_frequency)
 Sets the POWER_LINE_FREQUENCY control. More...
 
uvc_error_t uvc_get_hue (uvc_device_handle_t *devh, int16_t *hue, enum uvc_req_code req_code)
 Reads the HUE control. More...
 
uvc_error_t uvc_set_hue (uvc_device_handle_t *devh, int16_t hue)
 Sets the HUE control. More...
 
uvc_error_t uvc_get_hue_auto (uvc_device_handle_t *devh, uint8_t *hue_auto, enum uvc_req_code req_code)
 Reads the HUE_AUTO control. More...
 
uvc_error_t uvc_set_hue_auto (uvc_device_handle_t *devh, uint8_t hue_auto)
 Sets the HUE_AUTO control. More...
 
uvc_error_t uvc_get_saturation (uvc_device_handle_t *devh, uint16_t *saturation, enum uvc_req_code req_code)
 Reads the SATURATION control. More...
 
uvc_error_t uvc_set_saturation (uvc_device_handle_t *devh, uint16_t saturation)
 Sets the SATURATION control. More...
 
uvc_error_t uvc_get_sharpness (uvc_device_handle_t *devh, uint16_t *sharpness, enum uvc_req_code req_code)
 Reads the SHARPNESS control. More...
 
uvc_error_t uvc_set_sharpness (uvc_device_handle_t *devh, uint16_t sharpness)
 Sets the SHARPNESS control. More...
 
uvc_error_t uvc_get_gamma (uvc_device_handle_t *devh, uint16_t *gamma, enum uvc_req_code req_code)
 Reads the GAMMA control. More...
 
uvc_error_t uvc_set_gamma (uvc_device_handle_t *devh, uint16_t gamma)
 Sets the GAMMA control. More...
 
uvc_error_t uvc_get_white_balance_temperature (uvc_device_handle_t *devh, uint16_t *temperature, enum uvc_req_code req_code)
 Reads the WHITE_BALANCE_TEMPERATURE control. More...
 
uvc_error_t uvc_set_white_balance_temperature (uvc_device_handle_t *devh, uint16_t temperature)
 Sets the WHITE_BALANCE_TEMPERATURE control. More...
 
uvc_error_t uvc_get_white_balance_temperature_auto (uvc_device_handle_t *devh, uint8_t *temperature_auto, enum uvc_req_code req_code)
 Reads the WHITE_BALANCE_TEMPERATURE_AUTO control. More...
 
uvc_error_t uvc_set_white_balance_temperature_auto (uvc_device_handle_t *devh, uint8_t temperature_auto)
 Sets the WHITE_BALANCE_TEMPERATURE_AUTO control. More...
 
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)
 Reads the WHITE_BALANCE_COMPONENT control. More...
 
uvc_error_t uvc_set_white_balance_component (uvc_device_handle_t *devh, uint16_t blue, uint16_t red)
 Sets the WHITE_BALANCE_COMPONENT control. More...
 
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)
 Reads the WHITE_BALANCE_COMPONENT_AUTO control. More...
 
uvc_error_t uvc_set_white_balance_component_auto (uvc_device_handle_t *devh, uint8_t white_balance_component_auto)
 Sets the WHITE_BALANCE_COMPONENT_AUTO control. More...
 
uvc_error_t uvc_get_digital_multiplier (uvc_device_handle_t *devh, uint16_t *multiplier_step, enum uvc_req_code req_code)
 Reads the DIGITAL_MULTIPLIER control. More...
 
uvc_error_t uvc_set_digital_multiplier (uvc_device_handle_t *devh, uint16_t multiplier_step)
 Sets the DIGITAL_MULTIPLIER control. More...
 
uvc_error_t uvc_get_digital_multiplier_limit (uvc_device_handle_t *devh, uint16_t *multiplier_step, enum uvc_req_code req_code)
 Reads the DIGITAL_MULTIPLIER_LIMIT control. More...
 
uvc_error_t uvc_set_digital_multiplier_limit (uvc_device_handle_t *devh, uint16_t multiplier_step)
 Sets the DIGITAL_MULTIPLIER_LIMIT control. More...
 
uvc_error_t uvc_get_analog_video_standard (uvc_device_handle_t *devh, uint8_t *video_standard, enum uvc_req_code req_code)
 Reads the ANALOG_VIDEO_STANDARD control. More...
 
uvc_error_t uvc_set_analog_video_standard (uvc_device_handle_t *devh, uint8_t video_standard)
 Sets the ANALOG_VIDEO_STANDARD control. More...
 
uvc_error_t uvc_get_analog_video_lock_status (uvc_device_handle_t *devh, uint8_t *status, enum uvc_req_code req_code)
 Reads the ANALOG_LOCK_STATUS control. More...
 
uvc_error_t uvc_set_analog_video_lock_status (uvc_device_handle_t *devh, uint8_t status)
 Sets the ANALOG_LOCK_STATUS control. More...
 
uvc_error_t uvc_get_input_select (uvc_device_handle_t *devh, uint8_t *selector, enum uvc_req_code req_code)
 Reads the INPUT_SELECT control. More...
 
uvc_error_t uvc_set_input_select (uvc_device_handle_t *devh, uint8_t selector)
 Sets the INPUT_SELECT control. 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...
 
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_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...
 

Detailed Description

Functions for manipulating device settings and stream parameters.

The uvc_get_* and uvc_set_* functions are used to read and write the settings associated with the device's input, processing and output units.

Function Documentation

◆ uvc_get_scanning_mode()

uvc_error_t uvc_get_scanning_mode ( uvc_device_handle_t *  devh,
uint8_t *  mode,
enum uvc_req_code  req_code 
)

Reads the SCANNING_MODE control.

Parameters
devhUVC device handle
[out]mode0: interlaced, 1: progressive
req_codeUVC_GET_* request to execute

◆ uvc_set_scanning_mode()

uvc_error_t uvc_set_scanning_mode ( uvc_device_handle_t *  devh,
uint8_t  mode 
)

Sets the SCANNING_MODE control.

Parameters
devhUVC device handle
mode0: interlaced, 1: progressive

◆ uvc_get_ae_mode()

uvc_error_t uvc_get_ae_mode ( uvc_device_handle_t *  devh,
uint8_t *  mode,
enum uvc_req_code  req_code 
)

Reads camera's auto-exposure mode.

See uvc_set_ae_mode() for a description of the available modes.

Parameters
devhUVC device handle
[out]mode1: manual mode; 2: auto mode; 4: shutter priority mode; 8: aperture priority mode
req_codeUVC_GET_* request to execute

◆ uvc_set_ae_mode()

uvc_error_t uvc_set_ae_mode ( uvc_device_handle_t *  devh,
uint8_t  mode 
)

Sets camera's auto-exposure mode.

Cameras may support any of the following AE modes:

  • UVC_AUTO_EXPOSURE_MODE_MANUAL (1) - manual exposure time, manual iris
  • UVC_AUTO_EXPOSURE_MODE_AUTO (2) - auto exposure time, auto iris
  • UVC_AUTO_EXPOSURE_MODE_SHUTTER_PRIORITY (4) - manual exposure time, auto iris
  • UVC_AUTO_EXPOSURE_MODE_APERTURE_PRIORITY (8) - auto exposure time, manual iris

Most cameras provide manual mode and aperture priority mode.

Parameters
devhUVC device handle
mode1: manual mode; 2: auto mode; 4: shutter priority mode; 8: aperture priority mode

◆ uvc_get_ae_priority()

uvc_error_t uvc_get_ae_priority ( uvc_device_handle_t *  devh,
uint8_t *  priority,
enum uvc_req_code  req_code 
)

Checks whether the camera may vary the frame rate for exposure control reasons.

See uvc_set_ae_priority() for a description of the priority field.

Parameters
devhUVC device handle
[out]priority0: frame rate must remain constant; 1: frame rate may be varied for AE purposes
req_codeUVC_GET_* request to execute

◆ uvc_set_ae_priority()

uvc_error_t uvc_set_ae_priority ( uvc_device_handle_t *  devh,
uint8_t  priority 
)

Chooses whether the camera may vary the frame rate for exposure control reasons.

A priority value of zero means the camera may not vary its frame rate. A value of 1 means the frame rate is variable. This setting has no effect outside of the auto and shutter_priority auto-exposure modes.

Parameters
devhUVC device handle
priority0: frame rate must remain constant; 1: frame rate may be varied for AE purposes

◆ uvc_get_exposure_abs()

uvc_error_t uvc_get_exposure_abs ( uvc_device_handle_t *  devh,
uint32_t *  time,
enum uvc_req_code  req_code 
)

Gets the absolute exposure time.

See uvc_set_exposure_abs() for a description of the time field.

Parameters
devhUVC device handle
[out]time
req_codeUVC_GET_* request to execute

◆ uvc_set_exposure_abs()

uvc_error_t uvc_set_exposure_abs ( uvc_device_handle_t *  devh,
uint32_t  time 
)

Sets the absolute exposure time.

The time parameter should be provided in units of 0.0001 seconds (e.g., use the value 100 for a 10ms exposure period). Auto exposure should be set to manual or shutter_priority before attempting to change this setting.

Parameters
devhUVC device handle
time

◆ uvc_get_exposure_rel()

uvc_error_t uvc_get_exposure_rel ( uvc_device_handle_t *  devh,
int8_t *  step,
enum uvc_req_code  req_code 
)

Reads the exposure time relative to the current setting.

Parameters
devhUVC device handle
[out]stepnumber of steps by which to change the exposure time, or zero to set the default exposure time
req_codeUVC_GET_* request to execute

◆ uvc_set_exposure_rel()

uvc_error_t uvc_set_exposure_rel ( uvc_device_handle_t *  devh,
int8_t  step 
)

Sets the exposure time relative to the current setting.

Parameters
devhUVC device handle
stepnumber of steps by which to change the exposure time, or zero to set the default exposure time

◆ uvc_get_focus_abs()

uvc_error_t uvc_get_focus_abs ( uvc_device_handle_t *  devh,
uint16_t *  focus,
enum uvc_req_code  req_code 
)

Reads the distance at which an object is optimally focused.

Parameters
devhUVC device handle
[out]focusfocal target distance in millimeters
req_codeUVC_GET_* request to execute

◆ uvc_set_focus_abs()

uvc_error_t uvc_set_focus_abs ( uvc_device_handle_t *  devh,
uint16_t  focus 
)

Sets the distance at which an object is optimally focused.

Parameters
devhUVC device handle
focusfocal target distance in millimeters

◆ uvc_get_focus_rel()

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 
)

Reads the FOCUS_RELATIVE control.

Parameters
devhUVC device handle
[out]focus_relTODO
[out]speedTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_focus_rel()

uvc_error_t uvc_set_focus_rel ( uvc_device_handle_t *  devh,
int8_t  focus_rel,
uint8_t  speed 
)

Sets the FOCUS_RELATIVE control.

Parameters
devhUVC device handle
focus_relTODO
speedTODO

◆ uvc_get_focus_simple_range()

uvc_error_t uvc_get_focus_simple_range ( uvc_device_handle_t *  devh,
uint8_t *  focus,
enum uvc_req_code  req_code 
)

Reads the FOCUS_SIMPLE control.

Parameters
devhUVC device handle
[out]focusTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_focus_simple_range()

uvc_error_t uvc_set_focus_simple_range ( uvc_device_handle_t *  devh,
uint8_t  focus 
)

Sets the FOCUS_SIMPLE control.

Parameters
devhUVC device handle
focusTODO

◆ uvc_get_focus_auto()

uvc_error_t uvc_get_focus_auto ( uvc_device_handle_t *  devh,
uint8_t *  state,
enum uvc_req_code  req_code 
)

Reads the FOCUS_AUTO control.

Parameters
devhUVC device handle
[out]stateTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_focus_auto()

uvc_error_t uvc_set_focus_auto ( uvc_device_handle_t *  devh,
uint8_t  state 
)

Sets the FOCUS_AUTO control.

Parameters
devhUVC device handle
stateTODO

◆ uvc_get_iris_abs()

uvc_error_t uvc_get_iris_abs ( uvc_device_handle_t *  devh,
uint16_t *  iris,
enum uvc_req_code  req_code 
)

Reads the IRIS_ABSOLUTE control.

Parameters
devhUVC device handle
[out]irisTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_iris_abs()

uvc_error_t uvc_set_iris_abs ( uvc_device_handle_t *  devh,
uint16_t  iris 
)

Sets the IRIS_ABSOLUTE control.

Parameters
devhUVC device handle
irisTODO

◆ uvc_get_iris_rel()

uvc_error_t uvc_get_iris_rel ( uvc_device_handle_t *  devh,
uint8_t *  iris_rel,
enum uvc_req_code  req_code 
)

Reads the IRIS_RELATIVE control.

Parameters
devhUVC device handle
[out]iris_relTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_iris_rel()

uvc_error_t uvc_set_iris_rel ( uvc_device_handle_t *  devh,
uint8_t  iris_rel 
)

Sets the IRIS_RELATIVE control.

Parameters
devhUVC device handle
iris_relTODO

◆ uvc_get_zoom_abs()

uvc_error_t uvc_get_zoom_abs ( uvc_device_handle_t *  devh,
uint16_t *  focal_length,
enum uvc_req_code  req_code 
)

Reads the ZOOM_ABSOLUTE control.

Parameters
devhUVC device handle
[out]focal_lengthTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_zoom_abs()

uvc_error_t uvc_set_zoom_abs ( uvc_device_handle_t *  devh,
uint16_t  focal_length 
)

Sets the ZOOM_ABSOLUTE control.

Parameters
devhUVC device handle
focal_lengthTODO

◆ uvc_get_zoom_rel()

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 
)

Reads the ZOOM_RELATIVE control.

Parameters
devhUVC device handle
[out]zoom_relTODO
[out]digital_zoomTODO
[out]speedTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_zoom_rel()

uvc_error_t uvc_set_zoom_rel ( uvc_device_handle_t *  devh,
int8_t  zoom_rel,
uint8_t  digital_zoom,
uint8_t  speed 
)

Sets the ZOOM_RELATIVE control.

Parameters
devhUVC device handle
zoom_relTODO
digital_zoomTODO
speedTODO

◆ uvc_get_pantilt_abs()

uvc_error_t uvc_get_pantilt_abs ( uvc_device_handle_t *  devh,
int32_t *  pan,
int32_t *  tilt,
enum uvc_req_code  req_code 
)

Reads the PANTILT_ABSOLUTE control.

Parameters
devhUVC device handle
[out]panTODO
[out]tiltTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_pantilt_abs()

uvc_error_t uvc_set_pantilt_abs ( uvc_device_handle_t *  devh,
int32_t  pan,
int32_t  tilt 
)

Sets the PANTILT_ABSOLUTE control.

Parameters
devhUVC device handle
panTODO
tiltTODO

◆ uvc_get_pantilt_rel()

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 
)

Reads the PANTILT_RELATIVE control.

Parameters
devhUVC device handle
[out]pan_relTODO
[out]pan_speedTODO
[out]tilt_relTODO
[out]tilt_speedTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_pantilt_rel()

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 
)

Sets the PANTILT_RELATIVE control.

Parameters
devhUVC device handle
pan_relTODO
pan_speedTODO
tilt_relTODO
tilt_speedTODO

◆ uvc_get_roll_abs()

uvc_error_t uvc_get_roll_abs ( uvc_device_handle_t *  devh,
int16_t *  roll,
enum uvc_req_code  req_code 
)

Reads the ROLL_ABSOLUTE control.

Parameters
devhUVC device handle
[out]rollTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_roll_abs()

uvc_error_t uvc_set_roll_abs ( uvc_device_handle_t *  devh,
int16_t  roll 
)

Sets the ROLL_ABSOLUTE control.

Parameters
devhUVC device handle
rollTODO

◆ uvc_get_roll_rel()

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 
)

Reads the ROLL_RELATIVE control.

Parameters
devhUVC device handle
[out]roll_relTODO
[out]speedTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_roll_rel()

uvc_error_t uvc_set_roll_rel ( uvc_device_handle_t *  devh,
int8_t  roll_rel,
uint8_t  speed 
)

Sets the ROLL_RELATIVE control.

Parameters
devhUVC device handle
roll_relTODO
speedTODO

◆ uvc_get_privacy()

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

Reads the PRIVACY control.

Parameters
devhUVC device handle
[out]privacyTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_privacy()

uvc_error_t uvc_set_privacy ( uvc_device_handle_t *  devh,
uint8_t  privacy 
)

Sets the PRIVACY control.

Parameters
devhUVC device handle
privacyTODO

◆ uvc_get_digital_window()

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 
)

Reads the DIGITAL_WINDOW control.

Parameters
devhUVC device handle
[out]window_topTODO
[out]window_leftTODO
[out]window_bottomTODO
[out]window_rightTODO
[out]num_stepsTODO
[out]num_steps_unitsTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_digital_window()

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 
)

Sets the DIGITAL_WINDOW control.

Parameters
devhUVC device handle
window_topTODO
window_leftTODO
window_bottomTODO
window_rightTODO
num_stepsTODO
num_steps_unitsTODO

◆ uvc_get_digital_roi()

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 
)

Reads the REGION_OF_INTEREST control.

Parameters
devhUVC device handle
[out]roi_topTODO
[out]roi_leftTODO
[out]roi_bottomTODO
[out]roi_rightTODO
[out]auto_controlsTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_digital_roi()

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 
)

Sets the REGION_OF_INTEREST control.

Parameters
devhUVC device handle
roi_topTODO
roi_leftTODO
roi_bottomTODO
roi_rightTODO
auto_controlsTODO

◆ uvc_get_backlight_compensation()

uvc_error_t uvc_get_backlight_compensation ( uvc_device_handle_t *  devh,
uint16_t *  backlight_compensation,
enum uvc_req_code  req_code 
)

Reads the BACKLIGHT_COMPENSATION control.

Parameters
devhUVC device handle
[out]backlight_compensationdevice-dependent backlight compensation mode; zero means backlight compensation is disabled
req_codeUVC_GET_* request to execute

◆ uvc_set_backlight_compensation()

uvc_error_t uvc_set_backlight_compensation ( uvc_device_handle_t *  devh,
uint16_t  backlight_compensation 
)

Sets the BACKLIGHT_COMPENSATION control.

Parameters
devhUVC device handle
backlight_compensationdevice-dependent backlight compensation mode; zero means backlight compensation is disabled

◆ uvc_get_brightness()

uvc_error_t uvc_get_brightness ( uvc_device_handle_t *  devh,
int16_t *  brightness,
enum uvc_req_code  req_code 
)

Reads the BRIGHTNESS control.

Parameters
devhUVC device handle
[out]brightnessTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_brightness()

uvc_error_t uvc_set_brightness ( uvc_device_handle_t *  devh,
int16_t  brightness 
)

Sets the BRIGHTNESS control.

Parameters
devhUVC device handle
brightnessTODO

◆ uvc_get_contrast()

uvc_error_t uvc_get_contrast ( uvc_device_handle_t *  devh,
uint16_t *  contrast,
enum uvc_req_code  req_code 
)

Reads the CONTRAST control.

Parameters
devhUVC device handle
[out]contrastTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_contrast()

uvc_error_t uvc_set_contrast ( uvc_device_handle_t *  devh,
uint16_t  contrast 
)

Sets the CONTRAST control.

Parameters
devhUVC device handle
contrastTODO

◆ uvc_get_contrast_auto()

uvc_error_t uvc_get_contrast_auto ( uvc_device_handle_t *  devh,
uint8_t *  contrast_auto,
enum uvc_req_code  req_code 
)

Reads the CONTRAST_AUTO control.

Parameters
devhUVC device handle
[out]contrast_autoTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_contrast_auto()

uvc_error_t uvc_set_contrast_auto ( uvc_device_handle_t *  devh,
uint8_t  contrast_auto 
)

Sets the CONTRAST_AUTO control.

Parameters
devhUVC device handle
contrast_autoTODO

◆ uvc_get_gain()

uvc_error_t uvc_get_gain ( uvc_device_handle_t *  devh,
uint16_t *  gain,
enum uvc_req_code  req_code 
)

Reads the GAIN control.

Parameters
devhUVC device handle
[out]gainTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_gain()

uvc_error_t uvc_set_gain ( uvc_device_handle_t *  devh,
uint16_t  gain 
)

Sets the GAIN control.

Parameters
devhUVC device handle
gainTODO

◆ uvc_get_power_line_frequency()

uvc_error_t uvc_get_power_line_frequency ( uvc_device_handle_t *  devh,
uint8_t *  power_line_frequency,
enum uvc_req_code  req_code 
)

Reads the POWER_LINE_FREQUENCY control.

Parameters
devhUVC device handle
[out]power_line_frequencyTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_power_line_frequency()

uvc_error_t uvc_set_power_line_frequency ( uvc_device_handle_t *  devh,
uint8_t  power_line_frequency 
)

Sets the POWER_LINE_FREQUENCY control.

Parameters
devhUVC device handle
power_line_frequencyTODO

◆ uvc_get_hue()

uvc_error_t uvc_get_hue ( uvc_device_handle_t *  devh,
int16_t *  hue,
enum uvc_req_code  req_code 
)

Reads the HUE control.

Parameters
devhUVC device handle
[out]hueTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_hue()

uvc_error_t uvc_set_hue ( uvc_device_handle_t *  devh,
int16_t  hue 
)

Sets the HUE control.

Parameters
devhUVC device handle
hueTODO

◆ uvc_get_hue_auto()

uvc_error_t uvc_get_hue_auto ( uvc_device_handle_t *  devh,
uint8_t *  hue_auto,
enum uvc_req_code  req_code 
)

Reads the HUE_AUTO control.

Parameters
devhUVC device handle
[out]hue_autoTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_hue_auto()

uvc_error_t uvc_set_hue_auto ( uvc_device_handle_t *  devh,
uint8_t  hue_auto 
)

Sets the HUE_AUTO control.

Parameters
devhUVC device handle
hue_autoTODO

◆ uvc_get_saturation()

uvc_error_t uvc_get_saturation ( uvc_device_handle_t *  devh,
uint16_t *  saturation,
enum uvc_req_code  req_code 
)

Reads the SATURATION control.

Parameters
devhUVC device handle
[out]saturationTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_saturation()

uvc_error_t uvc_set_saturation ( uvc_device_handle_t *  devh,
uint16_t  saturation 
)

Sets the SATURATION control.

Parameters
devhUVC device handle
saturationTODO

◆ uvc_get_sharpness()

uvc_error_t uvc_get_sharpness ( uvc_device_handle_t *  devh,
uint16_t *  sharpness,
enum uvc_req_code  req_code 
)

Reads the SHARPNESS control.

Parameters
devhUVC device handle
[out]sharpnessTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_sharpness()

uvc_error_t uvc_set_sharpness ( uvc_device_handle_t *  devh,
uint16_t  sharpness 
)

Sets the SHARPNESS control.

Parameters
devhUVC device handle
sharpnessTODO

◆ uvc_get_gamma()

uvc_error_t uvc_get_gamma ( uvc_device_handle_t *  devh,
uint16_t *  gamma,
enum uvc_req_code  req_code 
)

Reads the GAMMA control.

Parameters
devhUVC device handle
[out]gammaTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_gamma()

uvc_error_t uvc_set_gamma ( uvc_device_handle_t *  devh,
uint16_t  gamma 
)

Sets the GAMMA control.

Parameters
devhUVC device handle
gammaTODO

◆ uvc_get_white_balance_temperature()

uvc_error_t uvc_get_white_balance_temperature ( uvc_device_handle_t *  devh,
uint16_t *  temperature,
enum uvc_req_code  req_code 
)

Reads the WHITE_BALANCE_TEMPERATURE control.

Parameters
devhUVC device handle
[out]temperatureTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_white_balance_temperature()

uvc_error_t uvc_set_white_balance_temperature ( uvc_device_handle_t *  devh,
uint16_t  temperature 
)

Sets the WHITE_BALANCE_TEMPERATURE control.

Parameters
devhUVC device handle
temperatureTODO

◆ uvc_get_white_balance_temperature_auto()

uvc_error_t uvc_get_white_balance_temperature_auto ( uvc_device_handle_t *  devh,
uint8_t *  temperature_auto,
enum uvc_req_code  req_code 
)

Reads the WHITE_BALANCE_TEMPERATURE_AUTO control.

Parameters
devhUVC device handle
[out]temperature_autoTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_white_balance_temperature_auto()

uvc_error_t uvc_set_white_balance_temperature_auto ( uvc_device_handle_t *  devh,
uint8_t  temperature_auto 
)

Sets the WHITE_BALANCE_TEMPERATURE_AUTO control.

Parameters
devhUVC device handle
temperature_autoTODO

◆ uvc_get_white_balance_component()

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 
)

Reads the WHITE_BALANCE_COMPONENT control.

Parameters
devhUVC device handle
[out]blueTODO
[out]redTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_white_balance_component()

uvc_error_t uvc_set_white_balance_component ( uvc_device_handle_t *  devh,
uint16_t  blue,
uint16_t  red 
)

Sets the WHITE_BALANCE_COMPONENT control.

Parameters
devhUVC device handle
blueTODO
redTODO

◆ uvc_get_white_balance_component_auto()

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 
)

Reads the WHITE_BALANCE_COMPONENT_AUTO control.

Parameters
devhUVC device handle
[out]white_balance_component_autoTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_white_balance_component_auto()

uvc_error_t uvc_set_white_balance_component_auto ( uvc_device_handle_t *  devh,
uint8_t  white_balance_component_auto 
)

Sets the WHITE_BALANCE_COMPONENT_AUTO control.

Parameters
devhUVC device handle
white_balance_component_autoTODO

◆ uvc_get_digital_multiplier()

uvc_error_t uvc_get_digital_multiplier ( uvc_device_handle_t *  devh,
uint16_t *  multiplier_step,
enum uvc_req_code  req_code 
)

Reads the DIGITAL_MULTIPLIER control.

Parameters
devhUVC device handle
[out]multiplier_stepTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_digital_multiplier()

uvc_error_t uvc_set_digital_multiplier ( uvc_device_handle_t *  devh,
uint16_t  multiplier_step 
)

Sets the DIGITAL_MULTIPLIER control.

Parameters
devhUVC device handle
multiplier_stepTODO

◆ uvc_get_digital_multiplier_limit()

uvc_error_t uvc_get_digital_multiplier_limit ( uvc_device_handle_t *  devh,
uint16_t *  multiplier_step,
enum uvc_req_code  req_code 
)

Reads the DIGITAL_MULTIPLIER_LIMIT control.

Parameters
devhUVC device handle
[out]multiplier_stepTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_digital_multiplier_limit()

uvc_error_t uvc_set_digital_multiplier_limit ( uvc_device_handle_t *  devh,
uint16_t  multiplier_step 
)

Sets the DIGITAL_MULTIPLIER_LIMIT control.

Parameters
devhUVC device handle
multiplier_stepTODO

◆ uvc_get_analog_video_standard()

uvc_error_t uvc_get_analog_video_standard ( uvc_device_handle_t *  devh,
uint8_t *  video_standard,
enum uvc_req_code  req_code 
)

Reads the ANALOG_VIDEO_STANDARD control.

Parameters
devhUVC device handle
[out]video_standardTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_analog_video_standard()

uvc_error_t uvc_set_analog_video_standard ( uvc_device_handle_t *  devh,
uint8_t  video_standard 
)

Sets the ANALOG_VIDEO_STANDARD control.

Parameters
devhUVC device handle
video_standardTODO

◆ uvc_get_analog_video_lock_status()

uvc_error_t uvc_get_analog_video_lock_status ( uvc_device_handle_t *  devh,
uint8_t *  status,
enum uvc_req_code  req_code 
)

Reads the ANALOG_LOCK_STATUS control.

Parameters
devhUVC device handle
[out]statusTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_analog_video_lock_status()

uvc_error_t uvc_set_analog_video_lock_status ( uvc_device_handle_t *  devh,
uint8_t  status 
)

Sets the ANALOG_LOCK_STATUS control.

Parameters
devhUVC device handle
statusTODO

◆ uvc_get_input_select()

uvc_error_t uvc_get_input_select ( uvc_device_handle_t *  devh,
uint8_t *  selector,
enum uvc_req_code  req_code 
)

Reads the INPUT_SELECT control.

Parameters
devhUVC device handle
[out]selectorTODO
req_codeUVC_GET_* request to execute

◆ uvc_set_input_select()

uvc_error_t uvc_set_input_select ( uvc_device_handle_t *  devh,
uint8_t  selector 
)

Sets the INPUT_SELECT control.

Parameters
devhUVC device handle
selectorTODO

◆ uvc_get_ctrl_len()

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.

Parameters
devhUVC device handle
unitUnit or Terminal ID; obtain this from the uvc_extension_unit_t describing the extension unit
ctrlVendor-specific control number to query
Returns
On success, the length of the control as reported by the device. Otherwise, a uvc_error_t error describing the error encountered.

◆ uvc_get_ctrl()

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.

Parameters
devhUVC device handle
unitUnit ID; obtain this from the uvc_extension_unit_t describing the extension unit
ctrlControl number to query
dataData buffer to be filled by the device
lenSize of data buffer
req_codeGET_* request to execute
Returns
On success, the number of bytes actually transferred. Otherwise, a uvc_error_t error describing the error encountered.

◆ uvc_set_ctrl()

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.

Parameters
devhUVC device handle
unitUnit or Terminal ID
ctrlControl number to set
dataData buffer to be sent to the device
lenSize of data buffer
Returns
On success, the number of bytes actually transferred. Otherwise, a uvc_error_t error describing the error encountered.