V4L2命令之 VIDIOC_STREAMON, VIDIOC_STREAMOFF
来源:互联网 发布:caffe fcn 训练模型 编辑:程序博客网 时间:2024/06/09 22:44
http://linuxtv.org/downloads/v4l-dvb-apis/vidioc-streamon.html
Name
VIDIOC_STREAMON, VIDIOC_STREAMOFF — Start or stop streaming I/O
Synopsis
intioctl(
int fd, int request,
const int *argp
)
;Arguments
fd
File descriptor returned by
open()
.request
VIDIOC_STREAMON, VIDIOC_STREAMOFF
argp
Description
The VIDIOC_STREAMON
and VIDIOC_STREAMOFF
ioctl start and stop the captureor output process during streaming (memory mapping oruser pointer) I/O.
Specifically the capture hardware is disabled and no input buffers are filled (if there are any empty buffers in the incoming queue) untilVIDIOC_STREAMON
has been called.Accordingly the output hardware is disabled, no video signal is produced untilVIDIOC_STREAMON
has been called.The ioctl will succeed only when at least one output buffer is in the incoming queue.
The VIDIOC_STREAMOFF
ioctl, apart of aborting or finishing any DMA in progress, unlocks any user pointer buffers locked in physical memory, and it removes all buffers from the incoming and outgoing queues. That means all images captured but not dequeued yet will be lost, likewise all images enqueued for output but not transmitted yet. I/O returns to the same state as after calling VIDIOC_REQBUFS
and can be restarted accordingly.
Both ioctls take a pointer to an integer, the desired buffer or stream type. This is the same as struct v4l2_requestbuffers type
. such as V4L2_BUF_TYPE_VIDEO_CAPTURE.
If VIDIOC_STREAMON
is called when streaming is already in progress, or if VIDIOC_STREAMOFF
is called when streaming is already stopped, then the ioctl does nothing and 0 is returned.
Note that applications can be preempted for unknown periods right before or after theVIDIOC_STREAMON
orVIDIOC_STREAMOFF
calls, there is no notion of starting or stopping "now". Buffer timestamps can be used to synchronize with other events.
Return Value
On success 0 is returned, on error -1 and the errno
variable is set appropriately. The generic error codes are described at theGeneric Error Codes chapter.
- EINVAL
The buffer
type
is not supported, or no buffers have been allocated (memory mapping) or enqueued (output) yet.- EPIPE
The driver implementspad-level format configuration and the pipeline configuration is invalid.
- V4L2命令之 VIDIOC_STREAMON, VIDIOC_STREAMOFF
- V4L2命令之 VIDIOC_G_CTRL, VIDIOC_S_CTRL
- V4L2命令之 VIDIOC_QUERYCTRL, VIDIOC_QUERYMENU
- V4L2命令之 VIDIOC_G_PARM, VIDIOC_S_PARM
- V4L2命令之 User Controls
- V4L2命令之 VIDIOC_G_CTRL, VIDIOC_S_CTRL
- V4L2命令之 VIDIOC_ENUM_FMT VIDIOC_ENUM_FRAMESIZES VIDIOC_ENUM_FRAMEINTERVALS
- v4l2控制命令精华
- v4l2-ctl 控制命令
- V4L2 常用控制命令
- v4l2文档之——v4l2 framework
- V4L2之ioctl错误
- Linux之V4L2编程
- V4L2 之V4L2_MEMORY_USERPTR
- Linux之V4L2基础编程
- Linux之V4L2基础编程
- Linux之V4L2基础编程
- Linux之V4L2基础编程
- android 开发学习1_用户界面(连载)
- Flex报错归类(一)
- Dialog&PopupWindow对话框
- C#ArrayList简单应用
- 详解数据库中的索引
- V4L2命令之 VIDIOC_STREAMON, VIDIOC_STREAMOFF
- 同时使用有线和无线,享受网路叠加的乐趣
- char * const p与 char const * p 区别
- 用于.NET 环境的时间测试
- struts2 转换器
- 数组排序
- eclipse安装groovy(超快速安装)
- rpm打包
- sip鉴权认证Authorization MD5