€•ÞzŒsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ5/translations/zh_CN/userspace-api/media/v4l/func-poll”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/zh_TW/userspace-api/media/v4l/func-poll”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/it_IT/userspace-api/media/v4l/func-poll”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/ja_JP/userspace-api/media/v4l/func-poll”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/ko_KR/userspace-api/media/v4l/func-poll”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒPortuguese (Brazilian)”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/pt_BR/userspace-api/media/v4l/func-poll”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ5/translations/sp_SP/userspace-api/media/v4l/func-poll”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒcomment”“”)”}”(hŒ8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later”h]”hŒ8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later”…””}”hh·sbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1hµhhh²hh³ŒO/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/func-poll.rst”h´KubhŒtarget”“”)”}”(hŒ.. _func-poll:”h]”h}”(h]”h ]”h"]”h$]”h&]”Œrefid”Œ func-poll”uh1hÈh´Khhh²hh³hÇubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒ V4L2 poll()”h]”hŒ V4L2 poll()”…””}”(hhÝh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhØh²hh³hÇh´Kubh×)”}”(hhh]”(hÜ)”}”(hŒName”h]”hŒName”…””}”(hhîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhhëh²hh³hÇh´K ubhŒ paragraph”“”)”}”(hŒ4v4l2-poll - Wait for some event on a file descriptor”h]”hŒ4v4l2-poll - Wait for some event on a file descriptor”…””}”(hhþh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K hhëh²hubeh}”(h]”Œname”ah ]”h"]”Œname”ah$]”h&]”uh1hÖhhØh²hh³hÇh´K ubh×)”}”(hhh]”(hÜ)”}”(hŒSynopsis”h]”hŒSynopsis”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjh²hh³hÇh´KubhŒ literal_block”“”)”}”(hŒ#include ”h]”hŒ#include ”…””}”hj'sbah}”(h]”h ]”h"]”h$]”h&]”hÅhÆŒforce”‰Œlanguage”Œc”Œhighlight_args”}”uh1j%h³hÇh´Khjh²hubhŒindex”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”Œentries”]”(Œsingle”ŒV4L.poll (C function)”Œ c.V4L.poll”hNt”auh1j:hjh²hh³Nh´NubhŒdesc”“”)”}”(hhh]”(hŒdesc_signature”“”)”}”(hŒ?int poll( struct pollfd *ufds, unsigned int nfds, int timeout )”h]”hŒdesc_signature_line”“”)”}”(hŒ=int poll(struct pollfd *ufds, unsigned int nfds, int timeout)”h]”(hŒdesc_sig_keyword_type”“”)”}”(hŒint”h]”hŒint”…””}”(hj^h²hh³Nh´Nubah}”(h]”h ]”Œkt”ah"]”h$]”h&]”uh1j\hjXh²hh³hÇh´KubhŒdesc_sig_space”“”)”}”(hŒ ”h]”hŒ ”…””}”(hjoh²hh³Nh´Nubah}”(h]”h ]”Œw”ah"]”h$]”h&]”uh1jmhjXh²hh³hÇh´KubhŒ desc_name”“”)”}”(hŒpoll”h]”hŒ desc_sig_name”“”)”}”(hŒpoll”h]”hŒpoll”…””}”(hj†h²hh³Nh´Nubah}”(h]”h ]”Œn”ah"]”h$]”h&]”uh1j„hj€ubah}”(h]”h ]”(Œsig-name”Œdescname”eh"]”h$]”h&]”hÅhÆuh1j~hjXh²hh³hÇh´KubhŒdesc_parameterlist”“”)”}”(hŒ5(struct pollfd *ufds, unsigned int nfds, int timeout)”h]”(hŒdesc_parameter”“”)”}”(hŒstruct pollfd *ufds”h]”(hŒdesc_sig_keyword”“”)”}”(hŒstruct”h]”hŒstruct”…””}”(hj«h²hh³Nh´Nubah}”(h]”h ]”Œk”ah"]”h$]”h&]”uh1j©hj¥ubjn)”}”(hŒ ”h]”hŒ ”…””}”(hjºh²hh³Nh´Nubah}”(h]”h ]”jzah"]”h$]”h&]”uh1jmhj¥ubh)”}”(hhh]”j…)”}”(hŒpollfd”h]”hŒpollfd”…””}”(hjËh²hh³Nh´Nubah}”(h]”h ]”j‘ah"]”h$]”h&]”uh1j„hjÈubah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”j7Œreftype”Œ identifier”Œ reftarget”jÍŒmodname”NŒ classname”NŒ c:parent_key”Œsphinx.domains.c”Œ LookupKey”“”)”}”Œdata”]”(jæŒ ASTIdentifier”“”)”}”jáŒV4L”sbN†”jî)”}”jájˆsbŒ c.V4L.poll”†”esbuh1hhj¥ubjn)”}”(hŒ ”h]”hŒ ”…””}”(hj÷h²hh³Nh´Nubah}”(h]”h ]”jzah"]”h$]”h&]”uh1jmhj¥ubhŒdesc_sig_punctuation”“”)”}”(hŒ*”h]”hŒ*”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”Œp”ah"]”h$]”h&]”uh1jhj¥ubj…)”}”(hŒufds”h]”hŒufds”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”j‘ah"]”h$]”h&]”uh1j„hj¥ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆhÅhÆuh1j£hjŸubj¤)”}”(hŒunsigned int nfds”h]”(j])”}”(hŒunsigned”h]”hŒunsigned”…””}”(hj/h²hh³Nh´Nubah}”(h]”h ]”jiah"]”h$]”h&]”uh1j\hj+ubjn)”}”(hŒ ”h]”hŒ ”…””}”(hj=h²hh³Nh´Nubah}”(h]”h ]”jzah"]”h$]”h&]”uh1jmhj+ubj])”}”(hŒint”h]”hŒint”…””}”(hjKh²hh³Nh´Nubah}”(h]”h ]”jiah"]”h$]”h&]”uh1j\hj+ubjn)”}”(hŒ ”h]”hŒ ”…””}”(hjYh²hh³Nh´Nubah}”(h]”h ]”jzah"]”h$]”h&]”uh1jmhj+ubj…)”}”(hŒnfds”h]”hŒnfds”…””}”(hjgh²hh³Nh´Nubah}”(h]”h ]”j‘ah"]”h$]”h&]”uh1j„hj+ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆhÅhÆuh1j£hjŸubj¤)”}”(hŒ int timeout”h]”(j])”}”(hŒint”h]”hŒint”…””}”(hj€h²hh³Nh´Nubah}”(h]”h ]”jiah"]”h$]”h&]”uh1j\hj|ubjn)”}”(hŒ ”h]”hŒ ”…””}”(hjŽh²hh³Nh´Nubah}”(h]”h ]”jzah"]”h$]”h&]”uh1jmhj|ubj…)”}”(hŒtimeout”h]”hŒtimeout”…””}”(hjœh²hh³Nh´Nubah}”(h]”h ]”j‘ah"]”h$]”h&]”uh1j„hj|ubeh}”(h]”h ]”h"]”h$]”h&]”Œnoemph”ˆhÅhÆuh1j£hjŸubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆuh1jhjXh²hh³hÇh´Kubeh}”(h]”h ]”h"]”h$]”h&]”hÅhÆŒ add_permalink”ˆuh1jVŒsphinx_line_type”Œ declarator”hjRh²hh³hÇh´Kubah}”(h]”jIah ]”(Œsig”Œ sig-object”eh"]”h$]”h&]”Œ is_multiline”ˆŒ _toc_parts”)Œ _toc_name”huh1jPh³hÇh´KhjMh²hubhŒ desc_content”“”)”}”(hhh]”h}”(h]”h ]”h"]”h$]”h&]”uh1jËhjMh²hh³hÇh´Kubeh}”(h]”h ]”(j7Œfunction”eh"]”h$]”h&]”Œdomain”j7Œobjtype”jÙŒdesctype”jÙŒnoindex”‰Œ noindexentry”‰Œnocontentsentry”‰uh1jKh²hhjh³Nh´Nubeh}”(h]”Œsynopsis”ah ]”h"]”Œsynopsis”ah$]”h&]”uh1hÖhhØh²hh³hÇh´Kubh×)”}”(hhh]”hÜ)”}”(hŒ Arguments”h]”hŒ Arguments”…””}”(hjîh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjëh²hh³hÇh´Kubah}”(h]”Œ arguments”ah ]”h"]”Œ arguments”ah$]”h&]”uh1hÖhhØh²hh³hÇh´Kubh×)”}”(hhh]”(hÜ)”}”(hŒ Description”h]”hŒ Description”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhjh²hh³hÇh´Kubhý)”}”(hŒWith the :c:func:`poll()` function applications can suspend execution until the driver has captured data or is ready to accept data for output.”h]”(hŒ With the ”…””}”(hjh²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”hŒliteral”“”)”}”(hjh]”hŒpoll()”…””}”(hj#h²hh³Nh´Nubah}”(h]”h ]”(Œxref”j7Œc-func”eh"]”h$]”h&]”uh1j!hjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”Œ!userspace-api/media/v4l/func-poll”Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåjè)”}”jë]”jïN†”asbŒ reftarget”Œpoll”uh1hh³hÇh´KhjubhŒv function applications can suspend execution until the driver has captured data or is ready to accept data for output.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Khjh²hubhý)”}”(hXîWhen streaming I/O has been negotiated this function waits until a buffer has been filled by the capture device and can be dequeued with the :ref:`VIDIOC_DQBUF ` ioctl. For output devices this function waits until the device is ready to accept a new buffer to be queued up with the :ref:`VIDIOC_QBUF ` ioctl for display. When buffers are already in the outgoing queue of the driver (capture) or the incoming queue isn't full (display) the function returns immediately.”h]”(hŒWhen streaming I/O has been negotiated this function waits until a buffer has been filled by the capture device and can be dequeued with the ”…””}”(hjOh²hh³Nh´Nubh)”}”(hŒ!:ref:`VIDIOC_DQBUF `”h]”hŒinline”“”)”}”(hjYh]”hŒ VIDIOC_DQBUF”…””}”(hj]h²hh³Nh´Nubah}”(h]”h ]”(j-Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j[hjWubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”jgŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjCŒ vidioc_qbuf”uh1hh³hÇh´K#hjOubhŒy ioctl. For output devices this function waits until the device is ready to accept a new buffer to be queued up with the ”…””}”(hjOh²hh³Nh´Nubh)”}”(hŒ :ref:`VIDIOC_QBUF `”h]”j\)”}”(hjh]”hŒ VIDIOC_QBUF”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(j-Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j[hj}ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j‹Œreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjCŒ vidioc_qbuf”uh1hh³hÇh´K#hjOubhŒ© ioctl for display. When buffers are already in the outgoing queue of the driver (capture) or the incoming queue isn’t full (display) the function returns immediately.”…””}”(hjOh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K#hjh²hubhý)”}”(hX(On success :c:func:`poll()` returns the number of file descriptors that have been selected (that is, file descriptors for which the ``revents`` field of the respective ``struct pollfd`` structure is non-zero). Capture devices set the ``POLLIN`` and ``POLLRDNORM`` flags in the ``revents`` field, output devices the ``POLLOUT`` and ``POLLWRNORM`` flags. When the function timed out it returns a value of zero, on failure it returns -1 and the ``errno`` variable is set appropriately. When the application did not call :ref:`VIDIOC_STREAMON ` the :c:func:`poll()` function succeeds, but sets the ``POLLERR`` flag in the ``revents`` field. When the application has called :ref:`VIDIOC_STREAMON ` for a capture device but hasn't yet called :ref:`VIDIOC_QBUF `, the :c:func:`poll()` function succeeds and sets the ``POLLERR`` flag in the ``revents`` field. For output devices this same situation will cause :c:func:`poll()` to succeed as well, but it sets the ``POLLOUT`` and ``POLLWRNORM`` flags in the ``revents`` field.”h]”(hŒ On success ”…””}”(hj§h²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”j")”}”(hj±h]”hŒpoll()”…””}”(hj³h²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hj¯ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒpoll”uh1hh³hÇh´K,hj§ubhŒi returns the number of file descriptors that have been selected (that is, file descriptors for which the ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ ``revents``”h]”hŒrevents”…””}”(hjÒh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ field of the respective ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ``struct pollfd``”h]”hŒ struct pollfd”…””}”(hjäh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ1 structure is non-zero). Capture devices set the ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ ``POLLIN``”h]”hŒPOLLIN”…””}”(hjöh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ and ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ``POLLRDNORM``”h]”hŒ POLLRDNORM”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ flags in the ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ ``revents``”h]”hŒrevents”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ field, output devices the ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ ``POLLOUT``”h]”hŒPOLLOUT”…””}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ and ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ``POLLWRNORM``”h]”hŒ POLLWRNORM”…””}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒa flags. When the function timed out it returns a value of zero, on failure it returns -1 and the ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ ``errno``”h]”hŒerrno”…””}”(hjPh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒB variable is set appropriately. When the application did not call ”…””}”(hj§h²hh³Nh´Nubh)”}”(hŒ(:ref:`VIDIOC_STREAMON `”h]”j\)”}”(hjdh]”hŒVIDIOC_STREAMON”…””}”(hjfh²hh³Nh´Nubah}”(h]”h ]”(j-Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j[hjbubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”jpŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjCŒvidioc_streamon”uh1hh³hÇh´K,hj§ubhŒ the ”…””}”(hj§h²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”j")”}”(hjˆh]”hŒpoll()”…””}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hj†ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒpoll”uh1hh³hÇh´K,hj§ubhŒ! function succeeds, but sets the ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ ``POLLERR``”h]”hŒPOLLERR”…””}”(hj©h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ flag in the ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ ``revents``”h]”hŒrevents”…””}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ( field. When the application has called ”…””}”(hj§h²hh³Nh´Nubh)”}”(hŒ(:ref:`VIDIOC_STREAMON `”h]”j\)”}”(hjÏh]”hŒVIDIOC_STREAMON”…””}”(hjÑh²hh³Nh´Nubah}”(h]”h ]”(j-Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j[hjÍubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”jÛŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjCŒvidioc_streamon”uh1hh³hÇh´K,hj§ubhŒ. for a capture device but hasn’t yet called ”…””}”(hj§h²hh³Nh´Nubh)”}”(hŒ :ref:`VIDIOC_QBUF `”h]”j\)”}”(hjóh]”hŒ VIDIOC_QBUF”…””}”(hjõh²hh³Nh´Nubah}”(h]”h ]”(j-Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j[hjñubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”jÿŒreftype”Œref”Œ refexplicit”ˆŒrefwarn”ˆjCŒ vidioc_qbuf”uh1hh³hÇh´K,hj§ubhŒ, the ”…””}”(hj§h²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”j")”}”(hjh]”hŒpoll()”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hjubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒpoll”uh1hh³hÇh´K,hj§ubhŒ function succeeds and sets the ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ ``POLLERR``”h]”hŒPOLLERR”…””}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ flag in the ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ ``revents``”h]”hŒrevents”…””}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ: field. For output devices this same situation will cause ”…””}”(hj§h²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”j")”}”(hj^h]”hŒpoll()”…””}”(hj`h²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hj\ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒpoll”uh1hh³hÇh´K,hj§ubhŒ% to succeed as well, but it sets the ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ ``POLLOUT``”h]”hŒPOLLOUT”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ and ”…””}”hj§sbj")”}”(hŒ``POLLWRNORM``”h]”hŒ POLLWRNORM”…””}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ flags in the ”…””}”(hj§h²hh³Nh´Nubj")”}”(hŒ ``revents``”h]”hŒrevents”…””}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj§ubhŒ field.”…””}”(hj§h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K,hjh²hubhý)”}”(hŒˆIf an event occurred (see :ref:`VIDIOC_DQEVENT`) then ``POLLPRI`` will be set in the ``revents`` field and :c:func:`poll()` will return.”h]”(hŒIf an event occurred (see ”…””}”(hj»h²hh³Nh´Nubh)”}”(hŒ:ref:`VIDIOC_DQEVENT`”h]”j\)”}”(hjÅh]”hŒVIDIOC_DQEVENT”…””}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”(j-Œstd”Œstd-ref”eh"]”h$]”h&]”uh1j[hjÃubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”jÑŒreftype”Œref”Œ refexplicit”‰Œrefwarn”ˆjCŒvidioc_dqevent”uh1hh³hÇh´K>hj»ubhŒ) then ”…””}”(hj»h²hh³Nh´Nubj")”}”(hŒ ``POLLPRI``”h]”hŒPOLLPRI”…””}”(hjçh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj»ubhŒ will be set in the ”…””}”(hj»h²hh³Nh´Nubj")”}”(hŒ ``revents``”h]”hŒrevents”…””}”(hjùh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj»ubhŒ field and ”…””}”(hj»h²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”j")”}”(hj h]”hŒpoll()”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hj ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒpoll”uh1hh³hÇh´K>hj»ubhŒ will return.”…””}”(hj»h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K>hjh²hubhý)”}”(hX|When use of the :c:func:`read()` function has been negotiated and the driver does not capture yet, the :c:func:`poll()` function starts capturing. When that fails it returns a ``POLLERR`` as above. Otherwise it waits until data has been captured and can be read. When the driver captures continuously (as opposed to, for example, still images) the function may return immediately.”h]”(hŒWhen use of the ”…””}”(hj4h²hh³Nh´Nubh)”}”(hŒ:c:func:`read()`”h]”j")”}”(hj>h]”hŒread()”…””}”(hj@h²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hj<ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒread”uh1hh³hÇh´KBhj4ubhŒG function has been negotiated and the driver does not capture yet, the ”…””}”(hj4h²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”j")”}”(hjah]”hŒpoll()”…””}”(hjch²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hj_ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒpoll”uh1hh³hÇh´KBhj4ubhŒ9 function starts capturing. When that fails it returns a ”…””}”(hj4h²hh³Nh´Nubj")”}”(hŒ ``POLLERR``”h]”hŒPOLLERR”…””}”(hj‚h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj4ubhŒÁ as above. Otherwise it waits until data has been captured and can be read. When the driver captures continuously (as opposed to, for example, still images) the function may return immediately.”…””}”(hj4h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KBhjh²hubhý)”}”(hXWhen use of the :c:func:`write()` function has been negotiated and the driver does not stream yet, the :c:func:`poll()` function starts streaming. When that fails it returns a ``POLLERR`` as above. Otherwise it waits until the driver is ready for a non-blocking :c:func:`write()` call.”h]”(hŒWhen use of the ”…””}”(hjšh²hh³Nh´Nubh)”}”(hŒ:c:func:`write()`”h]”j")”}”(hj¤h]”hŒwrite()”…””}”(hj¦h²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hj¢ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒwrite”uh1hh³hÇh´KIhjšubhŒF function has been negotiated and the driver does not stream yet, the ”…””}”(hjšh²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”j")”}”(hjÇh]”hŒpoll()”…””}”(hjÉh²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hjÅubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒpoll”uh1hh³hÇh´KIhjšubhŒ9 function starts streaming. When that fails it returns a ”…””}”(hjšh²hh³Nh´Nubj")”}”(hŒ ``POLLERR``”h]”hŒPOLLERR”…””}”(hjèh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hjšubhŒK as above. Otherwise it waits until the driver is ready for a non-blocking ”…””}”(hjšh²hh³Nh´Nubh)”}”(hŒ:c:func:`write()`”h]”j")”}”(hjüh]”hŒwrite()”…””}”(hjþh²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hjúubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒwrite”uh1hh³hÇh´KIhjšubhŒ call.”…””}”(hjšh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KIhjh²hubhý)”}”(hŒõIf the caller is only interested in events (just ``POLLPRI`` is set in the ``events`` field), then :c:func:`poll()` will *not* start streaming if the driver does not stream yet. This makes it possible to just poll for events and not for buffers.”h]”(hŒ1If the caller is only interested in events (just ”…””}”(hj#h²hh³Nh´Nubj")”}”(hŒ ``POLLPRI``”h]”hŒPOLLPRI”…””}”(hj+h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj#ubhŒ is set in the ”…””}”(hj#h²hh³Nh´Nubj")”}”(hŒ ``events``”h]”hŒevents”…””}”(hj=h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj#ubhŒ field), then ”…””}”(hj#h²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”j")”}”(hjQh]”hŒpoll()”…””}”(hjSh²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hjOubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒpoll”uh1hh³hÇh´KOhj#ubhŒ will ”…””}”(hj#h²hh³Nh´NubhŒemphasis”“”)”}”(hŒ*not*”h]”hŒnot”…””}”(hjth²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jrhj#ubhŒw start streaming if the driver does not stream yet. This makes it possible to just poll for events and not for buffers.”…””}”(hj#h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KOhjh²hubhý)”}”(hŒAll drivers implementing the :c:func:`read()` or :c:func:`write()` function or streaming I/O must also support the :c:func:`poll()` function.”h]”(hŒAll drivers implementing the ”…””}”(hjŒh²hh³Nh´Nubh)”}”(hŒ:c:func:`read()`”h]”j")”}”(hj–h]”hŒread()”…””}”(hj˜h²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hj”ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒread”uh1hh³hÇh´KThjŒubhŒ or ”…””}”(hjŒh²hh³Nh´Nubh)”}”(hŒ:c:func:`write()`”h]”j")”}”(hj¹h]”hŒwrite()”…””}”(hj»h²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hj·ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒwrite”uh1hh³hÇh´KThjŒubhŒ1 function or streaming I/O must also support the ”…””}”(hjŒh²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”j")”}”(hjÜh]”hŒpoll()”…””}”(hjÞh²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hjÚubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒpoll”uh1hh³hÇh´KThjŒubhŒ function.”…””}”(hjŒh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KThjh²hubhý)”}”(hŒ6For more details see the :c:func:`poll()` manual page.”h]”(hŒFor more details see the ”…””}”(hjh²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”j")”}”(hj h]”hŒpoll()”…””}”(hjh²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hj ubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒpoll”uh1hh³hÇh´KXhjubhŒ manual page.”…””}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´KXhjh²hubeh}”(h]”Œ description”ah ]”h"]”Œ description”ah$]”h&]”uh1hÖhhØh²hh³hÇh´Kubh×)”}”(hhh]”(hÜ)”}”(hŒ Return Value”h]”hŒ Return Value”…””}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛhj<h²hh³hÇh´K[ubhý)”}”(hŒËOn success, :c:func:`poll()` returns the number structures which have non-zero ``revents`` fields, or zero if the call timed out. On error -1 is returned, and the ``errno`` variable is set appropriately:”h]”(hŒ On success, ”…””}”(hjMh²hh³Nh´Nubh)”}”(hŒ:c:func:`poll()`”h]”j")”}”(hjWh]”hŒpoll()”…””}”(hjYh²hh³Nh´Nubah}”(h]”h ]”(j-j7Œc-func”eh"]”h$]”h&]”uh1j!hjUubah}”(h]”h ]”h"]”h$]”h&]”Œrefdoc”j9Œ refdomain”j7Œreftype”Œfunc”Œ refexplicit”‰Œrefwarn”‰jåj?jCŒpoll”uh1hh³hÇh´K]hjMubhŒ3 returns the number structures which have non-zero ”…””}”(hjMh²hh³Nh´Nubj")”}”(hŒ ``revents``”h]”hŒrevents”…””}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hjMubhŒI fields, or zero if the call timed out. On error -1 is returned, and the ”…””}”(hjMh²hh³Nh´Nubj")”}”(hŒ ``errno``”h]”hŒerrno”…””}”(hjŠh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hjMubhŒ variable is set appropriately:”…””}”(hjMh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´K]hj<h²hubhŒdefinition_list”“”)”}”(hhh]”(hŒdefinition_list_item”“”)”}”(hŒNEBADF One or more of the ``ufds`` members specify an invalid file descriptor. ”h]”(hŒterm”“”)”}”(hŒEBADF”h]”hŒEBADF”…””}”(hj¯h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j­h³hÇh´Kchj©ubhŒ definition”“”)”}”(hhh]”hý)”}”(hŒGOne or more of the ``ufds`` members specify an invalid file descriptor.”h]”(hŒOne or more of the ”…””}”(hjÂh²hh³Nh´Nubj")”}”(hŒ``ufds``”h]”hŒufds”…””}”(hjÊh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hjÂubhŒ, members specify an invalid file descriptor.”…””}”(hjÂh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kbhj¿ubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hj©ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j§h³hÇh´Kchj¤ubj¨)”}”(hŒcEBUSY The driver does not support multiple read or write streams and the device is already in use. ”h]”(j®)”}”(hŒEBUSY”h]”hŒEBUSY”…””}”(hjòh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j­h³hÇh´Kghjîubj¾)”}”(hhh]”hý)”}”(hŒ\The driver does not support multiple read or write streams and the device is already in use.”h]”hŒ\The driver does not support multiple read or write streams and the device is already in use.”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kfhj ubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hjîubeh}”(h]”h ]”h"]”h$]”h&]”uh1j§h³hÇh´Kghj¤h²hubj¨)”}”(hŒ8EFAULT ``ufds`` references an inaccessible memory area. ”h]”(j®)”}”(hŒEFAULT”h]”hŒEFAULT”…””}”(hj! h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j­h³hÇh´Kjhj ubj¾)”}”(hhh]”hý)”}”(hŒ0``ufds`` references an inaccessible memory area.”h]”(j")”}”(hŒ``ufds``”h]”hŒufds”…””}”(hj6 h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hj2 ubhŒ( references an inaccessible memory area.”…””}”(hj2 h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kjhj/ ubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hj ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j§h³hÇh´Kjhj¤h²hubj¨)”}”(hŒ,EINTR The call was interrupted by a signal. ”h]”(j®)”}”(hŒEINTR”h]”hŒEINTR”…””}”(hj^ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j­h³hÇh´KmhjZ ubj¾)”}”(hhh]”hý)”}”(hŒ%The call was interrupted by a signal.”h]”hŒ%The call was interrupted by a signal.”…””}”(hjo h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kmhjl ubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hjZ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j§h³hÇh´Kmhj¤h²hubj¨)”}”(hŒhEINVAL The ``nfds`` value exceeds the ``RLIMIT_NOFILE`` value. Use ``getrlimit()`` to obtain this value.”h]”(j®)”}”(hŒEINVAL”h]”hŒEINVAL”…””}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j­h³hÇh´Kphj‰ ubj¾)”}”(hhh]”hý)”}”(hŒaThe ``nfds`` value exceeds the ``RLIMIT_NOFILE`` value. Use ``getrlimit()`` to obtain this value.”h]”(hŒThe ”…””}”(hjž h²hh³Nh´Nubj")”}”(hŒ``nfds``”h]”hŒnfds”…””}”(hj¦ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hjž ubhŒ value exceeds the ”…””}”(hjž h²hh³Nh´Nubj")”}”(hŒ``RLIMIT_NOFILE``”h]”hŒ RLIMIT_NOFILE”…””}”(hj¸ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hjž ubhŒ value. Use ”…””}”(hjž h²hh³Nh´Nubj")”}”(hŒ``getrlimit()``”h]”hŒ getrlimit()”…””}”(hjÊ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1j!hjž ubhŒ to obtain this value.”…””}”(hjž h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hüh³hÇh´Kphj› ubah}”(h]”h ]”h"]”h$]”h&]”uh1j½hj‰ ubeh}”(h]”h ]”h"]”h$]”h&]”uh1j§h³hÇh´Kphj¤h²hubeh}”(h]”h ]”h"]”h$]”h&]”uh1j¢hj<h²hh³hÇh´Nubeh}”(h]”Œ return-value”ah ]”h"]”Œ return value”ah$]”h&]”uh1hÖhhØh²hh³hÇh´K[ubeh}”(h]”(Œ v4l2-poll”hÕeh ]”h"]”(Œ v4l2 poll()”Œ func-poll”eh$]”h&]”uh1hÖhhh²hh³hÇh´KŒexpect_referenced_by_name”}”j hÊsŒexpect_referenced_by_id”}”hÕhÊsubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”hÇuh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(hÛNŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”j, Œerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”hÇŒ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”hÕ]”hÊasŒnameids”}”(j hÕj jþ jjjèjåjjþj9j6jù jö uŒ nametypes”}”(j ˆj ‰j‰jè‰j‰j9‰jù ‰uh}”(hÕhØjþ hØjhëjåjjIjRjþjëj6jjö j<uŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”hŒsystem_message”“”)”}”(hhh]”hý)”}”(hhh]”hŒ/Hyperlink target "func-poll" is not referenced.”…””}”hj– sbah}”(h]”h ]”h"]”h$]”h&]”uh1hühj“ ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÇŒline”Kuh1j‘ ubaŒ transformer”NŒ include_log”]”Œ decoration”Nh²hub.