Em 22-05-2012 12:33, Andrzej Hajda escreveu:
> Some devices requires indicator if the buffer is the last one in the stream.
> Applications and drivers can use this flag in such case.
>
> Signed-off-by: Andrzej Hajda <[email protected]>
> Signed-off-by: Kyungmin Park <[email protected]>
> ---
> Documentation/DocBook/media/v4l/io.xml | 7 +++++++
> Documentation/DocBook/media/v4l/vidioc-qbuf.xml | 2 ++
> include/linux/videodev2.h | 1 +
> 3 files changed, 10 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/DocBook/media/v4l/io.xml
> b/Documentation/DocBook/media/v4l/io.xml
> index fd6aca2..dcbf1e0 100644
> --- a/Documentation/DocBook/media/v4l/io.xml
> +++ b/Documentation/DocBook/media/v4l/io.xml
> @@ -956,6 +956,13 @@ Typically applications shall use this flag for output
> buffers if the data
> in this buffer has not been created by the CPU but by some DMA-capable unit,
> in which case caches have not been used.</entry>
> </row>
> + <row>
> + <entry><constant>V4L2_BUF_FLAG_EOS</constant></entry>
> + <entry>0x2000</entry>
> + <entry>Application should set this flag in the output buffer
> +in order to inform the driver about the last frame of the stream. Some
> +drivers may require it to properly finish processing the stream.</entry>
This breaks backward compatibility, as applications written before this change
won't set this flag.
> + </row>
> </tbody>
> </tgroup>
> </table>
> diff --git a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
> b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
> index 9caa49a..ad49f7d 100644
> --- a/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
> +++ b/Documentation/DocBook/media/v4l/vidioc-qbuf.xml
> @@ -76,6 +76,8 @@ supports capturing from specific video inputs and you want
> to specify a video
> input, then <structfield>flags</structfield> should be set to
> <constant>V4L2_BUF_FLAG_INPUT</constant> and the field
> <structfield>input</structfield> must be initialized to the desired input.
> +Some drivers expects applications set <constant>V4L2_BUF_FLAG_EOS</constant>
> +flag on the last buffer of the stream.
> The <structfield>reserved</structfield> field must be set to 0. When using
> the <link linkend="planar-apis">multi-planar API</link>, the
> <structfield>m.planes</structfield> field must contain a userspace pointer
> diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h
> index 370d111..e44a7cd 100644
> --- a/include/linux/videodev2.h
> +++ b/include/linux/videodev2.h
> @@ -676,6 +676,7 @@ struct v4l2_buffer {
> /* Cache handling flags */
> #define V4L2_BUF_FLAG_NO_CACHE_INVALIDATE 0x0800
> #define V4L2_BUF_FLAG_NO_CACHE_CLEAN 0x1000
> +#define V4L2_BUF_FLAG_EOS 0x2000 /* The last buffer in the stream */
>
> /*
> * O V E R L A Y P R E V I E W
>
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html