UVC摄像头视频特定类请求
2022-03-09
1190
0
/* Video Class-specific Request codes */
#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
/* Video Streaming Interface Control selectors */
#define VS_PROBE_CONTROL 0x01
#define VS_COMMIT_CONTROL 0x02
在UVC视频流接口中,会处理VS_PROBE_CONTROL和VS_COMMIT_CONTROL的SET和GET请求。VS_PROBE_CONTROL和VS_COMMIT_CONTROL涉及主机和设备之间的流参数协商。下面的代码显示了与这些控件协商的流参数的结构。
/* Video Probe and Commit Controls (Table 4-47 , UVC 1.1) */
typedef struct
{
unsigned short bmHint;
unsigned char bFormatIndex;
unsigned char bFrameIndex;
unsigned int dwFrameInterval;
unsigned short wKeyFrameRate;
unsigned short wPFrameRate;
unsigned short wCompQuality;
unsigned short wCompWindowSize;
unsigned short wDelay;
unsigned int dwMaxVideoFrameSize;
unsigned int dwMaxPayloadTransferSize;
unsigned int dwClockFrequency;
unsigned char bmFramingInfo;
unsigned char bPreferedVersion;
unsigned char bMinVersion;
unsigned char bMaxVersion;
} __attribute__((packed)) UVC_ProbeCommit_Ctrl_t;
HID人机交互QQ群:564808376
UAC音频QQ群:218581009
UVC相机QQ群:331552032
BOT&UASP大容量存储QQ群:258159197
STC-USB单片机QQ群:315457461
USB技术交流QQ群2:580684376
USB技术交流QQ群:952873936