1 /**************************************************************************/
2 /*                                                                        */
3 /*       Copyright (c) Microsoft Corporation. All rights reserved.        */
4 /*                                                                        */
5 /*       This software is licensed under the Microsoft Software License   */
6 /*       Terms for Microsoft Azure RTOS. Full text of the license can be  */
7 /*       found in the LICENSE file at https://aka.ms/AzureRTOS_EULA       */
8 /*       and in the root directory of this software.                      */
9 /*                                                                        */
10 /**************************************************************************/
11 
12 
13 /**************************************************************************/
14 /**************************************************************************/
15 /**                                                                       */
16 /** USBX Component                                                        */
17 /**                                                                       */
18 /**   Video Class                                                         */
19 /**                                                                       */
20 /**************************************************************************/
21 /**************************************************************************/
22 
23 
24 /**************************************************************************/
25 /*                                                                        */
26 /*  COMPONENT DEFINITION                                   RELEASE        */
27 /*                                                                        */
28 /*    ux_host_class_video.h                               PORTABLE C      */
29 /*                                                           6.3.0        */
30 /*  AUTHOR                                                                */
31 /*                                                                        */
32 /*    Chaoqiong Xiao, Microsoft Corporation                               */
33 /*                                                                        */
34 /*  DESCRIPTION                                                           */
35 /*                                                                        */
36 /*    This file contains all the header and extern functions used by the  */
37 /*    USBX video class.                                                   */
38 /*                                                                        */
39 /*  RELEASE HISTORY                                                       */
40 /*                                                                        */
41 /*    DATE              NAME                      DESCRIPTION             */
42 /*                                                                        */
43 /*  05-19-2020     Chaoqiong Xiao           Initial Version 6.0           */
44 /*  09-30-2020     Chaoqiong Xiao           Modified comment(s),          */
45 /*                                            added new definition, field */
46 /*                                            and functions for video     */
47 /*                                            control handling, used UX   */
48 /*                                            prefix to refer to TX       */
49 /*                                            symbols instead of using    */
50 /*                                            them directly,              */
51 /*                                            resulting in version 6.1    */
52 /*  08-02-2021     Wen Wang                 Modified comment(s),          */
53 /*                                            added extern "C" keyword    */
54 /*                                            for compatibility with C++, */
55 /*                                            added new definitions       */
56 /*                                            according to UVC 1.5 Class  */
57 /*                                            specification,              */
58 /*                                            resulting in version 6.1.8  */
59 /*  10-31-2023     Chaoqiong Xiao           Modified comment(s),          */
60 /*                                            added format and frame data */
61 /*                                            fields for H264 support,    */
62 /*                                            optimized USB descriptors,  */
63 /*                                            added error checks support, */
64 /*                                            resulting in version 6.3.0  */
65 /*                                                                        */
66 /**************************************************************************/
67 
68 #ifndef UX_HOST_CLASS_VIDEO_H
69 #define UX_HOST_CLASS_VIDEO_H
70 
71 /* Determine if a C++ compiler is being used.  If so, ensure that standard
72    C is used to process the API information.  */
73 
74 #ifdef   __cplusplus
75 
76 /* Yes, C++ compiler is present.  Use standard C.  */
77 extern   "C" {
78 
79 #endif
80 
81 /* Internal option: enable the basic USBX error checking. This define is typically used
82    while debugging application.  */
83 #if defined(UX_ENABLE_ERROR_CHECKING) && !defined(UX_HOST_CLASS_VIDEO_ENABLE_ERROR_CHECKING)
84 #define UX_HOST_CLASS_VIDEO_ENABLE_ERROR_CHECKING
85 #endif
86 
87 /* Define external static data.  */
88 extern UCHAR _ux_system_class_video_interface_descriptor_structure[];
89 extern UCHAR _ux_system_class_video_input_terminal_descriptor_structure[];
90 extern UCHAR _ux_system_class_video_input_header_descriptor_structure[];
91 extern UCHAR _ux_system_class_video_processing_unit_descriptor_structure[];
92 extern UCHAR _ux_system_class_video_streaming_interface_descriptor_structure[];
93 extern UCHAR _ux_system_class_video_streaming_endpoint_descriptor_structure[];
94 extern UCHAR _ux_system_class_video_frame_descriptor_structure[];
95 
96 extern UCHAR _ux_system_host_class_video_name[];
97 
98 /* Define Video Class IOCTL constants.  */
99 
100 #define UX_HOST_CLASS_VIDEO_IOCTL_GET_INPUT_TERMINAL                                        0x01
101 #define UX_HOST_CLASS_VIDEO_IOCTL_GET_FORMAT_NUMBER                                         0x02
102 #define UX_HOST_CLASS_VIDEO_IOCTL_GET_FORMAT_DATA                                           0x03
103 #define UX_HOST_CLASS_VIDEO_IOCTL_GET_FRAME_NUMBER                                          0x04
104 #define UX_HOST_CLASS_VIDEO_IOCTL_GET_FRAME_DATA                                            0x05
105 #define UX_HOST_CLASS_VIDEO_IOCTL_CHANNEL_START                                             0x06
106 #define UX_HOST_CLASS_VIDEO_IOCTL_CHANNEL_STOP                                              0x07
107 #define UX_HOST_CLASS_VIDEO_IOCTL_GET_FRAME_INTERVAL                                        0x08
108 
109 #define UX_HOST_CLASS_VIDEO_IOCTL_ABORT_IN_PIPE                                             0x80
110 
111 /* Define Video Class main constants.  */
112 
113 #define UX_HOST_CLASS_VIDEO_CLASS_TRANSFER_TIMEOUT                                          30
114 #define UX_HOST_CLASS_VIDEO_CLASS                                                           0x0e
115 #define UX_HOST_CLASS_VIDEO_SUBCLASS_UNDEFINED                                              0
116 #define UX_HOST_CLASS_VIDEO_SUBCLASS_CONTROL                                                1
117 #define UX_HOST_CLASS_VIDEO_SUBCLASS_STREAMING                                              2
118 #define UX_HOST_CLASS_VIDEO_SUBCLASS_INTERFACE_COLLECTION                                   3
119 
120 
121 /* Define Video Class main descriptor types.  */
122 
123 #define UX_HOST_CLASS_VIDEO_CS_UNDEFINED                                                    0x20
124 #define UX_HOST_CLASS_VIDEO_CS_DEVICE                                                       0x21
125 #define UX_HOST_CLASS_VIDEO_CS_CONFIGURATION                                                0x22
126 #define UX_HOST_CLASS_VIDEO_CS_STRING                                                       0x23
127 #define UX_HOST_CLASS_VIDEO_CS_INTERFACE                                                    0x24
128 #define UX_HOST_CLASS_VIDEO_CS_ENDPOINT                                                     0x25
129 
130 /* Define Video Class specific VC .  */
131 
132 #define UX_HOST_CLASS_VIDEO_VC_DESCRIPTOR_UNDEFINED                                         0x00
133 #define UX_HOST_CLASS_VIDEO_VC_HEADER                                                       0x01
134 #define UX_HOST_CLASS_VIDEO_VC_INPUT_TERMINAL                                               0x02
135 #define UX_HOST_CLASS_VIDEO_VC_OUTPUT_TERMINAL                                              0x03
136 #define UX_HOST_CLASS_VIDEO_VC_SELECTOR_UNIT                                                0x04
137 #define UX_HOST_CLASS_VIDEO_VC_PROCESSING_UNIT                                              0x05
138 #define UX_HOST_CLASS_VIDEO_VC_EXTENSION_UNIT                                               0x06
139 #define UX_HOST_CLASS_VIDEO_VC_ENCODING_UNIT                                                0x07
140 
141 /* Define Video Class specific VS .  */
142 
143 #define UX_HOST_CLASS_VIDEO_VS_UNDEFINED                                                    0x00
144 #define UX_HOST_CLASS_VIDEO_VS_INPUT_HEADER                                                 0x01
145 #define UX_HOST_CLASS_VIDEO_VS_OUTPUT_HEADER                                                0x02
146 #define UX_HOST_CLASS_VIDEO_VS_STILL_IMAGE_FRAME                                            0x03
147 #define UX_HOST_CLASS_VIDEO_VS_FORMAT_UNCOMPRESSED                                          0x04
148 #define UX_HOST_CLASS_VIDEO_VS_FRAME_UNCOMPRESSED                                           0x05
149 #define UX_HOST_CLASS_VIDEO_VS_FORMAT_MJPEG                                                 0x06
150 #define UX_HOST_CLASS_VIDEO_VS_FRAME_MJPEG                                                  0x07
151 #define UX_HOST_CLASS_VIDEO_VS_FORMAT_MPEG2TS                                               0x0A
152 #define UX_HOST_CLASS_VIDEO_VS_FORMAT_DV                                                    0x0C
153 #define UX_HOST_CLASS_VIDEO_VS_COLORFORMAT                                                  0x0D
154 #define UX_HOST_CLASS_VIDEO_VS_FORMAT_FRAME_BASED                                           0x10
155 #define UX_HOST_CLASS_VIDEO_VS_FRAME_FRAME_BASED                                            0x11
156 #define UX_HOST_CLASS_VIDEO_VS_FORMAT_STREAM_BASED                                          0x12
157 #define UX_HOST_CLASS_VIDEO_VS_FORMAT_H264                                                  0x13
158 #define UX_HOST_CLASS_VIDEO_VS_FRAME_H264                                                   0x14
159 #define UX_HOST_CLASS_VIDEO_VS_FORMAT_H264_SIMULCAST                                        0x15
160 #define UX_HOST_CLASS_VIDEO_VS_FORMAT_VP8                                                   0x16
161 #define UX_HOST_CLASS_VIDEO_VS_FRAME_VP8                                                    0x17
162 #define UX_HOST_CLASS_VIDEO_VS_FORMAT_VP8_SIMULCAST                                         0x18
163 
164 
165 /* Define Video Class specific Control Selectors.  */
166 
167 #define UX_HOST_CLASS_VIDEO_CT_CONTROL_UNDEFINED                                            0x00
168 #define UX_HOST_CLASS_VIDEO_CT_SCANNING_MODE_CONTROL                                        0x01
169 #define UX_HOST_CLASS_VIDEO_CT_AE_MODE_CONTROL                                              0x02
170 #define UX_HOST_CLASS_VIDEO_CT_AE_PRIORITY_CONTROL                                          0x03
171 #define UX_HOST_CLASS_VIDEO_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL                               0x04
172 #define UX_HOST_CLASS_VIDEO_CT_EXPOSURE_TIME_RELATIVE_CONTROL                               0x05
173 #define UX_HOST_CLASS_VIDEO_CT_FOCUS_ABSOLUTE_CONTROL                                       0x06
174 #define UX_HOST_CLASS_VIDEO_CT_FOCUS_RELATIVE_CONTROL                                       0x07
175 #define UX_HOST_CLASS_VIDEO_CT_FOCUS_AUTO_CONTROL                                           0x08
176 #define UX_HOST_CLASS_VIDEO_CT_IRIS_ABSOLUTE_CONTROL                                        0x09
177 #define UX_HOST_CLASS_VIDEO_CT_IRIS_RELATIVE_CONTROL                                        0x0A
178 #define UX_HOST_CLASS_VIDEO_CT_ZOOM_ABSOLUTE_CONTROL                                        0x0B
179 #define UX_HOST_CLASS_VIDEO_CT_ZOOM_RELATIVE_CONTROL                                        0x0C
180 #define UX_HOST_CLASS_VIDEO_CT_PANTILT_ABSOLUTE_CONTROL                                     0x0D
181 #define UX_HOST_CLASS_VIDEO_CT_PANTILT_RELATIVE_CONTROL                                     0x0E
182 #define UX_HOST_CLASS_VIDEO_CT_ROLL_ABSOLUTE_CONTROL                                        0x0F
183 #define UX_HOST_CLASS_VIDEO_CT_ROLL_RELATIVE_CONTROL                                        0x10
184 #define UX_HOST_CLASS_VIDEO_CT_PRIVACY_CONTROL                                              0x11
185 #define UX_HOST_CLASS_VIDEO_CT_FOCUS_SIMPLE_CONTROL                                         0x12
186 #define UX_HOST_CLASS_VIDEO_CT_WINDOW_CONTROL                                               0x13
187 #define UX_HOST_CLASS_VIDEO_CT_REGION_OF_INTEREST_CONTROL                                   0x14
188 
189 
190 #define UX_HOST_CLASS_VIDEO_PU_CONTROL_UNDEFINED                                            0x00
191 #define UX_HOST_CLASS_VIDEO_PU_BACKLIGHT_COMPENSATION_CONTROL                               0x01
192 #define UX_HOST_CLASS_VIDEO_PU_BRIGHTNESS_CONTROL                                           0x02
193 #define UX_HOST_CLASS_VIDEO_PU_CONTRAST_CONTROL                                             0x03
194 #define UX_HOST_CLASS_VIDEO_PU_GAIN_CONTROL                                                 0x04
195 #define UX_HOST_CLASS_VIDEO_PU_POWER_LINE_FREQUENCY_CONTROL                                 0x05
196 #define UX_HOST_CLASS_VIDEO_PU_HUE_CONTROL                                                  0x06
197 #define UX_HOST_CLASS_VIDEO_PU_SATURATION_CONTROL                                           0x07
198 #define UX_HOST_CLASS_VIDEO_PU_SHARPNESS_CONTROL                                            0x08
199 #define UX_HOST_CLASS_VIDEO_PU_GAMMA_CONTROL                                                0x09
200 #define UX_HOST_CLASS_VIDEO_PU_WHITE_BALANCE_TEMPERATURE_CONTROL                            0x0A
201 #define UX_HOST_CLASS_VIDEO_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL                       0x0B
202 #define UX_HOST_CLASS_VIDEO_PU_WHITE_BALANCE_COMPONENT_CONTROL                              0x0C
203 #define UX_HOST_CLASS_VIDEO_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL                         0x0D
204 #define UX_HOST_CLASS_VIDEO_PU_DIGITAL_MULTIPLIER_CONTROL                                   0x0E
205 #define UX_HOST_CLASS_VIDEO_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL                             0x0F
206 #define UX_HOST_CLASS_VIDEO_PU_HUE_AUTO_CONTROL                                             0x10
207 #define UX_HOST_CLASS_VIDEO_PU_ANALOG_VIDEO_STANDARD_CONTROL                                0x11
208 #define UX_HOST_CLASS_VIDEO_PU_ANALOG_LOCK_STATUS_CONTROL                                   0x12
209 #define UX_HOST_CLASS_VIDEO_PU_CONTRAST_AUTO_CONTROL                                        0x13
210 
211 
212 #define UX_HOST_CLASS_VIDEO_VS_CONTROL_UNDEFINED                                            0x00
213 #define UX_HOST_CLASS_VIDEO_VS_PROBE_CONTROL                                                0x01
214 #define UX_HOST_CLASS_VIDEO_VS_COMMIT_CONTROL                                               0x02
215 #define UX_HOST_CLASS_VIDEO_VS_STILL_PROBE_CONTROL                                          0x03
216 #define UX_HOST_CLASS_VIDEO_VS_STILL_COMMIT_CONTROL                                         0x04
217 #define UX_HOST_CLASS_VIDEO_VS_STILL_IMAGE_TRIGGER_CONTROL                                  0x05
218 #define UX_HOST_CLASS_VIDEO_VS_STREAM_ERROR_CODE_CONTROL                                    0x06
219 #define UX_HOST_CLASS_VIDEO_VS_GENERATE_KEY_FRAME_CONTROL                                   0x07
220 #define UX_HOST_CLASS_VIDEO_VS_UPDATE_FRAME_SEGMENT_CONTROL                                 0x08
221 #define UX_HOST_CLASS_VIDEO_VS_SYNCH_DELAY_CONTROL                                          0x09
222 
223 
224 /* Define USB Video Class terminal types.  */
225 
226 #define UX_HOST_CLASS_VIDEO_TT_VENDOR_SPECIFIC                                              0x0100
227 #define UX_HOST_CLASS_VIDEO_TT_STREAMING                                                    0x0101
228 
229 #define UX_HOST_CLASS_VIDEO_ITT_VENDOR_SPECIFIC                                             0x0200
230 #define UX_HOST_CLASS_VIDEO_ITT_CAMERA                                                      0x0201
231 #define UX_HOST_CLASS_VIDEO_ITT_MEDIA_TRANSPORT_INPUT                                       0x0202
232 
233 #define UX_HOST_CLASS_VIDEO_OTT_VENDOR_SPECIFIC                                             0x0300
234 #define UX_HOST_CLASS_VIDEO_OTT_CAMERA                                                      0x0301
235 #define UX_HOST_CLASS_VIDEO_OTT_MEDIA_TRANSPORT_INPUT                                       0x0302
236 
237 
238 /* Define USB Video Class Request Error Code Control.  */
239 
240 #define UX_HOST_CLASS_VIDEO_REQUEST_ERROR_CODE_NO_ERROR                                     0x00
241 #define UX_HOST_CLASS_VIDEO_REQUEST_ERROR_CODE_NOT_READY                                    0x01
242 #define UX_HOST_CLASS_VIDEO_REQUEST_ERROR_CODE_WRONG_STATE                                  0x02
243 #define UX_HOST_CLASS_VIDEO_REQUEST_ERROR_CODE_POWER                                        0x03
244 #define UX_HOST_CLASS_VIDEO_REQUEST_ERROR_CODE_OUT_OF_RANGE                                 0x04
245 #define UX_HOST_CLASS_VIDEO_REQUEST_ERROR_CODE_INVALID_INPUT                                0x05
246 #define UX_HOST_CLASS_VIDEO_REQUEST_ERROR_CODE_INVALID_CONTROL                              0x06
247 #define UX_HOST_CLASS_VIDEO_REQUEST_ERROR_CODE_INVALID_REQUEST                              0x07
248 #define UX_HOST_CLASS_VIDEO_REQUEST_ERROR_CODE_INVALID_VALUE_WITHIN_RANGE                   0x08
249 #define UX_HOST_CLASS_VIDEO_REQUEST_ERROR_CODE_UNKNOWN                                      0xFF
250 
251 
252 /* Define Video Class encoding format types.  */
253 
254 #define UX_HOST_CLASS_VIDEO_INTERFACE_DESCRIPTOR_ENTRIES                                    8
255 #define UX_HOST_CLASS_VIDEO_INTERFACE_DESCRIPTOR_LENGTH                                     8
256 
257 #define UX_HOST_CLASS_VIDEO_INPUT_TERMINAL_DESCRIPTOR_ENTRIES                               7
258 #define UX_HOST_CLASS_VIDEO_INPUT_TERMINAL_DESCRIPTOR_LENGTH                                8
259 
260 #define UX_HOST_CLASS_VIDEO_INPUT_HEADER_DESCRIPTOR_ENTRIES                                 12
261 #define UX_HOST_CLASS_VIDEO_INPUT_HEADER_DESCRIPTOR_LENGTH                                  13
262 
263 #define UX_HOST_CLASS_VIDEO_PROCESSING_UNIT_DESCRIPTOR_ENTRIES                              8
264 #define UX_HOST_CLASS_VIDEO_PROCESSING_UNIT_DESCRIPTOR_LENGTH                               9
265 
266 #define UX_HOST_CLASS_VIDEO_STREAMING_INTERFACE_DESCRIPTOR_ENTRIES                          6
267 #define UX_HOST_CLASS_VIDEO_STREAMING_INTERFACE_DESCRIPTOR_LENGTH                           6
268 
269 #define UX_HOST_CLASS_VIDEO_STREAMING_ENDPOINT_DESCRIPTOR_ENTRIES                           6
270 #define UX_HOST_CLASS_VIDEO_STREAMING_ENDPOINT_DESCRIPTOR_LENGTH                            6
271 
272 #define UX_HOST_CLASS_VIDEO_FRAME_DESCRIPTOR_ENTRIES                                        12
273 #define UX_HOST_CLASS_VIDEO_FRAME_DESCRIPTOR_LENGTH                                         30
274 
275 
276 /* Define Video Class specific interface descriptor.  */
277 
278 #define UX_HOST_CLASS_VIDEO_MAX_CHANNEL                                                     8
279 #define UX_HOST_CLASS_VIDEO_NAME_LENGTH                                                     64
280 
281 /* Define Video Class specific request codes.  */
282 
283 #define UX_HOST_CLASS_VIDEO_REQUEST_CODE_UNDEFINED                                          0x00
284 #define UX_HOST_CLASS_VIDEO_SET_CUR                                                         0x01
285 #define UX_HOST_CLASS_VIDEO_GET_CUR                                                         0x81
286 #define UX_HOST_CLASS_VIDEO_GET_MIN                                                         0x82
287 #define UX_HOST_CLASS_VIDEO_GET_MAX                                                         0x83
288 #define UX_HOST_CLASS_VIDEO_GET_RES                                                         0x84
289 #define UX_HOST_CLASS_VIDEO_GET_INFO                                                        0x86
290 #define UX_HOST_CLASS_VIDEO_GET_DEF                                                         0x87
291 #define UX_HOST_CLASS_VIDEO_GET_CUR_ALL                                                     0x91
292 #define UX_HOST_CLASS_VIDEO_GET_MIN_ALL                                                     0x92
293 #define UX_HOST_CLASS_VIDEO_GET_MAX_ALL                                                     0x93
294 #define UX_HOST_CLASS_VIDEO_GET_RES_ALL                                                     0x94
295 #define UX_HOST_CLASS_VIDEO_GET_GET_DEF_ALL                                                 0x97
296 
297 /* Define Video Class error codes.  */
298 
299 #define UX_HOST_CLASS_VIDEO_WRONG_TYPE                                                      0x90
300 #define UX_HOST_CLASS_VIDEO_WRONG_INTERFACE                                                 0x91
301 #define UX_HOST_CLASS_VIDEO_PARAMETER_ERROR                                                 0x92
302 #define UX_HOST_CLASS_VIDEO_DEVICE_NOT_READY                                                0x93
303 
304 /* Define Video Class Terminal Control Selectors.  */
305 #define UX_HOST_CLASS_VIDEO_TCS_VC_CONTROL_UNDEFINED                                        0x00
306 #define UX_HOST_CLASS_VIDEO_TCS_VC_VIDEO_POWER_MODE_CONTROL                                 0x01
307 #define UX_HOST_CLASS_VIDEO_TCS_VC_REQUEST_ERROR_CODE_CONTROL                               0x02
308 
309 #define UX_HOST_CLASS_VIDEO_TCS_TE_CONTROL_UNDEFINED                                        0x00
310 
311 #define UX_HOST_CLASS_VIDEO_TCS_SU_CONTROL_UNDEFINED                                        0x00
312 #define UX_HOST_CLASS_VIDEO_TCS_SU_INPUT_SELECT_CONTROL                                     0x01
313 
314 #define UX_HOST_CLASS_VIDEO_TCS_CT_CONTROL_UNDEFINED                                        0x00
315 #define UX_HOST_CLASS_VIDEO_TCS_CT_SCANNING_MODE_CONTROL                                    0x01
316 #define UX_HOST_CLASS_VIDEO_TCS_CT_AE_MODE_CONTROL                                          0x02
317 #define UX_HOST_CLASS_VIDEO_TCS_CT_AE_PRIORITY_CONTROL                                      0x03
318 #define UX_HOST_CLASS_VIDEO_TCS_CT_EXPOSURE_TIME_ABSOLUTE_CONTROL                           0x04
319 #define UX_HOST_CLASS_VIDEO_TCS_CT_EXPOSURE_TIME_RELATIVE_CONTROL                           0x05
320 #define UX_HOST_CLASS_VIDEO_TCS_CT_FOCUS_ABSOLUTE_CONTROL                                   0x06
321 #define UX_HOST_CLASS_VIDEO_TCS_CT_FOCUS_RELATIVE_CONTROL                                   0x07
322 #define UX_HOST_CLASS_VIDEO_TCS_CT_FOCUS_AUTO_CONTROL                                       0x08
323 #define UX_HOST_CLASS_VIDEO_TCS_CT_IRIS_ABSOLUTE_CONTROL                                    0x09
324 #define UX_HOST_CLASS_VIDEO_TCS_CT_IRIS_RELATIVE_CONTROL                                    0x0A
325 #define UX_HOST_CLASS_VIDEO_TCS_CT_ZOOM_ABSOLUTE_CONTROL                                    0x0B
326 #define UX_HOST_CLASS_VIDEO_TCS_CT_ZOOM_RELATIVE_CONTROL                                    0x0C
327 #define UX_HOST_CLASS_VIDEO_TCS_CT_PANTILT_ABSOLUTE_CONTROL                                 0x0D
328 #define UX_HOST_CLASS_VIDEO_TCS_CT_PANTILT_RELATIVE_CONTROL                                 0x0E
329 #define UX_HOST_CLASS_VIDEO_TCS_CT_ROLL_ABSOLUTE_CONTROL                                    0x0F
330 #define UX_HOST_CLASS_VIDEO_TCS_CT_ROLL_RELATIVE_CONTROL                                    0x10
331 #define UX_HOST_CLASS_VIDEO_TCS_CT_PRIVACY_CONTROL                                          0x11
332 
333 #define UX_HOST_CLASS_VIDEO_TCS_PU_CONTROL_UNDEFINED                                        0x00
334 #define UX_HOST_CLASS_VIDEO_TCS_PU_BACKLIGHT_COMPENSATION_CONTROL                           0x01
335 #define UX_HOST_CLASS_VIDEO_TCS_PU_BRIGHTNESS_CONTROL                                       0x02
336 #define UX_HOST_CLASS_VIDEO_TCS_PU_CONTRAST_CONTROL                                         0x03
337 #define UX_HOST_CLASS_VIDEO_TCS_PU_GAIN_CONTROL                                             0x04
338 #define UX_HOST_CLASS_VIDEO_TCS_PU_POWER_LINE_FREQUENCY_CONTROL                             0x05
339 #define UX_HOST_CLASS_VIDEO_TCS_PU_HUE_CONTROL                                              0x06
340 #define UX_HOST_CLASS_VIDEO_TCS_PU_SATURATION_CONTROL                                       0x07
341 #define UX_HOST_CLASS_VIDEO_TCS_PU_SHARPNESS_CONTROL                                        0x08
342 #define UX_HOST_CLASS_VIDEO_TCS_PU_GAMMA_CONTROL                                            0x09
343 #define UX_HOST_CLASS_VIDEO_TCS_PU_WHITE_BALANCE_TEMPERATURE_CONTROL                        0x0A
344 #define UX_HOST_CLASS_VIDEO_TCS_PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL                   0x0B
345 #define UX_HOST_CLASS_VIDEO_TCS_PU_WHITE_BALANCE_COMPONENT_CONTROL                          0x0C
346 
347 #define UX_HOST_CLASS_VIDEO_TCS_PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL                     0x0D
348 #define UX_HOST_CLASS_VIDEO_TCS_PU_DIGITAL_MULTIPLIER_CONTROL                               0x0E
349 #define UX_HOST_CLASS_VIDEO_TCS_PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL                         0x0F
350 #define UX_HOST_CLASS_VIDEO_TCS_PU_HUE_AUTO_CONTROL                                         0x10
351 #define UX_HOST_CLASS_VIDEO_TCS_PU_ANALOG_VIDEO_STANDARD_CONTROL                            0x11
352 #define UX_HOST_CLASS_VIDEO_TCS_PU_ANALOG_LOCK_STATUS_CONTROL                               0x12
353 #define UX_HOST_CLASS_VIDEO_TCS_PU_CONTRAST_AUTO_CONTROL                                    0x13
354 
355 #define UX_HOST_CLASS_VIDEO_TCS_XU_CONTROL_UNDEFINED                                        0x00
356 
357 #define UX_HOST_CLASS_VIDEO_TCS_VS_CONTROL_UNDEFINED                                        0x00
358 #define UX_HOST_CLASS_VIDEO_TCS_VS_PROBE_CONTROL                                            0x01
359 #define UX_HOST_CLASS_VIDEO_TCS_VS_COMMIT_CONTROL                                           0x02
360 #define UX_HOST_CLASS_VIDEO_TCS_VS_STILL_PROBE_CONTROL                                      0x03
361 #define UX_HOST_CLASS_VIDEO_TCS_VS_STILL_COMMIT_CONTROL                                     0x04
362 #define UX_HOST_CLASS_VIDEO_TCS_VS_STILL_IMAGE_TRIGGER_CONTROL                              0x05
363 #define UX_HOST_CLASS_VIDEO_TCS_VS_STREAM_ERROR_CODE_CONTROL                                0x06
364 #define UX_HOST_CLASS_VIDEO_TCS_VS_GENERATE_KEY_FRAME_CONTROL                               0x07
365 #define UX_HOST_CLASS_VIDEO_TCS_VS_UPDATE_FRAME_SEGMENT_CONTROL                             0x08
366 #define UX_HOST_CLASS_VIDEO_TCS_VS_SYNCH_DELAY_CONTROL                                      0x09
367 
368 /* Define Video Class Probe and Commit Controls */
369 
370 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_LENGTH                                             34
371 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_HINT                                               0
372 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_FORMAT_INDEX                                       2
373 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_FRAME_INDEX                                        3
374 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_FRAME_INTERVAL                                     4
375 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_KEY_FRAME_RATE                                     8
376 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_PFRAME_RAE                                         10
377 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_COMP_QUALITY                                       12
378 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_COMP_WINDOW_SIZE                                   14
379 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_DELAY                                              16
380 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_MAX_VIDEO_FRAME_SIZE                               18
381 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_MAX_PAYLOAD_TRANSFER_SIZE                          22
382 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_CLOCK_FREQUENCY                                    26
383 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_FRAMING_INFO                                       30
384 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_PREFERED_VERSION                                   31
385 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_MIN_VERSION                                        32
386 #define UX_HOST_CLASS_VIDEO_PROBE_COMMIT_MAX_VERSION                                        33
387 
388 #ifndef UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST_COUNT
389 #define UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST_COUNT                                          8
390 #endif
391 
392 typedef struct UX_HOST_CLASS_VIDEO_INTERFACE_HEADER_DESCRIPTOR_STRUCT
393 {
394 
395     UCHAR           bLength;
396     UCHAR           bDescriptorType;
397     UCHAR           bDescriptorSubType;
398     UCHAR           _align_bcdUVC[1];
399     USHORT          bcdUVC;
400     USHORT          wTotalLength;
401     ULONG           dwClockFrequency;
402     UCHAR           bInCollection;
403     UCHAR           baInterfaceNr;
404 } UX_HOST_CLASS_VIDEO_INTERFACE_HEADER_DESCRIPTOR;
405 
406 /* Define Video Class specific input header interface descriptor.  */
407 
408 typedef struct UX_HOST_CLASS_VIDEO_INPUT_TERMINAL_DESCRIPTOR_STRUCT
409 {
410 
411     UCHAR           bLength;
412     UCHAR           bDescriptorType;
413     UCHAR           bDescriptorSubType;
414     UCHAR           bTerminalID;
415     USHORT          wTerminalType;
416     UCHAR           bAssocTerminal;
417     UCHAR           iTerminal;
418 } UX_HOST_CLASS_VIDEO_INPUT_TERMINAL_DESCRIPTOR;
419 
420 /* Define Video Class specific input header interface descriptor.  */
421 
422 typedef struct UX_HOST_CLASS_VIDEO_INPUT_HEADER_DESCRIPTOR_STRUCT
423 {
424 
425     UCHAR           bLength;
426     UCHAR           bDescriptorType;
427     UCHAR           bDescriptorSubType;
428     UCHAR           bNumFormats;
429     USHORT          wTotalLength;
430     UCHAR           bEndpointAddress;
431     UCHAR           bmInfo;
432     UCHAR           bTerminalLink;
433     UCHAR           bStillCaptureMethod;
434     UCHAR           bTriggerSupport;
435     UCHAR           bTriggerUsage;
436     UCHAR           bControlSize;
437     UCHAR           bmaControls;
438 } UX_HOST_CLASS_VIDEO_INPUT_HEADER_DESCRIPTOR;
439 
440 /* Define Video Class Selector descriptor.  */
441 
442 typedef struct UX_HOST_CLASS_VIDEO_SELECTOR_UNIT_DESCRIPTOR_STRUCT
443 {
444 
445     UCHAR           bLength;
446     UCHAR           bDescriptorType;
447     UCHAR           bDescriptorSubtype;
448     UCHAR           bUnitID;
449     UCHAR           bNrInPins;
450     UCHAR           baSourceID;
451 } UX_HOST_CLASS_VIDEO_SELECTOR_UNIT_DESCRIPTOR;
452 
453 /* Define Video Class Camera Terminal descriptor.  */
454 
455 typedef struct UX_HOST_CLASS_VIDEO_CAMERA_TERMINAL_DESCRIPTOR_STRUCT
456 {
457 
458     UCHAR           bLength;
459     UCHAR           bDescriptorType;
460     UCHAR           bDescriptorSubtype;
461     UCHAR           bTerminalID;
462     USHORT          wTerminalType;
463     UCHAR           bAssocTerminal;
464     UCHAR           iTerminal;
465     USHORT          wObjectiveFocalLengthMin;
466     USHORT          wObjectiveFocalLengthMax;
467     USHORT          wOcularFocalLength;
468     UCHAR           bControlSize;
469     UCHAR           _align_bmControls[1];
470     ULONG           bmControls;
471 } UX_HOST_CLASS_VIDEO_CAMERA_TERMINAL_DESCRIPTOR;
472 
473 /* Define Video Class Frame descriptor.  */
474 
475 typedef struct UX_HOST_CLASS_VIDEO_FRAME_DESCRIPTOR_STRUCT
476 {
477 
478     UCHAR           bLength;
479     UCHAR           bDescriptorType;
480     UCHAR           bDescriptorSubtype;
481     UCHAR           bFrameIndex;
482     UCHAR           bmCapabilities;
483     UCHAR           _align_wWidth[1];
484     USHORT          wWidth;
485     USHORT          wHeight;
486     UCHAR           _align_dwMinBitRate[2];
487     ULONG           dwMinBitRate;
488     ULONG           dwMaxBitRate;
489     ULONG           dwMaxVideoFrameBufferSize;
490     ULONG           dwDefaultFrameInterval;
491     UCHAR           bFrameIntervalType;
492     UCHAR           _align_size[3];
493 } UX_HOST_CLASS_VIDEO_FRAME_DESCRIPTOR;
494 
495 
496 
497 /* Define Video Class Processing Unit descriptor.  */
498 
499 typedef struct UX_HOST_CLASS_VIDEO_PROCESSING_UNIT_DESCRIPTOR_STRUCT
500 {
501 
502     UCHAR           bLength;
503     UCHAR           bDescriptorType;
504     UCHAR           bDescriptorSubtype;
505     UCHAR           bUnitID;
506     UCHAR           bSourceID;
507     UCHAR           _align_wMaxMultiplier[1];
508     USHORT          wMaxMultiplier;
509     UCHAR           bControlSize;
510     UCHAR           bmControls;
511     UCHAR           iProcessing;
512     UCHAR           bmVideoStandards;
513 } UX_HOST_CLASS_VIDEO_PROCESSING_UNIT_DESCRIPTOR;
514 
515 
516 /* Define Video Class instance structure.  */
517 
518 typedef struct UX_HOST_CLASS_VIDEO_STRUCT
519 {
520 
521     struct UX_HOST_CLASS_VIDEO_STRUCT
522                     *ux_host_class_video_next_instance;
523     UX_HOST_CLASS   *ux_host_class_video_class;
524     UX_DEVICE       *ux_host_class_video_device;
525     UX_INTERFACE    *ux_host_class_video_streaming_interface;
526     ULONG           ux_host_class_video_control_interface_number;
527     UX_ENDPOINT     *ux_host_class_video_isochronous_endpoint;
528     UINT            ux_host_class_video_state;
529     ULONG           ux_host_class_video_feature_unit_id;
530     ULONG           ux_host_class_video_terminal_id;
531     ULONG           ux_host_class_video_terminal_type;
532     UCHAR           *ux_host_class_video_configuration_descriptor;
533     ULONG           ux_host_class_video_configuration_descriptor_length;
534     UCHAR           ux_host_class_video_name[UX_HOST_CLASS_VIDEO_NAME_LENGTH];
535     ULONG           ux_host_class_video_number_formats;
536     ULONG           ux_host_class_video_length_formats;
537     UCHAR           *ux_host_class_video_format_address;
538     UCHAR           *ux_host_class_video_current_format_address;
539     ULONG           ux_host_class_video_current_format;
540     ULONG           ux_host_class_video_number_frames;
541     ULONG           ux_host_class_video_current_frame;
542     UCHAR           *ux_host_class_video_current_frame_address;
543     ULONG           ux_host_class_video_current_frame_interval;
544     ULONG           ux_host_class_video_current_max_payload_size;
545     UX_TRANSFER     ux_host_class_video_transfer_requests[UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST_COUNT];
546     ULONG           ux_host_class_video_transfer_request_start_index;
547     ULONG           ux_host_class_video_transfer_request_end_index;
548     UX_SEMAPHORE    ux_host_class_video_semaphore;
549     UX_SEMAPHORE    ux_host_class_video_semaphore_control_request;
550     VOID            (*ux_host_class_video_transfer_completion_function)(UX_TRANSFER*);
551 
552 } UX_HOST_CLASS_VIDEO;
553 
554 
555 /* Define Video Class isochronous USB transfer request structure.  */
556 
557 typedef struct UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST_STRUCT
558 {
559 
560     ULONG           ux_host_class_video_transfer_request_status;
561     UCHAR *         ux_host_class_video_transfer_request_data_pointer;
562     ULONG           ux_host_class_video_transfer_request_requested_length;
563     ULONG           ux_host_class_video_transfer_request_actual_length;
564     VOID            (*ux_host_class_video_transfer_request_completion_function) (struct UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST_STRUCT *);
565     UX_SEMAPHORE    ux_host_class_video_transfer_request_semaphore;
566     VOID            *ux_host_class_video_transfer_request_class_instance;
567     UINT            ux_host_class_video_transfer_request_completion_code;
568     struct UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST_STRUCT
569                     *ux_host_class_video_transfer_request_next_video_transfer_request;
570     UX_TRANSFER     ux_host_class_video_transfer_request;
571 } UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST;
572 
573 
574 /* Define Video Class channel/value control structures.  */
575 
576 typedef struct UX_HOST_CLASS_VIDEO_CONTROL_STRUCT
577 {
578 
579     ULONG          ux_host_class_video_control;
580     LONG           ux_host_class_video_control_min;
581     LONG           ux_host_class_video_control_max;
582     LONG           ux_host_class_video_control_res;
583     LONG           ux_host_class_video_control_cur;
584 } UX_HOST_CLASS_VIDEO_CONTROL;
585 
586 /* Define Video Class input terminal structures.  */
587 
588 typedef struct UX_HOST_CLASS_VIDEO_PARAMETER_INPUT_TERMINAL_STRUCT
589 {
590 
591     ULONG           ux_host_class_video_parameter_input_terminal_id;
592     ULONG           ux_host_class_video_parameter_input_terminal_type;
593 
594 } UX_HOST_CLASS_VIDEO_PARAMETER_INPUT_TERMINAL;
595 
596 /* Define Video Class format number structure.  */
597 
598 typedef struct UX_HOST_CLASS_VIDEO_PARAMETER_NUMBER_FORMATS_STRUCT
599 {
600 
601     ULONG           ux_host_class_video_parameter_number_formats;
602 
603 } UX_HOST_CLASS_VIDEO_PARAMETER_NUMBER_FORMATS;
604 
605 /* Define Video Class format data structure.  */
606 
607 typedef struct UX_HOST_CLASS_VIDEO_PARAMETER_FORMAT_DATA_STRUCT
608 {
609 
610     ULONG           ux_host_class_video_parameter_format_requested;
611     ULONG           ux_host_class_video_parameter_format_subtype;
612     UCHAR           *ux_host_class_video_parameter_format_guid;         /* not NULL if GUID is available for the subtype.  */
613     ULONG           ux_host_class_video_parameter_number_frame_descriptors;
614 
615 } UX_HOST_CLASS_VIDEO_PARAMETER_FORMAT_DATA;
616 
617 typedef struct UX_HOST_CLASS_VIDEO_PARAMETER_FRAME_DATA_STRUCT
618 {
619 
620     ULONG           ux_host_class_video_parameter_frame_requested;
621     ULONG           ux_host_class_video_parameter_frame_subtype;
622     ULONG           ux_host_class_video_parameter_frame_width;
623     ULONG           ux_host_class_video_parameter_frame_height;
624     ULONG           ux_host_class_video_parameter_default_frame_interval;
625     ULONG           ux_host_class_video_parameter_frame_interval_type;  /* 0: continuous {min,max,step}, n: discrete  */
626     UCHAR           *ux_host_class_video_parameter_frame_intervals;     /* {dwMin,dwMax,dwStep},... or dw1,dw2,... depending on interval type.  */
627 
628 } UX_HOST_CLASS_VIDEO_PARAMETER_FRAME_DATA;
629 
630 
631 typedef struct UX_HOST_CLASS_VIDEO_PARAMETER_CHANNEL_STRUCT
632 {
633 
634     ULONG           ux_host_class_video_parameter_channel_bandwidth_selection;
635     ULONG           ux_host_class_video_parameter_format_requested;
636     ULONG           ux_host_class_video_parameter_frame_requested;
637     ULONG           ux_host_class_video_parameter_frame_interval_requested;
638 
639 } UX_HOST_CLASS_VIDEO_PARAMETER_CHANNEL;
640 
641 typedef struct UX_HOST_CLASS_VIDEO_PARAMETER_FRAME_INTERVAL_STRUCT
642 {
643 
644     ULONG           ux_host_class_video_parameter_frame_requested;
645     ULONG          *ux_host_class_video_parameter_frame_interval_buffer;
646     ULONG           ux_host_class_video_parameter_frame_interval_buffer_length;
647     ULONG           ux_host_class_video_parameter_frame_interval_buffer_length_written;
648 
649 } UX_HOST_CLASS_VIDEO_PARAMETER_FRAME_INTERVAL;
650 
651 /* Define Video Class function prototypes.  */
652 
653 UINT    _ux_host_class_video_activate(UX_HOST_CLASS_COMMAND *command);
654 UINT    _ux_host_class_video_configure(UX_HOST_CLASS_VIDEO *video);
655 UINT    _ux_host_class_video_control_get(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_CONTROL *video_control);
656 UINT    _ux_host_class_video_control_value_get(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_CONTROL *video_control);
657 UINT    _ux_host_class_video_control_value_set(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_CONTROL *video_control);
658 UINT    _ux_host_class_video_deactivate(UX_HOST_CLASS_COMMAND *command);
659 UINT    _ux_host_class_video_descriptor_get(UX_HOST_CLASS_VIDEO *video);
660 UINT    _ux_host_class_video_endpoints_get(UX_HOST_CLASS_VIDEO *video);
661 UINT    _ux_host_class_video_entry(UX_HOST_CLASS_COMMAND *command);
662 UINT    _ux_host_class_video_read(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST *video_transfer_request);
663 UINT    _ux_host_class_video_transfer_request(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST *video_transfer_request);
664 VOID    _ux_host_class_video_transfer_request_completed(UX_TRANSFER *transfer_request);
665 VOID    _ux_host_class_video_transfer_request_callback(UX_TRANSFER *transfer_request);
666 UINT    _ux_host_class_video_control_list_get(UX_HOST_CLASS_VIDEO *video);
667 UINT    _ux_host_class_video_input_format_get(UX_HOST_CLASS_VIDEO *video);
668 UINT    _ux_host_class_video_input_terminal_get(UX_HOST_CLASS_VIDEO *video);
669 UINT    _ux_host_class_video_alternate_setting_locate(UX_HOST_CLASS_VIDEO *video, UINT max_payload_size, UINT *alternate_setting);
670 UINT    _ux_host_class_video_ioctl(UX_HOST_CLASS_VIDEO *video, ULONG ioctl_function, VOID *parameter);
671 UINT    _ux_host_class_video_format_data_get(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_PARAMETER_FORMAT_DATA *format_parameter);
672 UINT    _ux_host_class_video_frame_data_get(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_PARAMETER_FRAME_DATA *frame_parameter);
673 UINT    _ux_host_class_video_frame_interval_get(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_PARAMETER_FRAME_INTERVAL *interval_parameter);
674 UINT    _ux_host_class_video_channel_start(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_PARAMETER_CHANNEL *video_parameter);
675 UINT    _ux_host_class_video_stop(UX_HOST_CLASS_VIDEO *video);
676 UINT    _ux_host_class_video_start(UX_HOST_CLASS_VIDEO *video);
677 UINT    _ux_host_class_video_frame_parameters_set(UX_HOST_CLASS_VIDEO *video, ULONG frame_format, ULONG width, ULONG height, ULONG frame_interval);
678 ULONG   _ux_host_class_video_max_payload_get(UX_HOST_CLASS_VIDEO *video);
679 UINT    _ux_host_class_video_transfer_buffer_add(UX_HOST_CLASS_VIDEO *video, UCHAR* buffer);
680 UINT    _ux_host_class_video_transfer_buffers_add(UX_HOST_CLASS_VIDEO *video, UCHAR** buffers, ULONG num_buffers);
681 VOID    _ux_host_class_video_transfer_callback_set(UX_HOST_CLASS_VIDEO *video, VOID (*callback_function)(UX_TRANSFER*));
682 UINT    _ux_host_class_video_entities_parse(UX_HOST_CLASS_VIDEO *video,
683                         UINT(*parse_function)(VOID  *arg,
684                                             UCHAR *packed_interface_descriptor,
685                                             UCHAR *packed_entity_descriptor),
686                         VOID* arg);
687 UINT    _ux_host_class_video_control_request(UX_HOST_CLASS_VIDEO *video,
688                         UINT request, UCHAR interface_index,
689                         UINT entity_id, UINT control_selector,
690                         UCHAR *parameter, UINT parameter_size);
691 
692 UINT    _uxe_host_class_video_control_get(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_CONTROL *video_control);
693 UINT    _uxe_host_class_video_control_value_get(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_CONTROL *video_control);
694 UINT    _uxe_host_class_video_control_value_set(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_CONTROL *video_control);
695 UINT    _uxe_host_class_video_read(UX_HOST_CLASS_VIDEO *video, UX_HOST_CLASS_VIDEO_TRANSFER_REQUEST *video_transfer_request);
696 UINT    _uxe_host_class_video_ioctl(UX_HOST_CLASS_VIDEO *video, ULONG ioctl_function, VOID *parameter);
697 UINT    _uxe_host_class_video_start(UX_HOST_CLASS_VIDEO *video);
698 UINT    _uxe_host_class_video_stop(UX_HOST_CLASS_VIDEO *video);
699 UINT    _uxe_host_class_video_frame_parameters_set(UX_HOST_CLASS_VIDEO *video, ULONG frame_format, ULONG width, ULONG height, ULONG frame_interval);
700 ULONG   _uxe_host_class_video_max_payload_get(UX_HOST_CLASS_VIDEO *video);
701 UINT    _uxe_host_class_video_transfer_buffer_add(UX_HOST_CLASS_VIDEO *video, UCHAR* buffer);
702 UINT    _uxe_host_class_video_transfer_buffers_add(UX_HOST_CLASS_VIDEO *video, UCHAR** buffers, ULONG num_buffers);
703 VOID    _uxe_host_class_video_transfer_callback_set(UX_HOST_CLASS_VIDEO *video, VOID (*callback_function)(UX_TRANSFER*));
704 UINT    _uxe_host_class_video_entities_parse(UX_HOST_CLASS_VIDEO *video,
705                         UINT(*parse_function)(VOID  *arg,
706                                             UCHAR *packed_interface_descriptor,
707                                             UCHAR *packed_entity_descriptor),
708                         VOID* arg);
709 UINT    _uxe_host_class_video_control_request(UX_HOST_CLASS_VIDEO *video,
710                         UINT request, UCHAR interface_index,
711                         UINT entity_id, UINT control_selector,
712                         UCHAR *parameter, UINT parameter_size);
713 
714 /* Define Video Class API prototypes.  */
715 #if defined(UX_HOST_CLASS_VIDEO_ENABLE_ERROR_CHECKING)
716 
717 #define ux_host_class_video_entry                   _ux_host_class_video_entry
718 #define ux_host_class_video_control_get             _uxe_host_class_video_control_get
719 #define ux_host_class_video_control_value_get       _uxe_host_class_video_control_value_get
720 #define ux_host_class_video_control_value_set       _uxe_host_class_video_control_value_set
721 #define ux_host_class_video_read                    _uxe_host_class_video_read
722 #define ux_host_class_video_ioctl                   _uxe_host_class_video_ioctl
723 #define ux_host_class_video_start                   _uxe_host_class_video_start
724 #define ux_host_class_video_stop                    _uxe_host_class_video_stop
725 #define ux_host_class_video_frame_parameters_set    _uxe_host_class_video_frame_parameters_set
726 #define ux_host_class_video_max_payload_get         _uxe_host_class_video_max_payload_get
727 #define ux_host_class_video_transfer_buffer_add     _uxe_host_class_video_transfer_buffer_add
728 #define ux_host_class_video_transfer_buffers_add    _uxe_host_class_video_transfer_buffers_add
729 #define ux_host_class_video_transfer_callback_set   _uxe_host_class_video_transfer_callback_set
730 #define ux_host_class_video_entities_parse          _uxe_host_class_video_entities_parse
731 #define ux_host_class_video_control_request         _uxe_host_class_video_control_request
732 
733 #else
734 
735 #define ux_host_class_video_entry                   _ux_host_class_video_entry
736 #define ux_host_class_video_control_get             _ux_host_class_video_control_get
737 #define ux_host_class_video_control_value_get       _ux_host_class_video_control_value_get
738 #define ux_host_class_video_control_value_set       _ux_host_class_video_control_value_set
739 #define ux_host_class_video_read                    _ux_host_class_video_read
740 #define ux_host_class_video_ioctl                   _ux_host_class_video_ioctl
741 #define ux_host_class_video_start                   _ux_host_class_video_start
742 #define ux_host_class_video_stop                    _ux_host_class_video_stop
743 #define ux_host_class_video_frame_parameters_set    _ux_host_class_video_frame_parameters_set
744 #define ux_host_class_video_max_payload_get         _ux_host_class_video_max_payload_get
745 #define ux_host_class_video_transfer_buffer_add     _ux_host_class_video_transfer_buffer_add
746 #define ux_host_class_video_transfer_buffers_add    _ux_host_class_video_transfer_buffers_add
747 #define ux_host_class_video_transfer_callback_set   _ux_host_class_video_transfer_callback_set
748 #define ux_host_class_video_entities_parse          _ux_host_class_video_entities_parse
749 #define ux_host_class_video_control_request         _ux_host_class_video_control_request
750 
751 #endif
752 
753 /* Determine if a C++ compiler is being used.  If so, complete the standard
754    C conditional started above.  */
755 #ifdef __cplusplus
756 }
757 #endif
758 
759 #endif
760 
761 
762