The patch number 14776 was added via Douglas Schilling Landgraf
<[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.
Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel
If anyone has any objections, please let us know by sending a message to:
Linux Media Mailing List <[email protected]>
------
From: Pawel Osciak <[email protected]>
Add documentation for the new error flag
Add documentation for V4L2_BUF_FLAG_ERROR.
Priority: normal
Signed-off-by: Pawel Osciak <[email protected]>
Signed-off-by: Kyungmin Park <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Signed-off-by: Douglas Schilling Landgraf <[email protected]>
---
linux/Documentation/DocBook/v4l/io.xml | 10 ++++++++++
linux/Documentation/DocBook/v4l/vidioc-qbuf.xml | 14 ++++++++++++--
2 files changed, 22 insertions(+), 2 deletions(-)
diff -r 4878665465f0 -r e0013a87703d linux/Documentation/DocBook/v4l/io.xml
--- a/linux/Documentation/DocBook/v4l/io.xml Wed May 12 00:29:02 2010 -0300
+++ b/linux/Documentation/DocBook/v4l/io.xml Wed May 12 00:29:58 2010 -0300
@@ -702,6 +702,16 @@
state, in the application domain to say so.</entry>
</row>
<row>
+ <entry><constant>V4L2_BUF_FLAG_ERROR</constant></entry>
+ <entry>0x0040</entry>
+ <entry>When this flag is set, the buffer has been dequeued
+ successfully, although the data might have been corrupted.
+ This is recoverable, streaming may continue as normal and
+ the buffer may be reused normally.
+ Drivers set this flag when the <constant>VIDIOC_DQBUF</constant>
+ ioctl is called.</entry>
+ </row>
+ <row>
<entry><constant>V4L2_BUF_FLAG_KEYFRAME</constant></entry>
<entry>0x0008</entry>
<entry>Drivers set or clear this flag when calling the
diff -r 4878665465f0 -r e0013a87703d
linux/Documentation/DocBook/v4l/vidioc-qbuf.xml
--- a/linux/Documentation/DocBook/v4l/vidioc-qbuf.xml Wed May 12 00:29:02
2010 -0300
+++ b/linux/Documentation/DocBook/v4l/vidioc-qbuf.xml Wed May 12 00:29:58
2010 -0300
@@ -111,7 +111,11 @@
and <structfield>reserved</structfield>
fields of a &v4l2-buffer; as above, when <constant>VIDIOC_DQBUF</constant>
is called with a pointer to this structure the driver fills the
-remaining fields or returns an error code.</para>
+remaining fields or returns an error code. The driver may also set
+<constant>V4L2_BUF_FLAG_ERROR</constant> in the
<structfield>flags</structfield>
+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
+dequeued buffer might be corrupted.</para>
<para>By default <constant>VIDIOC_DQBUF</constant> blocks when no
buffer is in the outgoing queue. When the
@@ -158,7 +162,13 @@
<para><constant>VIDIOC_DQBUF</constant> failed due to an
internal error. Can also indicate temporary problems like signal
loss. Note the driver might dequeue an (empty) buffer despite
-returning an error, or even stop capturing.</para>
+returning an error, or even stop capturing. Reusing such buffer may be unsafe
+though and its details (e.g. <structfield>index</structfield>) may not be
+returned either. It is recommended that drivers indicate recoverable errors
+by setting the <constant>V4L2_BUF_FLAG_ERROR</constant> and returning 0
instead.
+In that case the application should be able to safely reuse the buffer and
+continue streaming.
+ </para>
</listitem>
</varlistentry>
</variablelist>
---
Patch is available at:
http://linuxtv.org/hg/v4l-dvb/rev/e0013a87703dc3fd3cea424eedf779608e4c7fe1
_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits