Classes | Macros | Typedefs | Enumerations | Functions | Variables
uvc-types.h File Reference
#include "types.h"
#include <vector>
#include <unordered_map>
Include dependency graph for uvc-types.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  backend_frame
 
struct  uvc_device_descriptor
 
struct  uvc_extension_unit
 
struct  uvc_format
 
struct  uvc_format_desc
 
struct  uvc_frame_desc
 
struct  uvc_input_terminal
 
struct  uvc_processing_unit
 
struct  uvc_selector_unit
 
struct  uvc_stream_ctrl
 

Macros

#define B_TO_BYTE(p)   ((int8_t)(p)[0])
 
#define DW_TO_INT(p)
 
#define INT_TO_DW(i, p)
 
#define QUAD_TO_QW(i, p)
 
#define QW_TO_QUAD(p)
 
#define SHORT_TO_SW(s, p)
 
#define SW_TO_SHORT(p)
 

Typedefs

typedef std::unique_ptr< backend_frame, cleanup_ptrbackend_frame_ptr
 
typedef librealsense::small_heap< backend_frame, 10 > backend_frames_archive
 
typedef single_consumer_queue< backend_frame_ptrbackend_frames_queue
 
typedef void(* cleanup_ptr) (backend_frame *)
 
typedef struct uvc_device_descriptor uvc_device_descriptor_t
 
typedef struct uvc_extension_unit uvc_extension_unit_t
 
typedef struct uvc_format_desc uvc_format_desc_t
 
typedef struct uvc_format uvc_format_t
 
typedef struct uvc_frame_desc uvc_frame_desc_t
 
typedef struct uvc_input_terminal uvc_input_terminal_t
 
typedef struct uvc_processing_unit uvc_processing_unit_t
 
typedef struct uvc_selector_unit uvc_selector_unit_t
 
typedef struct uvc_stream_ctrl uvc_stream_ctrl_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_et_type { UVC_EXTERNAL_VENDOR_SPECIFIC = 0x0400, UVC_COMPOSITE_CONNECTOR = 0x0401, UVC_SVIDEO_CONNECTOR = 0x0402, UVC_COMPONENT_CONNECTOR = 0x0403 }
 
enum  uvc_frame_format {
  UVC_FRAME_FORMAT_UNKNOWN = 0, UVC_FRAME_FORMAT_ANY = 0, UVC_FRAME_FORMAT_UNCOMPRESSED, UVC_FRAME_FORMAT_COMPRESSED,
  UVC_FRAME_FORMAT_YUYV, UVC_FRAME_FORMAT_UYVY, UVC_FRAME_FORMAT_RGB, UVC_FRAME_FORMAT_BGR,
  UVC_FRAME_FORMAT_MJPEG, UVC_FRAME_FORMAT_GRAY8, UVC_FRAME_FORMAT_BY8, UVC_FRAME_FORMAT_COUNT
}
 
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, UVC_REQ_TYPE_GET = 0xa1, UVC_REQ_TYPE_SET = 0x21
}
 
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_vc_ctrl_selector { UVC_VC_CONTROL_UNDEFINED = 0x00, UVC_VC_VIDEO_POWER_MODE_CONTROL = 0x01, UVC_VC_REQUEST_ERROR_CODE_CONTROL = 0x02 }
 
enum  uvc_vc_desc_subtype {
  UVC_VC_DESCRIPTOR_UNDEFINED = 0x00, UVC_VC_HEADER = 0x01, UVC_VC_INPUT_TERMINAL = 0x02, UVC_VC_OUTPUT_TERMINAL = 0x03,
  UVC_VC_SELECTOR_UNIT = 0x04, UVC_VC_PROCESSING_UNIT = 0x05, UVC_VC_EXTENSION_UNIT = 0x06
}
 
enum  uvc_vs_ctrl_selector {
  UVC_VS_CONTROL_UNDEFINED = 0x00, UVC_VS_PROBE_CONTROL = 0x01, UVC_VS_COMMIT_CONTROL = 0x02, UVC_VS_STILL_PROBE_CONTROL = 0x03,
  UVC_VS_STILL_COMMIT_CONTROL = 0x04, UVC_VS_STILL_IMAGE_TRIGGER_CONTROL = 0x05, UVC_VS_STREAM_ERROR_CODE_CONTROL = 0x06, UVC_VS_GENERATE_KEY_FRAME_CONTROL = 0x07,
  UVC_VS_UPDATE_FRAME_SEGMENT_CONTROL = 0x08, UVC_VS_SYNC_DELAY_CONTROL = 0x09
}
 
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

template<typename T >
as (const std::vector< uint8_t > &data, size_t index)
 

Variables

const std::unordered_map< uint32_t, uint32_tfourcc_map
 

Macro Definition Documentation

#define B_TO_BYTE (   p)    ((int8_t)(p)[0])

Converts an unaligned one-byte integer into an int8

Definition at line 12 of file uvc-types.h.

#define DW_TO_INT (   p)
Value:
((uint8_t)(p)[0] | \
((uint8_t)(p)[1] << 8) | \
((uint8_t)(p)[2] << 16) | \
((int8_t)(p)[3] << 24))
GLfloat GLfloat p
Definition: glext.h:12687
unsigned char uint8_t
Definition: stdint.h:78
signed char int8_t
Definition: stdint.h:75

Converts an unaligned four-byte little-endian integer into an int32

Definition at line 19 of file uvc-types.h.

#define INT_TO_DW (   i,
  p 
)
Value:
(p)[0] = (uint8_t)(i); \
(p)[1] = (uint8_t)((i) >> 8); \
(p)[2] = (uint8_t)((i) >> 16); \
(p)[3] = (uint8_t)((i) >> 24);
GLfloat GLfloat p
Definition: glext.h:12687
unsigned char uint8_t
Definition: stdint.h:78
int i

Converts an int32 into an unaligned four-byte little-endian integer

Definition at line 41 of file uvc-types.h.

#define QUAD_TO_QW (   i,
  p 
)
Value:
(p)[0] = (uint8_t)(i); \
(p)[1] = (uint8_t)((i) >> 8); \
(p)[2] = (uint8_t)((i) >> 16); \
(p)[3] = (uint8_t)((i) >> 24); \
(p)[4] = (uint8_t)((i) >> 32); \
(p)[5] = (uint8_t)((i) >> 40); \
(p)[6] = (uint8_t)((i) >> 48); \
(p)[7] = (uint8_t)((i) >> 56); \
GLfloat GLfloat p
Definition: glext.h:12687
unsigned char uint8_t
Definition: stdint.h:78
int i

Converts an int64 into an unaligned eight-byte little-endian integer

Definition at line 48 of file uvc-types.h.

#define QW_TO_QUAD (   p)
Value:
(((uint64_t)(p)[0]) | \
(((uint64_t)(p)[1]) << 8) | \
(((uint64_t)(p)[2]) << 16) | \
(((uint64_t)(p)[3]) << 24) | \
(((uint64_t)(p)[4]) << 32) | \
(((uint64_t)(p)[5]) << 40) | \
(((uint64_t)(p)[6]) << 48) | \
(((int64_t)(p)[7]) << 56))
GLfloat GLfloat p
Definition: glext.h:12687
unsigned __int64 uint64_t
Definition: stdint.h:90
signed __int64 int64_t
Definition: stdint.h:89

Converts an unaligned eight-byte little-endian integer into an int64

Definition at line 25 of file uvc-types.h.

#define SHORT_TO_SW (   s,
  p 
)
Value:
(p)[0] = (uint8_t)(s); \
(p)[1] = (uint8_t)((s) >> 8);
GLdouble s
GLfloat GLfloat p
Definition: glext.h:12687
unsigned char uint8_t
Definition: stdint.h:78

Converts an int16 into an unaligned two-byte little-endian integer

Definition at line 36 of file uvc-types.h.

#define SW_TO_SHORT (   p)
Value:
((uint8_t)(p)[0] | \
((int8_t)(p)[1] << 8))
GLfloat GLfloat p
Definition: glext.h:12687
unsigned char uint8_t
Definition: stdint.h:78
signed char int8_t
Definition: stdint.h:75

Converts an unaligned two-byte little-endian integer into an int16

Definition at line 15 of file uvc-types.h.

Typedef Documentation

typedef std::unique_ptr<backend_frame, cleanup_ptr> backend_frame_ptr

Definition at line 440 of file uvc-types.h.

Definition at line 417 of file uvc-types.h.

Definition at line 441 of file uvc-types.h.

typedef void(* cleanup_ptr) (backend_frame *)

Definition at line 437 of file uvc-types.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.

typedef struct uvc_format uvc_format_t

Represents post-capture processing functions

Represents selector unit to connect other units

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 145 of file uvc-types.h.

External terminal type (B.4)

Enumerator
UVC_EXTERNAL_VENDOR_SPECIFIC 
UVC_COMPOSITE_CONNECTOR 
UVC_SVIDEO_CONNECTOR 
UVC_COMPONENT_CONNECTOR 

Definition at line 214 of file uvc-types.h.

Color coding of stream, transport-independent

Enumerator
UVC_FRAME_FORMAT_UNKNOWN 
UVC_FRAME_FORMAT_ANY 

Any supported format

UVC_FRAME_FORMAT_UNCOMPRESSED 
UVC_FRAME_FORMAT_COMPRESSED 
UVC_FRAME_FORMAT_YUYV 

YUYV/YUV2/YUV422: YUV encoding with one luminance value per pixel and one UV (chrominance) pair for every two pixels.

UVC_FRAME_FORMAT_UYVY 
UVC_FRAME_FORMAT_RGB 

24-bit RGB

UVC_FRAME_FORMAT_BGR 
UVC_FRAME_FORMAT_MJPEG 

Motion-JPEG (or JPEG) encoded images

UVC_FRAME_FORMAT_GRAY8 
UVC_FRAME_FORMAT_BY8 
UVC_FRAME_FORMAT_COUNT 

Number of formats understood

Definition at line 71 of file uvc-types.h.

Input terminal type (B.2)

Enumerator
UVC_ITT_VENDOR_SPECIFIC 
UVC_ITT_CAMERA 
UVC_ITT_MEDIA_TRANSPORT_INPUT 

Definition at line 200 of file uvc-types.h.

Output terminal type (B.3)

Enumerator
UVC_OTT_VENDOR_SPECIFIC 
UVC_OTT_DISPLAY 
UVC_OTT_MEDIA_TRANSPORT_OUTPUT 

Definition at line 207 of file uvc-types.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 170 of file uvc-types.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 
UVC_REQ_TYPE_GET 
UVC_REQ_TYPE_SET 

Definition at line 123 of file uvc-types.h.

Enumerator
UVC_STATUS_ATTRIBUTE_VALUE_CHANGE 
UVC_STATUS_ATTRIBUTE_INFO_CHANGE 
UVC_STATUS_ATTRIBUTE_FAILURE_CHANGE 
UVC_STATUS_ATTRIBUTE_UNKNOWN 

Definition at line 227 of file uvc-types.h.

Enumerator
UVC_STATUS_CLASS_CONTROL 
UVC_STATUS_CLASS_CONTROL_CAMERA 
UVC_STATUS_CLASS_CONTROL_PROCESSING 

Definition at line 221 of file uvc-types.h.

USB terminal type (B.1)

Enumerator
UVC_TT_VENDOR_SPECIFIC 
UVC_TT_STREAMING 

Definition at line 194 of file uvc-types.h.

VideoControl interface control selector (A.9.1)

Enumerator
UVC_VC_CONTROL_UNDEFINED 
UVC_VC_VIDEO_POWER_MODE_CONTROL 
UVC_VC_REQUEST_ERROR_CODE_CONTROL 

Definition at line 138 of file uvc-types.h.

VideoControl interface descriptor subtype (A.5)

Enumerator
UVC_VC_DESCRIPTOR_UNDEFINED 
UVC_VC_HEADER 
UVC_VC_INPUT_TERMINAL 
UVC_VC_OUTPUT_TERMINAL 
UVC_VC_SELECTOR_UNIT 
UVC_VC_PROCESSING_UNIT 
UVC_VC_EXTENSION_UNIT 

Definition at line 94 of file uvc-types.h.

Enumerator
UVC_VS_CONTROL_UNDEFINED 
UVC_VS_PROBE_CONTROL 
UVC_VS_COMMIT_CONTROL 
UVC_VS_STILL_PROBE_CONTROL 
UVC_VS_STILL_COMMIT_CONTROL 
UVC_VS_STILL_IMAGE_TRIGGER_CONTROL 
UVC_VS_STREAM_ERROR_CODE_CONTROL 
UVC_VS_GENERATE_KEY_FRAME_CONTROL 
UVC_VS_UPDATE_FRAME_SEGMENT_CONTROL 
UVC_VS_SYNC_DELAY_CONTROL 

Definition at line 234 of file uvc-types.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 105 of file uvc-types.h.

Function Documentation

template<typename T >
T as ( const std::vector< uint8_t > &  data,
size_t  index 
)

Definition at line 407 of file uvc-types.h.

Variable Documentation

const std::unordered_map<uint32_t, uint32_t> fourcc_map
Initial value:
= {
{ 0x59382020, 0x47524559 },
{ 0x52573130, 0x70524141 },
{ 0x32000000, 0x47524559 },
{ 0x50000000, 0x5a313620 },
{ 0x52415738, 0x47524559 },
{ 0x52573136, 0x42595232 }
}

Definition at line 59 of file uvc-types.h.



librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:30