提交 e3b1b4e7 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[media] DocBook: various updates w.r.t. v4l2_buffer and multiplanar

Clarify the behavior of v4l2_buffer in the multiplanar case,
including fixing a false statement: you can't set m.planes to NULL
when calling DQBUF.
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 96b1a702
...@@ -677,8 +677,10 @@ memory, set by the application. See <xref linkend="userp" /> for details. ...@@ -677,8 +677,10 @@ memory, set by the application. See <xref linkend="userp" /> for details.
<entry><structfield>length</structfield></entry> <entry><structfield>length</structfield></entry>
<entry></entry> <entry></entry>
<entry>Size of the buffer (not the payload) in bytes for the <entry>Size of the buffer (not the payload) in bytes for the
single-planar API. For the multi-planar API should contain the single-planar API. For the multi-planar API the application sets
number of elements in the <structfield>planes</structfield> array. this to the number of elements in the <structfield>planes</structfield>
array. The driver will fill in the actual number of valid elements in
that array.
</entry> </entry>
</row> </row>
<row> <row>
......
...@@ -121,8 +121,7 @@ remaining fields or returns an error code. The driver may also set ...@@ -121,8 +121,7 @@ remaining fields or returns an error code. The driver may also set
field. It indicates a non-critical (recoverable) streaming error. In such case field. It indicates a non-critical (recoverable) streaming error. In such case
the application may continue as normal, but should be aware that data in the the application may continue as normal, but should be aware that data in the
dequeued buffer might be corrupted. When using the multi-planar API, the dequeued buffer might be corrupted. When using the multi-planar API, the
planes array does not have to be passed; the <structfield>m.planes</structfield> planes array must be passed in as well.</para>
member must be set to NULL in that case.</para>
<para>By default <constant>VIDIOC_DQBUF</constant> blocks when no <para>By default <constant>VIDIOC_DQBUF</constant> blocks when no
buffer is in the outgoing queue. When the buffer is in the outgoing queue. When the
......
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
<refsect1> <refsect1>
<title>Description</title> <title>Description</title>
<para>This ioctl is part of the <link linkend="mmap">memory <para>This ioctl is part of the <link linkend="mmap">streaming
mapping</link> I/O method. It can be used to query the status of a </link> I/O method. It can be used to query the status of a
buffer at any time after buffers have been allocated with the buffer at any time after buffers have been allocated with the
&VIDIOC-REQBUFS; ioctl.</para> &VIDIOC-REQBUFS; ioctl.</para>
...@@ -71,6 +71,7 @@ the structure.</para> ...@@ -71,6 +71,7 @@ the structure.</para>
<para>In the <structfield>flags</structfield> field the <para>In the <structfield>flags</structfield> field the
<constant>V4L2_BUF_FLAG_MAPPED</constant>, <constant>V4L2_BUF_FLAG_MAPPED</constant>,
<constant>V4L2_BUF_FLAG_PREPARED</constant>,
<constant>V4L2_BUF_FLAG_QUEUED</constant> and <constant>V4L2_BUF_FLAG_QUEUED</constant> and
<constant>V4L2_BUF_FLAG_DONE</constant> flags will be valid. The <constant>V4L2_BUF_FLAG_DONE</constant> flags will be valid. The
<structfield>memory</structfield> field will be set to the current <structfield>memory</structfield> field will be set to the current
...@@ -79,8 +80,10 @@ contains the offset of the buffer from the start of the device memory, ...@@ -79,8 +80,10 @@ contains the offset of the buffer from the start of the device memory,
the <structfield>length</structfield> field its size. For the multi-planar API, the <structfield>length</structfield> field its size. For the multi-planar API,
fields <structfield>m.mem_offset</structfield> and fields <structfield>m.mem_offset</structfield> and
<structfield>length</structfield> in the <structfield>m.planes</structfield> <structfield>length</structfield> in the <structfield>m.planes</structfield>
array elements will be used instead. The driver may or may not set the remaining array elements will be used instead and the <structfield>length</structfield>
fields and flags, they are meaningless in this context.</para> field of &v4l2-buffer; is set to the number of filled-in array elements.
The driver may or may not set the remaining fields and flags, they are
meaningless in this context.</para>
<para>The <structname>v4l2_buffer</structname> structure is <para>The <structname>v4l2_buffer</structname> structure is
specified in <xref linkend="buffer" />.</para> specified in <xref linkend="buffer" />.</para>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册