1 /* 2 * Copyright (c) 2015 - 2016, Freescale Semiconductor, Inc. 3 * Copyright 2016 NXP 4 * All rights reserved. 5 * 6 * SPDX-License-Identifier: BSD-3-Clause 7 */ 8 9 #ifndef __USB_DEVICE_VIDEO_H__ 10 #define __USB_DEVICE_VIDEO_H__ 11 12 /*! 13 * @addtogroup usb_device_video_drv 14 * @{ 15 */ 16 17 /******************************************************************************* 18 * Definitions 19 ******************************************************************************/ 20 21 /*! 22 * @name USB Video class codes 23 * @{ 24 */ 25 26 /*! @brief Video device class code */ 27 #define USB_DEVICE_VIDEO_CC_VIDEO (0x0EU) 28 29 /*! @brief Video device subclass code */ 30 #define USB_DEVICE_VIDEO_SC_UNDEFINED (0x00U) 31 #define USB_DEVICE_VIDEO_SC_VIDEOCONTROL (0x01U) 32 #define USB_DEVICE_VIDEO_SC_VIDEOSTREAMING (0x02U) 33 #define USB_DEVICE_VIDEO_SC_VIDEO_INTERFACE_COLLECTION (0x03U) 34 35 /*! @brief Video device protocol code */ 36 #define USB_DEVICE_VIDEO_PC_PROTOCOL_UNDEFINED (0x00U) 37 #define USB_DEVICE_VIDEO_PC_PROTOCOL_15 (0x01U) 38 39 /*! @brief Video device class-specific descriptor type */ 40 #define USB_DESCRIPTOR_TYPE_VIDEO_CS_UNDEFINED (0x20U) 41 #define USB_DESCRIPTOR_TYPE_VIDEO_CS_DEVICE (0x21U) 42 #define USB_DESCRIPTOR_TYPE_VIDEO_CS_CONFIGURATION (0x22U) 43 #define USB_DESCRIPTOR_TYPE_VIDEO_CS_STRING (0x23U) 44 #define USB_DESCRIPTOR_TYPE_VIDEO_CS_INTERFACE (0x24U) 45 #define USB_DESCRIPTOR_TYPE_VIDEO_CS_ENDPOINT (0x25U) 46 47 /*! @brief Video device class-specific VC interface descriptor subtype */ 48 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VC_DESCRIPTOR_UNDEFINED (0x00U) 49 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VC_HEADER (0x01U) 50 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VC_INPUT_TERMINAL (0x02U) 51 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VC_OUTPUT_TERMINAL (0x03U) 52 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VC_SELECTOR_UNIT (0x04U) 53 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VC_PROCESSING_UNIT (0x05U) 54 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VC_EXTENSION_UNIT (0x06U) 55 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VC_ENCODING_UNIT (0x07U) 56 57 /*! @brief Video device class-specific VS interface descriptor subtype */ 58 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_UNDEFINED (0x00U) 59 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_INPUT_HEADER (0x01U) 60 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_OUTPUT_HEADER (0x02U) 61 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_STILL_IMAGE_FRAME (0x03U) 62 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FORMAT_UNCOMPRESSED (0x04U) 63 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FRAME_UNCOMPRESSED (0x05U) 64 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FORMAT_MJPEG (0x06U) 65 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FRAME_MJPEG (0x07U) 66 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FORMAT_MPEG2TS (0x0AU) 67 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FORMAT_DV (0x0CU) 68 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_COLORFORMAT (0x0DU) 69 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FORMAT_FRAME_BASED (0x10U) 70 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FRAME_FRAME_BASED (0x11U) 71 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FORMAT_STREAM_BASED (0x12U) 72 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FORMAT_H264 (0x13U) 73 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FRAME_H264 (0x14U) 74 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FORMAT_H264_SIMULCAST (0x15U) 75 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FORMAT_VP8 (0x16U) 76 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FRAME_VP8 (0x17U) 77 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_VS_FORMAT_VP8_SIMULCAST (0x18U) 78 79 /*! @brief Video device class-specific VC endpoint descriptor subtype */ 80 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_EP_UNDEFINED (0x00U) 81 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_EP_GENERAL (0x01U) 82 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_EP_ENDPOINT (0x02U) 83 #define USB_DESCRIPTOR_SUBTYPE_VIDEO_EP_INTERRUPT (0x03U) 84 85 /*! @brief Video device class-specific request code */ 86 #define USB_DEVICE_VIDEO_REQUEST_CODE_UNDEFINED (0x00U) 87 #define USB_DEVICE_VIDEO_REQUEST_CODE_SET_CUR (0x01U) 88 #define USB_DEVICE_VIDEO_REQUEST_CODE_SET_CUR_ALL (0x11U) 89 #define USB_DEVICE_VIDEO_REQUEST_CODE_GET_CUR (0x81U) 90 #define USB_DEVICE_VIDEO_REQUEST_CODE_GET_MIN (0x82U) 91 #define USB_DEVICE_VIDEO_REQUEST_CODE_GET_MAX (0x83U) 92 #define USB_DEVICE_VIDEO_REQUEST_CODE_GET_RES (0x84U) 93 #define USB_DEVICE_VIDEO_REQUEST_CODE_GET_LEN (0x85U) 94 #define USB_DEVICE_VIDEO_REQUEST_CODE_GET_INFO (0x86U) 95 #define USB_DEVICE_VIDEO_REQUEST_CODE_GET_DEF (0x87U) 96 #define USB_DEVICE_VIDEO_REQUEST_CODE_GET_CUR_ALL (0x91U) 97 #define USB_DEVICE_VIDEO_REQUEST_CODE_GET_MIN_ALL (0x92U) 98 #define USB_DEVICE_VIDEO_REQUEST_CODE_GET_MAX_ALL (0x93U) 99 #define USB_DEVICE_VIDEO_REQUEST_CODE_GET_RES_ALL (0x94U) 100 #define USB_DEVICE_VIDEO_REQUEST_CODE_GET_DEF_ALL (0x97U) 101 102 /*! @brief Video device class-specific VideoControl interface control selector */ 103 #define USB_DEVICE_VIDEO_VC_CONTROL_UNDEFINED (0x00U) 104 #define USB_DEVICE_VIDEO_VC_VIDEO_POWER_MODE_CONTROL (0x01U) 105 #define USB_DEVICE_VIDEO_VC_REQUEST_ERROR_CODE_CONTROL (0x02U) 106 107 /*! @brief Video device class-specific Terminal control selector */ 108 #define USB_DEVICE_VIDEO_TE_CONTROL_UNDEFINED (0x00U) 109 110 /*! @brief Video device class-specific Selector Unit control selector */ 111 #define USB_DEVICE_VIDEO_SU_CONTROL_UNDEFINED (0x00U) 112 #define USB_DEVICE_VIDEO_SU_INPUT_SELECT_CONTROL (0x01U) 113 114 /*! @brief Video device class-specific Camera Terminal control selector */ 115 #define USB_DEVICE_VIDEO_CT_CONTROL_UNDEFINED (0x00U) 116 #define USB_DEVICE_VIDEO_CT_SCANNING_MODE_CONTROL (0x01U) 117 #define USB_DEVICE_VIDEO_CT_AE_MODE_CONTROL (0x02U) 118 #define USB_DEVICE_VIDEO_CT_AE_PRIORITY_CONTROL (0x03U) 119 #define USB_DEVICE_VIDEO_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL (0x04U) 120 #define USB_DEVICE_VIDEO_CT_EXPOSURE_TIME_RELATIVE_CONTROL (0x05U) 121 #define USB_DEVICE_VIDEO_CT_FOCUS_ABSOLUTE_CONTROL (0x06U) 122 #define USB_DEVICE_VIDEO_CT_FOCUS_RELATIVE_CONTROL (0x07U) 123 #define USB_DEVICE_VIDEO_CT_FOCUS_AUTO_CONTROL (0x08U) 124 #define USB_DEVICE_VIDEO_CT_IRIS_ABSOLUTE_CONTROL (0x09U) 125 #define USB_DEVICE_VIDEO_CT_IRIS_RELATIVE_CONTROL (0x0AU) 126 #define USB_DEVICE_VIDEO_CT_ZOOM_ABSOLUTE_CONTROL (0x0BU) 127 #define USB_DEVICE_VIDEO_CT_ZOOM_RELATIVE_CONTROL (0x0CU) 128 #define USB_DEVICE_VIDEO_CT_PANTILT_ABSOLUTE_CONTROL (0x0DU) 129 #define USB_DEVICE_VIDEO_CT_PANTILT_RELATIVE_CONTROL (0x0EU) 130 #define USB_DEVICE_VIDEO_CT_ROLL_ABSOLUTE_CONTROL (0x0FU) 131 #define USB_DEVICE_VIDEO_CT_ROLL_RELATIVE_CONTROL (0x10U) 132 #define USB_DEVICE_VIDEO_CT_PRIVACY_CONTROL (0x11U) 133 #define USB_DEVICE_VIDEO_CT_FOCUS_SIMPLE_CONTROL (0x12U) 134 #define USB_DEVICE_VIDEO_CT_WINDOW_CONTROL (0x13U) 135 #define USB_DEVICE_VIDEO_CT_REGION_OF_INTEREST_CONTROL (0x14U) 136 137 /*! @brief Video device class-specific Processing Unit control selector */ 138 #define USB_DEVICE_VIDEO_PU_CONTROL_UNDEFINED (0x00U) 139 #define USB_DEVICE_VIDEO_PU_BACKLIGHT_COMPENSATION_CONTROL (0x01U) 140 #define USB_DEVICE_VIDEO_PU_BRIGHTNESS_CONTROL (0x02U) 141 #define USB_DEVICE_VIDEO_PU_CONTRAST_CONTROL (0x03U) 142 #define USB_DEVICE_VIDEO_PU_GAIN_CONTROL (0x04U) 143 #define USB_DEVICE_VIDEO_PU_POWER_LINE_FREQUENCY_CONTROL (0x05U) 144 #define USB_DEVICE_VIDEO_PU_HUE_CONTROL (0x06U) 145 #define USB_DEVICE_VIDEO_PU_SATURATION_CONTROL (0x07U) 146 #define USB_DEVICE_VIDEO_PU_SHARPNESS_CONTROL (0x08U) 147 #define USB_DEVICE_VIDEO_PU_GAMMA_CONTROL (0x09U) 148 #define USB_DEVICE_VIDEO_PU_WHITE_BALANCE_TEMPERATURE_CONTROL (0x0AU) 149 #define USB_DEVICE_VIDEO_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL (0x0BU) 150 #define USB_DEVICE_VIDEO_PU_WHITE_BALANCE_COMPONENT_CONTROL (0x0CU) 151 #define USB_DEVICE_VIDEO_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL (0x0DU) 152 #define USB_DEVICE_VIDEO_PU_DIGITAL_MULTIPLIER_CONTROL (0x0EU) 153 #define USB_DEVICE_VIDEO_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL (0x0FU) 154 #define USB_DEVICE_VIDEO_PU_HUE_AUTO_CONTROL (0x10U) 155 #define USB_DEVICE_VIDEO_PU_ANALOG_VIDEO_STANDARD_CONTROL (0x11U) 156 #define USB_DEVICE_VIDEO_PU_ANALOG_LOCK_STATUS_CONTROL (0x12U) 157 #define USB_DEVICE_VIDEO_PU_CONTRAST_AUTO_CONTROL (0x13U) 158 159 /*! @brief Video device class-specific Encoding Unit control selector */ 160 #define USB_DEVICE_VIDEO_EU_CONTROL_UNDEFINED (0x00U) 161 #define USB_DEVICE_VIDEO_EU_SELECT_LAYER_CONTROL (0x01U) 162 #define USB_DEVICE_VIDEO_EU_PROFILE_TOOLSET_CONTROL (0x02U) 163 #define USB_DEVICE_VIDEO_EU_VIDEO_RESOLUTION_CONTROL (0x03U) 164 #define USB_DEVICE_VIDEO_EU_MIN_FRAME_INTERVAL_CONTROL (0x04U) 165 #define USB_DEVICE_VIDEO_EU_SLICE_MODE_CONTROL (0x05U) 166 #define USB_DEVICE_VIDEO_EU_RATE_CONTROL_MODE_CONTROL (0x06U) 167 #define USB_DEVICE_VIDEO_EU_AVERAGE_BITRATE_CONTROL (0x07U) 168 #define USB_DEVICE_VIDEO_EU_CPB_SIZE_CONTROL (0x08U) 169 #define USB_DEVICE_VIDEO_EU_PEAK_BIT_RATE_CONTROL (0x09U) 170 #define USB_DEVICE_VIDEO_EU_QUANTIZATION_PARAMS_CONTROL (0x0AU) 171 #define USB_DEVICE_VIDEO_EU_SYNC_REF_FRAME_CONTROL (0x0BU) 172 #define USB_DEVICE_VIDEO_EU_LTR_BUFFER_ CONTROL(0x0CU) 173 #define USB_DEVICE_VIDEO_EU_LTR_PICTURE_CONTROL (0x0DU) 174 #define USB_DEVICE_VIDEO_EU_LTR_VALIDATION_CONTROL (0x0EU) 175 #define USB_DEVICE_VIDEO_EU_LEVEL_IDC_LIMIT_CONTROL (0x0FU) 176 #define USB_DEVICE_VIDEO_EU_SEI_PAYLOADTYPE_CONTROL (0x10U) 177 #define USB_DEVICE_VIDEO_EU_QP_RANGE_CONTROL (0x11U) 178 #define USB_DEVICE_VIDEO_EU_PRIORITY_CONTROL (0x12U) 179 #define USB_DEVICE_VIDEO_EU_START_OR_STOP_LAYER_CONTROL (0x13U) 180 #define USB_DEVICE_VIDEO_EU_ERROR_RESILIENCY_CONTROL (0x14U) 181 182 /*! @brief Video device class-specific Extension Unit control selector */ 183 #define USB_DEVICE_VIDEO_XU_CONTROL_UNDEFINED (0x00U) 184 185 /*! @brief Video device class-specific VideoStreaming Interface control selector */ 186 #define USB_DEVICE_VIDEO_VS_CONTROL_UNDEFINED (0x00U) 187 #define USB_DEVICE_VIDEO_VS_PROBE_CONTROL (0x01U) 188 #define USB_DEVICE_VIDEO_VS_COMMIT_CONTROL (0x02U) 189 #define USB_DEVICE_VIDEO_VS_STILL_PROBE_CONTROL (0x03U) 190 #define USB_DEVICE_VIDEO_VS_STILL_COMMIT_CONTROL (0x04U) 191 #define USB_DEVICE_VIDEO_VS_STILL_IMAGE_TRIGGER_CONTROL (0x05U) 192 #define USB_DEVICE_VIDEO_VS_STREAM_ERROR_CODE_CONTROL (0x06U) 193 #define USB_DEVICE_VIDEO_VS_GENERATE_KEY_FRAME_CONTROL (0x07U) 194 #define USB_DEVICE_VIDEO_VS_UPDATE_FRAME_SEGMENT_CONTROL (0x08U) 195 #define USB_DEVICE_VIDEO_VS_SYNCH_DELAY_CONTROL (0x09U) 196 197 /*! @}*/ 198 199 /*! 200 * @name USB Video class terminal types 201 * @{ 202 */ 203 204 /*! @brief Video device USB terminal type */ 205 #define USB_DEVICE_VIDEO_TT_VENDOR_SPECIFIC (0x0100U) 206 #define USB_DEVICE_VIDEO_TT_STREAMING (0x0101U) 207 208 /*! @brief Video device input terminal type */ 209 #define USB_DEVICE_VIDEO_ITT_VENDOR_SPECIFIC (0x0200U) 210 #define USB_DEVICE_VIDEO_ITT_CAMERA (0x0201U) 211 #define USB_DEVICE_VIDEO_ITT_MEDIA_TRANSPORT_INPUT (0x0202U) 212 213 /*! @brief Video device output terminal type */ 214 #define USB_DEVICE_VIDEO_OTT_VENDOR_SPECIFIC (0x0300U) 215 #define USB_DEVICE_VIDEO_OTT_DISPLAY (0x0301U) 216 #define USB_DEVICE_VIDEO_OTT_MEDIA_TRANSPORT_OUTPUT (0x0302U) 217 218 /*! @brief Video device external terminal type */ 219 #define USB_DEVICE_VIDEO_ET_VENDOR_SPECIFIC (0x0400U) 220 #define USB_DEVICE_VIDEO_ET_COMPOSITE_CONNECTOR (0x0401U) 221 #define USB_DEVICE_VIDEO_ET_SVIDEO_CONNECTOR (0x0402U) 222 #define USB_DEVICE_VIDEO_ET_COMPONENT_CONNECTOR (0x0403U) 223 224 /*! @}*/ 225 226 /*! 227 * @name USB Video class setup request types 228 * @{ 229 */ 230 231 /*! @brief Video device class setup request set type */ 232 #define USB_DEVICE_VIDEO_SET_REQUEST_INTERFACE (0x21U) 233 #define USB_DEVICE_VIDEO_SET_REQUEST_ENDPOINT (0x22U) 234 235 /*! @brief Video device class setup request get type */ 236 #define USB_DEVICE_VIDEO_GET_REQUEST_INTERFACE (0xA1U) 237 #define USB_DEVICE_VIDEO_GET_REQUEST_ENDPOINT (0xA2U) 238 239 /*! @}*/ 240 241 /*! @brief Video device still image trigger control */ 242 #define USB_DEVICE_VIDEO_STILL_IMAGE_TRIGGER_NORMAL_OPERATION (0x00U) 243 #define USB_DEVICE_VIDEO_STILL_IMAGE_TRIGGER_TRANSMIT_STILL_IMAGE (0x01U) 244 #define USB_DEVICE_VIDEO_STILL_IMAGE_TRIGGER_TRANSMIT_STILL_IMAGE_VS_DEDICATED_BULK_PIPE (0x02U) 245 #define USB_DEVICE_VIDEO_STILL_IMAGE_TRIGGER_ABORT_STILL_IMAGE_TRANSMISSION (0x03U) 246 247 /*! 248 * @name USB Video device class-specific request commands 249 * @{ 250 */ 251 252 /*! @brief Video device class-specific request GET CUR COMMAND */ 253 #define USB_DEVICE_VIDEO_GET_CUR_VC_POWER_MODE_CONTROL (0x8101U) 254 #define USB_DEVICE_VIDEO_GET_CUR_VC_ERROR_CODE_CONTROL (0x8102U) 255 256 #define USB_DEVICE_VIDEO_GET_CUR_PU_BACKLIGHT_COMPENSATION_CONTROL (0x8121U) 257 #define USB_DEVICE_VIDEO_GET_CUR_PU_BRIGHTNESS_CONTROL (0x8122U) 258 #define USB_DEVICE_VIDEO_GET_CUR_PU_CONTRACT_CONTROL (0x8123U) 259 #define USB_DEVICE_VIDEO_GET_CUR_PU_GAIN_CONTROL (0x8124U) 260 #define USB_DEVICE_VIDEO_GET_CUR_PU_POWER_LINE_FREQUENCY_CONTROL (0x8125U) 261 #define USB_DEVICE_VIDEO_GET_CUR_PU_HUE_CONTROL (0x8126U) 262 #define USB_DEVICE_VIDEO_GET_CUR_PU_SATURATION_CONTROL (0x8127U) 263 #define USB_DEVICE_VIDEO_GET_CUR_PU_SHARRNESS_CONTROL (0x8128U) 264 #define USB_DEVICE_VIDEO_GET_CUR_PU_GAMMA_CONTROL (0x8129U) 265 #define USB_DEVICE_VIDEO_GET_CUR_PU_WHITE_BALANCE_TEMPERATURE_CONTROL (0x812AU) 266 #define USB_DEVICE_VIDEO_GET_CUR_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL (0x812BU) 267 #define USB_DEVICE_VIDEO_GET_CUR_PU_WHITE_BALANCE_COMPONENT_CONTROL (0x812CU) 268 #define USB_DEVICE_VIDEO_GET_CUR_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL (0x812DU) 269 #define USB_DEVICE_VIDEO_GET_CUR_PU_DIGITAL_MULTIPLIER_CONTROL (0x812EU) 270 #define USB_DEVICE_VIDEO_GET_CUR_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL (0x812FU) 271 #define USB_DEVICE_VIDEO_GET_CUR_PU_HUE_AUTO_CONTROL (0x8130U) 272 #define USB_DEVICE_VIDEO_GET_CUR_PU_ANALOG_VIDEO_STANDARD_CONTROL (0x8131U) 273 #define USB_DEVICE_VIDEO_GET_CUR_PU_ANALOG_LOCK_STATUS_CONTROL (0x8132U) 274 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 275 #define USB_DEVICE_VIDEO_GET_CUR_PU_CONTRAST_AUTO_CONTROL (0x8133U) 276 #endif 277 278 #define USB_DEVICE_VIDEO_GET_CUR_CT_SCANNING_MODE_CONTROL (0x8141U) 279 #define USB_DEVICE_VIDEO_GET_CUR_CT_AE_MODE_CONTROL (0x8142U) 280 #define USB_DEVICE_VIDEO_GET_CUR_CT_AE_PRIORITY_CONTROL (0x8143U) 281 #define USB_DEVICE_VIDEO_GET_CUR_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL (0x8144U) 282 #define USB_DEVICE_VIDEO_GET_CUR_CT_EXPOSURE_TIME_RELATIVE_CONTROL (0x8145U) 283 #define USB_DEVICE_VIDEO_GET_CUR_CT_FOCUS_ABSOLUTE_CONTROL (0x8146U) 284 #define USB_DEVICE_VIDEO_GET_CUR_CT_FOCUS_RELATIVE_CONTROL (0x8147U) 285 #define USB_DEVICE_VIDEO_GET_CUR_CT_FOCUS_AUTO_CONTROL (0x8148U) 286 #define USB_DEVICE_VIDEO_GET_CUR_CT_IRIS_ABSOLUTE_CONTROL (0x8149U) 287 #define USB_DEVICE_VIDEO_GET_CUR_CT_IRIS_RELATIVE_CONTROL (0x814AU) 288 #define USB_DEVICE_VIDEO_GET_CUR_CT_ZOOM_ABSOLUTE_CONTROL (0x814BU) 289 #define USB_DEVICE_VIDEO_GET_CUR_CT_ZOOM_RELATIVE_CONTROL (0x814CU) 290 #define USB_DEVICE_VIDEO_GET_CUR_CT_PANTILT_ABSOLUTE_CONTROL (0x814DU) 291 #define USB_DEVICE_VIDEO_GET_CUR_CT_PANTILT_RELATIVE_CONTROL (0x814EU) 292 #define USB_DEVICE_VIDEO_GET_CUR_CT_ROLL_ABSOLUTE_CONTROL (0x814FU) 293 #define USB_DEVICE_VIDEO_GET_CUR_CT_ROLL_RELATIVE_CONTROL (0x8150U) 294 #define USB_DEVICE_VIDEO_GET_CUR_CT_PRIVACY_CONTROL (0x8151U) 295 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 296 #define USB_DEVICE_VIDEO_GET_CUR_CT_FOCUS_SIMPLE_CONTROL (0x8152U) 297 #define USB_DEVICE_VIDEO_GET_CUR_CT_DIGITAL_WINDOW_CONTROL (0x8153U) 298 #define USB_DEVICE_VIDEO_GET_CUR_CT_REGION_OF_INTEREST_CONTROL (0x8154U) 299 #endif 300 301 #define USB_DEVICE_VIDEO_GET_CUR_VS_PROBE_CONTROL (0x8161U) 302 #define USB_DEVICE_VIDEO_GET_CUR_VS_COMMIT_CONTROL (0x8162U) 303 #define USB_DEVICE_VIDEO_GET_CUR_VS_STILL_PROBE_CONTROL (0x8163U) 304 #define USB_DEVICE_VIDEO_GET_CUR_VS_STILL_COMMIT_CONTROL (0x8164U) 305 #define USB_DEVICE_VIDEO_GET_CUR_VS_STILL_IMAGE_TRIGGER_CONTROL (0x8165U) 306 #define USB_DEVICE_VIDEO_GET_CUR_VS_STREAM_ERROR_CODE_CONTROL (0x8166U) 307 #define USB_DEVICE_VIDEO_GET_CUR_VS_GENERATE_KEY_FRAME_CONTROL (0x8167U) 308 #define USB_DEVICE_VIDEO_GET_CUR_VS_UPDATE_FRAME_SEGMENT_CONTROL (0x8168U) 309 #define USB_DEVICE_VIDEO_GET_CUR_VS_SYNCH_DELAY_CONTROL (0x8169U) 310 311 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 312 #define USB_DEVICE_VIDEO_GET_CUR_EU_SELECT_LAYER_CONTROL (0x8181U) 313 #define USB_DEVICE_VIDEO_GET_CUR_EU_PROFILE_TOOLSET_CONTROL (0x8182U) 314 #define USB_DEVICE_VIDEO_GET_CUR_EU_VIDEO_RESOLUTION_CONTROL (0x8183U) 315 #define USB_DEVICE_VIDEO_GET_CUR_EU_MIN_FRAME_INTERVAL_CONTROL (0x8184U) 316 #define USB_DEVICE_VIDEO_GET_CUR_EU_SLICE_MODE_CONTROL (0x8185U) 317 #define USB_DEVICE_VIDEO_GET_CUR_EU_RATE_CONTROL_MODE_CONTROL (0x8186U) 318 #define USB_DEVICE_VIDEO_GET_CUR_EU_AVERAGE_BITRATE_CONTROL (0x8187U) 319 #define USB_DEVICE_VIDEO_GET_CUR_EU_CPB_SIZE_CONTROL (0x8188U) 320 #define USB_DEVICE_VIDEO_GET_CUR_EU_PEAK_BIT_RATE_CONTROL (0x8189U) 321 #define USB_DEVICE_VIDEO_GET_CUR_EU_QUANTIZATION_PARAMS_CONTROL (0x818AU) 322 #define USB_DEVICE_VIDEO_GET_CUR_EU_SYNC_REF_FRAME_CONTROL (0x818BU) 323 #define USB_DEVICE_VIDEO_GET_CUR_EU_LTR_BUFFER_CONTROL (0x818CU) 324 #define USB_DEVICE_VIDEO_GET_CUR_EU_LTR_PICTURE_CONTROL (0x818DU) 325 #define USB_DEVICE_VIDEO_GET_CUR_EU_LTR_VALIDATION_CONTROL (0x818EU) 326 #define USB_DEVICE_VIDEO_GET_CUR_EU_LEVEL_IDC_LIMIT_CONTROL (0x818FU) 327 #define USB_DEVICE_VIDEO_GET_CUR_EU_SEI_PAYLOADTYPE_CONTROL (0x8190U) 328 #define USB_DEVICE_VIDEO_GET_CUR_EU_QP_RANGE_CONTROL (0x8191U) 329 #define USB_DEVICE_VIDEO_GET_CUR_EU_PRIORITY_CONTROL (0x8192U) 330 #define USB_DEVICE_VIDEO_GET_CUR_EU_START_OR_STOP_LAYER_CONTROL (0x8193U) 331 #define USB_DEVICE_VIDEO_GET_CUR_EU_ERROR_RESILIENCY_CONTROL (0x8194U) 332 #endif 333 334 /*! @brief Video device class-specific request GET MIN COMMAND */ 335 #define USB_DEVICE_VIDEO_GET_MIN_PU_BACKLIGHT_COMPENSATION_CONTROL (0x8221U) 336 #define USB_DEVICE_VIDEO_GET_MIN_PU_BRIGHTNESS_CONTROL (0x8222U) 337 #define USB_DEVICE_VIDEO_GET_MIN_PU_CONTRACT_CONTROL (0x8223U) 338 #define USB_DEVICE_VIDEO_GET_MIN_PU_GAIN_CONTROL (0x8224U) 339 #define USB_DEVICE_VIDEO_GET_MIN_PU_HUE_CONTROL (0x8226U) 340 #define USB_DEVICE_VIDEO_GET_MIN_PU_SATURATION_CONTROL (0x8227U) 341 #define USB_DEVICE_VIDEO_GET_MIN_PU_SHARRNESS_CONTROL (0x8228U) 342 #define USB_DEVICE_VIDEO_GET_MIN_PU_GAMMA_CONTROL (0x8229U) 343 #define USB_DEVICE_VIDEO_GET_MIN_PU_WHITE_BALANCE_TEMPERATURE_CONTROL (0x822AU) 344 #define USB_DEVICE_VIDEO_GET_MIN_PU_WHITE_BALANCE_COMPONENT_CONTROL (0x822CU) 345 #define USB_DEVICE_VIDEO_GET_MIN_PU_DIGITAL_MULTIPLIER_CONTROL (0x822EU) 346 #define USB_DEVICE_VIDEO_GET_MIN_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL (0x822FU) 347 348 #define USB_DEVICE_VIDEO_GET_MIN_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL (0x8244U) 349 #define USB_DEVICE_VIDEO_GET_MIN_CT_FOCUS_ABSOLUTE_CONTROL (0x8246U) 350 #define USB_DEVICE_VIDEO_GET_MIN_CT_FOCUS_RELATIVE_CONTROL (0x8247U) 351 #define USB_DEVICE_VIDEO_GET_MIN_CT_IRIS_ABSOLUTE_CONTROL (0x8249U) 352 #define USB_DEVICE_VIDEO_GET_MIN_CT_ZOOM_ABSOLUTE_CONTROL (0x824BU) 353 #define USB_DEVICE_VIDEO_GET_MIN_CT_ZOOM_RELATIVE_CONTROL (0x824CU) 354 #define USB_DEVICE_VIDEO_GET_MIN_CT_PANTILT_ABSOLUTE_CONTROL (0x824DU) 355 #define USB_DEVICE_VIDEO_GET_MIN_CT_PANTILT_RELATIVE_CONTROL (0x824EU) 356 #define USB_DEVICE_VIDEO_GET_MIN_CT_ROLL_ABSOLUTE_CONTROL (0x824FU) 357 #define USB_DEVICE_VIDEO_GET_MIN_CT_ROLL_RELATIVE_CONTROL (0x8250U) 358 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 359 #define USB_DEVICE_VIDEO_GET_MIN_CT_DIGITAL_WINDOW_CONTROL (0x8251U) 360 #define USB_DEVICE_VIDEO_GET_MIN_CT_REGION_OF_INTEREST_CONTROL (0x8252U) 361 #endif 362 363 #define USB_DEVICE_VIDEO_GET_MIN_VS_PROBE_CONTROL (0x8261U) 364 #define USB_DEVICE_VIDEO_GET_MIN_VS_STILL_PROBE_CONTROL (0x8263U) 365 #define USB_DEVICE_VIDEO_GET_MIN_VS_UPDATE_FRAME_SEGMENT_CONTROL (0x8268U) 366 #define USB_DEVICE_VIDEO_GET_MIN_VS_SYNCH_DELAY_CONTROL (0x8269U) 367 368 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 369 #define USB_DEVICE_VIDEO_GET_MIN_EU_VIDEO_RESOLUTION_CONTROL (0x8283U) 370 #define USB_DEVICE_VIDEO_GET_MIN_EU_MIN_FRAME_INTERVAL_CONTROL (0x8284U) 371 #define USB_DEVICE_VIDEO_GET_MIN_EU_SLICE_MODE_CONTROL (0x8285U) 372 #define USB_DEVICE_VIDEO_GET_MIN_EU_AVERAGE_BITRATE_CONTROL (0x8287U) 373 #define USB_DEVICE_VIDEO_GET_MIN_EU_CPB_SIZE_CONTROL (0x8288U) 374 #define USB_DEVICE_VIDEO_GET_MIN_EU_PEAK_BIT_RATE_CONTROL (0x8289U) 375 #define USB_DEVICE_VIDEO_GET_MIN_EU_QUANTIZATION_PARAMS_CONTROL (0x828AU) 376 #define USB_DEVICE_VIDEO_GET_MIN_EU_SYNC_REF_FRAME_CONTROL (0x828BU) 377 #define USB_DEVICE_VIDEO_GET_MIN_EU_LEVEL_IDC_LIMIT_CONTROL (0x828FU) 378 #define USB_DEVICE_VIDEO_GET_MIN_EU_SEI_PAYLOADTYPE_CONTROL (0x8290U) 379 #define USB_DEVICE_VIDEO_GET_MIN_EU_QP_RANGE_CONTROL (0x8291U) 380 #endif 381 382 /*! @brief Video device class-specific request GET MAX COMMAND */ 383 #define USB_DEVICE_VIDEO_GET_MAX_PU_BACKLIGHT_COMPENSATION_CONTROL (0x8321U) 384 #define USB_DEVICE_VIDEO_GET_MAX_PU_BRIGHTNESS_CONTROL (0x8322U) 385 #define USB_DEVICE_VIDEO_GET_MAX_PU_CONTRACT_CONTROL (0x8323U) 386 #define USB_DEVICE_VIDEO_GET_MAX_PU_GAIN_CONTROL (0x8324U) 387 #define USB_DEVICE_VIDEO_GET_MAX_PU_HUE_CONTROL (0x8326U) 388 #define USB_DEVICE_VIDEO_GET_MAX_PU_SATURATION_CONTROL (0x8327U) 389 #define USB_DEVICE_VIDEO_GET_MAX_PU_SHARRNESS_CONTROL (0x8328U) 390 #define USB_DEVICE_VIDEO_GET_MAX_PU_GAMMA_CONTROL (0x8329U) 391 #define USB_DEVICE_VIDEO_GET_MAX_PU_WHITE_BALANCE_TEMPERATURE_CONTROL (0x832AU) 392 #define USB_DEVICE_VIDEO_GET_MAX_PU_WHITE_BALANCE_COMPONENT_CONTROL (0x832CU) 393 #define USB_DEVICE_VIDEO_GET_MAX_PU_DIGITAL_MULTIPLIER_CONTROL (0x832EU) 394 #define USB_DEVICE_VIDEO_GET_MAX_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL (0x832FU) 395 396 #define USB_DEVICE_VIDEO_GET_MAX_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL (0x8344U) 397 #define USB_DEVICE_VIDEO_GET_MAX_CT_FOCUS_ABSOLUTE_CONTROL (0x8346U) 398 #define USB_DEVICE_VIDEO_GET_MAX_CT_FOCUS_RELATIVE_CONTROL (0x8347U) 399 #define USB_DEVICE_VIDEO_GET_MAX_CT_IRIS_ABSOLUTE_CONTROL (0x8349U) 400 #define USB_DEVICE_VIDEO_GET_MAX_CT_ZOOM_ABSOLUTE_CONTROL (0x834BU) 401 #define USB_DEVICE_VIDEO_GET_MAX_CT_ZOOM_RELATIVE_CONTROL (0x834CU) 402 #define USB_DEVICE_VIDEO_GET_MAX_CT_PANTILT_ABSOLUTE_CONTROL (0x834DU) 403 #define USB_DEVICE_VIDEO_GET_MAX_CT_PANTILT_RELATIVE_CONTROL (0x834EU) 404 #define USB_DEVICE_VIDEO_GET_MAX_CT_ROLL_ABSOLUTE_CONTROL (0x834FU) 405 #define USB_DEVICE_VIDEO_GET_MAX_CT_ROLL_RELATIVE_CONTROL (0x8350U) 406 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 407 #define USB_DEVICE_VIDEO_GET_MAX_CT_DIGITAL_WINDOW_CONTROL (0x8351U) 408 #define USB_DEVICE_VIDEO_GET_MAX_CT_REGION_OF_INTEREST_CONTROL (0x8352U) 409 #endif 410 411 #define USB_DEVICE_VIDEO_GET_MAX_VS_PROBE_CONTROL (0x8361U) 412 #define USB_DEVICE_VIDEO_GET_MAX_VS_STILL_PROBE_CONTROL (0x8363U) 413 #define USB_DEVICE_VIDEO_GET_MAX_VS_UPDATE_FRAME_SEGMENT_CONTROL (0x8368U) 414 #define USB_DEVICE_VIDEO_GET_MAX_VS_SYNCH_DELAY_CONTROL (0x8369U) 415 416 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 417 #define USB_DEVICE_VIDEO_GET_MAX_EU_VIDEO_RESOLUTION_CONTROL (0x8383U) 418 #define USB_DEVICE_VIDEO_GET_MAX_EU_MIN_FRAME_INTERVAL_CONTROL (0x8384U) 419 #define USB_DEVICE_VIDEO_GET_MAX_EU_SLICE_MODE_CONTROL (0x8385U) 420 #define USB_DEVICE_VIDEO_GET_MAX_EU_AVERAGE_BITRATE_CONTROL (0x8387U) 421 #define USB_DEVICE_VIDEO_GET_MAX_EU_CPB_SIZE_CONTROL (0x8388U) 422 #define USB_DEVICE_VIDEO_GET_MAX_EU_PEAK_BIT_RATE_CONTROL (0x8389U) 423 #define USB_DEVICE_VIDEO_GET_MAX_EU_QUANTIZATION_PARAMS_CONTROL (0x838AU) 424 #define USB_DEVICE_VIDEO_GET_MAX_EU_SYNC_REF_FRAME_CONTROL (0x838BU) 425 #define USB_DEVICE_VIDEO_GET_MAX_EU_LTR_BUFFER_CONTROL (0x838CU) 426 #define USB_DEVICE_VIDEO_GET_MAX_EU_LEVEL_IDC_LIMIT_CONTROL (0x838FU) 427 #define USB_DEVICE_VIDEO_GET_MAX_EU_SEI_PAYLOADTYPE_CONTROL (0x8390U) 428 #define USB_DEVICE_VIDEO_GET_MAX_EU_QP_RANGE_CONTROL (0x8391U) 429 #endif 430 431 /*! @brief Video device class-specific request GET RES COMMAND */ 432 #define USB_DEVICE_VIDEO_GET_RES_PU_BACKLIGHT_COMPENSATION_CONTROL (0x8421U) 433 #define USB_DEVICE_VIDEO_GET_RES_PU_BRIGHTNESS_CONTROL (0x8422U) 434 #define USB_DEVICE_VIDEO_GET_RES_PU_CONTRACT_CONTROL (0x8423U) 435 #define USB_DEVICE_VIDEO_GET_RES_PU_GAIN_CONTROL (0x8424U) 436 #define USB_DEVICE_VIDEO_GET_RES_PU_HUE_CONTROL (0x8426U) 437 #define USB_DEVICE_VIDEO_GET_RES_PU_SATURATION_CONTROL (0x8427U) 438 #define USB_DEVICE_VIDEO_GET_RES_PU_SHARRNESS_CONTROL (0x8428U) 439 #define USB_DEVICE_VIDEO_GET_RES_PU_GAMMA_CONTROL (0x8429U) 440 #define USB_DEVICE_VIDEO_GET_RES_PU_WHITE_BALANCE_TEMPERATURE_CONTROL (0x842AU) 441 #define USB_DEVICE_VIDEO_GET_RES_PU_WHITE_BALANCE_COMPONENT_CONTROL (0x842CU) 442 #define USB_DEVICE_VIDEO_GET_RES_PU_DIGITAL_MULTIPLIER_CONTROL (0x842EU) 443 #define USB_DEVICE_VIDEO_GET_RES_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL (0x842FU) 444 445 #define USB_DEVICE_VIDEO_GET_RES_CT_AE_MODE_CONTROL (0x8442U) 446 #define USB_DEVICE_VIDEO_GET_RES_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL (0x8444U) 447 #define USB_DEVICE_VIDEO_GET_RES_CT_FOCUS_ABSOLUTE_CONTROL (0x8446U) 448 #define USB_DEVICE_VIDEO_GET_RES_CT_FOCUS_RELATIVE_CONTROL (0x8447U) 449 #define USB_DEVICE_VIDEO_GET_RES_CT_IRIS_ABSOLUTE_CONTROL (0x8449U) 450 #define USB_DEVICE_VIDEO_GET_RES_CT_ZOOM_ABSOLUTE_CONTROL (0x844BU) 451 #define USB_DEVICE_VIDEO_GET_RES_CT_ZOOM_RELATIVE_CONTROL (0x844CU) 452 #define USB_DEVICE_VIDEO_GET_RES_CT_PANTILT_ABSOLUTE_CONTROL (0x844DU) 453 #define USB_DEVICE_VIDEO_GET_RES_CT_PANTILT_RELATIVE_CONTROL (0x844EU) 454 #define USB_DEVICE_VIDEO_GET_RES_CT_ROLL_ABSOLUTE_CONTROL (0x844FU) 455 #define USB_DEVICE_VIDEO_GET_RES_CT_ROLL_RELATIVE_CONTROL (0x8450U) 456 457 #define USB_DEVICE_VIDEO_GET_RES_VS_PROBE_CONTROL (0x8461U) 458 #define USB_DEVICE_VIDEO_GET_RES_VS_STILL_PROBE_CONTROL (0x8463U) 459 #define USB_DEVICE_VIDEO_GET_RES_VS_UPDATE_FRAME_SEGMENT_CONTROL (0x8468U) 460 #define USB_DEVICE_VIDEO_GET_RES_VS_SYNCH_DELAY_CONTROL (0x8469U) 461 462 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 463 #define USB_DEVICE_VIDEO_GET_RES_EU_AVERAGE_BITRATE_CONTROL (0x8487U) 464 #define USB_DEVICE_VIDEO_GET_RES_EU_CPB_SIZE_CONTROL (0x8488U) 465 #define USB_DEVICE_VIDEO_GET_RES_EU_PEAK_BIT_RATE_CONTROL (0x8489U) 466 #define USB_DEVICE_VIDEO_GET_RES_EU_QUANTIZATION_PARAMS_CONTROL (0x848AU) 467 #define USB_DEVICE_VIDEO_GET_RES_EU_ERROR_RESILIENCY_CONTROL (0x8494U) 468 #endif 469 470 /*! @brief Video device class-specific request GET LEN COMMAND */ 471 472 #define USB_DEVICE_VIDEO_GET_LEN_VS_PROBE_CONTROL (0x8561U) 473 #define USB_DEVICE_VIDEO_GET_LEN_VS_COMMIT_CONTROL (0x8562U) 474 #define USB_DEVICE_VIDEO_GET_LEN_VS_STILL_PROBE_CONTROL (0x8563U) 475 #define USB_DEVICE_VIDEO_GET_LEN_VS_STILL_COMMIT_CONTROL (0x8564U) 476 477 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 478 #define USB_DEVICE_VIDEO_GET_LEN_EU_SELECT_LAYER_CONTROL (0x8581U) 479 #define USB_DEVICE_VIDEO_GET_LEN_EU_PROFILE_TOOLSET_CONTROL (0x8582U) 480 #define USB_DEVICE_VIDEO_GET_LEN_EU_VIDEO_RESOLUTION_CONTROL (0x8583U) 481 #define USB_DEVICE_VIDEO_GET_LEN_EU_MIN_FRAME_INTERVAL_CONTROL (0x8584U) 482 #define USB_DEVICE_VIDEO_GET_LEN_EU_SLICE_MODE_CONTROL (0x8585U) 483 #define USB_DEVICE_VIDEO_GET_LEN_EU_RATE_CONTROL_MODE_CONTROL (0x8586U) 484 #define USB_DEVICE_VIDEO_GET_LEN_EU_AVERAGE_BITRATE_CONTROL (0x8587U) 485 #define USB_DEVICE_VIDEO_GET_LEN_EU_CPB_SIZE_CONTROL (0x8588U) 486 #define USB_DEVICE_VIDEO_GET_LEN_EU_PEAK_BIT_RATE_CONTROL (0x8589U) 487 #define USB_DEVICE_VIDEO_GET_LEN_EU_QUANTIZATION_PARAMS_CONTROL (0x858AU) 488 #define USB_DEVICE_VIDEO_GET_LEN_EU_SYNC_REF_FRAME_CONTROL (0x858BU) 489 #define USB_DEVICE_VIDEO_GET_LEN_EU_LTR_BUFFER_CONTROL (0x858CU) 490 #define USB_DEVICE_VIDEO_GET_LEN_EU_LTR_PICTURE_CONTROL (0x858DU) 491 #define USB_DEVICE_VIDEO_GET_LEN_EU_LTR_VALIDATION_CONTROL (0x858EU) 492 #define USB_DEVICE_VIDEO_GET_LEN_EU_QP_RANGE_CONTROL (0x8591U) 493 #define USB_DEVICE_VIDEO_GET_LEN_EU_PRIORITY_CONTROL (0x8592U) 494 #define USB_DEVICE_VIDEO_GET_LEN_EU_START_OR_STOP_LAYER_CONTROL (0x8593U) 495 #endif 496 497 /*! @brief Video device class-specific request GET INFO COMMAND */ 498 #define USB_DEVICE_VIDEO_GET_INFO_VC_POWER_MODE_CONTROL (0x8601U) 499 #define USB_DEVICE_VIDEO_GET_INFO_VC_ERROR_CODE_CONTROL (0x8602U) 500 501 #define USB_DEVICE_VIDEO_GET_INFO_PU_BACKLIGHT_COMPENSATION_CONTROL (0x8621U) 502 #define USB_DEVICE_VIDEO_GET_INFO_PU_BRIGHTNESS_CONTROL (0x8622U) 503 #define USB_DEVICE_VIDEO_GET_INFO_PU_CONTRACT_CONTROL (0x8623U) 504 #define USB_DEVICE_VIDEO_GET_INFO_PU_GAIN_CONTROL (0x8624U) 505 #define USB_DEVICE_VIDEO_GET_INFO_PU_POWER_LINE_FREQUENCY_CONTROL (0x8625U) 506 #define USB_DEVICE_VIDEO_GET_INFO_PU_HUE_CONTROL (0x8626U) 507 #define USB_DEVICE_VIDEO_GET_INFO_PU_SATURATION_CONTROL (0x8627U) 508 #define USB_DEVICE_VIDEO_GET_INFO_PU_SHARRNESS_CONTROL (0x8628U) 509 #define USB_DEVICE_VIDEO_GET_INFO_PU_GAMMA_CONTROL (0x8629U) 510 #define USB_DEVICE_VIDEO_GET_INFO_PU_WHITE_BALANCE_TEMPERATURE_CONTROL (0x862AU) 511 #define USB_DEVICE_VIDEO_GET_INFO_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL (0x862BU) 512 #define USB_DEVICE_VIDEO_GET_INFO_PU_WHITE_BALANCE_COMPONENT_CONTROL (0x862CU) 513 #define USB_DEVICE_VIDEO_GET_INFO_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL (0x862DU) 514 #define USB_DEVICE_VIDEO_GET_INFO_PU_DIGITAL_MULTIPLIER_CONTROL (0x862EU) 515 #define USB_DEVICE_VIDEO_GET_INFO_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL (0x862FU) 516 #define USB_DEVICE_VIDEO_GET_INFO_PU_HUE_AUTO_CONTROL (0x8630U) 517 #define USB_DEVICE_VIDEO_GET_INFO_PU_ANALOG_VIDEO_STANDARD_CONTROL (0x8631U) 518 #define USB_DEVICE_VIDEO_GET_INFO_PU_ANALOG_LOCK_STATUS_CONTROL (0x8632U) 519 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 520 #define USB_DEVICE_VIDEO_GET_INFO_PU_CONTRAST_AUTO_CONTROL (0x8633U) 521 #endif 522 523 #define USB_DEVICE_VIDEO_GET_INFO_CT_SCANNING_MODE_CONTROL (0x8641U) 524 #define USB_DEVICE_VIDEO_GET_INFO_CT_AE_MODE_CONTROL (0x8642U) 525 #define USB_DEVICE_VIDEO_GET_INFO_CT_AE_PRIORITY_CONTROL (0x8643U) 526 #define USB_DEVICE_VIDEO_GET_INFO_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL (0x8644U) 527 #define USB_DEVICE_VIDEO_GET_INFO_CT_EXPOSURE_TIME_RELATIVE_CONTROL (0x8645U) 528 #define USB_DEVICE_VIDEO_GET_INFO_CT_FOCUS_ABSOLUTE_CONTROL (0x8646U) 529 #define USB_DEVICE_VIDEO_GET_INFO_CT_FOCUS_RELATIVE_CONTROL (0x8647U) 530 #define USB_DEVICE_VIDEO_GET_INFO_CT_FOCUS_AUTO_CONTROL (0x8648U) 531 #define USB_DEVICE_VIDEO_GET_INFO_CT_IRIS_ABSOLUTE_CONTROL (0x8649U) 532 #define USB_DEVICE_VIDEO_GET_INFO_CT_IRIS_RELATIVE_CONTROL (0x864AU) 533 #define USB_DEVICE_VIDEO_GET_INFO_CT_ZOOM_ABSOLUTE_CONTROL (0x864BU) 534 #define USB_DEVICE_VIDEO_GET_INFO_CT_ZOOM_RELATIVE_CONTROL (0x864CU) 535 #define USB_DEVICE_VIDEO_GET_INFO_CT_PANTILT_ABSOLUTE_CONTROL (0x864DU) 536 #define USB_DEVICE_VIDEO_GET_INFO_CT_PANTILT_RELATIVE_CONTROL (0x864EU) 537 #define USB_DEVICE_VIDEO_GET_INFO_CT_ROLL_ABSOLUTE_CONTROL (0x864FU) 538 #define USB_DEVICE_VIDEO_GET_INFO_CT_ROLL_RELATIVE_CONTROL (0x8650U) 539 #define USB_DEVICE_VIDEO_GET_INFO_CT_PRIVACY_CONTROL (0x8651U) 540 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 541 #define USB_DEVICE_VIDEO_GET_INFO_CT_FOCUS_SIMPLE_CONTROL (0x8652U) 542 #endif 543 544 #define USB_DEVICE_VIDEO_GET_INFO_VS_PROBE_CONTROL (0x8661U) 545 #define USB_DEVICE_VIDEO_GET_INFO_VS_COMMIT_CONTROL (0x8662U) 546 #define USB_DEVICE_VIDEO_GET_INFO_VS_STILL_PROBE_CONTROL (0x8663U) 547 #define USB_DEVICE_VIDEO_GET_INFO_VS_STILL_COMMIT_CONTROL (0x8664U) 548 #define USB_DEVICE_VIDEO_GET_INFO_VS_STILL_IMAGE_TRIGGER_CONTROL (0x8665U) 549 #define USB_DEVICE_VIDEO_GET_INFO_VS_STREAM_ERROR_CODE_CONTROL (0x8666U) 550 #define USB_DEVICE_VIDEO_GET_INFO_VS_GENERATE_KEY_FRAME_CONTROL (0x8667U) 551 #define USB_DEVICE_VIDEO_GET_INFO_VS_UPDATE_FRAME_SEGMENT_CONTROL (0x8668U) 552 #define USB_DEVICE_VIDEO_GET_INFO_VS_SYNCH_DELAY_CONTROL (0x8669U) 553 554 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 555 #define USB_DEVICE_VIDEO_GET_INFO_EU_SELECT_LAYER_CONTROL (0x8681U) 556 #define USB_DEVICE_VIDEO_GET_INFO_EU_PROFILE_TOOLSET_CONTROL (0x8682U) 557 #define USB_DEVICE_VIDEO_GET_INFO_EU_VIDEO_RESOLUTION_CONTROL (0x8683U) 558 #define USB_DEVICE_VIDEO_GET_INFO_EU_MIN_FRAME_INTERVAL_CONTROL (0x8684U) 559 #define USB_DEVICE_VIDEO_GET_INFO_EU_SLICE_MODE_CONTROL (0x8685U) 560 #define USB_DEVICE_VIDEO_GET_INFO_EU_RATE_CONTROL_MODE_CONTROL (0x8686U) 561 #define USB_DEVICE_VIDEO_GET_INFO_EU_AVERAGE_BITRATE_CONTROL (0x8687U) 562 #define USB_DEVICE_VIDEO_GET_INFO_EU_CPB_SIZE_CONTROL (0x8688U) 563 #define USB_DEVICE_VIDEO_GET_INFO_EU_PEAK_BIT_RATE_CONTROL (0x8689U) 564 #define USB_DEVICE_VIDEO_GET_INFO_EU_QUANTIZATION_PARAMS_CONTROL (0x868AU) 565 #define USB_DEVICE_VIDEO_GET_INFO_EU_SYNC_REF_FRAME_CONTROL (0x868BU) 566 #define USB_DEVICE_VIDEO_GET_INFO_EU_LTR_BUFFER_CONTROL (0x868CU) 567 #define USB_DEVICE_VIDEO_GET_INFO_EU_LTR_PICTURE_CONTROL (0x868DU) 568 #define USB_DEVICE_VIDEO_GET_INFO_EU_LTR_VALIDATION_CONTROL (0x868EU) 569 #define USB_DEVICE_VIDEO_GET_INFO_EU_SEI_PAYLOADTYPE_CONTROL (0x8690U) 570 #define USB_DEVICE_VIDEO_GET_INFO_EU_QP_RANGE_CONTROL (0x8691U) 571 #define USB_DEVICE_VIDEO_GET_INFO_EU_PRIORITY_CONTROL (0x8692U) 572 #define USB_DEVICE_VIDEO_GET_INFO_EU_START_OR_STOP_LAYER_CONTROL (0x8693U) 573 #endif 574 575 /*! @brief Video device class-specific request GET DEF COMMAND */ 576 #define USB_DEVICE_VIDEO_GET_DEF_PU_BACKLIGHT_COMPENSATION_CONTROL (0x8721U) 577 #define USB_DEVICE_VIDEO_GET_DEF_PU_BRIGHTNESS_CONTROL (0x8722U) 578 #define USB_DEVICE_VIDEO_GET_DEF_PU_CONTRACT_CONTROL (0x8723U) 579 #define USB_DEVICE_VIDEO_GET_DEF_PU_GAIN_CONTROL (0x8724U) 580 #define USB_DEVICE_VIDEO_GET_DEF_PU_POWER_LINE_FREQUENCY_CONTROL (0x8725U) 581 #define USB_DEVICE_VIDEO_GET_DEF_PU_HUE_CONTROL (0x8726U) 582 #define USB_DEVICE_VIDEO_GET_DEF_PU_SATURATION_CONTROL (0x8727U) 583 #define USB_DEVICE_VIDEO_GET_DEF_PU_SHARRNESS_CONTROL (0x8728U) 584 #define USB_DEVICE_VIDEO_GET_DEF_PU_GAMMA_CONTROL (0x8729U) 585 #define USB_DEVICE_VIDEO_GET_DEF_PU_WHITE_BALANCE_TEMPERATURE_CONTROL (0x872AU) 586 #define USB_DEVICE_VIDEO_GET_DEF_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL (0x872BU) 587 #define USB_DEVICE_VIDEO_GET_DEF_PU_WHITE_BALANCE_COMPONENT_CONTROL (0x872CU) 588 #define USB_DEVICE_VIDEO_GET_DEF_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL (0x872DU) 589 #define USB_DEVICE_VIDEO_GET_DEF_PU_DIGITAL_MULTIPLIER_CONTROL (0x872EU) 590 #define USB_DEVICE_VIDEO_GET_DEF_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL (0x872FU) 591 #define USB_DEVICE_VIDEO_GET_DEF_PU_HUE_AUTO_CONTROL (0x8730U) 592 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 593 #define USB_DEVICE_VIDEO_GET_DEF_PU_CONTRAST_AUTO_CONTROL (0x8731U) 594 #endif 595 596 #define USB_DEVICE_VIDEO_GET_DEF_CT_AE_MODE_CONTROL (0x8742U) 597 #define USB_DEVICE_VIDEO_GET_DEF_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL (0x8744U) 598 #define USB_DEVICE_VIDEO_GET_DEF_CT_FOCUS_ABSOLUTE_CONTROL (0x8746U) 599 #define USB_DEVICE_VIDEO_GET_DEF_CT_FOCUS_RELATIVE_CONTROL (0x8747U) 600 #define USB_DEVICE_VIDEO_GET_DEF_CT_FOCUS_AUTO_CONTROL (0x8748U) 601 #define USB_DEVICE_VIDEO_GET_DEF_CT_IRIS_ABSOLUTE_CONTROL (0x8749U) 602 #define USB_DEVICE_VIDEO_GET_DEF_CT_ZOOM_ABSOLUTE_CONTROL (0x874BU) 603 #define USB_DEVICE_VIDEO_GET_DEF_CT_ZOOM_RELATIVE_CONTROL (0x874CU) 604 #define USB_DEVICE_VIDEO_GET_DEF_CT_PANTILT_ABSOLUTE_CONTROL (0x874DU) 605 #define USB_DEVICE_VIDEO_GET_DEF_CT_PANTILT_RELATIVE_CONTROL (0x874EU) 606 #define USB_DEVICE_VIDEO_GET_DEF_CT_ROLL_ABSOLUTE_CONTROL (0x874FU) 607 #define USB_DEVICE_VIDEO_GET_DEF_CT_ROLL_RELATIVE_CONTROL (0x8750U) 608 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 609 #define USB_DEVICE_VIDEO_GET_DEF_CT_FOCUS_SIMPLE_CONTROL (0x8751U) 610 #define USB_DEVICE_VIDEO_GET_DEF_CT_DIGITAL_WINDOW_CONTROL (0x8752U) 611 #define USB_DEVICE_VIDEO_GET_DEF_CT_REGION_OF_INTEREST_CONTROL (0x8753U) 612 #endif 613 614 #define USB_DEVICE_VIDEO_GET_DEF_VS_PROBE_CONTROL (0x8761U) 615 #define USB_DEVICE_VIDEO_GET_DEF_VS_STILL_PROBE_CONTROL (0x8763U) 616 #define USB_DEVICE_VIDEO_GET_DEF_VS_UPDATE_FRAME_SEGMENT_CONTROL (0x8768U) 617 #define USB_DEVICE_VIDEO_GET_DEF_VS_SYNCH_DELAY_CONTROL (0x8769U) 618 619 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 620 #define USB_DEVICE_VIDEO_GET_DEF_EU_PROFILE_TOOLSET_CONTROL (0x8782U) 621 #define USB_DEVICE_VIDEO_GET_DEF_EU_VIDEO_RESOLUTION_CONTROL (0x8783U) 622 #define USB_DEVICE_VIDEO_GET_DEF_EU_MIN_FRAME_INTERVAL_CONTROL (0x8784U) 623 #define USB_DEVICE_VIDEO_GET_DEF_EU_SLICE_MODE_CONTROL (0x8785U) 624 #define USB_DEVICE_VIDEO_GET_DEF_EU_RATE_CONTROL_MODE_CONTROL (0x8786U) 625 #define USB_DEVICE_VIDEO_GET_DEF_EU_AVERAGE_BITRATE_CONTROL (0x8787U) 626 #define USB_DEVICE_VIDEO_GET_DEF_EU_CPB_SIZE_CONTROL (0x8788U) 627 #define USB_DEVICE_VIDEO_GET_DEF_EU_PEAK_BIT_RATE_CONTROL (0x8789U) 628 #define USB_DEVICE_VIDEO_GET_DEF_EU_QUANTIZATION_PARAMS_CONTROL (0x878AU) 629 #define USB_DEVICE_VIDEO_GET_DEF_EU_LTR_BUFFER_CONTROL (0x878CU) 630 #define USB_DEVICE_VIDEO_GET_DEF_EU_LTR_PICTURE_CONTROL (0x878DU) 631 #define USB_DEVICE_VIDEO_GET_DEF_EU_LTR_VALIDATION_CONTROL (0x878EU) 632 #define USB_DEVICE_VIDEO_GET_DEF_EU_LEVEL_IDC_LIMIT_CONTROL (0x878FU) 633 #define USB_DEVICE_VIDEO_GET_DEF_EU_SEI_PAYLOADTYPE_CONTROL (0x8790U) 634 #define USB_DEVICE_VIDEO_GET_DEF_EU_QP_RANGE_CONTROL (0x8791U) 635 #define USB_DEVICE_VIDEO_GET_DEF_EU_ERROR_RESILIENCY_CONTROL (0x8794U) 636 #endif 637 638 /*! @brief Video device class-specific request SET CUR COMMAND */ 639 #define USB_DEVICE_VIDEO_SET_CUR_VC_POWER_MODE_CONTROL (0x0101U) 640 641 #define USB_DEVICE_VIDEO_SET_CUR_PU_BACKLIGHT_COMPENSATION_CONTROL (0x0121U) 642 #define USB_DEVICE_VIDEO_SET_CUR_PU_BRIGHTNESS_CONTROL (0x0122U) 643 #define USB_DEVICE_VIDEO_SET_CUR_PU_CONTRACT_CONTROL (0x0123U) 644 #define USB_DEVICE_VIDEO_SET_CUR_PU_GAIN_CONTROL (0x0124U) 645 #define USB_DEVICE_VIDEO_SET_CUR_PU_POWER_LINE_FREQUENCY_CONTROL (0x0125U) 646 #define USB_DEVICE_VIDEO_SET_CUR_PU_HUE_CONTROL (0x0126U) 647 #define USB_DEVICE_VIDEO_SET_CUR_PU_SATURATION_CONTROL (0x0127U) 648 #define USB_DEVICE_VIDEO_SET_CUR_PU_SHARRNESS_CONTROL (0x0128U) 649 #define USB_DEVICE_VIDEO_SET_CUR_PU_GAMMA_CONTROL (0x0129U) 650 #define USB_DEVICE_VIDEO_SET_CUR_PU_WHITE_BALANCE_TEMPERATURE_CONTROL (0x012AU) 651 #define USB_DEVICE_VIDEO_SET_CUR_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL (0x012BU) 652 #define USB_DEVICE_VIDEO_SET_CUR_PU_WHITE_BALANCE_COMPONENT_CONTROL (0x012CU) 653 #define USB_DEVICE_VIDEO_SET_CUR_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL (0x012DU) 654 #define USB_DEVICE_VIDEO_SET_CUR_PU_DIGITAL_MULTIPLIER_CONTROL (0x012EU) 655 #define USB_DEVICE_VIDEO_SET_CUR_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL (0x012FU) 656 #define USB_DEVICE_VIDEO_SET_CUR_PU_HUE_AUTO_CONTROL (0x0130U) 657 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 658 #define USB_DEVICE_VIDEO_SET_CUR_PU_CONTRAST_AUTO_CONTROL (0x0131U) 659 #endif 660 661 #define USB_DEVICE_VIDEO_SET_CUR_CT_SCANNING_MODE_CONTROL (0x0141U) 662 #define USB_DEVICE_VIDEO_SET_CUR_CT_AE_MODE_CONTROL (0x0142U) 663 #define USB_DEVICE_VIDEO_SET_CUR_CT_AE_PRIORITY_CONTROL (0x0143U) 664 #define USB_DEVICE_VIDEO_SET_CUR_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL (0x0144U) 665 #define USB_DEVICE_VIDEO_SET_CUR_CT_EXPOSURE_TIME_RELATIVE_CONTROL (0x0145U) 666 #define USB_DEVICE_VIDEO_SET_CUR_CT_FOCUS_ABSOLUTE_CONTROL (0x0146U) 667 #define USB_DEVICE_VIDEO_SET_CUR_CT_FOCUS_RELATIVE_CONTROL (0x0147U) 668 #define USB_DEVICE_VIDEO_SET_CUR_CT_FOCUS_AUTO_CONTROL (0x0148U) 669 #define USB_DEVICE_VIDEO_SET_CUR_CT_IRIS_ABSOLUTE_CONTROL (0x0149U) 670 #define USB_DEVICE_VIDEO_SET_CUR_CT_IRIS_RELATIVE_CONTROL (0x014AU) 671 #define USB_DEVICE_VIDEO_SET_CUR_CT_ZOOM_ABSOLUTE_CONTROL (0x014BU) 672 #define USB_DEVICE_VIDEO_SET_CUR_CT_ZOOM_RELATIVE_CONTROL (0x014CU) 673 #define USB_DEVICE_VIDEO_SET_CUR_CT_PANTILT_ABSOLUTE_CONTROL (0x014DU) 674 #define USB_DEVICE_VIDEO_SET_CUR_CT_PANTILT_RELATIVE_CONTROL (0x014EU) 675 #define USB_DEVICE_VIDEO_SET_CUR_CT_ROLL_ABSOLUTE_CONTROL (0x014FU) 676 #define USB_DEVICE_VIDEO_SET_CUR_CT_ROLL_RELATIVE_CONTROL (0x0150U) 677 #define USB_DEVICE_VIDEO_SET_CUR_CT_PRIVACY_CONTROL (0x0151U) 678 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 679 #define USB_DEVICE_VIDEO_SET_CUR_CT_FOCUS_SIMPLE_CONTROL (0x0152U) 680 #define USB_DEVICE_VIDEO_SET_CUR_CT_DIGITAL_WINDOW_CONTROL (0x0153U) 681 #define USB_DEVICE_VIDEO_SET_CUR_CT_REGION_OF_INTEREST_CONTROL (0x0154U) 682 #endif 683 684 #define USB_DEVICE_VIDEO_SET_CUR_VS_PROBE_CONTROL (0x0161U) 685 #define USB_DEVICE_VIDEO_SET_CUR_VS_COMMIT_CONTROL (0x0162U) 686 #define USB_DEVICE_VIDEO_SET_CUR_VS_STILL_PROBE_CONTROL (0x0163U) 687 #define USB_DEVICE_VIDEO_SET_CUR_VS_STILL_COMMIT_CONTROL (0x0164U) 688 #define USB_DEVICE_VIDEO_SET_CUR_VS_STILL_IMAGE_TRIGGER_CONTROL (0x0165U) 689 #define USB_DEVICE_VIDEO_SET_CUR_VS_STREAM_ERROR_CODE_CONTROL (0x0166U) 690 #define USB_DEVICE_VIDEO_SET_CUR_VS_GENERATE_KEY_FRAME_CONTROL (0x0167U) 691 #define USB_DEVICE_VIDEO_SET_CUR_VS_UPDATE_FRAME_SEGMENT_CONTROL (0x0168U) 692 #define USB_DEVICE_VIDEO_SET_CUR_VS_SYNCH_DELAY_CONTROL (0x0169U) 693 694 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 695 #define USB_DEVICE_VIDEO_SET_CUR_EU_SELECT_LAYER_CONTROL (0x0181U) 696 #define USB_DEVICE_VIDEO_SET_CUR_EU_PROFILE_TOOLSET_CONTROL (0x0182U) 697 #define USB_DEVICE_VIDEO_SET_CUR_EU_VIDEO_RESOLUTION_CONTROL (0x0183U) 698 #define USB_DEVICE_VIDEO_SET_CUR_EU_MIN_FRAME_INTERVAL_CONTROL (0x0184U) 699 #define USB_DEVICE_VIDEO_SET_CUR_EU_SLICE_MODE_CONTROL (0x0185U) 700 #define USB_DEVICE_VIDEO_SET_CUR_EU_RATE_CONTROL_MODE_CONTROL (0x0186U) 701 #define USB_DEVICE_VIDEO_SET_CUR_EU_AVERAGE_BITRATE_CONTROL (0x0187U) 702 #define USB_DEVICE_VIDEO_SET_CUR_EU_CPB_SIZE_CONTROL (0x0188U) 703 #define USB_DEVICE_VIDEO_SET_CUR_EU_PEAK_BIT_RATE_CONTROL (0x0189U) 704 #define USB_DEVICE_VIDEO_SET_CUR_EU_QUANTIZATION_PARAMS_CONTROL (0x018AU) 705 #define USB_DEVICE_VIDEO_SET_CUR_EU_SYNC_REF_FRAME_CONTROL (0x018BU) 706 #define USB_DEVICE_VIDEO_SET_CUR_EU_LTR_BUFFER_CONTROL (0x018CU) 707 #define USB_DEVICE_VIDEO_SET_CUR_EU_LTR_PICTURE_CONTROL (0x018DU) 708 #define USB_DEVICE_VIDEO_SET_CUR_EU_LTR_VALIDATION_CONTROL (0x018EU) 709 #define USB_DEVICE_VIDEO_SET_CUR_EU_LEVEL_IDC_LIMIT_CONTROL (0x018FU) 710 #define USB_DEVICE_VIDEO_SET_CUR_EU_SEI_PAYLOADTYPE_CONTROL (0x0190U) 711 #define USB_DEVICE_VIDEO_SET_CUR_EU_QP_RANGE_CONTROL (0x0191U) 712 #define USB_DEVICE_VIDEO_SET_CUR_EU_PRIORITY_CONTROL (0x0192U) 713 #define USB_DEVICE_VIDEO_SET_CUR_EU_START_OR_STOP_LAYER_CONTROL (0x0193U) 714 #define USB_DEVICE_VIDEO_SET_CUR_EU_ERROR_RESILIENCY_CONTROL (0x0194U) 715 #endif 716 717 /*! @}*/ 718 719 /*! @brief The payload header structure for MJPEG payload format. */ 720 STRUCT_PACKED 721 struct _usb_device_video_mjpeg_payload_header_struct 722 { 723 uint8_t bHeaderLength; /*!< The payload header length. */ 724 union 725 { 726 uint8_t bmheaderInfo; /*!< The payload header bitmap field. */ 727 struct 728 { 729 uint8_t frameIdentifier : 1U; /*!< Frame Identifier. This bit toggles at each frame start boundary and stays 730 constant for the rest of the frame.*/ 731 uint8_t endOfFrame : 1U; /*!< End of Frame. This bit indicates the end of a video frame and is set in the 732 last video sample that belongs to a frame.*/ 733 uint8_t presentationTimeStamp : 1U; /*!< Presentation Time Stamp. This bit, when set, indicates the presence 734 of a PTS field.*/ 735 uint8_t sourceClockReference : 1U; /*!< Source Clock Reference. This bit, when set, indicates the presence 736 of a SCR field.*/ 737 uint8_t reserved : 1U; /*!< Reserved. Set to 0. */ 738 uint8_t stillImage : 1U; /*!< Still Image. This bit, when set, identifies a video sample that belongs to a 739 still image.*/ 740 uint8_t errorBit : 1U; /*!< Error Bit. This bit, when set, indicates an error in the device streaming.*/ 741 uint8_t endOfHeader : 1U; /*!< End of Header. This bit, when set, indicates the end of the BFH fields.*/ 742 } headerInfoBits; 743 struct 744 { 745 uint8_t FID : 1U; /*!< Frame Identifier. This bit toggles at each frame start boundary and stays constant 746 for the rest of the frame.*/ 747 uint8_t EOI : 1U; /*!< End of Frame. This bit indicates the end of a video frame and is set in the last 748 video sample that belongs to a frame.*/ 749 uint8_t PTS : 1U; /*!< Presentation Time Stamp. This bit, when set, indicates the presence of a PTS field.*/ 750 uint8_t SCR : 1U; /*!< Source Clock Reference. This bit, when set, indicates the presence of a SCR field.*/ 751 uint8_t RES : 1U; /*!< Reserved. Set to 0. */ 752 uint8_t STI : 1U; /*!< Still Image. This bit, when set, identifies a video sample that belongs to a still 753 image.*/ 754 uint8_t ERR : 1U; /*!< Error Bit. This bit, when set, indicates an error in the device streaming.*/ 755 uint8_t EOH : 1U; /*!< End of Header. This bit, when set, indicates the end of the BFH fields.*/ 756 } headerInfoBitmap; 757 } headerInfoUnion; 758 uint32_t dwPresentationTime; /*!< Presentation time stamp (PTS) field.*/ 759 uint8_t bSourceClockReference[6]; /*!< Source clock reference (SCR) field.*/ 760 } STRUCT_UNPACKED; 761 typedef struct _usb_device_video_mjpeg_payload_header_struct usb_device_video_mjpeg_payload_header_struct_t; 762 763 /*! @brief The Video probe and commit controls structure.*/ 764 STRUCT_PACKED 765 struct _usb_device_video_probe_and_commit_controls_struct 766 { 767 union 768 { 769 uint8_t bmHint; /*!< Bit-field control indicating to the function what fields shall be kept fixed. */ 770 struct 771 { 772 uint8_t dwFrameInterval : 1U; /*!< dwFrameInterval field.*/ 773 uint8_t wKeyFrameRate : 1U; /*!< wKeyFrameRate field.*/ 774 uint8_t wPFrameRate : 1U; /*!< wPFrameRate field.*/ 775 uint8_t wCompQuality : 1U; /*!< wCompQuality field.*/ 776 uint8_t wCompWindowSize : 1U; /*!< wCompWindowSize field.*/ 777 uint8_t reserved : 3U; /*!< Reserved field.*/ 778 } hintBitmap; 779 } hintUnion; 780 union 781 { 782 uint8_t bmHint; /*!< Bit-field control indicating to the function what fields shall be kept fixed. */ 783 struct 784 { 785 uint8_t reserved : 8U; /*!< Reserved field.*/ 786 } hintBitmap; 787 } hintUnion1; 788 uint8_t bFormatIndex; /*!< Video format index from a format descriptor.*/ 789 uint8_t bFrameIndex; /*!< Video frame index from a frame descriptor.*/ 790 uint32_t dwFrameInterval; /*!< Frame interval in 100ns units.*/ 791 uint16_t wKeyFrameRate; /*!< Key frame rate in key-frame per video-frame units.*/ 792 uint16_t wPFrameRate; /*!< PFrame rate in PFrame/key frame units.*/ 793 uint16_t wCompQuality; /*!< Compression quality control in abstract units 0U (lowest) to 10000U (highest).*/ 794 uint16_t wCompWindowSize; /*!< Window size for average bit rate control.*/ 795 uint16_t wDelay; /*!< Internal video streaming interface latency in ms from video data capture to presentation on 796 the USB.*/ 797 uint32_t dwMaxVideoFrameSize; /*!< Maximum video frame or codec-specific segment size in bytes.*/ 798 uint32_t dwMaxPayloadTransferSize; /*!< Specifies the maximum number of bytes that the device can transmit or 799 receive in a single payload transfer.*/ 800 uint32_t dwClockFrequency; /*!< The device clock frequency in Hz for the specified format. This specifies the 801 units used for the time information fields in the Video Payload Headers in the data 802 stream.*/ 803 uint8_t bmFramingInfo; /*!< Bit-field control supporting the following values: D0 Frame ID, D1 EOF.*/ 804 uint8_t bPreferedVersion; /*!< The preferred payload format version supported by the host or device for the 805 specified bFormatIndex value.*/ 806 uint8_t bMinVersion; /*!< The minimum payload format version supported by the device for the specified bFormatIndex 807 value.*/ 808 uint8_t bMaxVersion; /*!< The maximum payload format version supported by the device for the specified bFormatIndex 809 value.*/ 810 #if defined(USB_DEVICE_VIDEO_CLASS_VERSION_1_5) && USB_DEVICE_VIDEO_CLASS_VERSION_1_5 811 uint8_t bUsage; /*!< This bitmap enables features reported by the bmUsages field of the Video Frame Descriptor.*/ 812 uint8_t bBitDepthLuma; /*!< Represents bit_depth_luma_minus8 + 8U, which must be the same as bit_depth_chroma_minus8 813 + 8.*/ 814 uint8_t bmSettings; /*!< A bitmap of flags that is used to discover and control specific features of a temporally 815 encoded video stream.*/ 816 uint8_t bMaxNumberOfRefFramesPlus1; /*!< Host indicates the maximum number of frames stored for use as references.*/ 817 uint16_t bmRateControlModes; /*!< This field contains 4U sub-fields, each of which is a 4U bit number.*/ 818 uint64_t bmLayoutPerStream; /*!< This field contains 4U sub-fields, each of which is a 2U byte number.*/ 819 #endif 820 } STRUCT_UNPACKED; 821 typedef struct _usb_device_video_probe_and_commit_controls_struct usb_device_video_probe_and_commit_controls_struct_t; 822 823 /*! @brief The Video still probe and still commit controls structure.*/ 824 STRUCT_PACKED 825 struct _usb_device_video_still_probe_and_commit_controls_struct 826 { 827 uint8_t bFormatIndex; /*!< Video format index from a format descriptor.*/ 828 uint8_t bFrameIndex; /*!< Video frame index from a frame descriptor.*/ 829 uint8_t bCompressionIndex; /*!< Compression index from a frame descriptor.*/ 830 uint32_t dwMaxVideoFrameSize; /*!< Maximum still image size in bytes.*/ 831 uint32_t dwMaxPayloadTransferSize; /*!< Specifies the maximum number of bytes that the device can transmit or 832 receive in a single payload transfer.*/ 833 } STRUCT_UNPACKED; 834 typedef struct _usb_device_video_still_probe_and_commit_controls_struct 835 usb_device_video_still_probe_and_commit_controls_struct_t; 836 837 /*! @brief Available common event types in video class callback */ 838 typedef enum _usb_device_video_event 839 { 840 kUSB_DeviceVideoEventStreamSendResponse = 0x01U, /*!< Send data completed or cancelled in stream pipe */ 841 kUSB_DeviceVideoEventStreamRecvResponse, /*!< Data received or cancelled in stream pipe */ 842 kUSB_DeviceVideoEventControlSendResponse, /*!< Send data completed or cancelled etc in video control pipe */ 843 kUSB_DeviceVideoEventClassRequestBuffer, /*!< Get buffer to save the data of the video class-specific request. */ 844 } usb_device_video_event_t; 845 846 /*! 847 * @brief The video device class-specific information. 848 * The structure is used to pass the video entity information filled by application. 849 * Such as 850 * entity id (unit or terminal ID), 851 * entity type (unit or terminal type), 852 * and terminal type if the entity is a terminal. 853 */ 854 typedef struct _usb_device_video_entity_struct 855 { 856 uint8_t entityId; 857 uint8_t entityType; 858 uint16_t terminalType; 859 } usb_device_video_entity_struct_t; 860 861 /*! 862 * @brief The video device class-specific information list. 863 * The structure is used to pass the video entity informations filled by the application. 864 * The type of each entity is the usb_device_video_entity_struct_t. 865 * The structure pointer is kept in the usb_device_interface_struct_t::classSpecific, 866 * such as, if there are three entities(out terminal, camera terminal, and processing unit), 867 * the value of the count field is 3U and the entity field saves the every entity information. 868 */ 869 typedef struct _usb_device_video_entities_struct 870 { 871 usb_device_video_entity_struct_t *entity; 872 uint8_t count; 873 } usb_device_video_entities_struct_t; 874 875 /*! @brief The video device class status structure */ 876 typedef struct _usb_device_video_struct 877 { 878 usb_device_handle handle; /*!< The device handle */ 879 usb_device_class_config_struct_t *configStruct; /*!< The configuration of the class. */ 880 usb_device_interface_struct_t *controlInterfaceHandle; /*!< Current control interface handle */ 881 usb_device_interface_struct_t *streamInterfaceHandle; /*!< Current stream interface handle */ 882 uint8_t configuration; /*!< Current configuration */ 883 uint8_t controlInterfaceNumber; /*!< The control interface number of the class */ 884 uint8_t controlAlternate; /*!< Current alternate setting of the control interface */ 885 uint8_t streamInterfaceNumber; /*!< The stream interface number of the class */ 886 uint8_t streamAlternate; /*!< Current alternate setting of the stream interface */ 887 uint8_t streamInPipeBusy; /*!< Stream IN pipe busy flag */ 888 uint8_t streamOutPipeBusy; /*!< Stream OUT pipe busy flag */ 889 } usb_device_video_struct_t; 890 891 /******************************************************************************* 892 * API 893 ******************************************************************************/ 894 895 #if defined(__cplusplus) 896 extern "C" { 897 #endif 898 899 /*! 900 * @brief Initializes the video class. 901 * 902 * This function is used to initialize the video class. This function can only be called by the #USB_DeviceClassInit. 903 * 904 * @param[in] controllerId The controller ID of the USB IP. See the enumeration #usb_controller_index_t. 905 * @param[in] config The class configuration information. 906 * @param[in] handle An parameter used to return pointer of the video class handle to the caller. 907 * 908 * @return A USB error code or kStatus_USB_Success. 909 */ 910 extern usb_status_t USB_DeviceVideoInit(uint8_t controllerId, 911 usb_device_class_config_struct_t *config, 912 class_handle_t *handle); 913 914 /*! 915 * @brief Deinitializes the device video class. 916 * 917 * The function deinitializes the device video class. This function can only be called by the #USB_DeviceClassDeinit. 918 * 919 * @param[in] handle The video class handle received from usb_device_class_config_struct_t::classHandle. 920 * 921 * @return A USB error code or kStatus_USB_Success. 922 */ 923 extern usb_status_t USB_DeviceVideoDeinit(class_handle_t handle); 924 925 /*! 926 * @brief Handles the event passed to the video class. 927 * 928 * This function handles the event passed to the video class. This function can only be called by the 929 * #USB_DeviceClassEvent. 930 * 931 * @param[in] handle The video class handle received from the usb_device_class_config_struct_t::classHandle. 932 * @param[in] event The event codes. See the enumeration #usb_device_class_event_t. 933 * @param[in,out] param The parameter type is determined by the event code. 934 * 935 * @return A USB error code or kStatus_USB_Success. 936 * @retval kStatus_USB_Success Free device handle successfully. 937 * @retval kStatus_USB_InvalidParameter The device handle is not found. 938 * @retval kStatus_USB_InvalidRequest The request is invalid and the control pipe is stalled by the caller. 939 */ 940 extern usb_status_t USB_DeviceVideoEvent(void *handle, uint32_t event, void *param); 941 942 /*! 943 * @name USB device video class APIs 944 * @{ 945 */ 946 947 /*! 948 * @brief Sends data through a specified endpoint. 949 * 950 * The function is used to send data through a specified endpoint. 951 * The function calls #USB_DeviceSendRequest internally. 952 * 953 * @param[in] handle The video class handle received from usb_device_class_config_struct_t::classHandle. 954 * @param[in] ep Endpoint index. 955 * @param[in] buffer The memory address to hold the data need to be sent. 956 * @param[in] length The data length to be sent. 957 * 958 * @return A USB error code or kStatus_USB_Success. 959 * 960 * @note The function can only be called in the same context. 961 * 962 * @note The return value indicates whether the sending request is successful or not. The transfer done is notified by 963 * USB_DeviceVideoStreamIn or USB_DeviceVideoControlIn. 964 * Currently, only one transfer request can be supported for a specific endpoint. 965 * If there is a specific requirement to support multiple transfer requests for a specific endpoint, the application 966 * should implement a queue in the application level. 967 * The subsequent transfer can begin only when the previous transfer is done (a notification is received through the 968 * endpoint 969 * callback). 970 */ 971 extern usb_status_t USB_DeviceVideoSend(class_handle_t handle, uint8_t ep, uint8_t *buffer, uint32_t length); 972 973 /*! 974 * @brief Receives data through a specified endpoint. 975 * 976 * The function is used to receive data through a specified endpoint. 977 * The function calls the #USB_DeviceRecvRequest internally. 978 * 979 * @param[in] handle The video class handle got from usb_device_class_config_struct_t::classHandle. 980 * @param[in] ep Endpoint index. 981 * @param[in] buffer The memory address to save the received data. 982 * @param[in] length The data length want to be received. 983 * 984 * @return A USB error code or kStatus_USB_Success. 985 * 986 * @note The function can only be called in the same context. 987 * 988 * @note The return value indicates whether the receiving request is successful or not. The transfer done is notified by 989 * USB_DeviceVideoStreamOut. 990 * Currently, only one transfer request can be supported for a specific endpoint. 991 * If there is a specific requirement to support multiple transfer requests for a specific endpoint. The application 992 * should implement a queue in the application level. 993 * The subsequent transfer can begin only when the previous transfer is done (a notification is received through the 994 * endpoint 995 * callback). 996 */ 997 extern usb_status_t USB_DeviceVideoRecv(class_handle_t handle, uint8_t ep, uint8_t *buffer, uint32_t length); 998 999 /*! @}*/ 1000 1001 #if defined(__cplusplus) 1002 } 1003 #endif 1004 1005 /*! @}*/ 1006 1007 #endif /* __USB_DEVICE_VIDEO_H__ */ 1008