Lines Matching +full:frame +full:- +full:buffer
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
10 .. _func-read:
19 v4l2-read - Read from a V4L2 device
25 .. code-block:: c
31 :name: v4l2-read
37 File descriptor returned by :ref:`open() <func-open>`.
40 Buffer to be filled
48 :ref:`read() <func-read>` attempts to read up to ``count`` bytes from file
49 descriptor ``fd`` into the buffer starting at ``buf``. The layout of the
50 data in the buffer is discussed in the respective device interface
51 section, see ##. If ``count`` is zero, :ref:`read() <func-read>` returns zero
54 :ref:`read() <func-read>` call will provide at most one frame (two fields)
57 By default :ref:`read() <func-read>` blocks until data becomes available. When
58 the ``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>`
60 is available. The :ref:`select() <func-select>` or
61 :ref:`poll() <func-poll>` functions can always be used to suspend
63 :ref:`read() <func-read>` function must also support :ref:`select() <func-select>` and
64 :ref:`poll() <func-poll>`.
70 :ref:`read() <func-read>` never returns a "snapshot" of a buffer being filled.
71 Using a single buffer the driver will stop capturing when the
72 application starts reading the buffer until the read is finished. Thus
74 reading, or the capture rate must fall below the nominal frame rate of
77 The behavior of :ref:`read() <func-read>` when called during the active picture
80 keeps capturing into an internal buffer, continuously overwriting the
81 previously, not read frame, and returns the frame being received at the
82 time of the :ref:`read() <func-read>` call as soon as it is complete.
85 :ref:`read() <func-read>` call. The frame being received at :ref:`read() <func-read>`
86 time is discarded, returning the following frame instead. Again this
88 nominal frame rate. An example of this model is the video read mode of
89 the bttv driver, initiating a DMA to user memory when :ref:`read() <func-read>`
92 In the multiple buffer model drivers maintain a ring of internal
93 buffers, automatically advancing to the next free buffer. This allows
110 of data required for one frame. This may happen for example because
111 :ref:`read() <func-read>` was interrupted by a signal. On error, -1 is
113 the next read will start at the beginning of a new frame. Possible error
117 Non-blocking I/O has been selected using O_NONBLOCK and no data was
139 The :ref:`read() <func-read>` function is not supported by this driver, not