日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程语言 > c/c++ >内容正文

c/c++

[camera][v4l2][第五话]: UVC协议学习

發(fā)布時間:2023/12/10 c/c++ 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 [camera][v4l2][第五话]: UVC协议学习 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1.??USB Video Camera Topology
?

a. T 代表terminal, U 代表unit?(在程序里Unit/Terminal都稱為entity)

?

b. 有兩大interface

## VideoControl Interface :is used to control the inner workings of
the function //?VC里含有多個Unit/Terminal等功能模塊,可以通過訪問這些模塊進(jìn)行控制,比如調(diào)亮度

ret = uvc_query_ctrl(dev ?/* 哪一個USB設(shè)備 */, SET_CUR, ctrl->entity->id ?/* 哪一個unit/terminal */,
dev->intfnum /* 哪一個接口: VC interface */, ctrl->info->selector,
uvc_ctrl_data(ctrl, UVC_CTRL_DATA_CURRENT),
ctrl->info->size);
?


## VideoStreaming Interface:?handles the data traffic received
from the camera video subsystem //?讀視頻數(shù)據(jù)

?ret = uvc_query_ctrl(video->dev /* 哪一個USB設(shè)備 */, SET_CUR, 0,
?? ?video->streaming->intfnum ?/* 哪一個接口: VS */,
?? ?probe ? VS_PROBE_CONTROL : VS_COMMIT_CONTROL, data, size,
?? ?uvc_timeout_param);

2. USB Video Camera Descriptor Hierarchy

a. 注意兩大interface

## VideoControl Interface

## VideoStreaming Interface

b.?## VideoStreaming Interface 可以有多個 Alt.Setting, 然后每個Setting里可以有多個format,format里又可以有多種frame(比如分辨率不同等)

c. 可以用lsusb -v -d 0x1e4e(vendor id) 來查看所有的Descriptor

Device Descriptor:
? Configuration Descriptor:
? ? Interface Descriptor:
? ? ? VideoControl Interface Descriptor:

? ? ? VideoControl Interface Descriptor:
? ? ? VideoControl Interface Descriptor:
? ? ? VideoControl Interface Descriptor:
? ? ? VideoControl Interface Descriptor:
? ? ? Endpoint Descriptor:
? ? Interface Descriptor:
? ? ? VideoStreaming Interface Descriptor:

? ? ? VideoStreaming Interface Descriptor:
? ? ? VideoStreaming Interface Descriptor:
? ? ? VideoStreaming Interface Descriptor:
? ? ? VideoStreaming Interface Descriptor:
? ? ? VideoStreaming Interface Descriptor:
? ? ? VideoStreaming Interface Descriptor:
? ? ? VideoStreaming Interface Descriptor:
? ? ? VideoStreaming Interface Descriptor:

?

總結(jié)

以上是生活随笔為你收集整理的[camera][v4l2][第五话]: UVC协议学习的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。