aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-04-07 09:01:28 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-04-16 17:53:52 -0400
commitb050b29e071a0b11262ad513700ab073f58c45b2 (patch)
tree39a449e59b218f0b7a663f4f3886d6d7156e88ad /Documentation/DocBook
parent3050040b4ed95a8e3fa243d57f78a1d7fb1ab77b (diff)
[media] DocBook media: update bytesused field description
For output buffers the application has to set the bytesused field. In reality applications often do not set this since drivers that deal with fix image sizes just override it anyway. The vb2 framework will replace this field with the length field if bytesused was set to 0 by the application, which is what happens in practice. Document this behavior. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r--Documentation/DocBook/media/v4l/io.xml13
1 files changed, 11 insertions, 2 deletions
diff --git a/Documentation/DocBook/media/v4l/io.xml b/Documentation/DocBook/media/v4l/io.xml
index 97a69bf6f3eb..188e6211abd1 100644
--- a/Documentation/DocBook/media/v4l/io.xml
+++ b/Documentation/DocBook/media/v4l/io.xml
@@ -699,7 +699,12 @@ linkend="v4l2-buf-type" /></entry>
699buffer. It depends on the negotiated data format and may change with 699buffer. It depends on the negotiated data format and may change with
700each buffer for compressed variable size data like JPEG images. 700each buffer for compressed variable size data like JPEG images.
701Drivers must set this field when <structfield>type</structfield> 701Drivers must set this field when <structfield>type</structfield>
702refers to an input stream, applications when it refers to an output stream.</entry> 702refers to an input stream, applications when it refers to an output stream.
703If the application sets this to 0 for an output stream, then
704<structfield>bytesused</structfield> will be set to the size of the
705buffer (see the <structfield>length</structfield> field of this struct) by
706the driver. For multiplanar formats this field is ignored and the
707<structfield>planes</structfield> pointer is used instead.</entry>
703 </row> 708 </row>
704 <row> 709 <row>
705 <entry>__u32</entry> 710 <entry>__u32</entry>
@@ -861,7 +866,11 @@ should set this to 0.</entry>
861 <entry></entry> 866 <entry></entry>
862 <entry>The number of bytes occupied by data in the plane 867 <entry>The number of bytes occupied by data in the plane
863 (its payload). Drivers must set this field when <structfield>type</structfield> 868 (its payload). Drivers must set this field when <structfield>type</structfield>
864 refers to an input stream, applications when it refers to an output stream.</entry> 869 refers to an input stream, applications when it refers to an output stream.
870 If the application sets this to 0 for an output stream, then
871 <structfield>bytesused</structfield> will be set to the size of the
872 plane (see the <structfield>length</structfield> field of this struct)
873 by the driver.</entry>
865 </row> 874 </row>
866 <row> 875 <row>
867 <entry>__u32</entry> 876 <entry>__u32</entry>