[camera][v4l2][第五话]: UVC协议学习
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)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【TypeError: float()
- 下一篇: s3c2440移植MQTT