diff options
Diffstat (limited to 'Documentation/DocBook/v4l/vidioc-qbuf.xml')
-rw-r--r-- | Documentation/DocBook/v4l/vidioc-qbuf.xml | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/Documentation/DocBook/v4l/vidioc-qbuf.xml b/Documentation/DocBook/v4l/vidioc-qbuf.xml index ab691ebf3b93..f2b11f8a4031 100644 --- a/Documentation/DocBook/v4l/vidioc-qbuf.xml +++ b/Documentation/DocBook/v4l/vidioc-qbuf.xml | |||
@@ -64,7 +64,8 @@ zero to the number of buffers allocated with &VIDIOC-REQBUFS; | |||
64 | contents of the struct <structname>v4l2_buffer</structname> returned | 64 | contents of the struct <structname>v4l2_buffer</structname> returned |
65 | by a &VIDIOC-QUERYBUF; ioctl will do as well. When the buffer is | 65 | by a &VIDIOC-QUERYBUF; ioctl will do as well. When the buffer is |
66 | intended for output (<structfield>type</structfield> is | 66 | intended for output (<structfield>type</structfield> is |
67 | <constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> or | 67 | <constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant>, |
68 | <constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>, or | ||
68 | <constant>V4L2_BUF_TYPE_VBI_OUTPUT</constant>) applications must also | 69 | <constant>V4L2_BUF_TYPE_VBI_OUTPUT</constant>) applications must also |
69 | initialize the <structfield>bytesused</structfield>, | 70 | initialize the <structfield>bytesused</structfield>, |
70 | <structfield>field</structfield> and | 71 | <structfield>field</structfield> and |
@@ -75,7 +76,11 @@ supports capturing from specific video inputs and you want to specify a video | |||
75 | input, then <structfield>flags</structfield> should be set to | 76 | input, then <structfield>flags</structfield> should be set to |
76 | <constant>V4L2_BUF_FLAG_INPUT</constant> and the field | 77 | <constant>V4L2_BUF_FLAG_INPUT</constant> and the field |
77 | <structfield>input</structfield> must be initialized to the desired input. | 78 | <structfield>input</structfield> must be initialized to the desired input. |
78 | The <structfield>reserved</structfield> field must be set to 0. | 79 | The <structfield>reserved</structfield> field must be set to 0. When using |
80 | the <link linkend="planar-apis">multi-planar API</link>, the | ||
81 | <structfield>m.planes</structfield> field must contain a userspace pointer | ||
82 | to a filled-in array of &v4l2-plane; and the <structfield>length</structfield> | ||
83 | field must be set to the number of elements in that array. | ||
79 | </para> | 84 | </para> |
80 | 85 | ||
81 | <para>To enqueue a <link linkend="mmap">memory mapped</link> | 86 | <para>To enqueue a <link linkend="mmap">memory mapped</link> |
@@ -93,10 +98,13 @@ structure the driver sets the | |||
93 | buffer applications set the <structfield>memory</structfield> | 98 | buffer applications set the <structfield>memory</structfield> |
94 | field to <constant>V4L2_MEMORY_USERPTR</constant>, the | 99 | field to <constant>V4L2_MEMORY_USERPTR</constant>, the |
95 | <structfield>m.userptr</structfield> field to the address of the | 100 | <structfield>m.userptr</structfield> field to the address of the |
96 | buffer and <structfield>length</structfield> to its size. | 101 | buffer and <structfield>length</structfield> to its size. When the multi-planar |
97 | When <constant>VIDIOC_QBUF</constant> is called with a pointer to this | 102 | API is used, <structfield>m.userptr</structfield> and |
98 | structure the driver sets the <constant>V4L2_BUF_FLAG_QUEUED</constant> | 103 | <structfield>length</structfield> members of the passed array of &v4l2-plane; |
99 | flag and clears the <constant>V4L2_BUF_FLAG_MAPPED</constant> and | 104 | have to be used instead. When <constant>VIDIOC_QBUF</constant> is called with |
105 | a pointer to this structure the driver sets the | ||
106 | <constant>V4L2_BUF_FLAG_QUEUED</constant> flag and clears the | ||
107 | <constant>V4L2_BUF_FLAG_MAPPED</constant> and | ||
100 | <constant>V4L2_BUF_FLAG_DONE</constant> flags in the | 108 | <constant>V4L2_BUF_FLAG_DONE</constant> flags in the |
101 | <structfield>flags</structfield> field, or it returns an error code. | 109 | <structfield>flags</structfield> field, or it returns an error code. |
102 | This ioctl locks the memory pages of the buffer in physical memory, | 110 | This ioctl locks the memory pages of the buffer in physical memory, |
@@ -115,7 +123,9 @@ remaining fields or returns an error code. The driver may also set | |||
115 | <constant>V4L2_BUF_FLAG_ERROR</constant> in the <structfield>flags</structfield> | 123 | <constant>V4L2_BUF_FLAG_ERROR</constant> in the <structfield>flags</structfield> |
116 | field. It indicates a non-critical (recoverable) streaming error. In such case | 124 | field. It indicates a non-critical (recoverable) streaming error. In such case |
117 | the application may continue as normal, but should be aware that data in the | 125 | the application may continue as normal, but should be aware that data in the |
118 | dequeued buffer might be corrupted.</para> | 126 | dequeued buffer might be corrupted. When using the multi-planar API, the |
127 | planes array does not have to be passed; the <structfield>m.planes</structfield> | ||
128 | member must be set to NULL in that case.</para> | ||
119 | 129 | ||
120 | <para>By default <constant>VIDIOC_DQBUF</constant> blocks when no | 130 | <para>By default <constant>VIDIOC_DQBUF</constant> blocks when no |
121 | buffer is in the outgoing queue. When the | 131 | buffer is in the outgoing queue. When the |