Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b050b29e authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 3050040b
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -699,7 +699,12 @@ linkend="v4l2-buf-type" /></entry>
buffer. It depends on the negotiated data format and may change with
each buffer for compressed variable size data like JPEG images.
Drivers must set this field when <structfield>type</structfield>
refers to an input stream, applications when it refers to an output stream.</entry>
refers to an input stream, applications when it refers to an output stream.
If the application sets this to 0 for an output stream, then
<structfield>bytesused</structfield> will be set to the size of the
buffer (see the <structfield>length</structfield> field of this struct) by
the driver. For multiplanar formats this field is ignored and the
<structfield>planes</structfield> pointer is used instead.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>
@@ -861,7 +866,11 @@ should set this to 0.</entry>
	    <entry></entry>
	    <entry>The number of bytes occupied by data in the plane
	      (its payload). Drivers must set this field when <structfield>type</structfield>
	      refers to an input stream, applications when it refers to an output stream.</entry>
	      refers to an input stream, applications when it refers to an output stream.
	      If the application sets this to 0 for an output stream, then
	      <structfield>bytesused</structfield> will be set to the size of the
	      plane (see the <structfield>length</structfield> field of this struct)
	      by the driver.</entry>
	  </row>
	  <row>
	    <entry>__u32</entry>