[PATCH 02/11] Documentation: media: description of DMABUF importing in V4L2

Tomasz Stanislawski t.stanislaws at samsung.com
Thu Apr 5 08:10:34 PDT 2012


Hello,
Thank you for review. Please refer to comments below.

On 04/05/2012 04:58 PM, Rémi Denis-Courmont wrote:
> Le jeudi 5 avril 2012 16:59:59 Tomasz Stanislawski, vous avez écrit :
>> This patch adds description and usage examples for importing
>> DMABUF file descriptor in V4L2.
>>
>> Signed-off-by: Tomasz Stanislawski <t.stanislaws at samsung.com>
>> Signed-off-by: Kyungmin Park <kyungmin.park at samsung.com>
>> ---
>>  Documentation/DocBook/media/v4l/compat.xml         |    4 +
>>  Documentation/DocBook/media/v4l/io.xml             |  177
>> ++++++++++++++++++++ .../DocBook/media/v4l/vidioc-create-bufs.xml       | 
>>   1 +
>>  Documentation/DocBook/media/v4l/vidioc-qbuf.xml    |   15 ++
>>  Documentation/DocBook/media/v4l/vidioc-reqbufs.xml |    8 +-
>>  5 files changed, 203 insertions(+), 2 deletions(-)
>>

[snip]

>> +    <example>
>> +      <title>Initiating streaming I/O with DMABUF file descriptors</title>
>> +
>> +      <programlisting>
>> +&v4l2-requestbuffers; reqbuf;
>> +
>> +memset (&amp;reqbuf, 0, sizeof (reqbuf));
>> +reqbuf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
>> +reqbuf.memory = V4L2_MEMORY_DMABUF;
>> +
>> +if (ioctl (fd, &VIDIOC-REQBUFS;, &amp;reqbuf) == -1) {
>> +	if (errno == EINVAL)
>> +		printf ("Video capturing or user pointer streaming is not 
> supported\n");
> 
> User pointer??
> 

Right. I will fix this copy & paste error.

>> +	else
>> +		perror ("VIDIOC_REQBUFS");
>> +
>> +	exit (EXIT_FAILURE);
>> +}
>> +      </programlisting>
>> +    </example>
>> +

[snip]

>> +    <para>To start and stop capturing or output applications call the
>> +&VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; ioctl. Note
>> +<constant>VIDIOC_STREAMOFF</constant> removes all buffers from both queues
>> and +unlocks/unpins all buffers as a side effect. Since there is no notion
>> of doing +anything "now" on a multitasking system, if an application needs
>> to synchronize +with another event it should examine the &v4l2-buffer;
>> +<structfield>timestamp</structfield> of captured buffers, or set the field
>> +before enqueuing buffers for output.</para>
>> +
>> +    <para>Drivers implementing user pointer I/O must support the
> 
> User pointer again??
> 
> 

Yes. Another C&P mistake. Thanks for noticing it.

Regards,
Tomasz Stanislawski



More information about the dri-devel mailing list