设为首页 加入收藏

TOP

uvc摄像头代码解析4
2014-11-23 21:38:21 来源: 作者: 【 】 浏览:12
Tags:uvc 摄像头 代码 解析
7.u vc_parse_format
7.1 uvc格式描述符
struct uvc_format_desc { //uvc格式描述符  
char *name; //uvc格式描述符名字  
__u8 guid[16];//全局唯一ID  
__u32 fcc; //压缩格式  
};  

7.2 uvc解析1个格式描述符
static int uvc_parse_format(struct uvc_device *dev,struct uvc_streaming *streaming, struct uvc_format *format,__u32 **intervals, unsigned char *buffer, int buflen)  
{  
    struct usb_interface *intf = streaming->intf;    //获取usb接口  
    struct usb_host_interface *alts = intf->cur_altsetting;  //获取usb_host_interface  
    struct uvc_format_desc *fmtdesc;    //uvc格式描述符  
    struct uvc_frame *frame;    //uvc帧  
    const unsigned char *start = buffer;  
    unsigned int interval;  
    unsigned int i, n;  
    __u8 ftype;  
  
    format->type = buffer[2];    //uvc格式类型  
    format->index = buffer[3];   //uvc格式索引  
    switch (buffer[2]) {    //uvc格式类型  
    case UVC_VS_FORMAT_UNCOMPRESSED: 


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇1062 昂贵的聘礼 (spfa + 等级枚.. 下一篇HDU1069:Monkey and Banana(DP+贪..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·Redis on AWS:Elast (2025-12-27 04:19:30)
·在 Spring Boot 项目 (2025-12-27 04:19:27)
·使用华为开发者空间 (2025-12-27 04:19:24)
·Getting Started wit (2025-12-27 03:49:24)
·Ubuntu 上最好用的中 (2025-12-27 03:49:20)