V4L2很简单的例子 [英] v4l2 very simple example

查看:352
本文介绍了V4L2很简单的例子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在寻找一个简单例如使用V4L2在Linux下访问摄像机。
在哪里可以找到它?由于操作简单,越好。

I'm looking for a simple example for camera access in Linux using V4L2. Where I can find it? As simple, as possible.

谢谢,

推荐答案

在这里尝试uvccapture code - >的 http://staticwave.ca/source/uvccapture/
这是非常小但非常混凝土的例子,这使得所有使用V4L2概念(打开,设置格式,分配内存,请求缓冲区,Dqbuffer和查询缓冲区 - ioclts所有intems)。

Try the uvccapture code here -> http://staticwave.ca/source/uvccapture/ It is very small yet very concrete example which makes use of all the V4l2 concepts (open,set format, allocate memory, Request Buffer, Dqbuffer and Query-buffer - all intems of ioclts).

uvcgrab ()函数是一个寻找它利用Dqbuffer和查询的缓冲区。

uvcgrab() function is the one to look for which makes use of Dqbuffer and Query-buffer.

ioctl (vd->fd, VIDIOC_DQBUF, &vd->buf);

ioctl (vd->fd, VIDIOC_QBUF, &vd->buf)

在研究它,你可以继续寻找这个链接这将缓解您的理解定义的ioctl

While Studying it you can keep looking for the ioctl definition in this link which will ease your understanding.

这篇关于V4L2很简单的例子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆