;|sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget5/translations/zh_CN/userspace-api/media/v4l/func-readmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget5/translations/zh_TW/userspace-api/media/v4l/func-readmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget5/translations/it_IT/userspace-api/media/v4l/func-readmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget5/translations/ja_JP/userspace-api/media/v4l/func-readmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget5/translations/ko_KR/userspace-api/media/v4l/func-readmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget5/translations/sp_SP/userspace-api/media/v4l/func-readmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-laterh]h8SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhO/var/lib/git/docbuild/linux/Documentation/userspace-api/media/v4l/func-read.rsthKubhtarget)}(h.. _func-read:h]h}(h]h ]h"]h$]h&]refid func-readuh1hhKhhhhhhubhsection)}(hhh](htitle)}(h V4L2 read()h]h V4L2 read()}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hNameh]hName}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh paragraph)}(h#v4l2-read - Read from a V4L2 deviceh]h#v4l2-read - Read from a V4L2 device}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubeh}(h]nameah ]h"]nameah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hSynopsish]hSynopsis}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh literal_block)}(h#include h]h#include }hjsbah}(h]h ]h"]h$]h&]hhforcelanguagechighlight_args}uh1jhhhKhjhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singleV4L.read (C function) c.V4L.readhNtauh1j&hjhhhNhNubhdesc)}(hhh](hdesc_signature)}(h/ssize_t read( int fd, void *buf, size_t count )h]hdesc_signature_line)}(h-ssize_t read(int fd, void *buf, size_t count)h](h)}(hhh]h desc_sig_name)}(hssize_th]hssize_t}(hjMhhhNhNubah}(h]h ]nah"]h$]h&]uh1jKhjHubah}(h]h ]h"]h$]h&] refdomainj#reftype identifier reftargetjOmodnameN classnameN c:parent_keysphinx.domains.c LookupKey)}data](ji ASTIdentifier)}jdV4LsbNjq)}jdreadsb c.V4L.readesbuh1hhjDhhhhhKubhdesc_sig_space)}(h h]h }(hj}hhhNhNubah}(h]h ]wah"]h$]h&]uh1j{hjDhhhhhKubh desc_name)}(hreadh]jL)}(hjxh]hread}(hjhhhNhNubah}(h]h ]jXah"]h$]h&]uh1jKhjubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1jhjDhhhhhKubhdesc_parameterlist)}(h!(int fd, void *buf, size_t count)h](hdesc_parameter)}(hint fdh](hdesc_sig_keyword_type)}(hinth]hint}(hjhhhNhNubah}(h]h ]ktah"]h$]h&]uh1jhjubj|)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j{hjubjL)}(hfdh]hfd}(hjhhhNhNubah}(h]h ]jXah"]h$]h&]uh1jKhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h void *bufh](j)}(hvoidh]hvoid}(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1jhjubj|)}(h h]h }(hjhhhNhNubah}(h]h ]jah"]h$]h&]uh1j{hjubhdesc_sig_punctuation)}(h*h]h*}(hj hhhNhNubah}(h]h ]pah"]h$]h&]uh1jhjubjL)}(hbufh]hbuf}(hjhhhNhNubah}(h]h ]jXah"]h$]h&]uh1jKhjubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubj)}(h size_t counth](h)}(hhh]jL)}(hsize_th]hsize_t}(hj4hhhNhNubah}(h]h ]jXah"]h$]h&]uh1jKhj1ubah}(h]h ]h"]h$]h&] refdomainj#reftypejd reftargetj6modnameN classnameNjhjk)}jn](jrNjv c.V4L.readesbuh1hhj-ubj|)}(h h]h }(hjShhhNhNubah}(h]h ]jah"]h$]h&]uh1j{hj-ubjL)}(hcounth]hcount}(hjahhhNhNubah}(h]h ]jXah"]h$]h&]uh1jKhj-ubeh}(h]h ]h"]h$]h&]noemphhhuh1jhjubeh}(h]h ]h"]h$]h&]hhuh1jhjDhhhhhKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jBsphinx_line_type declaratorhj>hhhhhKubah}(h]j5ah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1j<hhhKhj9hhubh desc_content)}(hhh]h}(h]h ]h"]h$]h&]uh1jhj9hhhhhKubeh}(h]h ](j#functioneh"]h$]h&]domainj#objtypejdesctypejnoindex noindexentrynocontentsentryuh1j7hhhjhNhNubeh}(h]synopsisah ]h"]synopsisah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Argumentsh]h Arguments}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubhdefinition_list)}(hhh](hdefinition_list_item)}(h5``fd`` File descriptor returned by :c:func:`open()`. h](hterm)}(h``fd``h]hliteral)}(hjh]hfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhhhKhjubh definition)}(hhh]h)}(h-File descriptor returned by :c:func:`open()`.h](hFile descriptor returned by }(hjhhhNhNubh)}(h:c:func:`open()`h]j)}(hjh]hopen()}(hjhhhNhNubah}(h]h ](xrefj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdoc!userspace-api/media/v4l/func-read refdomainj#reftypefunc refexplicitrefwarnjhjk)}jn]jrNasb reftargetopenuh1hhhhKhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(h``buf`` Buffer to be filled h](j)}(h``buf``h]j)}(hj6h]hbuf}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj4ubah}(h]h ]h"]h$]h&]uh1jhhhKhj0ubj)}(hhh]h)}(hBuffer to be filledh]hBuffer to be filled}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjKubah}(h]h ]h"]h$]h&]uh1jhj0ubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubj)}(h&``count`` Max number of bytes to read h](j)}(h ``count``h]j)}(hjnh]hcount}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhjlubah}(h]h ]h"]h$]h&]uh1jhhhK"hjhubj)}(hhh]h)}(hMax number of bytes to readh]hMax number of bytes to read}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjubah}(h]h ]h"]h$]h&]uh1jhjhubeh}(h]h ]h"]h$]h&]uh1jhhhK"hjhhubeh}(h]h ]h"]h$]h&]uh1jhjhhhhhNubeh}(h] argumentsah ]h"] argumentsah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h Descriptionh]h Description}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhK%ubh)}(hX:c:func:`read()` attempts to read up to ``count`` bytes from file descriptor ``fd`` into the buffer starting at ``buf``. The layout of the data in the buffer is discussed in the respective device interface section, see ##. If ``count`` is zero, :c:func:`read()` returns zero and has no other results. If ``count`` is greater than ``SSIZE_MAX``, the result is unspecified. Regardless of the ``count`` value each :c:func:`read()` call will provide at most one frame (two fields) worth of data.h](h)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhK'hjubh attempts to read up to }(hjhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh bytes from file descriptor }(hjhhhNhNubj)}(h``fd``h]hfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh into the buffer starting at }(hjhhhNhNubj)}(h``buf``h]hbuf}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubhk. The layout of the data in the buffer is discussed in the respective device interface section, see ##. If }(hjhhhNhNubj)}(h ``count``h]hcount}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is zero, }(hjhhhNhNubh)}(h:c:func:`read()`h]j)}(hj0h]hread()}(hj2hhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhj.ubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhK'hjubh+ returns zero and has no other results. If }(hjhhhNhNubj)}(h ``count``h]hcount}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh is greater than }(hjhhhNhNubj)}(h ``SSIZE_MAX``h]h SSIZE_MAX}(hjchhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh/, the result is unspecified. Regardless of the }(hjhhhNhNubj)}(h ``count``h]hcount}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh value each }(hjhhhNhNubh)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhK'hjubh@ call will provide at most one frame (two fields) worth of data.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK'hjhhubh)}(hXBy default :c:func:`read()` blocks until data becomes available. When the ``O_NONBLOCK`` flag was given to the :c:func:`open()` function it returns immediately with an ``EAGAIN`` error code when no data is available. The :c:func:`select()` or :c:func:`poll()` functions can always be used to suspend execution until data becomes available. All drivers supporting the :c:func:`read()` function must also support :c:func:`select()` and :c:func:`poll()`.h](h By default }(hjhhhNhNubh)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhK0hjubh/ blocks until data becomes available. When the }(hjhhhNhNubj)}(h``O_NONBLOCK``h]h O_NONBLOCK}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh flag was given to the }(hjhhhNhNubh)}(h:c:func:`open()`h]j)}(hjh]hopen()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjopenuh1hhhhK0hjubh) function it returns immediately with an }(hjhhhNhNubj)}(h ``EAGAIN``h]hEAGAIN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh+ error code when no data is available. The }(hjhhhNhNubh)}(h:c:func:`select()`h]j)}(hj$h]hselect()}(hj&hhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhj"ubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjselectuh1hhhhK0hjubh or }(hjhhhNhNubh)}(h:c:func:`poll()`h]j)}(hjGh]hpoll()}(hjIhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjEubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjpolluh1hhhhK0hjubhl functions can always be used to suspend execution until data becomes available. All drivers supporting the }(hjhhhNhNubh)}(h:c:func:`read()`h]j)}(hjjh]hread()}(hjlhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhK0hjubh function must also support }(hjhhhNhNubh)}(h:c:func:`select()`h]j)}(hjh]hselect()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjselectuh1hhhhK0hjubh and }(hjhhhNhNubh)}(h:c:func:`poll()`h]j)}(hjh]hpoll()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjpolluh1hhhhK0hjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK0hjhhubh)}(hDrivers can implement read functionality in different ways, using a single or multiple buffers and discarding the oldest or newest frames once the internal buffers are filled.h]hDrivers can implement read functionality in different ways, using a single or multiple buffers and discarding the oldest or newest frames once the internal buffers are filled.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK9hjhhubh)}(hXh:c:func:`read()` never returns a "snapshot" of a buffer being filled. Using a single buffer the driver will stop capturing when the application starts reading the buffer until the read is finished. Thus only the period of the vertical blanking interval is available for reading, or the capture rate must fall below the nominal frame rate of the video standard.h](h)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhK=hjubhX\ never returns a “snapshot” of a buffer being filled. Using a single buffer the driver will stop capturing when the application starts reading the buffer until the read is finished. Thus only the period of the vertical blanking interval is available for reading, or the capture rate must fall below the nominal frame rate of the video standard.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK=hjhhubh)}(hXThe behavior of :c:func:`read()` when called during the active picture period or the vertical blanking separating the top and bottom field depends on the discarding policy. A driver discarding the oldest frames keeps capturing into an internal buffer, continuously overwriting the previously, not read frame, and returns the frame being received at the time of the :c:func:`read()` call as soon as it is complete.h](hThe behavior of }(hjhhhNhNubh)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhKDhjubhXM when called during the active picture period or the vertical blanking separating the top and bottom field depends on the discarding policy. A driver discarding the oldest frames keeps capturing into an internal buffer, continuously overwriting the previously, not read frame, and returns the frame being received at the time of the }(hjhhhNhNubh)}(h:c:func:`read()`h]j)}(hj?h]hread()}(hjAhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhKDhjubh call as soon as it is complete.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKDhjhhubh)}(hXA driver discarding the newest frames stops capturing until the next :c:func:`read()` call. The frame being received at :c:func:`read()` time is discarded, returning the following frame instead. Again this implies a reduction of the capture rate to one half or less of the nominal frame rate. An example of this model is the video read mode of the bttv driver, initiating a DMA to user memory when :c:func:`read()` is called and returning when the DMA finished.h](hEA driver discarding the newest frames stops capturing until the next }(hjfhhhNhNubh)}(h:c:func:`read()`h]j)}(hjph]hread()}(hjrhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjnubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhKKhjfubh# call. The frame being received at }(hjfhhhNhNubh)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhKKhjfubhX time is discarded, returning the following frame instead. Again this implies a reduction of the capture rate to one half or less of the nominal frame rate. An example of this model is the video read mode of the bttv driver, initiating a DMA to user memory when }(hjfhhhNhNubh)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhKKhjfubh/ is called and returning when the DMA finished.}(hjfhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKKhjhhubh)}(hX2In the multiple buffer model drivers maintain a ring of internal buffers, automatically advancing to the next free buffer. This allows continuous capturing when the application can empty the buffers fast enough. Again, the behavior when the driver runs out of free buffers depends on the discarding policy.h]hX2In the multiple buffer model drivers maintain a ring of internal buffers, automatically advancing to the next free buffer. This allows continuous capturing when the application can empty the buffers fast enough. Again, the behavior when the driver runs out of free buffers depends on the discarding policy.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShjhhubh)}(hX5Applications can get and set the number of buffers used internally by the driver with the :ref:`VIDIOC_G_PARM ` and :ref:`VIDIOC_S_PARM ` ioctls. They are optional, however. The discarding policy is not reported and cannot be changed. For minimum requirements see :ref:`devices`.h](hZApplications can get and set the number of buffers used internally by the driver with the }(hjhhhNhNubh)}(h$:ref:`VIDIOC_G_PARM `h]hinline)}(hjh]h VIDIOC_G_PARM}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainjreftyperef refexplicitrefwarnj vidioc_g_parmuh1hhhhKYhjubh and }(hjhhhNhNubh)}(h$:ref:`VIDIOC_S_PARM `h]j)}(hjh]h VIDIOC_S_PARM}(hjhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj'reftyperef refexplicitrefwarnj vidioc_g_parmuh1hhhhKYhjubh ioctls. They are optional, however. The discarding policy is not reported and cannot be changed. For minimum requirements see }(hjhhhNhNubh)}(h:ref:`devices`h]j)}(hj?h]hdevices}(hjAhhhNhNubah}(h]h ](jstdstd-refeh"]h$]h&]uh1jhj=ubah}(h]h ]h"]h$]h&]refdocj refdomainjKreftyperef refexplicitrefwarnjdevicesuh1hhhhKYhjubh.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKYhjhhubeh}(h] descriptionah ]h"] descriptionah$]h&]uh1hhhhhhhhK%ubh)}(hhh](h)}(h Return Valueh]h Return Value}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohhhhhK`ubh)}(hXOn success, the number of bytes read is returned. It is not an error if this number is smaller than the number of bytes requested, or the amount of data required for one frame. This may happen for example because :c:func:`read()` was interrupted by a signal. On error, -1 is returned, and the ``errno`` variable is set appropriately. In this case the next read will start at the beginning of a new frame. Possible error codes are:h](hOn success, the number of bytes read is returned. It is not an error if this number is smaller than the number of bytes requested, or the amount of data required for one frame. This may happen for example because }(hjhhhNhNubh)}(h:c:func:`read()`h]j)}(hjh]hread()}(hjhhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhKbhjubh@ was interrupted by a signal. On error, -1 is returned, and the }(hjhhhNhNubj)}(h ``errno``h]herrno}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh variable is set appropriately. In this case the next read will start at the beginning of a new frame. Possible error codes are:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKbhjohhubj)}(hhh](j)}(hnEAGAIN Non-blocking I/O has been selected using O_NONBLOCK and no data was immediately available for reading. h](j)}(hEAGAINh]hEAGAIN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKlhjubj)}(hhh]h)}(hfNon-blocking I/O has been selected using O_NONBLOCK and no data was immediately available for reading.h]hfNon-blocking I/O has been selected using O_NONBLOCK and no data was immediately available for reading.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKkhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKlhjubj)}(hEBADF ``fd`` is not a valid file descriptor or is not open for reading, or the process already has the maximum number of files open. h](j)}(hEBADFh]hEBADF}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKphjubj)}(hhh]h)}(h~``fd`` is not a valid file descriptor or is not open for reading, or the process already has the maximum number of files open.h](j)}(h``fd``h]hfd}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubhx is not a valid file descriptor or is not open for reading, or the process already has the maximum number of files open.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKohjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKphjhhubj)}(hZEBUSY The driver does not support multiple read streams and the device is already in use. h](j)}(hEBUSYh]hEBUSY}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKthj2ubj)}(hhh]h)}(hSThe driver does not support multiple read streams and the device is already in use.h]hSThe driver does not support multiple read streams and the device is already in use.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKshjDubah}(h]h ]h"]h$]h&]uh1jhj2ubeh}(h]h ]h"]h$]h&]uh1jhhhKthjhhubj)}(h7EFAULT ``buf`` references an inaccessible memory area. h](j)}(hEFAULTh]hEFAULT}(hjehhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKwhjaubj)}(hhh]h)}(h/``buf`` references an inaccessible memory area.h](j)}(h``buf``h]hbuf}(hjzhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjvubh( references an inaccessible memory area.}(hjvhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKwhjsubah}(h]h ]h"]h$]h&]uh1jhjaubeh}(h]h ]h"]h$]h&]uh1jhhhKwhjhhubj)}(hEEINTR The call was interrupted by a signal before any data was read. h](j)}(hEINTRh]hEINTR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKzhjubj)}(hhh]h)}(h>The call was interrupted by a signal before any data was read.h]h>The call was interrupted by a signal before any data was read.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKzhjhhubj)}(hxEIO I/O error. This indicates some hardware problem or a failure to communicate with a remote device (USB camera etc.). h](j)}(hEIOh]hEIO}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK~hjubj)}(hhh]h)}(hsI/O error. This indicates some hardware problem or a failure to communicate with a remote device (USB camera etc.).h]hsI/O error. This indicates some hardware problem or a failure to communicate with a remote device (USB camera etc.).}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK}hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhK~hjhhubj)}(hEINVAL The :c:func:`read()` function is not supported by this driver, not on this device, or generally not on this type of device.h](j)}(hEINVALh]hEINVAL}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj)}(hhh]h)}(h{The :c:func:`read()` function is not supported by this driver, not on this device, or generally not on this type of device.h](hThe }(hj hhhNhNubh)}(h:c:func:`read()`h]j)}(hj h]hread()}(hj hhhNhNubah}(h]h ](jj#c-funceh"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]refdocj refdomainj#reftypefunc refexplicitrefwarnjhjjreaduh1hhhhKhj ubhg function is not supported by this driver, not on this device, or generally not on this type of device.}(hj hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhhhKhjhhubeh}(h]h ]h"]h$]h&]uh1jhjohhhhhNubeh}(h] return-valueah ]h"] return valueah$]h&]uh1hhhhhhhhK`ubeh}(h]( v4l2-readheh ]h"]( v4l2 read() func-readeh$]h&]uh1hhhhhhhhKexpect_referenced_by_name}jb hsexpect_referenced_by_id}hhsubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}h]hasnameids}(jb hja j^ hhjjjjjljijY jV u nametypes}(jb ja hjjjljY uh}(hhj^ hhhjjj5j>jjjijjV jou footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages]hsystem_message)}(hhh]h)}(hhh]h/Hyperlink target "func-read" is not referenced.}hj sbah}(h]h ]h"]h$]h&]uh1hhj ubah}(h]h ]h"]h$]h&]levelKtypeINFOsourcehlineKuh1j uba transformerN include_log] decorationNhhub.