-
Notifications
You must be signed in to change notification settings - Fork 1
/
uvcdesc.h
1106 lines (929 loc) · 36.5 KB
/
uvcdesc.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//+-------------------------------------------------------------------------
//
// Microsoft Windows
//
// Copyright (C) Microsoft Corporation, 1999 - 2008
//
// File: uvcdesc.h
//
// This header is from the UVC 1.1 USBVideo driver
//
//--------------------------------------------------------------------------
#ifndef ___UVCDESC_H___
#define ___UVCDESC_H___
// USB Video Device Class Code
#define USB_DEVICE_CLASS_VIDEO 0x0E
// Video sub-classes
#define SUBCLASS_UNDEFINED 0x00
#define VIDEO_SUBCLASS_CONTROL 0x01
#define VIDEO_SUBCLASS_STREAMING 0x02
// Video Class-Specific Descriptor Types
#define CS_UNDEFINED 0x20
#define CS_DEVICE 0x21
#define CS_CONFIGURATION 0x22
#define CS_STRING 0x23
#define CS_INTERFACE 0x24
#define CS_ENDPOINT 0x25
// Video Class-Specific VC Interface Descriptor Subtypes
#define VC_HEADER 0x01
#define INPUT_TERMINAL 0x02
#define OUTPUT_TERMINAL 0x03
#define SELECTOR_UNIT 0x04
#define PROCESSING_UNIT 0x05
#define EXTENSION_UNIT 0x06
#define MAX_TYPE_UNIT 0x07
// Video Class-Specific VS Interface Descriptor Subtypes
#define VS_DESCRIPTOR_UNDEFINED 0x00
#define VS_INPUT_HEADER 0x01
#define VS_OUTPUT_HEADER 0x02
#define VS_STILL_IMAGE_FRAME 0x03
#define VS_FORMAT_UNCOMPRESSED 0x04
#define VS_FRAME_UNCOMPRESSED 0x05
#define VS_FORMAT_MJPEG 0x06
#define VS_FRAME_MJPEG 0x07
#define VS_FORMAT_MPEG1 0x08
#define VS_FORMAT_MPEG2PS 0x09
#define VS_FORMAT_MPEG2TS 0x0A
#define VS_FORMAT_MPEG4SL 0x0B
#define VS_FORMAT_DV 0x0C
#define VS_COLORFORMAT 0x0D
#define VS_FORMAT_VENDOR 0x0E
#define VS_FRAME_VENDOR 0x0F
// Video Class-Specific Endpoint Descriptor Subtypes
#define EP_UNDEFINED 0x00
#define EP_GENERAL 0x01
#define EP_ENDPOINT 0x02
#define EP_INTERRUPT 0x03
// Video Class-Specific Terminal Types
#define TERMINAL_TYPE_VENDOR_SPECIFIC 0x0100
#define TERMINAL_TYPE_USB_STREAMING 0x0101
#define TERMINAL_TYPE_INPUT_MASK 0x0200
#define TERMINAL_TYPE_INPUT_VENDOR_SPECIFIC 0x0200
#define TERMINAL_TYPE_INPUT_CAMERA 0x0201
#define TERMINAL_TYPE_INPUT_MEDIA_TRANSPORT 0x0202
#define TERMINAL_TYPE_OUTPUT_MASK 0x0300
#define TERMINAL_TYPE_OUTPUT_VENDOR_SPECIFIC 0x0300
#define TERMINAL_TYPE_OUTPUT_DISPLAY 0x0301
#define TERMINAL_TYPE_OUTPUT_MEDIA_TRANSPORT 0x0302
#define TERMINAL_TYPE_EXTERNAL_VENDOR_SPECIFIC 0x0400
#define TERMINAL_TYPE_EXTERNAL_UNDEFINED 0x0400
#define TERMINAL_TYPE_EXTERNAL_COMPOSITE 0x0401
#define TERMINAL_TYPE_EXTERNAL_SVIDEO 0x0402
#define TERMINAL_TYPE_EXTERNAL_COMPONENT 0x0403
// Controls for error checking only
#define DEV_SPECIFIC_CONTROL 0x1001
// Map KSNODE_TYPE GUIDs to Indexes
#define NODE_TYPE_NONE 0
#define NODE_TYPE_STREAMING 1
#define NODE_TYPE_INPUT_TERMINAL 2
#define NODE_TYPE_OUTPUT_TERMINAL 3
#define NODE_TYPE_SELECTOR 4
#define NODE_TYPE_PROCESSING 5
#define NODE_TYPE_CAMERA_TERMINAL 6
#define NODE_TYPE_INPUT_MTT 7
#define NODE_TYPE_OUTPUT_MTT 8
#define NODE_TYPE_DEV_SPEC 9
#define NODE_TYPE_MAX 9
// USB bmRequestType values
#define USBVIDEO_INTERFACE_SET 0x21
#define USBVIDEO_ENDPOINT_SET 0x22
#define USBVIDEO_INTERFACE_GET 0xA1
#define USBVIDEO_ENDPOINT_GET 0xA2
// Video Class-specific specific requests
#define CLASS_SPECIFIC_GET_MASK 0x80
#define RC_UNDEFINED 0x00
#define SET_CUR 0x01
#define GET_CUR 0x81
#define GET_MIN 0x82
#define GET_MAX 0x83
#define GET_RES 0x84
#define GET_LEN 0x85
#define GET_INFO 0x86
#define GET_DEF 0x87
// Power Mode Control constants
#define POWER_MODE_CONTROL_FULL 0x0
#define POWER_MODE_CONTROL_DEV_DEPENDENT 0x1
// Video Class-specific Processing Unit Controls
#define PU_CONTROL_UNDEFINED 0x00
#define PU_BACKLIGHT_COMPENSATION_CONTROL 0x01
#define PU_BRIGHTNESS_CONTROL 0x02
#define PU_CONTRAST_CONTROL 0x03
#define PU_GAIN_CONTROL 0x04
#define PU_POWER_LINE_FREQUENCY_CONTROL 0x05
#define PU_HUE_CONTROL 0x06
#define PU_SATURATION_CONTROL 0x07
#define PU_SHARPNESS_CONTROL 0x08
#define PU_GAMMA_CONTROL 0x09
#define PU_WHITE_BALANCE_TEMPERATURE_CONTROL 0x0A
#define PU_WHITE_BALANCE_TEMPERATURE_AUTO_CONTROL 0x0B
#define PU_WHITE_BALANCE_COMPONENT_CONTROL 0x0C
#define PU_WHITE_BALANCE_COMPONENT_AUTO_CONTROL 0x0D
#define PU_DIGITAL_MULTIPLIER_CONTROL 0x0E
#define PU_DIGITAL_MULTIPLIER_LIMIT_CONTROL 0x0F
#define PU_HUE_AUTO_CONTROL 0x10
#define PU_ANALOG_VIDEO_STANDARD_CONTROL 0x11
#define PU_ANALOG_LOCK_STATUS_CONTROL 0x12
// Video Class-specific Camera Terminal Controls
#define CT_CONTROL_UNDEFINED 0x00
#define CT_SCANNING_MODE_CONTROL 0x01
#define CT_AE_MODE_CONTROL 0x02
#define CT_AE_PRIORITY_CONTROL 0x03
#define CT_EXPOSURE_TIME_ABSOLUTE_CONTROL 0x04
#define CT_EXPOSURE_TIME_RELATIVE_CONTROL 0x05
#define CT_FOCUS_ABSOLUTE_CONTROL 0x06
#define CT_FOCUS_RELATIVE_CONTROL 0x07
#define CT_FOCUS_AUTO_CONTROL 0x08
#define CT_IRIS_ABSOLUTE_CONTROL 0x09
#define CT_IRIS_RELATIVE_CONTROL 0x0A
#define CT_ZOOM_ABSOLUTE_CONTROL 0x0B
#define CT_ZOOM_RELATIVE_CONTROL 0x0C
#define CT_PANTILT_ABSOLUTE_CONTROL 0x0D
#define CT_PANTILT_RELATIVE_CONTROL 0x0E
#define CT_ROLL_ABSOLUTE_CONTROL 0x0F
#define CT_ROLL_RELATIVE_CONTROL 0x10
#define CT_PRIVACY_CONTROL 0x11
#define CT_RELATIVE_INCREASE 0x01
#define CT_RELATIVE_DECREASE 0xff
#define CT_RELATIVE_STOP 0x00
// Selector Unit Control Selector
#define SU_INPUT_SELECT_CONTROL 0x01
// Media Tape Transport Control Selector
#define MTT_CONTROL_UNDEFINED 0x00
#define MTT_TRANSPORT_CONTROL 0x01
#define MTT_ATN_INFORMATION_CONTROL 0x02
#define MTT_MEDIA_INFORMATION_CONTROL 0x03
#define MTT_TIME_CODE_INFORMATION_CONTROL 0x04
// Media Transport Terminal States
#define MTT_STATE_PLAY_NEXT_FRAME 0x00
#define MTT_STATE_PLAY_FWD_SLOWEST 0x01
#define MTT_STATE_PLAY_SLOW_FWD_4 0x02
#define MTT_STATE_PLAY_SLOW_FWD_3 0x03
#define MTT_STATE_PLAY_SLOW_FWD_2 0x04
#define MTT_STATE_PLAY_SLOW_FWD_1 0x05
#define MTT_STATE_PLAY_X1 0x06
#define MTT_STATE_PLAY_FAST_FWD_1 0x07
#define MTT_STATE_PLAY_FAST_FWD_2 0x08
#define MTT_STATE_PLAY_FAST_FWD_3 0x09
#define MTT_STATE_PLAY_FAST_FWD_4 0x0A
#define MTT_STATE_PLAY_FASTEST_FWD 0x0B
#define MTT_STATE_PLAY_PREV_FRAME 0x0C
#define MTT_STATE_PLAY_SLOWEST_REV 0x0D
#define MTT_STATE_PLAY_SLOW_REV_4 0x0E
#define MTT_STATE_PLAY_SLOW_REV_3 0x0F
#define MTT_STATE_PLAY_SLOW_REV_2 0x10
#define MTT_STATE_PLAY_SLOW_REV_1 0x11
#define MTT_STATE_PLAY_REV 0x12
#define MTT_STATE_PLAY_FAST_REV_1 0x13
#define MTT_STATE_PLAY_FAST_REV_2 0x14
#define MTT_STATE_PLAY_FAST_REV_3 0x15
#define MTT_STATE_PLAY_FAST_REV_4 0x16
#define MTT_STATE_PLAY_FASTEST_REV 0x17
#define MTT_STATE_PLAY 0x18
#define MTT_STATE_PAUSE 0x19
#define MTT_STATE_PLAY_REVERSE_PAUSE 0x1A
#define MTT_STATE_STOP 0x40
#define MTT_STATE_FAST_FORWARD 0x41
#define MTT_STATE_REWIND 0x42
#define MTT_STATE_HIGH_SPEED_REWIND 0x43
#define MTT_STATE_RECORD_START 0x50
#define MTT_STATE_RECORD_PAUSE 0x51
#define MTT_STATE_EJECT 0x60
#define MTT_STATE_PLAY_SLOW_FWD_X 0x70
#define MTT_STATE_PLAY_FAST_FWD_X 0x71
#define MTT_STATE_PLAY_SLOW_REV_X 0x72
#define MTT_STATE_PLAY_FAST_REV_X 0x73
#define MTT_STATE_STOP_START 0x74
#define MTT_STATE_STOP_END 0x75
#define MTT_STATE_STOP_EMERGENCY 0x76
#define MTT_STATE_STOP_CONDENSATION 0x77
#define MTT_STATE_UNSPECIFIED 0x7F
// Video Control Interface Control Selectors
#define VC_UNDEFINED_CONTROL 0x00
#define VC_VIDEO_POWER_MODE_CONTROL 0x01
#define VC_REQUEST_ERROR_CODE_CONTROL 0x02
// VideoStreaming Interface Control Selectors
#define VS_CONTROL_UNDEFINED 0x00
#define VS_PROBE_CONTROL 0x01
#define VS_COMMIT_CONTROL 0x02
#define VS_STILL_PROBE_CONTROL 0x03
#define VS_STILL_COMMIT_CONTROL 0x04
#define VS_STILL_IMAGE_TRIGGER_CONTROL 0x05
#define VS_STREAM_ERROR_CODE_CONTROL 0x06
#define VS_GENERATE_KEY_FRAME_CONTROL 0x07
#define VS_UPDATE_FRAME_SEGMENT_CONTROL 0x08
#define VS_SYNC_DELAY_CONTROL 0x09
// Probe commit bitmap framing info
#define VS_PROBE_COMMIT_BIT_FID 0x01
#define VS_PROBE_COMMIT_BIT_EOF 0x02
// Stream payload header Bit Field Header bits
#define BFH_FID 0x01 // Frame ID bit
#define BFH_EOF 0x02 // End of Frame bit
#define BFH_PTS 0x04 // Presentation Time Stamp bit
#define BFH_SCR 0x08 // Source Clock Reference bit
#define BFH_RES 0x10 // Reserved bit
#define BFH_STI 0x20 // Still image bit
#define BFH_ERR 0x40 // Error bit
#define BFH_EOH 0x80 // End of header bit
#define HDR_LENGTH 1 // Length of header length field in bytes
#define BFH_LENGTH 1 // Length of BFH field in bytes
#define PTS_LENGTH 4 // Length of PTS field in bytes
#define SCR_LENGTH 6 // Length of SCR field in bytes
// USB Video Status Codes (Request Error Code Control)
#define USBVIDEO_RE_STATUS_NOERROR 0x00
#define USBVIDEO_RE_STATUS_NOT_READY 0x01
#define USBVIDEO_RE_STATUS_WRONG_STATE 0x02
#define USBVIDEO_RE_STATUS_POWER 0x03
#define USBVIDEO_RE_STATUS_OUT_OF_RANGE 0x04
#define USBVIDEO_RE_STATUS_INVALID_UNIT 0x05
#define USBVIDEO_RE_STATUS_INVALID_CONTROL 0x06
#define USBVIDEO_RE_STATUS_UNKNOWN 0x07
// USB Video Device Status Codes (Stream Error Code Control)
#define USBVIDEO_SE_STATUS_NOERROR 0x00
#define USBVIDEO_SE_STATUS_PROTECTED_CONTENT 0x01
#define USBVIDEO_SE_STATUS_INPUT_BUFFER_UNDERRUN 0x02
#define USBVIDEO_SE_STATUS_DATA_DICONTINUITY 0x03
#define USBVIDEO_SE_STATUS_OUTPUT_BUFFER_UNDERRUN 0x04
#define USBVIDEO_SE_STATUS_OUTPUT_BUFFER_OVERRUN 0x05
#define USBVIDEO_SE_STATUS_FORMAT_CHANGE 0x06
#define USBVIDEO_SE_STATUS_STILL_IMAGE_ERROR 0x07
#define USBVIDEO_SE_STATUS_UNKNOWN 0x08
// Status Interrupt Types
#define STATUS_INTERRUPT_VC 1
#define STATUS_INTERRUPT_VS 2
// Status Interrupt Attributes
#define STATUS_INTERRUPT_ATTRIBUTE_VALUE 0x00
#define STATUS_INTERRUPT_ATTRIBUTE_INFO 0x01
#define STATUS_INTERRUPT_ATTRIBUTE_FAILURE 0x02
// VideoStreaming interface interrupt types
#define VS_INTERRUPT_EVENT_BUTTON_PRESS 0x00
#define VS_INTERRUPT_VALUE_BUTTON_RELEASE 0x00
#define VS_INTERRUPT_VALUE_BUTTON_PRESS 0x01
// Get Info Values
#define USBVIDEO_ASYNC_CONTROL 0x10
#define USBVIDEO_SETTABLE_CONTROL 0x2
#define MAX_INTERRUPT_PACKET_VALUE_SIZE 8
// Frame descriptor frame interval array offsets
#define MIN_FRAME_INTERVAL_OFFSET 0
#define MAX_FRAME_INTERVAL_OFFSET 1
#define FRAME_INTERVAL_STEP_OFFSET 2
// Still image capture methods
#define STILL_CAPTURE_METHOD_NONE 0
#define STILL_CAPTURE_METHOD_1 1
#define STILL_CAPTURE_METHOD_2 2
#define STILL_CAPTURE_METHOD_3 3
// Still image trigger control states
#define STILL_IMAGE_TRIGGER_NORMAL 0
#define STILL_IMAGE_TRIGGER_TRANSMIT 1
#define STILL_IMAGE_TRIGGER_TRANSMIT_BULK 2
#define STILL_IMAGE_TRIGGER_TRANSMIT_ABORT 3
// Endpoint descriptor masks
#define EP_DESCRIPTOR_TRANSACTION_SIZE_MASK 0x07ff
#define EP_DESCRIPTOR_NUM_TRANSACTION_MASK 0x1800
#define EP_DESCRIPTOR_NUM_TRANSACTION_OFFSET 11
// Copy protection flag defined in the Uncompressed Payload Spec
#define USB_VIDEO_UNCOMPRESSED_RESTRICT_DUPLICATION 1
// Interlace flags
#define INTERLACE_FLAGS_SUPPORTED_MASK 0x01
#define INTERLACE_FLAGS_FIELDS_PER_FRAME_MASK 0x02
#define INTERLACE_FLAGS_FIELDS_PER_FRAME_2 0x00
#define INTERLACE_FLAGS_FIELDS_PER_FRAME_1 0x02
#define INTERLACE_FLAGS_FIELD_1_FIRST_MASK 0x04
#define INTERLACE_FLAGS_FIELD_PATTERN_MASK 0x30
#define INTERLACE_FLAGS_FIELD_PATTERN_FIELD1 0x00
#define INTERLACE_FLAGS_FIELD_PATTERN_FIELD2 0x10
#define INTERLACE_FLAGS_FIELD_PATTERN_REGULAR 0x20
#define INTERLACE_FLAGS_FIELD_PATTERN_RANDOM 0x30
#define INTERLACE_FLAGS_DISPLAY_MODE_MASK 0xC0
#define INTERLACE_FLAGS_DISPLAY_MODE_BOB 0x00
#define INTERLACE_FLAGS_DISPLAY_MODE_WEAVE 0x40
#define INTERLACE_FLAGS_DISPLAY_MODE_BOB_WEAVE 0x80
// Color Matching Flags
#define UVC_PRIMARIES_UNKNOWN 0x0
#define UVC_PRIMARIES_BT709 0x1
#define UVC_PRIMARIES_BT470_2M 0x2
#define UVC_PRIMARIES_BT470_2BG 0x3
#define UVC_PRIMARIES_SMPTE_170M 0x4
#define UVC_PRIMARIES_SMPTE_240M 0x5
#define UVC_GAMMA_UNKNOWN 0x0
#define UVC_GAMMA_BT709 0x1
#define UVC_GAMMA_BT470_2M 0x2
#define UVC_GAMMA_BT470_2BG 0x3
#define UVC_GAMMA_SMPTE_170M 0x4
#define UVC_GAMMA_SMPTE_240M 0x5
#define UVC_GAMMA_LINEAR 0x6
#define UVC_GAMMA_sRGB 0x7
#define UVC_TRANSFER_MATRIX_UNKNOWN 0x0
#define UVC_TRANSFER_MATRIX_BT709 0x1
#define UVC_TRANSFER_MATRIX_FCC 0x2
#define UVC_TRANSFER_MATRIX_BT470_2BG 0x3
#define UVC_TRANSFER_MATRIX_BT601 0x4
#define UVC_TRANSFER_MATRIX_SMPTE_240M 0x5
//
// BEGIN - VDC Descriptor and Control Structures
//
#pragma warning( disable : 4200 ) // Allow zero-sized arrays at end of structs
#pragma pack( push, vdc_descriptor_structs, 1)
// Video Specific Descriptor
typedef struct {
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // descriptor subtype
} VIDEO_SPECIFIC, *PVIDEO_SPECIFIC;
#define SIZEOF_VIDEO_SPECIFIC(pDesc) sizeof(VIDEO_SPECIFIC)
// Video Unit Descriptor
typedef struct {
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // descriptor subtype
UCHAR bUnitID; // Constant uniquely identifying the Unit
} VIDEO_UNIT, *PVIDEO_UNIT;
#define SIZEOF_VIDEO_UNIT(pDesc) sizeof(VIDEO_UNIT)
// VideoControl Header Descriptor
typedef struct {
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // VC_HEADER descriptor subtype
USHORT bcdVideoSpec; // USB video class spec revision number
USHORT wTotalLength; // Total length, including all units and terminals
ULONG dwClockFreq; // Device clock frequency in Hz
UCHAR bInCollection; // number of video streaming interfaces
UCHAR baInterfaceNr[]; // interface number array
} VIDEO_CONTROL_HEADER_UNIT, *PVIDEO_CONTROL_HEADER_UNIT;
#define SIZEOF_VIDEO_CONTROL_HEADER_UNIT(pDesc) \
((sizeof(VIDEO_CONTROL_HEADER_UNIT) + (pDesc)->bInCollection))
// VideoControl Input Terminal Descriptor
typedef struct {
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // INPUT_TERMINAL descriptor subtype
UCHAR bTerminalID; // Constant uniquely identifying the Terminal
USHORT wTerminalType; // Constant characterizing the terminal type
UCHAR bAssocTerminal; // ID of associated output terminal
UCHAR iTerminal; // Index of string descriptor
} VIDEO_INPUT_TERMINAL, *PVIDEO_INPUT_TERMINAL;
#define SIZEOF_VIDEO_INPUT_TERMINAL(pDesc) sizeof(VIDEO_INPUT_TERMINAL)
// VideoControl Output Terminal Descriptor
typedef struct {
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // OUTPUT_TERMINAL descriptor subtype
UCHAR bTerminalID; // Constant uniquely identifying the Terminal
USHORT wTerminalType; // Constant characterizing the terminal type
UCHAR bAssocTerminal; // ID of associated input terminal
UCHAR bSourceID; // ID of source unit/terminal
UCHAR iTerminal; // Index of string descriptor
} VIDEO_OUTPUT_TERMINAL, *PVIDEO_OUTPUT_TERMINAL;
#define SIZEOF_VIDEO_OUTPUT_TERMINAL(pDesc) sizeof(VIDEO_OUTPUT_TERMINAL)
// VideoControl Camera Terminal Descriptor
typedef struct {
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // INPUT_TERMINAL descriptor subtype
UCHAR bTerminalID; // Constant uniquely identifying the Terminal
USHORT wTerminalType; // Sensor type
UCHAR bAssocTerminal; // ID of associated output terminal
UCHAR iTerminal; // Index of string descriptor
USHORT wObjectiveFocalLengthMin; // Min focal length for zoom
USHORT wObjectiveFocalLengthMax; // Max focal length for zoom
USHORT wOcularFocalLength; // Ocular focal length for zoom
UCHAR bControlSize; // Size of bmControls field
UCHAR bmControls[]; // Bitmap of controls supported
} VIDEO_CAMERA_TERMINAL, *PVIDEO_CAMERA_TERMINAL;
#define SIZEOF_VIDEO_CAMERA_TERMINAL(pDesc) \
(sizeof(VIDEO_CAMERA_TERMINAL) + (pDesc)->bControlSize)
// Media Transport Input Terminal Descriptor
typedef struct {
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // INPUT_TERMINAL descriptor subtype
UCHAR bTerminalID; // Constant uniquely identifying the Terminal
USHORT wTerminalType; // Media Transport type
UCHAR bAssocTerminal; // ID of associated output terminal
UCHAR iTerminal; // Index of string descriptor
UCHAR bControlSize; // Size of bmControls field
UCHAR bmControls[]; // Bitmap of controls supported
} VIDEO_INPUT_MTT, *PVIDEO_INPUT_MTT;
__inline size_t SizeOfVideoInputMTT(_In_ PVIDEO_INPUT_MTT pDesc)
{
UCHAR bTransportModeSize;
PUCHAR pbCurr;
pbCurr = pDesc->bmControls + pDesc->bControlSize;
bTransportModeSize = *pbCurr;
return sizeof(VIDEO_INPUT_MTT) + pDesc->bControlSize + 1 + bTransportModeSize;
}
#define SIZEOF_VIDEO_INPUT_MTT(pDesc) SizeOfVideoInputMTT(pDesc)
// Media Transport Output Terminal Descriptor
typedef struct {
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // OUTPUT_TERMINAL descriptor subtype
UCHAR bTerminalID; // Constant uniquely identifying the Terminal
USHORT wTerminalType; // Media Transport type
UCHAR bAssocTerminal; // ID of associated output terminal
UCHAR bSourceID; // ID of source unit/terminal
UCHAR iTerminal; // Index of string descriptor
UCHAR bControlSize; // Size of bmControls field
UCHAR bmControls[]; // Bitmap of controls supported
} VIDEO_OUTPUT_MTT, *PVIDEO_OUTPUT_MTT;
__inline size_t SizeOfVideoOutputMTT(_In_ PVIDEO_OUTPUT_MTT pDesc)
{
UCHAR bTransportModeSize;
PUCHAR pbCurr;
pbCurr = pDesc->bmControls + pDesc->bControlSize;
bTransportModeSize = *pbCurr;
return sizeof(VIDEO_OUTPUT_MTT) + pDesc->bControlSize + 1+ bTransportModeSize;
}
#define SIZEOF_VIDEO_OUTPUT_MTT(pDesc) SizeOfVideoOutputMTT(pDesc)
// VideoControl Selector Unit Descriptor
typedef struct {
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // SELECTOR_UNIT descriptor subtype
UCHAR bUnitID; // Constant uniquely identifying the Unit
UCHAR bNrInPins; // Number of input pins
UCHAR baSourceID[]; // IDs of connected units/terminals
} VIDEO_SELECTOR_UNIT, *PVIDEO_SELECTOR_UNIT;
#define SIZEOF_VIDEO_SELECTOR_UNIT(pDesc) \
(sizeof(VIDEO_SELECTOR_UNIT) + (pDesc)->bNrInPins + 1)
// VideoControl Processing Unit Descriptor
typedef struct {
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // PROCESSING_UNIT descriptor subtype
UCHAR bUnitID; // Constant uniquely identifying the Unit
UCHAR bSourceID; // ID of connected unit/terminal
USHORT wMaxMultiplier; // Maximum digital magnification
UCHAR bControlSize; // Size of bmControls field
UCHAR bmControls[]; // Bitmap of controls supported
} VIDEO_PROCESSING_UNIT, *PVIDEO_PROCESSING_UNIT;
#define SIZEOF_VIDEO_PROCESSING_UNIT(pDesc) \
(sizeof(VIDEO_PROCESSING_UNIT) + 1 + (pDesc)->bControlSize)
// VideoControl Extension Unit Descriptor
typedef struct {
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // EXTENSION_UNIT descriptor subtype
UCHAR bUnitID; // Constant uniquely identifying the Unit
GUID guidExtensionCode; // Vendor-specific code identifying extension unit
UCHAR bNumControls; // Number of controls in Extension Unit
UCHAR bNrInPins; // Number of input pins
UCHAR baSourceID[]; // IDs of connected units/terminals
} VIDEO_EXTENSION_UNIT, *PVIDEO_EXTENSION_UNIT;
// this is followed by bControlSize, bmControls and iExtension (1 byte)
__inline size_t SizeOfVideoExtensionUnit(PVIDEO_EXTENSION_UNIT pDesc)
{
UCHAR bControlSize;
PUCHAR pbCurr;
// baSourceID is an array, and hence understood to be an address
pbCurr = pDesc->baSourceID + pDesc->bNrInPins;
if (((ULONG_PTR) pbCurr < (ULONG_PTR) pDesc->baSourceID) ||
(ULONG_PTR) pbCurr >= (ULONG_PTR)((UCHAR *) pDesc + pDesc->bLength))
return 0;
bControlSize = *pbCurr;
return 24 + pDesc->bNrInPins + bControlSize;
}
#define SIZEOF_VIDEO_EXTENSION_UNIT(pDesc) SizeOfVideoExtensionUnit(pDesc)
// Class-specific Interrupt Endpoint Descriptor
typedef struct {
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_ENDPOINT descriptor type
UCHAR bDescriptorSubtype; // EP_INTERRUPT descriptor subtype
USHORT wMaxTransferSize; // Max interrupt payload size
} VIDEO_CS_INTERRUPT, *PVIDEO_CS_INTERRUPT;
#define SIZEOF_VIDEO_CS_INTERRUPT(pDesc) sizeof(VIDEO_CS_INTERRUPT)
// VideoStreaming Input Header Descriptor
typedef struct _VIDEO_STREAMING_INPUT_HEADER
{
UCHAR bLength; // Size of this descriptor in bytes
UCHAR bDescriptorType; // CS_INTERFACE descriptor type
UCHAR bDescriptorSubtype; // VS_INPUT_HEADER descriptor subtype
UCHAR bNumFormats;
USHORT wTotalLength;
UCHAR bEndpointAddress;
UCHAR bmInfo;
UCHAR bTerminalLink;
UCHAR bStillCaptureMethod;
UCHAR bTriggerSupport;
UCHAR bTriggerUsage;
UCHAR bControlSize;
UCHAR bmaControls[];
} VIDEO_STREAMING_INPUT_HEADER, *PVIDEO_STREAMING_INPUT_HEADER;
#define SIZEOF_VIDEO_STREAMING_INPUT_HEADER(pDesc) \
(sizeof(VIDEO_STREAMING_INPUT_HEADER) + (pDesc->bNumFormats * pDesc->bControlSize))
// VideoStreaming Output Header Descriptor
typedef struct _VIDEO_STREAMING_OUTPUT_HEADER
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bNumFormats;
USHORT wTotalLength;
UCHAR bEndpointAddress;
UCHAR bTerminalLink;
} VIDEO_STREAMING_OUTPUT_HEADER, *PVIDEO_STREAMING_OUTPUT_HEADER;
#define SIZEOF_VIDEO_STREAMING_OUTPUT_HEADER(pDesc) sizeof(VIDEO_STREAMING_OUTPUT_HEADER)
typedef struct _VIDEO_STILL_IMAGE_RECT
{
USHORT wWidth;
USHORT wHeight;
} VIDEO_STILL_IMAGE_RECT;
// VideoStreaming Still Image Frame Descriptor
typedef struct _VIDEO_STILL_IMAGE_FRAME
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bEndpointAddress;
UCHAR bNumImageSizePatterns;
VIDEO_STILL_IMAGE_RECT aStillRect[];
} VIDEO_STILL_IMAGE_FRAME, *PVIDEO_STILL_IMAGE_FRAME;
__inline size_t SizeOfVideoStillImageFrame(PVIDEO_STILL_IMAGE_FRAME pDesc)
{
UCHAR bNumCompressionPatterns;
PUCHAR pbCurr;
pbCurr = (PUCHAR) pDesc->aStillRect + (sizeof(VIDEO_STILL_IMAGE_RECT) * pDesc->bNumImageSizePatterns);
bNumCompressionPatterns = *pbCurr;
return (sizeof(VIDEO_STILL_IMAGE_FRAME) +
(sizeof(VIDEO_STILL_IMAGE_RECT) * pDesc->bNumImageSizePatterns) +
1 + bNumCompressionPatterns);
}
#define SIZEOF_VIDEO_STILL_IMAGE_FRAME(pDesc) SizeOfVideoStillImageFrame(pDesc)
// VideoStreaming Color Matching Descriptor
typedef struct _VIDEO_COLORFORMAT
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bColorPrimaries;
UCHAR bTransferCharacteristics;
UCHAR bMatrixCoefficients;
} VIDEO_COLORFORMAT, *PVIDEO_COLORFORMAT;
#define SIZEOF_VIDEO_COLORFORMAT(pDesc) sizeof(VIDEO_COLORFORMAT)
// VideoStreaming Uncompressed Format Descriptor
typedef struct _VIDEO_FORMAT_UNCOMPRESSED
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bFormatIndex;
UCHAR bNumFrameDescriptors;
GUID guidFormat;
UCHAR bBitsPerPixel;
UCHAR bDefaultFrameIndex;
UCHAR bAspectRatioX;
UCHAR bAspectRatioY;
UCHAR bmInterlaceFlags;
UCHAR bCopyProtect;
} VIDEO_FORMAT_UNCOMPRESSED, *PVIDEO_FORMAT_UNCOMPRESSED;
#define SIZEOF_VIDEO_FORMAT_UNCOMPRESSED(pDesc) sizeof(VIDEO_FORMAT_UNCOMPRESSED)
// VideoStreaming Uncompressed Frame Descriptor
typedef struct _VIDEO_FRAME_UNCOMPRESSED
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bFrameIndex;
UCHAR bmCapabilities;
USHORT wWidth;
USHORT wHeight;
ULONG dwMinBitRate;
ULONG dwMaxBitRate;
ULONG dwMaxVideoFrameBufferSize;
ULONG dwDefaultFrameInterval;
UCHAR bFrameIntervalType;
ULONG adwFrameInterval[];
} VIDEO_FRAME_UNCOMPRESSED, *PVIDEO_FRAME_UNCOMPRESSED;
__inline size_t SizeOfVideoFrameUncompressed(_In_ PVIDEO_FRAME_UNCOMPRESSED pDesc)
{
if (pDesc->bFrameIntervalType == 0) { // Continuous
return sizeof(VIDEO_FRAME_UNCOMPRESSED) + (3 * sizeof(ULONG));
}
else { // Discrete
return sizeof(VIDEO_FRAME_UNCOMPRESSED) + (pDesc->bFrameIntervalType * sizeof(ULONG));
}
}
#define SIZEOF_VIDEO_FRAME_UNCOMPRESSED(pDesc) SizeOfVideoFrameUncompressed(pDesc)
// VideoStreaming MJPEG Format Descriptor
typedef struct _VIDEO_FORMAT_MJPEG
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bFormatIndex;
UCHAR bNumFrameDescriptors;
UCHAR bmFlags;
UCHAR bDefaultFrameIndex;
UCHAR bAspectRatioX;
UCHAR bAspectRatioY;
UCHAR bmInterlaceFlags;
UCHAR bCopyProtect;
} VIDEO_FORMAT_MJPEG, *PVIDEO_FORMAT_MJPEG;
#define SIZEOF_VIDEO_FORMAT_MJPEG(pDesc) sizeof(VIDEO_FORMAT_MJPEG)
// VideoStreaming MJPEG Frame Descriptor
typedef struct _VIDEO_FRAME_MJPEG
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bFrameIndex;
UCHAR bmCapabilities;
USHORT wWidth;
USHORT wHeight;
ULONG dwMinBitRate;
ULONG dwMaxBitRate;
ULONG dwMaxVideoFrameBufferSize;
ULONG dwDefaultFrameInterval;
UCHAR bFrameIntervalType;
ULONG adwFrameInterval[];
} VIDEO_FRAME_MJPEG, *PVIDEO_FRAME_MJPEG;
__inline size_t SizeOfVideoFrameMjpeg(_In_ PVIDEO_FRAME_MJPEG pDesc)
{
if (pDesc->bFrameIntervalType == 0) { // Continuous
return sizeof(VIDEO_FRAME_MJPEG) + (3 * sizeof(ULONG));
}
else { // Discrete
return sizeof(VIDEO_FRAME_MJPEG) + (pDesc->bFrameIntervalType * sizeof(ULONG));
}
}
#define SIZEOF_VIDEO_FRAME_MJPEG(pDesc) SizeOfVideoFrameMjpeg(pDesc)
// VideoStreaming Vendor Format Descriptor
typedef struct _VIDEO_FORMAT_VENDOR
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bFormatIndex;
UCHAR bNumFrameDescriptors;
GUID guidMajorFormat;
GUID guidSubFormat;
GUID guidSpecifier;
UCHAR bPayloadClass;
UCHAR bDefaultFrameIndex;
UCHAR bCopyProtect;
} VIDEO_FORMAT_VENDOR, *PVIDEO_FORMAT_VENDOR;
#define SIZEOF_VIDEO_FORMAT_VENDOR(pDesc) sizeof(VIDEO_FORMAT_VENDOR)
// VideoStreaming Vendor Frame Descriptor
typedef struct _VIDEO_FRAME_VENDOR
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bFrameIndex;
UCHAR bmCapabilities;
USHORT wWidth;
USHORT wHeight;
ULONG dwMinBitRate;
ULONG dwMaxBitRate;
ULONG dwMaxVideoFrameBufferSize;
ULONG dwDefaultFrameInterval;
UCHAR bFrameIntervalType;
DWORD adwFrameInterval[];
} VIDEO_FRAME_VENDOR, *PVIDEO_FRAME_VENDOR;
__inline size_t SizeOfVideoFrameVendor(_In_ PVIDEO_FRAME_VENDOR pDesc)
{
if (pDesc->bFrameIntervalType == 0) { // Continuous
return sizeof(VIDEO_FRAME_VENDOR) + (3 * sizeof(ULONG));
}
else { // Discrete
return sizeof(VIDEO_FRAME_VENDOR) + (pDesc->bFrameIntervalType * sizeof(ULONG));
}
}
#define SIZEOF_VIDEO_FRAME_VENDOR(pDesc) SizeOfVideoFrameVendor(pDesc)
// VideoStreaming DV Format Descriptor
typedef struct _VIDEO_FORMAT_DV
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bFormatIndex;
ULONG dwMaxVideoFrameBufferSize;
UCHAR bFormatType;
} VIDEO_FORMAT_DV, *PVIDEO_FORMAT_DV;
#define SIZEOF_VIDEO_FORMAT_DV(pDesc) sizeof(VIDEO_FORMAT_DV)
// VideoStreaming MPEG2-TS Format Descriptor
typedef struct _VIDEO_FORMAT_MPEG2TS
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bFormatIndex;
UCHAR bDataOffset;
UCHAR bPacketLength;
UCHAR bStrideLength;
} VIDEO_FORMAT_MPEG2TS, *PVIDEO_FORMAT_MPEG2TS;
#define SIZEOF_VIDEO_FORMAT_MPEG2TS(pDesc) sizeof(VIDEO_FORMAT_MPEG2TS)
// VideoStreaming MPEG1 System Stream Format Descriptor
typedef struct _VIDEO_FORMAT_MPEG1SS
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bFormatIndex;
UCHAR bPacketLength;
UCHAR bPackLength;
UCHAR bPackDataType;
} VIDEO_FORMAT_MPEG1SS, *PVIDEO_FORMAT_MPEG1SS;
#define SIZEOF_VIDEO_FORMAT_MPEG1SS(pDesc) sizeof(VIDEO_FORMAT_MPEG1SS)
// VideoStreaming MPEG2-PS Format Descriptor
typedef struct _VIDEO_FORMAT_MPEG2PS
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bFormatIndex;
UCHAR bPacketLength;
UCHAR bPackLength;
UCHAR bPackDataType;
} VIDEO_FORMAT_MPEG2PS, *PVIDEO_FORMAT_MPEG2PS;
#define SIZEOF_VIDEO_FORMAT_MPEG2PS(pDesc) sizeof(VIDEO_FORMAT_MPEG2PS)
// VideoStreaming MPEG4-SL Format Descriptor
typedef struct _VIDEO_FORMAT_MPEG4SL
{
UCHAR bLength;
UCHAR bDescriptorType;
UCHAR bDescriptorSubtype;
UCHAR bFormatIndex;
UCHAR bPacketLength;
} VIDEO_FORMAT_MPEG4SL, *PVIDEO_FORMAT_MPEG4SL;
#define SIZEOF_VIDEO_FORMAT_MPEG4SL(pDesc) sizeof(VIDEO_FORMAT_MPEG4SL)
// VideoStreaming Probe/Commit Control
typedef struct _VS_PROBE_COMMIT_CONTROL
{
USHORT bmHint;
UCHAR bFormatIndex;
UCHAR bFrameIndex;
ULONG dwFrameInterval;
USHORT wKeyFrameRate;
USHORT wPFrameRate;
USHORT wCompQuality;
USHORT wCompWindowSize;
USHORT wDelay;
ULONG dwMaxVideoFrameSize;
ULONG dwMaxPayloadTransferSize;
} VS_PROBE_COMMIT_CONTROL, *PVS_PROBE_COMMIT_CONTROL;
// VideoStreaming Still Probe/Commit Control
typedef struct _VS_STILL_PROBE_COMMIT_CONTROL
{
UCHAR bFormatIndex;
UCHAR bFrameIndex;
UCHAR bCompressionIndex;
ULONG dwMaxVideoFrameSize;
ULONG dwMaxPayloadTransferSize;
} VS_STILL_PROBE_COMMIT_CONTROL, *PVS_STILL_PROBE_COMMIT_CONTROL;
// Status Interrupt Packet (Video Control)
typedef struct _VC_INTERRUPT_PACKET
{
UCHAR bStatusType;
UCHAR bOriginator;
UCHAR bEvent;
UCHAR bSelector;
UCHAR bAttribute;
UCHAR bValue[1];
} VC_INTERRUPT_PACKET, *PVC_INTERRUPT_PACKET;
// Status Interrupt Packet (Video Control)
typedef struct _VC_INTERRUPT_PACKET_EX
{
UCHAR bStatusType;
UCHAR bOriginator;
UCHAR bEvent;
UCHAR bSelector;
UCHAR bAttribute;
UCHAR bValue[MAX_INTERRUPT_PACKET_VALUE_SIZE];
} VC_INTERRUPT_PACKET_EX, *PVC_INTERRUPT_PACKET_EX;
// Status Interrupt Packet (Video Streaming)
typedef struct _VS_INTERRUPT_PACKET
{
UCHAR bStatusType;
UCHAR bOriginator;
UCHAR bEvent;
UCHAR bValue[1];
} VS_INTERRUPT_PACKET, *PVS_INTERRUPT_PACKET;
// Status Interrupt Packet (Generic)
typedef struct _VIDEO_INTERRUPT_PACKET
{
UCHAR bStatusType;
UCHAR bOriginator;
} VIDEO_INTERRUPT_PACKET, *PVIDEO_INTERRUPT_PACKET;
// Relative property struct
typedef struct _VIDEO_RELATIVE_PROPERTY
{
UCHAR bValue;
UCHAR bSpeed;
} VIDEO_RELATIVE_PROPERTY, *PVIDEO_RELATIVE_PROPERTY;
// Relative Zoom control struct
typedef struct _ZOOM_RELATIVE_PROPERTY
{
UCHAR bZoom;
UCHAR bDigitalZoom;
UCHAR bSpeed;
} ZOOM_RELATIVE_PROPERTY, *PZOOM_RELATIVE_PROPERTY;
// Relative pan-tilt struct
typedef struct _PANTILT_RELATIVE_PROPERTY
{
UCHAR bPanRelative;
UCHAR bPanSpeed;
UCHAR bTiltRelative;
UCHAR bTiltSpeed;
} PANTILT_RELATIVE_PROPERTY, *PPANTILT_RELATIVE_PROPERTY;
typedef struct _MEDIA_INFORMATION_CONTROL
{
UCHAR bmMediaType;
UCHAR bmWriteProtect;
} MEDIA_INFORMATION_CONTROL, *PMEDIA_INFORMATION_CONTROL;
typedef struct _TIME_CODE_INFORMATION_CONTROL
{
UCHAR bcdFrame;
UCHAR bcdSecond;
UCHAR bcdMinute;
UCHAR bcdHour;