当前位置:网站首页>USB host driver - UVC swap
USB host driver - UVC swap
2022-07-06 19:19:00 【Be good to me】
1. issue description
yavta It's a test APP, test UVC Data acquisition and return of camera .
yavta -f YUYV -s 1280x720 -t 1/60 -c100 /dev/video0 -F/data/yua
Frame rate 60FPS Not working properly ,blocked, all frame fail.
yavta -f YUYV -s 1280x720 -t 1/30 -c100 /dev/video0 -F/data/yua
Frame rate 30FPS Normal operation , But there will also be some packet losses .
1.1 Some parameters of the image
Frame rate :FPS( How many frames per second ); as well as Gop( Indicates how many seconds a I frame ), Affect fluency .
-t 1/60 // Frame rate 60, One second transmission 60 frame
The resolution of the : The number of pixels contained in an inch ; VGA:Video Graphics Array( Video image resolution ), Affect clarity .
-s 1280x720 // The resolution of the 720P
Video size : The resolution of the x 2( How many bytes does each pixel occupy ) x 8 x Frame rate x Time (s) /1024/1024
YUV422 Format frame size : The resolution of the x 2 Byte
about YUV422 Format 1080P In terms of video , An image is 1920x1080x2x8/1024/1024 = 31.64Mbit,1 Second 30 Frame images , Then there are 949.2Mb/s.
1.2 yavta Control process
[email protected]-rb5:/# strace yavta -f YUYV -s 1280x720 -t 1/60 -c100 /dev/video0
// Analytical parameters
execve("/usr/bin/yavta", ["yavta", "-f", "YUYV", "-s", "1280x720", "-t", "1/60", "-c100", "/dev/video0"], 0x7fc5203a80 /* 16 vars */) = 0
// Open the device node
openat(AT_FDCWD, "/dev/video0", O_RDWR) = 3
// Echo display
write(1, "Device /dev/video0 opened.\n", 27Device /dev/video0 opened.) = 27
// Device node ioctl
ioctl(3, VIDIOC_QUERYCAP, {
driver="uvcvideo", card="KS2A418: KS2A418", bus_info="usb-xhci-hcd.0.auto-1.3", version=4.19.125, ...) = 0
// Echo display
write(1, "Device `KS2A418: KS2A418' on `us"..., 117Device `KS2A418: KS2A418' on `usb-xhci-hcd.0.auto-1.3' (driver 'uvcvideo') supports video, capture, without mplanes.) = 117
// ioctl Set parameters
ioctl(3, VIDIOC_G_PARM, {
type=V4L2_BUF_TYPE_VIDEO_CAPTURE, parm.capture={
capability=V4L2_CAP_TIMEPERFRAME, capturemode=0, timeperframe=1/60, extendedmode=0, readbuffers=0}}) = 0
write(1, "Current frame rate: 1/60\n", 25Current frame rate: 1/60) = 25
write(1, "Setting frame rate to: 1/60\n", 28Setting frame rate to: 1/60) = 28
...
these ioctl The interface of the corresponding drive is :
// \drivers\media\usb\uvc\uvc_v4l2.c
const struct v4l2_ioctl_ops uvc_ioctl_ops = {
.vidioc_querycap = uvc_ioctl_querycap,
...
.vidioc_reqbufs = uvc_ioctl_reqbufs,
.vidioc_querybuf = uvc_ioctl_querybuf,
.vidioc_qbuf = uvc_ioctl_qbuf,
.vidioc_expbuf = uvc_ioctl_expbuf,
.vidioc_dqbuf = uvc_ioctl_dqbuf,
.vidioc_create_bufs = uvc_ioctl_create_bufs,
.vidioc_streamon = uvc_ioctl_streamon,
.vidioc_streamoff = uvc_ioctl_streamoff,
...
};
边栏推荐
- ModuleNotFoundError: No module named ‘PIL‘解决方法
- Problems encountered in using RT thread component fish
- ROS自定义消息发布订阅示例
- 三面蚂蚁金服成功拿到offer,Android开发社招面试经验
- Interface test tool - postman
- Modulenotfounderror: no module named 'PIL' solution
- AIRIOT物联网平台赋能集装箱行业构建【焊接工位信息监控系统】
- Excel 中VBA脚本的简单应用
- AutoCAD - what is the default lineweight for centerline drawing and CAD? Can I modify it?
- Optical blood pressure estimation based on PPG and FFT neural network [translation]
猜你喜欢
ROS custom message publishing subscription example
ROS自定义消息发布订阅示例
Dark horse -- redis
Wx applet learning notes day01
三年Android开发,2022疫情期间八家大厂的Android面试经历和真题整理
全套教学资料,阿里快手拼多多等7家大厂Android面试真题
PMP每日一练 | 考试不迷路-7.6
Synchronous development of business and application: strategic suggestions for application modernization
php+redis实现超时取消订单功能
How to improve website weight
随机推荐
Lucun smart sprint technology innovation board: annual revenue of 400million, proposed to raise 700million
Leetcode topic [array] - 119 Yang Hui triangle II
能源行业的数字化“新”运维
Pychrm Community Edition calls matplotlib pyplot. Solution of imshow() function image not popping up
第五期个人能力认证考核通过名单公布
GCC【7】- 编译检查的是函数的声明,链接检查的是函数的定义bug
How to type multiple spaces when editing CSDN articles
Test technology stack arrangement -- self cultivation of test development engineers
LeetCode-1279. Traffic light intersection
三年Android开发,2022疫情期间八家大厂的Android面试经历和真题整理
【论文笔记】TransUNet: Transformers Make StrongEncoders for Medical Image Segmentation
Use map function and split function to type multiple elements in one line
Help improve the professional quality of safety talents | the first stage of personal ability certification and assessment has been successfully completed!
R语言ggplot2可视化时间序列柱形图:通过双色渐变配色颜色主题可视化时间序列柱形图
史上超级详细,想找工作的你还不看这份资料就晚了
A method of removing text blur based on pixel repair
helm部署etcd集群
Reptiles have a good time. Are you full? These three bottom lines must not be touched!
Mathematical knowledge -- code implementation of Gaussian elimination (elementary line transformation to solve equations)
【pytorch】yolov5 训练自己的数据集