Reading Images
==============
-A video capture device may support the :ref:`read() function <rw>`
-and/or streaming (:ref:`memory mapping <mmap>` or
+A video capture device may support the ::ref:`read() function <func-read>`
+and/or streaming (:ref:`memory mapping <func-mmap>` or
:ref:`user pointer <userp>`) I/O. See :ref:`io` for details.
overlap, or when the driver supports multiple opens and another process
already requested VBI capturing or output. Anyway, applications must
expect other resource allocation points which may return ``EBUSY``, at the
-:ref:`VIDIOC_STREAMON` ioctl and the first read(),
-write() and select() call.
+:ref:`VIDIOC_STREAMON` ioctl and the first :ref:`read() <func-read>`
+, :ref:`write() <func-write>` and :ref:`select() <func-select>` calls.
VBI devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all requests
technicality, input devices still support only reading and output
devices only writing.
- When the ``O_NONBLOCK`` flag is given, the read() function and the
- :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will return the ``EAGAIN``
- error code when no data is available or no buffer is in the driver
- outgoing queue, otherwise these functions block until data becomes
- available. All V4L2 drivers exchanging data with applications must
- support the ``O_NONBLOCK`` flag.
+ When the ``O_NONBLOCK`` flag is given, the :ref:`read() <func-read>`
+ function and the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will
+ return the ``EAGAIN`` error code when no data is available or no
+ buffer is in the driver outgoing queue, otherwise these functions
+ block until data becomes available. All V4L2 drivers exchanging data
+ with applications must support the ``O_NONBLOCK`` flag.
Other flags have no effect.
'feature' was never used by applications and many drivers did not
support it and if they did it was certainly never tested. In addition,
switching a device node between different functions only works when
-using the streaming I/O API, not with the read()/write() API.
+using the streaming I/O API, not with the
+:ref:`read() <func-read>`/\ :ref:`write() <func-write>` API.
Today each device node supports just one function.