UVC规范(USB摄像头)
+ -

UVC 描述符实例

2020-10-01 4435 0

通过BUSBOUND抓取USB摄像头插入电脑时的数据信息,这里只是选报设备描述符接口描述符信息

Device  Phase  Data                      Description       Cmd.Phase.Ofs(rep)
------  -----  ------------------------  ----------------  ------------------
  29.0  CTL    80 06 00 01  00 00 12 00  GET DESCRIPTOR           1.1.0        
  29.0  IN     12 01 20 03  ef 02 01 09  .. .....                 1.2.0        
               d9 2b 21 00  01 02 01 02  .+!.....                 1.2.8        
               03 01                     ..                       1.2.16       
  29.0  CTL    80 06 00 02  00 00 09 00  GET DESCRIPTOR           2.1.0        
  29.0  IN     09 02 02 01  02 01 00 80  ........                 2.2.0        
               70                        p                        2.2.8        
  29.0  CTL    80 06 00 02  00 00 02 01  GET DESCRIPTOR           3.1.0        
  29.0  IN     09 02 02 01  02 01 00 80  ........                 3.2.0        
               70 09 04 00  00 00 0e 01  p.......                 3.2.8        
               00 00 0d 24  01 10 01 51  ...$...Q                 3.2.16       
               00 e8 03 00  00 01 01 12  ........                 3.2.24       
               24 02 02 01  02 00 00 00  $.......                 3.2.32       
               00 00 00 00  00 03 0a 0a  ........                 3.2.40       
               00 0d 24 05  03 02 00 00  ..$.....                 3.2.48       
               03 09 06 00  00 00 1c 24  .......$                 3.2.56       
               06 04 29 c8  ac f6 db ac  ..).....                 3.2.64       
               11 e5 84 24  f3 90 68 f7  ...$..h.                 3.2.72       
               55 11 14 01  03 03 1f 00  U.......                 3.2.80       
               0d 00 09 24  03 05 01 01  ...$....                 3.2.88       
               00 04 00 09  04 01 00 01  ........                 3.2.96       
               0e 02 00 00  0e 24 01 01  .....$..                 3.2.104      
               89 00 81 00  05 00 00 00  ........                 3.2.112      
               01 00 1b 24  04 01 03 59  ...$...Y                 3.2.120      
               55 59 32 00  00 10 00 80  UY2.....                 3.2.128      
               00 00 aa 00  38 9b 71 10  ....8.q.                 3.2.136      
               01 00 00 00  00 1e 24 05  ......$.                 3.2.144      
               01 02 80 07  38 04 00 80  ....8...                 3.2.152      
               53 3b 00 80  53 3b 00 48  S;..S;.H                 3.2.160      
               3f 00 15 16  05 00 01 15  ?.......                 3.2.168      
               16 05 00 1e  24 05 02 02  ....$...                 3.2.176      
               00 05 d0 02  00 00 5e 1a  ......^.                 3.2.184      
               00 00 5e 1a  00 20 1c 00  ..^.. ..                 3.2.192      
               15 16 05 00  01 15 16 05  ........                 3.2.200      
               00 1e 24 05  03 02 80 02  ..$.....                 3.2.208      
               68 01 00 80  97 06 00 80  h.......                 3.2.216      
               97 06 00 08  07 00 15 16  ........                 3.2.224      
               05 00 01 15  16 05 00 06  ........                 3.2.232      
               24 0d 01 07  04 07 05 81  $.......                 3.2.240      
               02 00 04 00  06 30 0f 00  .....0..                 3.2.248      
               00 00                     ..                       3.2.256

设备描述符

12 01 20 03  ef 02 01 09  d9 2b 21 00  01 02 01 02  03 01

对其数据时行结构分析

bLength                  : 0x12 (18 bytes)
bDescriptorType          : 0x01 (Device Descriptor)
bcdUSB                   : 0x320 (USB Version 3.20)
bDeviceClass             : 0xEF (Miscellaneous)
bDeviceSubClass          : 0x02
bDeviceProtocol          : 0x01 (IAD - Interface Association Descriptor)
bMaxPacketSize0          : 0x09 (9 bytes)
idVendor                 : 0x2BD9
idProduct                : 0x0021
bcdDevice                : 0x0201
iManufacturer            : 0x01 (String Descriptor 1)
 Language 0x0409         : "xxx"//这里隐去厂
iProduct                 : 0x02 (String Descriptor 2)
 Language 0x0409         : "xxx x"//这里隐去
iSerialNumber            : 0x03 (String Descriptor 3)
 Language 0x0409         : "B41A01004"
bNumConfigurations       : 0x01 (1 Configuration)
Data (HexDump)           : 12 01 20 03 EF 02 01 09 D9 2B 21 00 01 02 01 02   .. ......+!.....
                           03 01

可以看到是视频类0xef,有1个配置

配置描述符

------------------ Configuration Descriptor -------------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x02 (Configuration Descriptor)
wTotalLength             : 0x019F (415 bytes)
bNumInterfaces           : 0x05 (5 Interfaces)
bConfigurationValue      : 0x01 (Configuration 1)
iConfiguration           : 0x00 (No String Descriptor)
bmAttributes             : 0x80
 D7: Reserved, set 1     : 0x01
 D6: Self Powered        : 0x00 (no)
 D5: Remote Wakeup       : 0x00 (no)
 D4..0: Reserved, set 0  : 0x00
MaxPower                 : 0x70 (896 mA)

这里有5个接口描述符

接口描述符

接口描述符中不光含有接口描述符相关内容,后面也有其它描述符信息,所以是个变长数据结构。USB驱动在获取时是通过2次获取的。

 ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x00
bAlternateSetting        : 0x00
bNumEndpoints            : 0x00 (Default Control Pipe only)
bInterfaceClass          : 0x0E (Video)
bInterfaceSubClass       : 0x01 (Video Control)
bInterfaceProtocol       : 0x00
iInterface               : 0x00 (No String Descriptor)
Data (HexDump)           : 09 04 00 00 00 0E 01 00 00                        .........

注意:

真实在配置固件时应该有个IAD的,不过这里没有,由USBCCGP过滤掉。

控制接口头描述符头

  ------- Video Control Interface Header Descriptor -----
bLength                  : 0x0D (13 bytes)
bDescriptorType          : 0x24 (Video Control Interface)
bDescriptorSubtype       : 0x01 (Video Control Header)
bcdUVC                   : 0x0110 (UVC Version 1.10)
wTotalLength             : 0x0051 (81 bytes)
dwClockFreq              : 0x000003E8 (1000 Hz)
bInCollection            : 0x01 (1 VideoStreaming interface)
baInterfaceNr[1]         : 0x01
Data (HexDump)           : 0D 24 01 10 01 51 00 E8 03 00 00 01 01            .$...Q.......

VC输入端点描述符(第一个接口)

     -------- Video Control Input Terminal Descriptor ------
bLength                  : 0x12 (18 bytes)
bDescriptorType          : 0x24 (Video Control Interface)
bDescriptorSubtype       : 0x02 (Input Terminal)
bTerminalID              : 0x02
wTerminalType            : 0x0201 (ITT_CAMERA)
bAssocTerminal           : 0x00 (Not associated with an Output Terminal)
iTerminal                : 0x00
Camera Input Terminal Data:
wObjectiveFocalLengthMin : 0x0000
wObjectiveFocalLengthMax : 0x0000
wOcularFocalLength       : 0x0000
bControlSize             : 0x03
bmControls               : 0x0A, 0x0A, 0x00
 D00                     : 0   no -  Scanning Mode
 D01                     : 1  yes -  Auto-Exposure Mode
 D02                     : 0   no -  Auto-Exposure Priority
 D03                     : 1  yes -  Exposure Time (Absolute)
 D04                     : 0   no -  Exposure Time (Relative)
 D05                     : 0   no -  Focus (Absolute)
 D06                     : 0   no -  Focus (Relative)
 D07                     : 0   no -  Iris (Absolute)
 D08                     : 0   no -  Iris (Relative)
 D09                     : 1  yes -  Zoom (Absolute)
 D10                     : 0   no -  Zoom (Relative)
 D11                     : 1  yes -  Pan (Absolute)
 D12                     : 0   no -  Pan (Relative)
 D13                     : 0   no -  Roll (Absolute)
 D14                     : 0   no -  Roll (Relative)
 D15                     : 0   no -  Tilt (Absolute)
 D16                     : 0   no -  Tilt (Relative)
 D17                     : 0   no -  Focus Auto
 D18                     : 0   no -  Reserved
 D19                     : 0   no -  Reserved
 D20                     : 0   no -  Reserved
 D21                     : 0   no -  Reserved
 D22                     : 0   no -  Reserved
 D23                     : 0   no -  Reserved
Data (HexDump)           : 12 24 02 02 01 02 00 00 00 00 00 00 00 00 03 0A   .$..............
                           0A 00                                             ..
Data (HexDump)           : 12 24 02 02 01 02 00 00 00 00 00 00 00 00 03 0A   .$..............
                           0A 00

控制单元描述符

       -------- Video Control Processing Unit Descriptor -----
bLength                  : 0x0D (13 bytes)
bDescriptorType          : 0x24 (Video Control Interface)
bDescriptorSubtype       : 0x05 (Processing Unit)
bUnitID                  : 0x03
bSourceID                : 0x02
wMaxMultiplier           : 0x0000
bControlSize             : 0x03
bmControls               : 0x09, 0x06, 0x00
 D00                     : 1  yes -  Brightness
 D01                     : 0   no -  Contrast
 D02                     : 0   no -  Hue
 D03                     : 1  yes -  Saturation
 D04                     : 0   no -  Sharpness
 D05                     : 0   no -  Gamma
 D06                     : 0   no -  White Balance Temperature
 D07                     : 0   no -  White Balance Component
 D08                     : 0   no -  Backlight Compensation
 D09                     : 1  yes -  Gain
 D10                     : 1  yes -  Power Line Frequency
 D11                     : 0   no -  Hue, Auto
 D12                     : 0   no -  White Balance Temperature, Auto
 D13                     : 0   no -  White Balance Component, Auto
 D14                     : 0   no -  Digital Multiplier
 D15                     : 0   no -  Digital Multiplier Limit
 D16                     : 0   no -  Analog Video Standard
 D17                     : 0   no -  Analog Video Lock Status
 D18                     : 0   no -  Contrast, Auto
 D19                     : 0   no -  Reserved
 D20                     : 0   no -  Reserved
 D21                     : 0   no -  Reserved
 D22                     : 0   no -  Reserved
 D23                     : 0   no -  Reserved
iProcessing              : 0x00
bmVideoStandards         : 0x00
 D00                   : 0   no -  None
 D01                   : 0   no -  NTSC  - 525/60
 D02                   : 0   no -  PAL   - 625/50
 D03                   : 0   no -  SECAM - 625/50
 D04                   : 0   no -  NTSC  - 625/50
 D05                   : 0   no -  PAL   - 525/60
 D06                   : 0   no -  Reserved
 D07                   : 0   no -  Reserved
Data (HexDump)           : 0D 24 05 03 02 00 00 03 09 06 00 00 00            .$...........

扩展单元描述符

 --------- Video Control Extension Unit Descriptor -----
bLength                  : 0x1C (28 bytes)
bDescriptorType          : 0x24 (Video Control Interface)
bDescriptorSubtype       : 0x06 (Extension Unit)
bUnitID                  : 0x04
guidExtensionCode        : {F6ACC829-ACDB-E511-8424-F39068F75511}
bNumControls             : 0x14
bNrInPins                : 0x01 (1 pins)
baSourceID[1]            : 0x03
bControlSize             : 0x03
bmControls               : 0x1F, 0x00, 0x0D
 D00                     : 1  yes -  Vendor-Specific (Optional)
 D01                     : 1  yes -  Vendor-Specific (Optional)
 D02                     : 1  yes -  Vendor-Specific (Optional)
 D03                     : 1  yes -  Vendor-Specific (Optional)
 D04                     : 1  yes -  Vendor-Specific (Optional)
 D05                     : 0   no -  Vendor-Specific (Optional)
 D06                     : 0   no -  Vendor-Specific (Optional)
 D07                     : 0   no -  Vendor-Specific (Optional)
 D08                     : 0   no -  Vendor-Specific (Optional)
 D09                     : 0   no -  Vendor-Specific (Optional)
 D10                     : 0   no -  Vendor-Specific (Optional)
 D11                     : 0   no -  Vendor-Specific (Optional)
 D12                     : 0   no -  Vendor-Specific (Optional)
 D13                     : 0   no -  Vendor-Specific (Optional)
 D14                     : 0   no -  Vendor-Specific (Optional)
 D15                     : 0   no -  Vendor-Specific (Optional)
 D16                     : 1  yes -  Vendor-Specific (Optional)
 D17                     : 0   no -  Vendor-Specific (Optional)
 D18                     : 1  yes -  Vendor-Specific (Optional)
 D19                     : 1  yes -  Vendor-Specific (Optional)
 D20                     : 0   no -  Vendor-Specific (Optional)
 D21                     : 0   no -  Vendor-Specific (Optional)
 D22                     : 0   no -  Vendor-Specific (Optional)
 D23                     : 0   no -  Vendor-Specific (Optional)
iExtension               : 0x00
Data (HexDump)           : 1C 24 06 04 29 C8 AC F6 DB AC 11 E5 84 24 F3 90   .$..)........$..
                           68 F7 55 11 14 01 03 03 1F 00 0D 00               h.U.........

输出终端描述符

    ------- Video Control Output Terminal Descriptor ------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x24 (Video Control Interface)
bDescriptorSubtype       : 0x03 (Output Terminal)
bTerminalID              : 0x05
wTerminalType            : 0x0101 (TT_STREAMING)
bAssocTerminal           : 0x00 (Not associated with an Input Terminal)
bSourceID                : 0x04
iTerminal                : 0x00
Data (HexDump)           : 09 24 03 05 01 01 00 04 00                        .$.......

接口描述符(第二个接口)

      ---------------- Interface Descriptor -----------------
bLength                  : 0x09 (9 bytes)
bDescriptorType          : 0x04 (Interface Descriptor)
bInterfaceNumber         : 0x01
bAlternateSetting        : 0x00
bNumEndpoints            : 0x01 (1 Endpoint)
bInterfaceClass          : 0x0E (Video)
bInterfaceSubClass       : 0x02 (Video Streaming)
bInterfaceProtocol       : 0x00
iInterface               : 0x00 (No String Descriptor)
Data (HexDump)           : 09 04 01 00 01 0E 02 00 00                        .........

输入头描述符

---- VC-Specific VS Video Input Header Descriptor -----
bLength                  : 0x0E (14 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x01 (Input Header)
bNumFormats              : 0x01
wTotalLength             : 0x0089 (137 bytes)
bEndpointAddress         : 0x81 (Direction=IN  EndpointID=1)
bmInfo                   : 0x00 (Dynamic Format Change not supported)
bTerminalLink            : 0x05
bStillCaptureMethod      : 0x00 (No Still Capture)
nbTriggerSupport         : 0x00 (Hardware Triggering not supported)
bTriggerUsage            : 0x00 (Host will initiate still image capture)
nbControlSize            : 0x01
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
Data (HexDump)           : 0E 24 01 01 89 00 81 00 05 00 00 00 01 00         .$............
        ------- VS Uncompressed Format Type Descriptor --------
bLength                  : 0x1B (27 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x04 (Uncompressed Format Type)
bFormatIndex             : 0x01 (1)
bNumFrameDescriptors     : 0x03 (3)
guidFormat               : {32595559-0000-0010-8000-00AA00389B71} (YUY2)
bBitsPerPixel            : 0x10 (16 bits)
bDefaultFrameIndex       : 0x01 (1)
bAspectRatioX            : 0x00
bAspectRatioY            : 0x00
bmInterlaceFlags         : 0x00
 D0 IL stream or variable: 0 (no)
 D1 Fields per frame     : 0 (2 fields)
 D2 Field 1 first        : 0 (no)
 D3 Reserved             : 0
 D4..5 Field pattern     : 0 (Field 1 only)
 D6..7 Display Mode      : 0 (Bob only)
bCopyProtect             : 0x00 (No restrictions)
Data (HexDump)           : 1B 24 04 01 03 59 55 59 32 00 00 10 00 80 00 00   .$...YUY2.......
                           AA 00 38 9B 71 10 01 00 00 00 00                  ..8.q......
   -------- VS Uncompressed Frame Type Descriptor --------
        ---> This is the Default (optimum) Frame index
bLength                  : 0x1E (30 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x05 (Uncompressed Frame Type)
bFrameIndex              : 0x01
bmCapabilities           : 0x02
wWidth                   : 0x0780 (1920)
wHeight                  : 0x0438 (1080)
dwMinBitRate             : 0x3B538000 (995328000 bps -> 124.4 MB/s)
dwMaxBitRate             : 0x3B538000 (995328000 bps -> 124.4 MB/s)
dwMaxVideoFrameBufferSize: 0x003F4800 (4147200 bytes)
dwDefaultFrameInterval   : 0x00051615 (33.3333 ms -> 30.000 fps)
bFrameIntervalType       : 0x01 (1 discrete frame interval supported)
adwFrameInterval[1]      : 0x00051615 (33.3333 ms -> 30.000 fps)
Data (HexDump)           : 1E 24 05 01 02 80 07 38 04 00 80 53 3B 00 80 53   .$.....8...S;..S
                           3B 00 48 3F 00 15 16 05 00 01 15 16 05 00         ;.H?..........
        -------- VS Uncompressed Frame Type Descriptor --------
bLength                  : 0x1E (30 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x05 (Uncompressed Frame Type)
bFrameIndex              : 0x02
bmCapabilities           : 0x02
wWidth                   : 0x0500 (1280)
wHeight                  : 0x02D0 (720)
dwMinBitRate             : 0x1A5E0000 (442368000 bps -> 55.2 MB/s)
dwMaxBitRate             : 0x1A5E0000 (442368000 bps -> 55.2 MB/s)
dwMaxVideoFrameBufferSize: 0x001C2000 (1843200 bytes)
dwDefaultFrameInterval   : 0x00051615 (33.3333 ms -> 30.000 fps)
bFrameIntervalType       : 0x01 (1 discrete frame interval supported)
adwFrameInterval[1]      : 0x00051615 (33.3333 ms -> 30.000 fps)
Data (HexDump)           : 1E 24 05 02 02 00 05 D0 02 00 00 5E 1A 00 00 5E   .$.........^...^
                           1A 00 20 1C 00 15 16 05 00 01 15 16 05 00         .. ...........
        -------- VS Uncompressed Frame Type Descriptor --------
bLength                  : 0x1E (30 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x05 (Uncompressed Frame Type)
bFrameIndex              : 0x03
bmCapabilities           : 0x02
wWidth                   : 0x0280 (640)
wHeight                  : 0x0168 (360)
dwMinBitRate             : 0x06978000 (110592000 bps -> 13.8 MB/s)
dwMaxBitRate             : 0x06978000 (110592000 bps -> 13.8 MB/s)
dwMaxVideoFrameBufferSize: 0x00070800 (460800 bytes)
dwDefaultFrameInterval   : 0x00051615 (33.3333 ms -> 30.000 fps)
bFrameIntervalType       : 0x01 (1 discrete frame interval supported)
adwFrameInterval[1]      : 0x00051615 (33.3333 ms -> 30.000 fps)
Data (HexDump)           : 1E 24 05 03 02 80 02 68 01 00 80 97 06 00 80 97   .$.....h........
                           06 00 08 07 00 15 16 05 00 01 15 16 05 00         ..............
        ------- VS Color Matching Descriptor Descriptor -------
bLength                  : 0x06 (6 bytes)
bDescriptorType          : 0x24 (Video Streaming Interface)
bDescriptorSubtype       : 0x0D (Color Matching)
bColorPrimaries          : 0x01 (BT.709, sRGB)
bTransferCharacteristics : 0x07 (sRGB)
bMatrixCoefficients      : 0x04 (SMPTE 170M)
Data (HexDump)           : 06 24 0D 01 07 04                                 .$....
        ----------------- Endpoint Descriptor -----------------
bLength                  : 0x07 (7 bytes)
bDescriptorType          : 0x05 (Endpoint Descriptor)
bEndpointAddress         : 0x81 (Direction=IN EndpointID=1)
bmAttributes             : 0x02 (TransferType=Bulk)
wMaxPacketSize           : 0x0400 (max 1024 bytes)
bInterval                : 0x00 (never NAKs)
Data (HexDump)           : 07 05 81 02 00 04 00                              .......
       ------ SuperSpeed Endpoint Companion Descriptor -------
bLength                  : 0x06 (6 bytes)
bDescriptorType          : 0x30 (SuperSpeed Endpoint Companion Descriptor)
bMaxBurst                : 0x0F (up to 16 packets per burst)
bmAttributes             : 0x00 (The bulk endpoint does not define streams)
wBytesPerInterval        : 0x0000
Data (HexDump)           : 06 30 0F 00 00 00                                 .0....
HID人机交互QQ群:564808376    UAC音频QQ群:218581009    UVC相机QQ群:331552032    BOT&UASP大容量存储QQ群:258159197    STC-USB单片机QQ群:315457461    USB技术交流QQ群2:580684376    USB技术交流QQ群:952873936   

0 篇笔记 写笔记

USB音箱 工作抓包分析
USB音响打开Length Phase Data -------- ----- ------------------------------ -------------- CTL ......
Linux V4L2 UVC摄像头框架浅析
V4L2 :video for linux version 2 ,是 Linux 里一套标准的视频驱动,它支持 UVC 标准的摄像头。本文来分析一下它的核心框架。整个v4l2的框架分为三层:在应用层,我们可以在 /dev 目录发现 video0 类似的设备节点,上层的摄像头程序打开设备节点进行......
打开UVC摄像头(特定类请求)数据分析
通过上节可以知道,设备支持4种的视频格式,且每种格式如下:MPJPG数据格式bFormatIndexbFrameIndex分辩率及及帧率11640x480x(30,15,10)121280x720x(30,15,10)131920x1080x(30,15......
UVC摄像头扩展单元功能的开发步骤是什么?
写在扩展单元的题外话本人在开发支持UVC扩展单元的directShow应用时,必现并不需要注册接口,只需要在其源过滤器参照后续的代码枚举相关的接口如IKsControl,IKsTopologyInfo定位到指定的扩展单元接口后,直接使用其对应的IKsControl::KsProperty即可实现扩展......
UVC摄像头的延迟reduce latency
一般的ISP,200W30帧来说,sensor进来缓存一帧就是33ms+vpu处理时间大概10ms+jpeg编码时间16ms+USB传输时间200KB大概7、8ms,最后就是windows上的显示延迟时间,如果JPEG编码出来缓存不止一帧,时间就更长了,所以一般会超过100多ms另外,网络传输如使......
UVC Windows下UVC摄像头数据分析
这里我们分析一款UVC摄像头来进行数据分析。环境:win10 x64工具:bushound,usbviewer将摄像头插入PC后,打开usbviewer工具,可以看到关于此摄像头的相关信息。可以看到,这个摄像头其实是一个USB复合设备,所以其对应的系统驱动为USBCCGP,然后再由USB复合设......
简易摄像头playcap工程代码及应用程序
playcap是一个小巧的UVC摄像头测试工具,使用的是DirectShow,本人之前装饰部分代码发布到此网址:http://www.usbzh.com/article/detail-553.html但经常有人说编译不过,其实这都是工程配置问题引起的。现将工程代码及编译好的应用程序提供详细的下载地......
Windows下UVC虚拟摄像头的实现
最近在Windows10 x64环境下,开发了一个虚拟UVC摄像头驱动。确切的来说这不是摄像头驱动,而是一个虚拟USB总线驱动。使用该虚拟总线驱动使用应用软件通过IOCTL控制总线子设备的创建与卸载。驱动安装完成后,是一个单纯的USB虚拟总线。应用软件通过发送自定义IOCTL码IOCTL_BUSEN......
UVC摄像头的关闭流程及抓包分析
通过UVC协议规范可以知道,UVC的数据传输支持USB四种传输中的批量传输和同步传输,所以对于UVC摄像头,当我们在摄像头正在工作时,需要停止摄像头工作,执行的操作是不同的。在Linux的源代码中,摄像头的流关闭是由函数uvc_video_stop_streaming完成的。代码比较简单,我们直接给......
UVC摄像头批量传输的StreamOn和StreamOff
在UVC规范中,UVC摄像头视频数据的传输方式支持两种,分别为批量传输和同步传输。UVC摄像头数据传输的格式按负载数据头的方式按帧进行打包传输。根据USB规范可知,同步传输方式是只要带中带有同步端点的接口,系统会定时从设备中读取数据,无论设备中是否有数据。而如要要停止数据的传输,只需要选中不带有同步......
Linux源码分析UVC摄像头的初始化流程分析
UVC摄像头的初始化发生在硬件被接入USB集线器中,设备初USB驱动识别为摄像头的后续初始化流程。和Windows的AddDevice驱动函数一样,Linux设备的创建和侦测是通过int uvc_probe函数实现的。其函数的调用关系如下://linux/v5.11.11/source/drive......
Windows对红外相机摄像头的支持
从Windows10的1607版本开始,USB视频类(UVC)驱动程序支持产生红外(IR)流的摄像头。红外摄像头相机捕捉场景的亮度值,并通过USB以未压缩格式或压缩格式传输帧。这些相机及其流通过媒体捕获管道(pipeline)导出给应用程序。红外UVC摄像头相机帧类型红外UVC摄像头相机支持的格......
华为UAC麦克风的工作过程数据分析
看完了耳机的数据分析,再来分析麦克风,就相对来说很简单了,这是因为:第一:麦克风没有音频控制特效单元描述符,所以少了很多特定类请求。第二:麦克风只有一个音频流转换接口,且只支持采样率为48000HZ 16位。具体的过程见下:Length Phase Data-------- --......
BusHound的使用方法详解
在开始菜单日运行Bus Hound软件,将USB设备插入电脑U口。如图所示,进入”Devices”目录,在”Devices”内选择要监听的设备。例如:我的设备置是一个U盘,则装置为USB大容量储存设备,点选”USB大容量储存设备”图示,可以在下面的”Properties”图框内看到设备的设备树及设备......
UVC 输入终端描述符
输入终端描述符用于向主机报告视频数据输入终端的相关信息。输入终端描述符使用bTerminalID描述输入终端的ID,且这个ID是惟一的。输入终端描述符位于视频控制接口中。输入终端描述符结构体定义如下:// Input Terminal Descriptortypedef struct _USB......
关注公众号
取消
感谢您的支持,我会继续努力的!
扫码支持
扫码打赏,你说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

您的支持,是我们前进的动力!