uvc摄像头代码解析1
2013-09-12 11:35:33 我来说两句 作者:paomadi收藏 我要投稿一.FAQ1.判断自己的摄像头是否支持uvc标准输入lsusb //列出usb设备[cpp] Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device
·
-
一.FAQ
1.判断自己的摄像头是否支持uvc标准输入lsusb //列出usb设备[cpp]Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 001 Device 003: ID 0c45:62f1 Microdia //摄像头Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hubBus 002 Device 002: ID 1a40:0101 TERMINUS TECHNOLOGY INC.Bus 002 Device 003: ID 17ef:6025 Lenovo更详细的树形图lsusb -t[cpp]/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M|__ Port 1: Dev 2, If 0, Class=hub, Driver=hub/4p, 480M/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=musb-hdrc/1p, 480M|__ Port 1: Dev 4, If 0, Class='bInterfaceClass 0x0e not yet handled', Driver=, 480M|__ Port 1: Dev 4, If 1, Class='bInterfaceClass 0x0e not yet handled', Driver=, 480M|__ Port 1: Dev 4, If 2, Class=audio, Driver=snd-usb-audio, 480M|__ Port 1: Dev 4, If 3, Class=audio, Driver=snd-usb-audio, 480Mlsusb -d 0c45:62f1 -v | grep "14 Video" 检测设备属性[cpp]bFunctionClasss 14 VideobInterfaceClass 14 VideobInterfaceClass 14 VideobInterfaceClass 14 VideobInterfaceClass 14 VideobInterfaceClass 14 VideobInterfaceClass 14 VideobInterfaceClass 14 VideobInterfaceClass 14 Video显示类似上面信息表示该摄像头是支持uvc标准的2.使能/关闭调试的trace打印信息[cpp]echo 0xffff > /sys/module/uvcvideo/parameters/traceecho 0 > /sys/module/uvcvideo/parameters/trace3.播放测试[cpp] view plaincopymplayer tv:// -tv fps=25二.uvc类标准1. 下载标准协议地址[cpp]http://www.usb.org/developers/de vclass_docs2.功能特性(翻译)Each video function has a single VideoControl (VC) interface and can have several VideoStreaming (VS) interfaces每个视频有且仅有1个VideoControl (VC)接口和可有多个 VideoStreaming (VS) 接口The VideoControl (VC) interface is used to access the device controls of the function whereasthe VideoStreaming (VS) interfaces are used to transport data streams into and out of the function.VC接口用于设备功能控制,VS接口用于传输数据流进出Video Interface Class Code(A.1 P171)视频接口类代码 就是宏定义的USB_CLASS_VIDEO总共有3种子类subclass1.VideoControl Interface 视频控制接口子类2.VideoStreaming Interface 视频数据流接口子类3.Video Interface Collection 视频接口集合子类宏定义[cpp] v/* A.2. Video Interface Subclass Codes */#define UVC_SC_UNDEFINED 0x00#define UVC_SC_VIDEOCONTROL 0x01#define UVC_SC_VIDEOSTREAMING 0x02#define UVC_SC_VIDEO_INTERFACE_COLLECTION 0x03Units provide the basic building blocks to fully describe most video functions ,A Unit has one or more Input Pins and a single Output Pin,Unit提供了基础模块来全面描述大部分的视频功能,一个Unit可以由一个或多个输入引脚和仅一个输出引脚(这里的每一个pin代表一个逻辑上的数据流)
更多推荐
已为社区贡献7条内容
所有评论(0)