提交 acf92046 编写于 作者: H Hans Verkuil 提交者: Mauro Carvalho Chehab

[media] DocBook media: fix the poll() 'no QBUF' documentation

Clarify what poll() returns if STREAMON was called but not QBUF.
Make explicit the different behavior for this scenario for
capture and output devices.
Signed-off-by: NHans Verkuil <hans.verkuil@cisco.com>
Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@osg.samsung.com>
上级 58d75f4b
...@@ -44,10 +44,18 @@ Capture devices set the <constant>POLLIN</constant> and ...@@ -44,10 +44,18 @@ Capture devices set the <constant>POLLIN</constant> and
flags. When the function timed out it returns a value of zero, on flags. When the function timed out it returns a value of zero, on
failure it returns <returnvalue>-1</returnvalue> and the failure it returns <returnvalue>-1</returnvalue> and the
<varname>errno</varname> variable is set appropriately. When the <varname>errno</varname> variable is set appropriately. When the
application did not call &VIDIOC-QBUF; or &VIDIOC-STREAMON; yet the application did not call &VIDIOC-STREAMON; the
<function>poll()</function> function succeeds, but sets the <function>poll()</function> function succeeds, but sets the
<constant>POLLERR</constant> flag in the <constant>POLLERR</constant> flag in the
<structfield>revents</structfield> field.</para> <structfield>revents</structfield> field. When the
application has called &VIDIOC-STREAMON; for a capture device but hasn't
yet called &VIDIOC-QBUF;, the <function>poll()</function> function
succeeds and sets the <constant>POLLERR</constant> flag in the
<structfield>revents</structfield> field. For output devices this
same situation will cause <function>poll()</function> to succeed
as well, but it sets the <constant>POLLOUT</constant> and
<constant>POLLWRNORM</constant> flags in the <structfield>revents</structfield>
field.</para>
<para>When use of the <function>read()</function> function has <para>When use of the <function>read()</function> function has
been negotiated and the driver does not capture yet, the been negotiated and the driver does not capture yet, the
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册