UVC 输入头描述符
2020-10-02
3249
0
输入头描述符用于包含视频流输入端点的接口集。它提供了后续不同格式描述符数量的信息以及所有类特定描述符的总大小在转换设置为0的情况下的接口。
// Class-specific VS Interface Input Header Descriptor
typedef struct _USB_VS_INTERFACE_INPUT_HEADER_DESCRIPTOR
{
UINT8 bLength;
UINT8 bDescriptorType;
UINT8 bDescriptorSubtype;
UINT8 bNumFormats;
UINT16 wTotalLength;
UINT8 bEndpointAddress;
UINT8 bmInfo;
UINT8 bTerminalLink;
UINT8 bStillCaptureMethod;
UINT8 bTriggerSupport;
UINT8 bTriggerUsage;
UINT8 bControlSize;
UINT8 bmaControls[bControlSize];
} USB_VS_INTERFACE_INPUT_HEADER_DESCRIPTOR;
- bLength:描述符大小, 13+(p*n)
- bDescriptorType:视频特定类描述符类型,CS_INTERFACE,值为0x24
- bDescriptorSubtype:描述符子类型,VS_INPUT_HEADER,值为0x01
- bNumFormats:此接口下的视频有负载格式描述符的数目,p
- wTotalLength:视频特定类总大小(包括后续相关描述符)
- bEndpointAddress:用于视频传输的等时/同步传输或者批量传输的端点地址。
- bmInfo:视频流接口特性信息。D0为1表示支持动态改变视频格式,为0表示不支持;D1-7保留
- bTerminalLink:连接此端点的输出端点ID.
- bStillCaptureMethod:静态抓图的支持方法。0表示不支持,1为方法1,2为方法2,3为方法3.
- bTriggerSupport:是否支持硬件触发。0不支持,1支持。
- bTriggerUsage:指示主机软件如何响应来自此接口的中断事件。bTriggerSupport为0忽略此字段。0为静态图像抓取,1为通过按钮的按下与释放抓取。
- bControlSize:每种bNumFormats的bmaControls字节大小。
- bmaControls:每个字节的D0-D3表示支持命名字段何时提交。一种fomrat一组bmaControls
当有2种格式时:
---- VC-Specific VS Video Input Header Descriptor -----
bLength : 0x0F (15 bytes)
bDescriptorType : 0x24 (Video Streaming Interface)
bDescriptorSubtype : 0x01 (Input Header)
bNumFormats : 0x02
wTotalLength : 0x01A3 (419 bytes)
bEndpointAddress : 0x81 (Direction=IN EndpointID=1)
bmInfo : 0x00 (Dynamic Format Change not supported)
bTerminalLink : 0x05 (Output Terminal ID 5)
bStillCaptureMethod : 0x00 (No Still Capture)
nbTriggerSupport : 0x00 (Hardware Triggering not supported)
bTriggerUsage : 0x00 (Host will initiate still image capture)
bControlSize : 0x01 (1 bytes each)
Video Payload Format 1 : 0x00
D0 : 0 no - Key Frame Rate
D1 : 0 no - P Frame Rate
D2 : 0 no - Compression Quality
D3 : 0 no - Compression Window Size
D4 : 0 no - Generate Key Frame
D5 : 0 no - Update Frame Segment
D6 : 0 no - Reserved
D7 : 0 no - Reserved
Video Payload Format 2 : 0x00
D0 : 0 no - Key Frame Rate
D1 : 0 no - P Frame Rate
D2 : 0 no - Compression Quality
D3 : 0 no - Compression Window Size
D4 : 0 no - Generate Key Frame
D5 : 0 no - Update Frame Segment
D6 : 0 no - Reserved
D7 : 0 no - Reserved
Data (HexDump) : 0F 24 01 02 A3 01 81 00 05 00 00 00 01 00 00 .$.............
当有三种格式时:
---- VC-Specific VS Video Input Header Descriptor -----
bLength : 0x10 (16 bytes)
bDescriptorType : 0x24 (Video Streaming Interface)
bDescriptorSubtype : 0x01 (Input Header)
bNumFormats : 0x03
wTotalLength : 0x012A (298 bytes)
bEndpointAddress : 0x85 (Direction=IN EndpointID=5)
bmInfo : 0x00 (Dynamic Format Change not supported)
bTerminalLink : 0x03 (Output Terminal ID 3)
bStillCaptureMethod : 0x00 (No Still Capture)
nbTriggerSupport : 0x00 (Hardware Triggering not supported)
bTriggerUsage : 0x00 (Host will initiate still image capture)
bControlSize : 0x01 (1 bytes each)
Video Payload Format 1 : 0x00
D0 : 0 no - Key Frame Rate
D1 : 0 no - P Frame Rate
D2 : 0 no - Compression Quality
D3 : 0 no - Compression Window Size
D4 : 0 no - Generate Key Frame
D5 : 0 no - Update Frame Segment
D6 : 0 no - Reserved
D7 : 0 no - Reserved
Video Payload Format 2 : 0x00
D0 : 0 no - Key Frame Rate
D1 : 0 no - P Frame Rate
D2 : 0 no - Compression Quality
D3 : 0 no - Compression Window Size
D4 : 0 no - Generate Key Frame
D5 : 0 no - Update Frame Segment
D6 : 0 no - Reserved
D7 : 0 no - Reserved
Video Payload Format 3 : 0x00
D0 : 0 no - Key Frame Rate
D1 : 0 no - P Frame Rate
D2 : 0 no - Compression Quality
D3 : 0 no - Compression Window Size
D4 : 0 no - Generate Key Frame
D5 : 0 no - Update Frame Segment
D6 : 0 no - Reserved
D7 : 0 no - Reserved
Data (HexDump) : 10 24 01 03 2A 01 85 00 03 00 00 00 01 00 00 00 .$..*...........
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936