Commit 407e84cd authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

media: docs: make V4L documents more compatible with Sphinx 3.1+

Sphinx 3.x broke support for the cdomain.py extension, as the
c domain code was rewritten. Due to that, the c tags need to
be re-written, in order to use the new c domain notation.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 01fae02d
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _buffer: .. _buffer:
...@@ -33,7 +34,6 @@ mem-to-mem devices is an exception to the rule: the timestamp source ...@@ -33,7 +34,6 @@ mem-to-mem devices is an exception to the rule: the timestamp source
flags are copied from the OUTPUT video buffer to the CAPTURE video flags are copied from the OUTPUT video buffer to the CAPTURE video
buffer. buffer.
Interactions between formats, controls and buffers Interactions between formats, controls and buffers
================================================== ==================================================
...@@ -152,7 +152,6 @@ based on the queried sizes (for instance by allocating a set of buffers large ...@@ -152,7 +152,6 @@ based on the queried sizes (for instance by allocating a set of buffers large
enough for all the desired formats and controls, or by allocating separate set enough for all the desired formats and controls, or by allocating separate set
of appropriately sized buffers for each use case). of appropriately sized buffers for each use case).
.. c:type:: v4l2_buffer .. c:type:: v4l2_buffer
struct v4l2_buffer struct v4l2_buffer
...@@ -257,7 +256,7 @@ struct v4l2_buffer ...@@ -257,7 +256,7 @@ struct v4l2_buffer
``V4L2_MEMORY_MMAP`` this is the offset of the buffer from the ``V4L2_MEMORY_MMAP`` this is the offset of the buffer from the
start of the device memory. The value is returned by the driver start of the device memory. The value is returned by the driver
and apart of serving as parameter to the and apart of serving as parameter to the
:ref:`mmap() <func-mmap>` function not useful for applications. :c:func:`mmap()` function not useful for applications.
See :ref:`mmap` for details See :ref:`mmap` for details
* - unsigned long * - unsigned long
- ``userptr`` - ``userptr``
...@@ -310,7 +309,6 @@ struct v4l2_buffer ...@@ -310,7 +309,6 @@ struct v4l2_buffer
given, then ``EINVAL`` will be returned. given, then ``EINVAL`` will be returned.
.. c:type:: v4l2_plane .. c:type:: v4l2_plane
struct v4l2_plane struct v4l2_plane
...@@ -350,7 +348,7 @@ struct v4l2_plane ...@@ -350,7 +348,7 @@ struct v4l2_plane
- ``mem_offset`` - ``mem_offset``
- When the memory type in the containing struct - When the memory type in the containing struct
:c:type:`v4l2_buffer` is ``V4L2_MEMORY_MMAP``, this :c:type:`v4l2_buffer` is ``V4L2_MEMORY_MMAP``, this
is the value that should be passed to :ref:`mmap() <func-mmap>`, is the value that should be passed to :c:func:`mmap()`,
similar to the ``offset`` field in struct similar to the ``offset`` field in struct
:c:type:`v4l2_buffer`. :c:type:`v4l2_buffer`.
* - unsigned long * - unsigned long
...@@ -384,7 +382,6 @@ struct v4l2_plane ...@@ -384,7 +382,6 @@ struct v4l2_plane
applications. applications.
.. c:type:: v4l2_buf_type .. c:type:: v4l2_buf_type
enum v4l2_buf_type enum v4l2_buf_type
...@@ -448,7 +445,6 @@ enum v4l2_buf_type ...@@ -448,7 +445,6 @@ enum v4l2_buf_type
- Buffer for metadata output, see :ref:`metadata`. - Buffer for metadata output, see :ref:`metadata`.
.. _buffer-flags: .. _buffer-flags:
Buffer Flags Buffer Flags
...@@ -720,7 +716,6 @@ enum v4l2_memory ...@@ -720,7 +716,6 @@ enum v4l2_memory
- The buffer is used for :ref:`DMA shared buffer <dmabuf>` I/O. - The buffer is used for :ref:`DMA shared buffer <dmabuf>` I/O.
Timecodes Timecodes
========= =========
...@@ -729,7 +724,6 @@ The :c:type:`v4l2_buffer_timecode` structure is designed to hold a ...@@ -729,7 +724,6 @@ The :c:type:`v4l2_buffer_timecode` structure is designed to hold a
(struct :c:type:`timeval` timestamps are stored in the struct (struct :c:type:`timeval` timestamps are stored in the struct
:c:type:`v4l2_buffer` ``timestamp`` field.) :c:type:`v4l2_buffer` ``timestamp`` field.)
.. c:type:: v4l2_timecode .. c:type:: v4l2_timecode
struct v4l2_timecode struct v4l2_timecode
...@@ -766,7 +760,6 @@ struct v4l2_timecode ...@@ -766,7 +760,6 @@ struct v4l2_timecode
- The "user group" bits from the timecode. - The "user group" bits from the timecode.
.. _timecode-type: .. _timecode-type:
Timecode Types Timecode Types
...@@ -796,7 +789,6 @@ Timecode Types ...@@ -796,7 +789,6 @@ Timecode Types
- -
.. _timecode-flags: .. _timecode-flags:
Timecode Flags Timecode Flags
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _capture: .. _capture:
...@@ -19,7 +20,6 @@ device. ...@@ -19,7 +20,6 @@ device.
.. note:: The same device file names are used for video output devices. .. note:: The same device file names are used for video output devices.
Querying Capabilities Querying Capabilities
===================== =====================
...@@ -34,7 +34,6 @@ functions they may also support the :ref:`video overlay <overlay>` ...@@ -34,7 +34,6 @@ functions they may also support the :ref:`video overlay <overlay>`
streaming I/O methods must be supported. Tuners and audio inputs are streaming I/O methods must be supported. Tuners and audio inputs are
optional. optional.
Supplemental Functions Supplemental Functions
====================== ======================
...@@ -45,7 +44,6 @@ Video capture devices shall support :ref:`audio input <audio>`, ...@@ -45,7 +44,6 @@ Video capture devices shall support :ref:`audio input <audio>`,
:ref:`video input <video>` ioctls must be supported by all video :ref:`video input <video>` ioctls must be supported by all video
capture devices. capture devices.
Image Format Negotiation Image Format Negotiation
======================== ========================
...@@ -55,7 +53,7 @@ capture, the latter how images are stored in memory, i. e. in RGB or YUV ...@@ -55,7 +53,7 @@ capture, the latter how images are stored in memory, i. e. in RGB or YUV
format, the number of bits per pixel or width and height. Together they format, the number of bits per pixel or width and height. Together they
also define how images are scaled in the process. also define how images are scaled in the process.
As usual these parameters are *not* reset at :ref:`open() <func-open>` As usual these parameters are *not* reset at :c:func:`open()`
time to permit Unix tool chains, programming a device and then reading time to permit Unix tool chains, programming a device and then reading
from it as if it was a plain file. Well written V4L2 applications ensure from it as if it was a plain file. Well written V4L2 applications ensure
they really get what they want, including cropping and scaling. they really get what they want, including cropping and scaling.
...@@ -95,7 +93,6 @@ and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC ...@@ -95,7 +93,6 @@ and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC
requests and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does. requests and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does.
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional. :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional.
Reading Images Reading Images
============== ==============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _output: .. _output:
...@@ -18,7 +19,6 @@ device. ...@@ -18,7 +19,6 @@ device.
.. note:: The same device file names are used also for video capture devices. .. note:: The same device file names are used also for video capture devices.
Querying Capabilities Querying Capabilities
===================== =====================
...@@ -32,7 +32,6 @@ functions they may also support the :ref:`raw VBI output <raw-vbi>` ...@@ -32,7 +32,6 @@ functions they may also support the :ref:`raw VBI output <raw-vbi>`
streaming I/O methods must be supported. Modulators and audio outputs streaming I/O methods must be supported. Modulators and audio outputs
are optional. are optional.
Supplemental Functions Supplemental Functions
====================== ======================
...@@ -43,7 +42,6 @@ Video output devices shall support :ref:`audio output <audio>`, ...@@ -43,7 +42,6 @@ Video output devices shall support :ref:`audio output <audio>`,
:ref:`video output <video>` ioctls must be supported by all video :ref:`video output <video>` ioctls must be supported by all video
output devices. output devices.
Image Format Negotiation Image Format Negotiation
======================== ========================
...@@ -53,7 +51,7 @@ the latter how images are stored in memory, i. e. in RGB or YUV format, ...@@ -53,7 +51,7 @@ the latter how images are stored in memory, i. e. in RGB or YUV format,
the number of bits per pixel or width and height. Together they also the number of bits per pixel or width and height. Together they also
define how images are scaled in the process. define how images are scaled in the process.
As usual these parameters are *not* reset at :ref:`open() <func-open>` As usual these parameters are *not* reset at :c:func:`open()`
time to permit Unix tool chains, programming a device and then writing time to permit Unix tool chains, programming a device and then writing
to it as if it was a plain file. Well written V4L2 applications ensure to it as if it was a plain file. Well written V4L2 applications ensure
they really get what they want, including cropping and scaling. they really get what they want, including cropping and scaling.
...@@ -92,7 +90,6 @@ and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC ...@@ -92,7 +90,6 @@ and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC
requests and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does. requests and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does.
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional. :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is optional.
Writing Images Writing Images
============== ==============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _raw-vbi: .. _raw-vbi:
...@@ -32,7 +33,6 @@ applications must call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. ...@@ -32,7 +33,6 @@ applications must call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
Accessed as ``/dev/vbi``, raw VBI capturing or output is the default Accessed as ``/dev/vbi``, raw VBI capturing or output is the default
device function. device function.
Querying Capabilities Querying Capabilities
===================== =====================
...@@ -44,7 +44,6 @@ in the ``capabilities`` field of struct ...@@ -44,7 +44,6 @@ in the ``capabilities`` field of struct
read/write, streaming or asynchronous I/O methods must be supported. VBI read/write, streaming or asynchronous I/O methods must be supported. VBI
devices may or may not have a tuner or modulator. devices may or may not have a tuner or modulator.
Supplemental Functions Supplemental Functions
====================== ======================
...@@ -53,7 +52,6 @@ VBI devices shall support :ref:`video input or output <video>`, ...@@ -53,7 +52,6 @@ VBI devices shall support :ref:`video input or output <video>`,
ioctls as needed. The :ref:`video standard <standard>` ioctls provide ioctls as needed. The :ref:`video standard <standard>` ioctls provide
information vital to program a VBI device, therefore must be supported. information vital to program a VBI device, therefore must be supported.
Raw VBI Format Negotiation Raw VBI Format Negotiation
========================== ==========================
...@@ -62,7 +60,7 @@ frequency. To properly interpret the data V4L2 specifies an ioctl to ...@@ -62,7 +60,7 @@ frequency. To properly interpret the data V4L2 specifies an ioctl to
query the sampling parameters. Moreover, to allow for some flexibility query the sampling parameters. Moreover, to allow for some flexibility
applications can also suggest different parameters. applications can also suggest different parameters.
As usual these parameters are *not* reset at :ref:`open() <func-open>` As usual these parameters are *not* reset at :c:func:`open()`
time to permit Unix tool chains, programming a device and then reading time to permit Unix tool chains, programming a device and then reading
from it as if it was a plain file. Well written V4L2 applications should from it as if it was a plain file. Well written V4L2 applications should
always ensure they really get what they want, requesting reasonable always ensure they really get what they want, requesting reasonable
...@@ -91,8 +89,8 @@ happen for instance when the video and VBI areas to capture would ...@@ -91,8 +89,8 @@ happen for instance when the video and VBI areas to capture would
overlap, or when the driver supports multiple opens and another process overlap, or when the driver supports multiple opens and another process
already requested VBI capturing or output. Anyway, applications must already requested VBI capturing or output. Anyway, applications must
expect other resource allocation points which may return ``EBUSY``, at the expect other resource allocation points which may return ``EBUSY``, at the
:ref:`VIDIOC_STREAMON` ioctl and the first :ref:`read() <func-read>` :ref:`VIDIOC_STREAMON` ioctl and the first :c:func:`read()`
, :ref:`write() <func-write>` and :ref:`select() <func-select>` calls. , :c:func:`write()` and :c:func:`select()` calls.
VBI devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and 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 :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, even if :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ignores all requests
...@@ -182,7 +180,6 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does ...@@ -182,7 +180,6 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
- This array is reserved for future extensions. Drivers and - This array is reserved for future extensions. Drivers and
applications must set it to zero. applications must set it to zero.
.. tabularcolumns:: |p{4.4cm}|p{1.5cm}|p{11.6cm}| .. tabularcolumns:: |p{4.4cm}|p{1.5cm}|p{11.6cm}|
.. _vbifmt-flags: .. _vbifmt-flags:
...@@ -218,7 +215,6 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does ...@@ -218,7 +215,6 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
non-zero. non-zero.
.. _vbi-hsync: .. _vbi-hsync:
.. kernel-figure:: vbi_hsync.svg .. kernel-figure:: vbi_hsync.svg
...@@ -227,7 +223,6 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does ...@@ -227,7 +223,6 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
**Figure 4.1. Line synchronization** **Figure 4.1. Line synchronization**
.. _vbi-525: .. _vbi-525:
.. kernel-figure:: vbi_525.svg .. kernel-figure:: vbi_525.svg
...@@ -251,7 +246,6 @@ negotiation, or after switching the video standard which may invalidate ...@@ -251,7 +246,6 @@ negotiation, or after switching the video standard which may invalidate
the negotiated VBI parameters, should be refused by the driver. A format the negotiated VBI parameters, should be refused by the driver. A format
change during active I/O is not permitted. change during active I/O is not permitted.
Reading and writing VBI images Reading and writing VBI images
============================== ==============================
...@@ -261,7 +255,6 @@ consisting of two fields of VBI images immediately following in memory. ...@@ -261,7 +255,6 @@ consisting of two fields of VBI images immediately following in memory.
The total size of a frame computes as follows: The total size of a frame computes as follows:
.. code-block:: c .. code-block:: c
(count[0] + count[1]) * samples_per_line * sample size in bytes (count[0] + count[1]) * samples_per_line * sample size in bytes
...@@ -276,8 +269,8 @@ The latter bears the possibility of synchronizing video and VBI data by ...@@ -276,8 +269,8 @@ The latter bears the possibility of synchronizing video and VBI data by
using buffer timestamps. using buffer timestamps.
Remember the :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` ioctl and the Remember the :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` ioctl and the
first :ref:`read() <func-read>`, :ref:`write() <func-write>` and first :c:func:`read()`, :c:func:`write()` and
:ref:`select() <func-select>` call can be resource allocation :c:func:`select()` call can be resource allocation
points returning an ``EBUSY`` error code if the required hardware resources points returning an ``EBUSY`` error code if the required hardware resources
are temporarily unavailable, for example the device is already in use by are temporarily unavailable, for example the device is already in use by
another process. another process.
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _rds: .. _rds:
...@@ -28,7 +29,6 @@ The RDS interface does not support this format. Should support for MMBS ...@@ -28,7 +29,6 @@ The RDS interface does not support this format. Should support for MMBS
the linux-media mailing list: the linux-media mailing list:
`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__. `https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__.
Querying Capabilities Querying Capabilities
===================== =====================
...@@ -68,31 +68,27 @@ like program identification codes and radio text, the flag ...@@ -68,31 +68,27 @@ like program identification codes and radio text, the flag
:ref:`Writing RDS data <writing-rds-data>` and :ref:`Writing RDS data <writing-rds-data>` and
:ref:`FM Transmitter Control Reference <fm-tx-controls>`. :ref:`FM Transmitter Control Reference <fm-tx-controls>`.
.. _reading-rds-data: .. _reading-rds-data:
Reading RDS data Reading RDS data
================ ================
RDS data can be read from the radio device with the RDS data can be read from the radio device with the
:ref:`read() <func-read>` function. The data is packed in groups of :c:func:`read()` function. The data is packed in groups of
three bytes. three bytes.
.. _writing-rds-data: .. _writing-rds-data:
Writing RDS data Writing RDS data
================ ================
RDS data can be written to the radio device with the RDS data can be written to the radio device with the
:ref:`write() <func-write>` function. The data is packed in groups of :c:func:`write()` function. The data is packed in groups of
three bytes, as follows: three bytes, as follows:
RDS datastructures RDS datastructures
================== ==================
.. c:type:: v4l2_rds_data .. c:type:: v4l2_rds_data
.. tabularcolumns:: |p{2.5cm}|p{2.5cm}|p{12.5cm}| .. tabularcolumns:: |p{2.5cm}|p{2.5cm}|p{12.5cm}|
...@@ -113,7 +109,6 @@ RDS datastructures ...@@ -113,7 +109,6 @@ RDS datastructures
- Block description - Block description
.. _v4l2-rds-block: .. _v4l2-rds-block:
.. tabularcolumns:: |p{2.9cm}|p{14.6cm}| .. tabularcolumns:: |p{2.9cm}|p{14.6cm}|
...@@ -136,7 +131,6 @@ RDS datastructures ...@@ -136,7 +131,6 @@ RDS datastructures
reception of this block. reception of this block.
.. _v4l2-rds-block-codes: .. _v4l2-rds-block-codes:
.. tabularcolumns:: |p{6.4cm}|p{2.0cm}|p{1.2cm}|p{7.9cm}| .. tabularcolumns:: |p{6.4cm}|p{2.0cm}|p{1.2cm}|p{7.9cm}|
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _sliced: .. _sliced:
...@@ -27,7 +28,6 @@ however the default function here is video capturing or output. ...@@ -27,7 +28,6 @@ however the default function here is video capturing or output.
Different file descriptors must be used to pass raw and sliced VBI data Different file descriptors must be used to pass raw and sliced VBI data
simultaneously, if this is supported by the driver. simultaneously, if this is supported by the driver.
Querying Capabilities Querying Capabilities
===================== =====================
...@@ -39,7 +39,6 @@ respectively, in the ``capabilities`` field of struct ...@@ -39,7 +39,6 @@ respectively, in the ``capabilities`` field of struct
read/write, streaming or asynchronous :ref:`I/O methods <io>` must be read/write, streaming or asynchronous :ref:`I/O methods <io>` must be
supported. Sliced VBI devices may have a tuner or modulator. supported. Sliced VBI devices may have a tuner or modulator.
Supplemental Functions Supplemental Functions
====================== ======================
...@@ -49,7 +48,6 @@ capabilities, and they may support :ref:`control` ioctls. ...@@ -49,7 +48,6 @@ capabilities, and they may support :ref:`control` ioctls.
The :ref:`video standard <standard>` ioctls provide information vital The :ref:`video standard <standard>` ioctls provide information vital
to program a sliced VBI device, therefore must be supported. to program a sliced VBI device, therefore must be supported.
.. _sliced-vbi-format-negotitation: .. _sliced-vbi-format-negotitation:
Sliced VBI Format Negotiation Sliced VBI Format Negotiation
...@@ -96,9 +94,8 @@ at this point, it may return an ``EBUSY`` error code if the required ...@@ -96,9 +94,8 @@ at this point, it may return an ``EBUSY`` error code if the required
resources are temporarily unavailable. Other resource allocation points resources are temporarily unavailable. Other resource allocation points
which may return ``EBUSY`` can be the which may return ``EBUSY`` can be the
:ref:`VIDIOC_STREAMON` ioctl and the first :ref:`VIDIOC_STREAMON` ioctl and the first
:ref:`read() <func-read>`, :ref:`write() <func-write>` and :c:func:`read()`, :c:func:`write()` and
:ref:`select() <func-select>` call. :c:func:`select()` call.
.. c:type:: v4l2_sliced_vbi_format .. c:type:: v4l2_sliced_vbi_format
...@@ -191,7 +188,7 @@ struct v4l2_sliced_vbi_format ...@@ -191,7 +188,7 @@ struct v4l2_sliced_vbi_format
* - __u32 * - __u32
- ``io_size`` - ``io_size``
- :cspan:`2` Maximum number of bytes passed by one - :cspan:`2` Maximum number of bytes passed by one
:ref:`read() <func-read>` or :ref:`write() <func-write>` call, :c:func:`read()` or :c:func:`write()` call,
and the buffer size in bytes for the and the buffer size in bytes for the
:ref:`VIDIOC_QBUF` and :ref:`VIDIOC_QBUF` and
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. Drivers set this field
...@@ -274,7 +271,6 @@ Sliced VBI services ...@@ -274,7 +271,6 @@ Sliced VBI services
\normalsize \normalsize
Drivers may return an ``EINVAL`` error code when applications attempt to Drivers may return an ``EINVAL`` error code when applications attempt to
read or write data without prior format negotiation, after switching the read or write data without prior format negotiation, after switching the
video standard (which may invalidate the negotiated VBI parameters) and video standard (which may invalidate the negotiated VBI parameters) and
...@@ -284,13 +280,12 @@ return an ``EBUSY`` error code when applications attempt to change the ...@@ -284,13 +280,12 @@ return an ``EBUSY`` error code when applications attempt to change the
format while i/o is in progress (between a format while i/o is in progress (between a
:ref:`VIDIOC_STREAMON` and :ref:`VIDIOC_STREAMON` and
:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` call, and after the first :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` call, and after the first
:ref:`read() <func-read>` or :ref:`write() <func-write>` call). :c:func:`read()` or :c:func:`write()` call).
Reading and writing sliced VBI data Reading and writing sliced VBI data
=================================== ===================================
A single :ref:`read() <func-read>` or :ref:`write() <func-write>` A single :c:func:`read()` or :c:func:`write()`
call must pass all data belonging to one video frame. That is an array call must pass all data belonging to one video frame. That is an array
of struct :c:type:`v4l2_sliced_vbi_data` structures with one or of struct :c:type:`v4l2_sliced_vbi_data` structures with one or
more elements and a total size not exceeding ``io_size`` bytes. Likewise more elements and a total size not exceeding ``io_size`` bytes. Likewise
...@@ -298,7 +293,6 @@ in streaming I/O mode one buffer of ``io_size`` bytes must contain data ...@@ -298,7 +293,6 @@ in streaming I/O mode one buffer of ``io_size`` bytes must contain data
of one video frame. The ``id`` of unused of one video frame. The ``id`` of unused
struct :c:type:`v4l2_sliced_vbi_data` elements must be zero. struct :c:type:`v4l2_sliced_vbi_data` elements must be zero.
.. c:type:: v4l2_sliced_vbi_data .. c:type:: v4l2_sliced_vbi_data
struct v4l2_sliced_vbi_data struct v4l2_sliced_vbi_data
...@@ -344,9 +338,8 @@ struct v4l2_sliced_vbi_data ...@@ -344,9 +338,8 @@ struct v4l2_sliced_vbi_data
bytes at the end of this array are undefined, drivers and bytes at the end of this array are undefined, drivers and
applications shall ignore them. applications shall ignore them.
Packets are always passed in ascending line number order, without Packets are always passed in ascending line number order, without
duplicate line numbers. The :ref:`write() <func-write>` function and duplicate line numbers. The :c:func:`write()` function and
the :ref:`VIDIOC_QBUF` ioctl must return an ``EINVAL`` the :ref:`VIDIOC_QBUF` ioctl must return an ``EINVAL``
error code when applications violate this rule. They must also return an error code when applications violate this rule. They must also return an
EINVAL error code when applications pass an incorrect field or line EINVAL error code when applications pass an incorrect field or line
...@@ -370,7 +363,6 @@ streaming (:ref:`memory mapping <mmap>` and/or ...@@ -370,7 +363,6 @@ streaming (:ref:`memory mapping <mmap>` and/or
:ref:`user pointer <userp>`) I/O. The latter bears the possibility of :ref:`user pointer <userp>`) I/O. The latter bears the possibility of
synchronizing video and VBI data by using buffer timestamps. synchronizing video and VBI data by using buffer timestamps.
Sliced VBI Data in MPEG Streams Sliced VBI Data in MPEG Streams
=============================== ===============================
...@@ -405,7 +397,6 @@ data insertion is not supported by the device. ...@@ -405,7 +397,6 @@ data insertion is not supported by the device.
The following subsections specify the format of the embedded sliced VBI The following subsections specify the format of the embedded sliced VBI
data. data.
MPEG Stream Embedded, Sliced VBI Data Format: NONE MPEG Stream Embedded, Sliced VBI Data Format: NONE
-------------------------------------------------- --------------------------------------------------
...@@ -417,7 +408,6 @@ nor driver shall insert "empty" embedded sliced VBI data packets in the ...@@ -417,7 +408,6 @@ nor driver shall insert "empty" embedded sliced VBI data packets in the
MPEG stream when this format is set. No MPEG stream data structures are MPEG stream when this format is set. No MPEG stream data structures are
specified for this format. specified for this format.
MPEG Stream Embedded, Sliced VBI Data Format: IVTV MPEG Stream Embedded, Sliced VBI Data Format: IVTV
-------------------------------------------------- --------------------------------------------------
...@@ -460,7 +450,6 @@ the end with unspecified fill bytes to align the end of the payload to a ...@@ -460,7 +450,6 @@ the end with unspecified fill bytes to align the end of the payload to a
with 18 lines/field with 43 bytes of data/line and a 4 byte magic with 18 lines/field with 43 bytes of data/line and a 4 byte magic
number). number).
.. c:type:: v4l2_mpeg_vbi_fmt_ivtv .. c:type:: v4l2_mpeg_vbi_fmt_ivtv
struct v4l2_mpeg_vbi_fmt_ivtv struct v4l2_mpeg_vbi_fmt_ivtv
...@@ -523,7 +512,6 @@ Magic Constants for struct v4l2_mpeg_vbi_fmt_ivtv magic field ...@@ -523,7 +512,6 @@ Magic Constants for struct v4l2_mpeg_vbi_fmt_ivtv magic field
valid and that 36 lines of sliced VBI data are present. valid and that 36 lines of sliced VBI data are present.
.. c:type:: v4l2_mpeg_vbi_itv0 .. c:type:: v4l2_mpeg_vbi_itv0
.. c:type:: v4l2_mpeg_vbi_ITV0 .. c:type:: v4l2_mpeg_vbi_ITV0
...@@ -548,7 +536,6 @@ structs v4l2_mpeg_vbi_itv0 and v4l2_mpeg_vbi_ITV0 ...@@ -548,7 +536,6 @@ structs v4l2_mpeg_vbi_itv0 and v4l2_mpeg_vbi_ITV0
value: value:
:: ::
linemask[0] b0: line 6 first field linemask[0] b0: line 6 first field
...@@ -574,7 +561,6 @@ structs v4l2_mpeg_vbi_itv0 and v4l2_mpeg_vbi_ITV0 ...@@ -574,7 +561,6 @@ structs v4l2_mpeg_vbi_itv0 and v4l2_mpeg_vbi_ITV0
applications. applications.
.. _v4l2-mpeg-vbi-itv0-1: .. _v4l2-mpeg-vbi-itv0-1:
struct v4l2_mpeg_vbi_ITV0 struct v4l2_mpeg_vbi_ITV0
...@@ -596,7 +582,6 @@ struct v4l2_mpeg_vbi_ITV0 ...@@ -596,7 +582,6 @@ struct v4l2_mpeg_vbi_ITV0
lines 6 through 23 of the second field. lines 6 through 23 of the second field.
.. c:type:: v4l2_mpeg_vbi_itv0_line .. c:type:: v4l2_mpeg_vbi_itv0_line
struct v4l2_mpeg_vbi_itv0_line struct v4l2_mpeg_vbi_itv0_line
...@@ -619,7 +604,6 @@ struct v4l2_mpeg_vbi_itv0_line ...@@ -619,7 +604,6 @@ struct v4l2_mpeg_vbi_itv0_line
- The sliced VBI data for the line. - The sliced VBI data for the line.
.. _ITV0-Line-Identifier-Constants: .. _ITV0-Line-Identifier-Constants:
Line Identifiers for struct v4l2_mpeg_vbi_itv0_line id field Line Identifiers for struct v4l2_mpeg_vbi_itv0_line id field
...@@ -653,7 +637,6 @@ Line Identifiers for struct v4l2_mpeg_vbi_itv0_line id field ...@@ -653,7 +637,6 @@ Line Identifiers for struct v4l2_mpeg_vbi_itv0_line id field
description of the line payload. description of the line payload.
.. [#f1] .. [#f1]
According to :ref:`ETS 300 706 <ets300706>` lines 6-22 of the first According to :ref:`ETS 300 706 <ets300706>` lines 6-22 of the first
field and lines 5-22 of the second field may carry Teletext data. field and lines 5-22 of the second field may carry Teletext data.
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _diff-v4l: .. _diff-v4l:
...@@ -13,7 +14,6 @@ the much improved V4L2 API replaces the V4L API. The support for the old ...@@ -13,7 +14,6 @@ the much improved V4L2 API replaces the V4L API. The support for the old
V4L calls were removed from Kernel, but the library :ref:`libv4l` V4L calls were removed from Kernel, but the library :ref:`libv4l`
supports the conversion of a V4L API system call into a V4L2 one. supports the conversion of a V4L API system call into a V4L2 one.
Opening and Closing Devices Opening and Closing Devices
=========================== ===========================
...@@ -32,7 +32,6 @@ recommend that V4L2 drivers by default register devices with the same ...@@ -32,7 +32,6 @@ recommend that V4L2 drivers by default register devices with the same
numbers, but the system administrator can assign arbitrary minor numbers numbers, but the system administrator can assign arbitrary minor numbers
using driver module options. The major device number remains 81. using driver module options. The major device number remains 81.
.. _v4l-dev: .. _v4l-dev:
.. flat-table:: V4L Device Types, Names and Numbers .. flat-table:: V4L Device Types, Names and Numbers
...@@ -53,14 +52,12 @@ using driver module options. The major device number remains 81. ...@@ -53,14 +52,12 @@ using driver module options. The major device number remains 81.
- ``/dev/vbi``, ``/dev/vbi0`` to ``/dev/vbi31`` - ``/dev/vbi``, ``/dev/vbi0`` to ``/dev/vbi31``
- 224-255 - 224-255
V4L prohibits (or used to prohibit) multiple opens of a device file. V4L prohibits (or used to prohibit) multiple opens of a device file.
V4L2 drivers *may* support multiple opens, see :ref:`open` for details V4L2 drivers *may* support multiple opens, see :ref:`open` for details
and consequences. and consequences.
V4L drivers respond to V4L2 ioctls with an ``EINVAL`` error code. V4L drivers respond to V4L2 ioctls with an ``EINVAL`` error code.
Querying Capabilities Querying Capabilities
===================== =====================
...@@ -151,7 +148,6 @@ introduction. ...@@ -151,7 +148,6 @@ introduction.
- ``-`` - ``-``
- See above. - See above.
The ``audios`` field was replaced by ``capabilities`` flag The ``audios`` field was replaced by ``capabilities`` flag
``V4L2_CAP_AUDIO``, indicating *if* the device has any audio inputs or ``V4L2_CAP_AUDIO``, indicating *if* the device has any audio inputs or
outputs. To determine their number applications can enumerate audio outputs. To determine their number applications can enumerate audio
...@@ -164,7 +160,6 @@ were removed. Calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or ...@@ -164,7 +160,6 @@ were removed. Calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
dimensions returns the closest size possible, taking into account the dimensions returns the closest size possible, taking into account the
current video standard, cropping and scaling limitations. current video standard, cropping and scaling limitations.
Video Sources Video Sources
============= =============
...@@ -180,7 +175,6 @@ The ``channel`` field counting inputs was renamed to ``index``, the ...@@ -180,7 +175,6 @@ The ``channel`` field counting inputs was renamed to ``index``, the
video input types were renamed as follows: video input types were renamed as follows:
.. flat-table:: .. flat-table::
:header-rows: 1 :header-rows: 1
:stub-columns: 0 :stub-columns: 0
...@@ -192,7 +186,6 @@ video input types were renamed as follows: ...@@ -192,7 +186,6 @@ video input types were renamed as follows:
* - ``VIDEO_TYPE_CAMERA`` * - ``VIDEO_TYPE_CAMERA``
- ``V4L2_INPUT_TYPE_CAMERA`` - ``V4L2_INPUT_TYPE_CAMERA``
Unlike the ``tuners`` field expressing the number of tuners of this Unlike the ``tuners`` field expressing the number of tuners of this
input, V4L2 assumes each video input is connected to at most one tuner. input, V4L2 assumes each video input is connected to at most one tuner.
However a tuner can have more than one input, i. e. RF connectors, and a However a tuner can have more than one input, i. e. RF connectors, and a
...@@ -216,7 +209,6 @@ addition together with the ``norm`` field and has been removed in the ...@@ -216,7 +209,6 @@ addition together with the ``norm`` field and has been removed in the
meantime. V4L2 has a similar, albeit more comprehensive approach to meantime. V4L2 has a similar, albeit more comprehensive approach to
video standards, see :ref:`standard` for more information. video standards, see :ref:`standard` for more information.
Tuning Tuning
====== ======
...@@ -260,7 +252,6 @@ frequency where renamed to ...@@ -260,7 +252,6 @@ frequency where renamed to
to a struct :c:type:`v4l2_frequency` instead of an to a struct :c:type:`v4l2_frequency` instead of an
unsigned long integer. unsigned long integer.
.. _v4l-image-properties: .. _v4l-image-properties:
Image Properties Image Properties
...@@ -274,7 +265,6 @@ replaced by V4L2 controls accessible with the ...@@ -274,7 +265,6 @@ replaced by V4L2 controls accessible with the
:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls: :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls:
.. flat-table:: .. flat-table::
:header-rows: 1 :header-rows: 1
:stub-columns: 0 :stub-columns: 0
...@@ -292,7 +282,6 @@ replaced by V4L2 controls accessible with the ...@@ -292,7 +282,6 @@ replaced by V4L2 controls accessible with the
* - ``whiteness`` * - ``whiteness``
- ``V4L2_CID_WHITENESS`` - ``V4L2_CID_WHITENESS``
The V4L picture controls are assumed to range from 0 to 65535 with no The V4L picture controls are assumed to range from 0 to 65535 with no
particular reset value. The V4L2 API permits arbitrary limits and particular reset value. The V4L2 API permits arbitrary limits and
defaults which can be queried with the defaults which can be queried with the
...@@ -306,7 +295,6 @@ of the image depth and others need not know. The ``palette`` field moved ...@@ -306,7 +295,6 @@ of the image depth and others need not know. The ``palette`` field moved
into the struct :c:type:`v4l2_pix_format`: into the struct :c:type:`v4l2_pix_format`:
.. flat-table:: .. flat-table::
:header-rows: 1 :header-rows: 1
:stub-columns: 0 :stub-columns: 0
...@@ -346,11 +334,9 @@ into the struct :c:type:`v4l2_pix_format`: ...@@ -346,11 +334,9 @@ into the struct :c:type:`v4l2_pix_format`:
* - ``VIDEO_PALETTE_YUV410P`` * - ``VIDEO_PALETTE_YUV410P``
- :ref:`V4L2_PIX_FMT_YVU410 <V4L2-PIX-FMT-YVU410>` - :ref:`V4L2_PIX_FMT_YVU410 <V4L2-PIX-FMT-YVU410>`
V4L2 image formats are defined in :ref:`pixfmt`. The image format can V4L2 image formats are defined in :ref:`pixfmt`. The image format can
be selected with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. be selected with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
Audio Audio
===== =====
...@@ -384,7 +370,6 @@ The following fields where replaced by V4L2 controls accessible with the ...@@ -384,7 +370,6 @@ The following fields where replaced by V4L2 controls accessible with the
:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls: :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctls:
.. flat-table:: .. flat-table::
:header-rows: 1 :header-rows: 1
:stub-columns: 0 :stub-columns: 0
...@@ -400,7 +385,6 @@ The following fields where replaced by V4L2 controls accessible with the ...@@ -400,7 +385,6 @@ The following fields where replaced by V4L2 controls accessible with the
* - ``balance`` * - ``balance``
- ``V4L2_CID_AUDIO_BALANCE`` - ``V4L2_CID_AUDIO_BALANCE``
To determine which of these controls are supported by a driver V4L To determine which of these controls are supported by a driver V4L
provides the ``flags`` ``VIDEO_AUDIO_VOLUME``, ``VIDEO_AUDIO_BASS``, provides the ``flags`` ``VIDEO_AUDIO_VOLUME``, ``VIDEO_AUDIO_BASS``,
``VIDEO_AUDIO_TREBLE`` and ``VIDEO_AUDIO_BALANCE``. In the V4L2 API the ``VIDEO_AUDIO_TREBLE`` and ``VIDEO_AUDIO_BALANCE``. In the V4L2 API the
...@@ -416,7 +400,6 @@ V4L2 API permits arbitrary limits and defaults which can be queried with ...@@ -416,7 +400,6 @@ V4L2 API permits arbitrary limits and defaults which can be queried with
the :ref:`VIDIOC_QUERYCTRL` ioctl. For general the :ref:`VIDIOC_QUERYCTRL` ioctl. For general
information about controls see :ref:`control`. information about controls see :ref:`control`.
Frame Buffer Overlay Frame Buffer Overlay
==================== ====================
...@@ -463,7 +446,6 @@ size is determined by ``w.width`` and ``w.height``. ...@@ -463,7 +446,6 @@ size is determined by ``w.width`` and ``w.height``.
The ``VIDIOCCAPTURE`` ioctl to enable or disable overlay was renamed to The ``VIDIOCCAPTURE`` ioctl to enable or disable overlay was renamed to
:ref:`VIDIOC_OVERLAY`. :ref:`VIDIOC_OVERLAY`.
Cropping Cropping
======== ========
...@@ -490,21 +472,19 @@ struct :c:type:`v4l2_window`. These structures are used to ...@@ -490,21 +472,19 @@ struct :c:type:`v4l2_window`. These structures are used to
select a capture or overlay format with the select a capture or overlay format with the
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
Reading Images, Memory Mapping Reading Images, Memory Mapping
============================== ==============================
Capturing using the read method Capturing using the read method
------------------------------- -------------------------------
There is no essential difference between reading images from a V4L or There is no essential difference between reading images from a V4L or
V4L2 device using the :ref:`read() <func-read>` function, however V4L2 V4L2 device using the :c:func:`read()` function, however V4L2
drivers are not required to support this I/O method. Applications can drivers are not required to support this I/O method. Applications can
determine if the function is available with the determine if the function is available with the
:ref:`VIDIOC_QUERYCAP` ioctl. All V4L2 devices :ref:`VIDIOC_QUERYCAP` ioctl. All V4L2 devices
exchanging data with applications must support the exchanging data with applications must support the
:ref:`select() <func-select>` and :ref:`poll() <func-poll>` :c:func:`select()` and :c:func:`poll()`
functions. functions.
To select an image format and size, V4L provides the ``VIDIOCSPICT`` and To select an image format and size, V4L provides the ``VIDIOCSPICT`` and
...@@ -517,7 +497,6 @@ negotiation ioctls :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and ...@@ -517,7 +497,6 @@ negotiation ioctls :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
For more information about the V4L2 read interface see :ref:`rw`. For more information about the V4L2 read interface see :ref:`rw`.
Capturing using memory mapping Capturing using memory mapping
------------------------------ ------------------------------
...@@ -528,7 +507,6 @@ read method. V4L2 supports memory mapping as well, with a few ...@@ -528,7 +507,6 @@ read method. V4L2 supports memory mapping as well, with a few
differences. differences.
.. flat-table:: .. flat-table::
:header-rows: 1 :header-rows: 1
:stub-columns: 0 :stub-columns: 0
...@@ -550,7 +528,7 @@ differences. ...@@ -550,7 +528,7 @@ differences.
``VIDIOCGMBUF`` ioctl is available to query the number of buffers, ``VIDIOCGMBUF`` ioctl is available to query the number of buffers,
the offset of each buffer from the start of the virtual file, and the offset of each buffer from the start of the virtual file, and
the overall amount of memory used, which can be used as arguments the overall amount of memory used, which can be used as arguments
for the :ref:`mmap() <func-mmap>` function. for the :c:func:`mmap()` function.
- Buffers are individually mapped. The offset and size of each - Buffers are individually mapped. The offset and size of each
buffer can be determined with the buffer can be determined with the
:ref:`VIDIOC_QUERYBUF` ioctl. :ref:`VIDIOC_QUERYBUF` ioctl.
...@@ -568,7 +546,7 @@ differences. ...@@ -568,7 +546,7 @@ differences.
the incoming queue. Filled buffers are dequeued from the outgoing the incoming queue. Filled buffers are dequeued from the outgoing
queue with the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. To wait queue with the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. To wait
until filled buffers become available this function, until filled buffers become available this function,
:ref:`select() <func-select>` or :ref:`poll() <func-poll>` can :c:func:`select()` or :c:func:`poll()` can
be used. The :ref:`VIDIOC_STREAMON` ioctl be used. The :ref:`VIDIOC_STREAMON` ioctl
must be called once after enqueuing one or more buffers to start must be called once after enqueuing one or more buffers to start
capturing. Its counterpart capturing. Its counterpart
...@@ -577,11 +555,9 @@ differences. ...@@ -577,11 +555,9 @@ differences.
signal status, if known, with the signal status, if known, with the
:ref:`VIDIOC_ENUMINPUT` ioctl. :ref:`VIDIOC_ENUMINPUT` ioctl.
For a more in-depth discussion of memory mapping and examples, see For a more in-depth discussion of memory mapping and examples, see
:ref:`mmap`. :ref:`mmap`.
Reading Raw VBI Data Reading Raw VBI Data
==================== ====================
...@@ -592,7 +568,6 @@ the V4L VBI interface. Reading from the device yields a raw VBI image ...@@ -592,7 +568,6 @@ the V4L VBI interface. Reading from the device yields a raw VBI image
with the following parameters: with the following parameters:
.. flat-table:: .. flat-table::
:header-rows: 1 :header-rows: 1
:stub-columns: 0 :stub-columns: 0
...@@ -616,7 +591,6 @@ with the following parameters: ...@@ -616,7 +591,6 @@ with the following parameters:
* - flags * - flags
- 0 - 0
Undocumented in the V4L specification, in Linux 2.3 the Undocumented in the V4L specification, in Linux 2.3 the
``VIDIOCGVBIFMT`` and ``VIDIOCSVBIFMT`` ioctls using struct ``VIDIOCGVBIFMT`` and ``VIDIOCSVBIFMT`` ioctls using struct
``vbi_format`` were added to determine the VBI image ``vbi_format`` were added to determine the VBI image
...@@ -630,11 +604,10 @@ remaining fields are probably equivalent to struct ...@@ -630,11 +604,10 @@ remaining fields are probably equivalent to struct
Apparently only the Zoran (ZR 36120) driver implements these ioctls. The Apparently only the Zoran (ZR 36120) driver implements these ioctls. The
semantics differ from those specified for V4L2 in two ways. The semantics differ from those specified for V4L2 in two ways. The
parameters are reset on :ref:`open() <func-open>` and parameters are reset on :c:func:`open()` and
``VIDIOCSVBIFMT`` always returns an ``EINVAL`` error code if the parameters ``VIDIOCSVBIFMT`` always returns an ``EINVAL`` error code if the parameters
are invalid. are invalid.
Miscellaneous Miscellaneous
============= =============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _dmabuf: .. _dmabuf:
...@@ -36,7 +37,6 @@ are passed in struct :c:type:`v4l2_buffer` (or in struct ...@@ -36,7 +37,6 @@ are passed in struct :c:type:`v4l2_buffer` (or in struct
driver must be switched into DMABUF I/O mode by calling the driver must be switched into DMABUF I/O mode by calling the
:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` with the desired buffer type. :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` with the desired buffer type.
Example: Initiating streaming I/O with DMABUF file descriptors Example: Initiating streaming I/O with DMABUF file descriptors
============================================================== ==============================================================
...@@ -135,10 +135,10 @@ buffers it must wait until an empty buffer can be dequeued and reused. ...@@ -135,10 +135,10 @@ buffers it must wait until an empty buffer can be dequeued and reused.
Two methods exist to suspend execution of the application until one or Two methods exist to suspend execution of the application until one or
more buffers can be dequeued. By default :ref:`VIDIOC_DQBUF more buffers can be dequeued. By default :ref:`VIDIOC_DQBUF
<VIDIOC_QBUF>` blocks when no buffer is in the outgoing queue. When the <VIDIOC_QBUF>` blocks when no buffer is in the outgoing queue. When the
``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>` function, ``O_NONBLOCK`` flag was given to the :c:func:`open()` function,
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN`` :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN``
error code when no buffer is available. The error code when no buffer is available. The
:ref:`select() <func-select>` and :ref:`poll() <func-poll>` :c:func:`select()` and :c:func:`poll()`
functions are always available. functions are always available.
To start and stop capturing or displaying applications call the To start and stop capturing or displaying applications call the
...@@ -158,5 +158,5 @@ Drivers implementing DMABUF importing I/O must support the ...@@ -158,5 +158,5 @@ Drivers implementing DMABUF importing I/O must support the
:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`, :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`, :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`,
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_STREAMON :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_STREAMON
<VIDIOC_STREAMON>` and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, <VIDIOC_STREAMON>` and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls,
and the :ref:`select() <func-select>` and :ref:`poll() <func-poll>` and the :c:func:`select()` and :c:func:`poll()`
functions. functions.
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _format: .. _format:
...@@ -6,7 +7,6 @@ ...@@ -6,7 +7,6 @@
Data Formats Data Formats
************ ************
Data Format Negotiation Data Format Negotiation
======================= =======================
...@@ -53,8 +53,8 @@ image size. ...@@ -53,8 +53,8 @@ image size.
When applications omit the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl its locking side When applications omit the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl its locking side
effects are implied by the next step, the selection of an I/O method effects are implied by the next step, the selection of an I/O method
with the :ref:`VIDIOC_REQBUFS` ioctl or implicit with the :ref:`VIDIOC_REQBUFS` ioctl or implicit
with the first :ref:`read() <func-read>` or with the first :c:func:`read()` or
:ref:`write() <func-write>` call. :c:func:`write()` call.
Generally only one logical stream can be assigned to a file descriptor, Generally only one logical stream can be assigned to a file descriptor,
the exception being drivers permitting simultaneous video capturing and the exception being drivers permitting simultaneous video capturing and
...@@ -67,7 +67,6 @@ All drivers exchanging data with applications must support the ...@@ -67,7 +67,6 @@ All drivers exchanging data with applications must support the
:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. Implementation of the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. Implementation of the
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is highly recommended but optional. :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` is highly recommended but optional.
Image Format Enumeration Image Format Enumeration
======================== ========================
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _func-close: .. _func-close:
...@@ -11,7 +12,6 @@ Name ...@@ -11,7 +12,6 @@ Name
v4l2-close - Close a V4L2 device v4l2-close - Close a V4L2 device
Synopsis Synopsis
======== ========
...@@ -19,16 +19,13 @@ Synopsis ...@@ -19,16 +19,13 @@ Synopsis
#include <unistd.h> #include <unistd.h>
.. c:function:: int close( int fd ) .. c:function:: int close( int fd )
:name: v4l2-close
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
Description Description
=========== ===========
...@@ -38,7 +35,6 @@ associated with the file descriptor are freed. However data format ...@@ -38,7 +35,6 @@ associated with the file descriptor are freed. However data format
parameters, current input or output, control values or other properties parameters, current input or output, control values or other properties
remain unchanged. remain unchanged.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _func-ioctl: .. _func-ioctl:
...@@ -11,7 +12,6 @@ Name ...@@ -11,7 +12,6 @@ Name
v4l2-ioctl - Program a V4L2 device v4l2-ioctl - Program a V4L2 device
Synopsis Synopsis
======== ========
...@@ -19,15 +19,13 @@ Synopsis ...@@ -19,15 +19,13 @@ Synopsis
#include <sys/ioctl.h> #include <sys/ioctl.h>
``int ioctl(int fd, int request, void *argp)``
.. c:function:: int ioctl( int fd, int request, void *argp )
:name: v4l2-ioctl
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``request`` ``request``
V4L2 ioctl request code as defined in the ``videodev2.h`` header V4L2 ioctl request code as defined in the ``videodev2.h`` header
...@@ -36,7 +34,6 @@ Arguments ...@@ -36,7 +34,6 @@ Arguments
``argp`` ``argp``
Pointer to a function parameter, usually a structure. Pointer to a function parameter, usually a structure.
Description Description
=========== ===========
...@@ -50,7 +47,6 @@ include the version in the kernel sources on the system they compile on. ...@@ -50,7 +47,6 @@ include the version in the kernel sources on the system they compile on.
All V4L2 ioctl requests, their respective function and parameters are All V4L2 ioctl requests, their respective function and parameters are
specified in :ref:`user-func`. specified in :ref:`user-func`.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _func-mmap: .. _func-mmap:
...@@ -11,7 +12,6 @@ Name ...@@ -11,7 +12,6 @@ Name
v4l2-mmap - Map device memory into application address space v4l2-mmap - Map device memory into application address space
Synopsis Synopsis
======== ========
...@@ -20,9 +20,7 @@ Synopsis ...@@ -20,9 +20,7 @@ Synopsis
#include <unistd.h> #include <unistd.h>
#include <sys/mman.h> #include <sys/mman.h>
.. c:function:: void *mmap( void *start, size_t length, int prot, int flags, int fd, off_t offset ) .. c:function:: void *mmap( void *start, size_t length, int prot, int flags, int fd, off_t offset )
:name: v4l2-mmap
Arguments Arguments
========= =========
...@@ -54,7 +52,7 @@ Arguments ...@@ -54,7 +52,7 @@ Arguments
#. The Linux ``videobuf`` kernel module, which is used by some #. The Linux ``videobuf`` kernel module, which is used by some
drivers supports only ``PROT_READ`` | ``PROT_WRITE``. When the drivers supports only ``PROT_READ`` | ``PROT_WRITE``. When the
driver does not support the desired protection, the driver does not support the desired protection, the
:ref:`mmap() <func-mmap>` function fails. :c:func:`mmap()` function fails.
#. Device memory accesses (e. g. the memory on a graphics card #. Device memory accesses (e. g. the memory on a graphics card
with video capturing hardware) may incur a performance penalty with video capturing hardware) may incur a performance penalty
...@@ -70,7 +68,7 @@ Arguments ...@@ -70,7 +68,7 @@ Arguments
``MAP_FIXED`` requests that the driver selects no other address than ``MAP_FIXED`` requests that the driver selects no other address than
the one specified. If the specified address cannot be used, the one specified. If the specified address cannot be used,
:ref:`mmap() <func-mmap>` will fail. If ``MAP_FIXED`` is specified, :c:func:`mmap()` will fail. If ``MAP_FIXED`` is specified,
``start`` must be a multiple of the pagesize. Use of this option is ``start`` must be a multiple of the pagesize. Use of this option is
discouraged. discouraged.
...@@ -87,7 +85,7 @@ Arguments ...@@ -87,7 +85,7 @@ Arguments
flags. flags.
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``offset`` ``offset``
Offset of the buffer in device memory. This must be the same value Offset of the buffer in device memory. This must be the same value
...@@ -97,11 +95,10 @@ Arguments ...@@ -97,11 +95,10 @@ Arguments
in the struct :c:type:`v4l2_plane` ``m`` union in the struct :c:type:`v4l2_plane` ``m`` union
``mem_offset`` field for the multi-planar API. ``mem_offset`` field for the multi-planar API.
Description Description
=========== ===========
The :ref:`mmap() <func-mmap>` function asks to map ``length`` bytes starting at The :c:func:`mmap()` function asks to map ``length`` bytes starting at
``offset`` in the memory of the device specified by ``fd`` into the ``offset`` in the memory of the device specified by ``fd`` into the
application address space, preferably at address ``start``. This latter application address space, preferably at address ``start``. This latter
address is a hint only, and is usually specified as 0. address is a hint only, and is usually specified as 0.
...@@ -111,13 +108,12 @@ Suitable length and offset parameters are queried with the ...@@ -111,13 +108,12 @@ Suitable length and offset parameters are queried with the
allocated with the :ref:`VIDIOC_REQBUFS` ioctl allocated with the :ref:`VIDIOC_REQBUFS` ioctl
before they can be queried. before they can be queried.
To unmap buffers the :ref:`munmap() <func-munmap>` function is used. To unmap buffers the :c:func:`munmap()` function is used.
Return Value Return Value
============ ============
On success :ref:`mmap() <func-mmap>` returns a pointer to the mapped buffer. On On success :c:func:`mmap()` returns a pointer to the mapped buffer. On
error ``MAP_FAILED`` (-1) is returned, and the ``errno`` variable is set error ``MAP_FAILED`` (-1) is returned, and the ``errno`` variable is set
appropriately. Possible error codes are: appropriately. Possible error codes are:
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _func-munmap: .. _func-munmap:
...@@ -11,7 +12,6 @@ Name ...@@ -11,7 +12,6 @@ Name
v4l2-munmap - Unmap device memory v4l2-munmap - Unmap device memory
Synopsis Synopsis
======== ========
...@@ -20,37 +20,33 @@ Synopsis ...@@ -20,37 +20,33 @@ Synopsis
#include <unistd.h> #include <unistd.h>
#include <sys/mman.h> #include <sys/mman.h>
.. c:function:: int munmap( void *start, size_t length ) .. c:function:: int munmap( void *start, size_t length )
:name: v4l2-munmap
Arguments Arguments
========= =========
``start`` ``start``
Address of the mapped buffer as returned by the Address of the mapped buffer as returned by the
:ref:`mmap() <func-mmap>` function. :c:func:`mmap()` function.
``length`` ``length``
Length of the mapped buffer. This must be the same value as given to Length of the mapped buffer. This must be the same value as given to
:ref:`mmap() <func-mmap>` and returned by the driver in the struct :c:func:`mmap()` and returned by the driver in the struct
:c:type:`v4l2_buffer` ``length`` field for the :c:type:`v4l2_buffer` ``length`` field for the
single-planar API and in the struct single-planar API and in the struct
:c:type:`v4l2_plane` ``length`` field for the :c:type:`v4l2_plane` ``length`` field for the
multi-planar API. multi-planar API.
Description Description
=========== ===========
Unmaps a previously with the :ref:`mmap() <func-mmap>` function mapped Unmaps a previously with the :c:func:`mmap()` function mapped
buffer and frees it, if possible. buffer and frees it, if possible.
Return Value Return Value
============ ============
On success :ref:`munmap() <func-munmap>` returns 0, on failure -1 and the On success :c:func:`munmap()` returns 0, on failure -1 and the
``errno`` variable is set appropriately: ``errno`` variable is set appropriately:
EINVAL EINVAL
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _func-open: .. _func-open:
...@@ -11,7 +12,6 @@ Name ...@@ -11,7 +12,6 @@ Name
v4l2-open - Open a V4L2 device v4l2-open - Open a V4L2 device
Synopsis Synopsis
======== ========
...@@ -19,9 +19,7 @@ Synopsis ...@@ -19,9 +19,7 @@ Synopsis
#include <fcntl.h> #include <fcntl.h>
.. c:function:: int open( const char *device_name, int flags ) .. c:function:: int open( const char *device_name, int flags )
:name: v4l2-open
Arguments Arguments
========= =========
...@@ -34,7 +32,7 @@ Arguments ...@@ -34,7 +32,7 @@ Arguments
technicality, input devices still support only reading and output technicality, input devices still support only reading and output
devices only writing. devices only writing.
When the ``O_NONBLOCK`` flag is given, the :ref:`read() <func-read>` When the ``O_NONBLOCK`` flag is given, the :c:func:`read()`
function and the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will function and the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl will
return the ``EAGAIN`` error code when no data is available or no return the ``EAGAIN`` error code when no data is available or no
buffer is in the driver outgoing queue, otherwise these functions buffer is in the driver outgoing queue, otherwise these functions
...@@ -43,22 +41,20 @@ Arguments ...@@ -43,22 +41,20 @@ Arguments
Other flags have no effect. Other flags have no effect.
Description Description
=========== ===========
To open a V4L2 device applications call :ref:`open() <func-open>` with the To open a V4L2 device applications call :c:func:`open()` with the
desired device name. This function has no side effects; all data format desired device name. This function has no side effects; all data format
parameters, current input or output, control values or other properties parameters, current input or output, control values or other properties
remain unchanged. At the first :ref:`open() <func-open>` call after loading the remain unchanged. At the first :c:func:`open()` call after loading the
driver they will be reset to default values, drivers are never in an driver they will be reset to default values, drivers are never in an
undefined state. undefined state.
Return Value Return Value
============ ============
On success :ref:`open() <func-open>` returns the new file descriptor. On error On success :c:func:`open()` returns the new file descriptor. On error
-1 is returned, and the ``errno`` variable is set appropriately. -1 is returned, and the ``errno`` variable is set appropriately.
Possible error codes are: Possible error codes are:
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _func-poll: .. _func-poll:
...@@ -11,7 +12,6 @@ Name ...@@ -11,7 +12,6 @@ Name
v4l2-poll - Wait for some event on a file descriptor v4l2-poll - Wait for some event on a file descriptor
Synopsis Synopsis
======== ========
...@@ -19,19 +19,16 @@ Synopsis ...@@ -19,19 +19,16 @@ Synopsis
#include <sys/poll.h> #include <sys/poll.h>
.. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout ) .. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout )
:name: v4l2-poll
Arguments Arguments
========= =========
Description Description
=========== ===========
With the :ref:`poll() <func-poll>` function applications can suspend execution With the :c:func:`poll()` function applications can suspend execution
until the driver has captured data or is ready to accept data for until the driver has captured data or is ready to accept data for
output. output.
...@@ -44,57 +41,56 @@ display. When buffers are already in the outgoing queue of the driver ...@@ -44,57 +41,56 @@ display. When buffers are already in the outgoing queue of the driver
(capture) or the incoming queue isn't full (display) the function (capture) or the incoming queue isn't full (display) the function
returns immediately. returns immediately.
On success :ref:`poll() <func-poll>` returns the number of file descriptors On success :c:func:`poll()` returns the number of file descriptors
that have been selected (that is, file descriptors for which the that have been selected (that is, file descriptors for which the
``revents`` field of the respective :c:func:`struct pollfd` structure ``revents`` field of the respective ``struct pollfd`` structure
is non-zero). Capture devices set the ``POLLIN`` and ``POLLRDNORM`` is non-zero). Capture devices set the ``POLLIN`` and ``POLLRDNORM``
flags in the ``revents`` field, output devices the ``POLLOUT`` and flags in the ``revents`` field, output devices the ``POLLOUT`` and
``POLLWRNORM`` flags. When the function timed out it returns a value of ``POLLWRNORM`` flags. When the function timed out it returns a value of
zero, on failure it returns -1 and the ``errno`` variable is set zero, on failure it returns -1 and the ``errno`` variable is set
appropriately. When the application did not call appropriately. When the application did not call
:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` the :ref:`poll() <func-poll>` :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` the :c:func:`poll()`
function succeeds, but sets the ``POLLERR`` flag in the ``revents`` function succeeds, but sets the ``POLLERR`` flag in the ``revents``
field. When the application has called field. When the application has called
:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` for a capture device but :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` for a capture device but
hasn't yet called :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, the hasn't yet called :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, the
:ref:`poll() <func-poll>` function succeeds and sets the ``POLLERR`` flag in :c:func:`poll()` function succeeds and sets the ``POLLERR`` flag in
the ``revents`` field. For output devices this same situation will cause the ``revents`` field. For output devices this same situation will cause
:ref:`poll() <func-poll>` to succeed as well, but it sets the ``POLLOUT`` and :c:func:`poll()` to succeed as well, but it sets the ``POLLOUT`` and
``POLLWRNORM`` flags in the ``revents`` field. ``POLLWRNORM`` flags in the ``revents`` field.
If an event occurred (see :ref:`VIDIOC_DQEVENT`) If an event occurred (see :ref:`VIDIOC_DQEVENT`)
then ``POLLPRI`` will be set in the ``revents`` field and then ``POLLPRI`` will be set in the ``revents`` field and
:ref:`poll() <func-poll>` will return. :c:func:`poll()` will return.
When use of the :ref:`read() <func-read>` function has been negotiated and the When use of the :c:func:`read()` function has been negotiated and the
driver does not capture yet, the :ref:`poll() <func-poll>` function starts driver does not capture yet, the :c:func:`poll()` function starts
capturing. When that fails it returns a ``POLLERR`` as above. Otherwise 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 it waits until data has been captured and can be read. When the driver
captures continuously (as opposed to, for example, still images) the captures continuously (as opposed to, for example, still images) the
function may return immediately. function may return immediately.
When use of the :ref:`write() <func-write>` function has been negotiated and the When use of the :c:func:`write()` function has been negotiated and the
driver does not stream yet, the :ref:`poll() <func-poll>` function starts driver does not stream yet, the :c:func:`poll()` function starts
streaming. When that fails it returns a ``POLLERR`` as above. Otherwise streaming. When that fails it returns a ``POLLERR`` as above. Otherwise
it waits until the driver is ready for a non-blocking it waits until the driver is ready for a non-blocking
:ref:`write() <func-write>` call. :c:func:`write()` call.
If the caller is only interested in events (just ``POLLPRI`` is set in If the caller is only interested in events (just ``POLLPRI`` is set in
the ``events`` field), then :ref:`poll() <func-poll>` will *not* start the ``events`` field), then :c:func:`poll()` will *not* start
streaming if the driver does not stream yet. This makes it possible to streaming if the driver does not stream yet. This makes it possible to
just poll for events and not for buffers. just poll for events and not for buffers.
All drivers implementing the :ref:`read() <func-read>` or :ref:`write() <func-write>` All drivers implementing the :c:func:`read()` or :c:func:`write()`
function or streaming I/O must also support the :ref:`poll() <func-poll>` function or streaming I/O must also support the :c:func:`poll()`
function. function.
For more details see the :ref:`poll() <func-poll>` manual page. For more details see the :c:func:`poll()` manual page.
Return Value Return Value
============ ============
On success, :ref:`poll() <func-poll>` returns the number structures which have 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 non-zero ``revents`` fields, or zero if the call timed out. On error -1
is returned, and the ``errno`` variable is set appropriately: is returned, and the ``errno`` variable is set appropriately:
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _func-read: .. _func-read:
...@@ -11,7 +12,6 @@ Name ...@@ -11,7 +12,6 @@ Name
v4l2-read - Read from a V4L2 device v4l2-read - Read from a V4L2 device
Synopsis Synopsis
======== ========
...@@ -19,15 +19,13 @@ Synopsis ...@@ -19,15 +19,13 @@ Synopsis
#include <unistd.h> #include <unistd.h>
.. c:function:: ssize_t read( int fd, void *buf, size_t count ) .. c:function:: ssize_t read( int fd, void *buf, size_t count )
:name: v4l2-read
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``buf`` ``buf``
Buffer to be filled Buffer to be filled
...@@ -38,48 +36,48 @@ Arguments ...@@ -38,48 +36,48 @@ Arguments
Description Description
=========== ===========
:ref:`read() <func-read>` attempts to read up to ``count`` bytes from file :c:func:`read()` attempts to read up to ``count`` bytes from file
descriptor ``fd`` into the buffer starting at ``buf``. The layout of the descriptor ``fd`` into the buffer starting at ``buf``. The layout of the
data in the buffer is discussed in the respective device interface data in the buffer is discussed in the respective device interface
section, see ##. If ``count`` is zero, :ref:`read() <func-read>` returns zero section, see ##. If ``count`` is zero, :c:func:`read()` returns zero
and has no other results. If ``count`` is greater than ``SSIZE_MAX``, and has no other results. If ``count`` is greater than ``SSIZE_MAX``,
the result is unspecified. Regardless of the ``count`` value each the result is unspecified. Regardless of the ``count`` value each
:ref:`read() <func-read>` call will provide at most one frame (two fields) :c:func:`read()` call will provide at most one frame (two fields)
worth of data. worth of data.
By default :ref:`read() <func-read>` blocks until data becomes available. When By default :c:func:`read()` blocks until data becomes available. When
the ``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>` the ``O_NONBLOCK`` flag was given to the :c:func:`open()`
function it returns immediately with an ``EAGAIN`` error code when no data function it returns immediately with an ``EAGAIN`` error code when no data
is available. The :ref:`select() <func-select>` or is available. The :c:func:`select()` or
:ref:`poll() <func-poll>` functions can always be used to suspend :c:func:`poll()` functions can always be used to suspend
execution until data becomes available. All drivers supporting the execution until data becomes available. All drivers supporting the
:ref:`read() <func-read>` function must also support :ref:`select() <func-select>` and :c:func:`read()` function must also support :c:func:`select()` and
:ref:`poll() <func-poll>`. :c:func:`poll()`.
Drivers can implement read functionality in different ways, using a Drivers can implement read functionality in different ways, using a
single or multiple buffers and discarding the oldest or newest frames single or multiple buffers and discarding the oldest or newest frames
once the internal buffers are filled. once the internal buffers are filled.
:ref:`read() <func-read>` never returns a "snapshot" of a buffer being filled. :c:func:`read()` never returns a "snapshot" of a buffer being filled.
Using a single buffer the driver will stop capturing when the Using a single buffer the driver will stop capturing when the
application starts reading the buffer until the read is finished. Thus application starts reading the buffer until the read is finished. Thus
only the period of the vertical blanking interval is available for only the period of the vertical blanking interval is available for
reading, or the capture rate must fall below the nominal frame rate of reading, or the capture rate must fall below the nominal frame rate of
the video standard. the video standard.
The behavior of :ref:`read() <func-read>` when called during the active picture The behavior of :c:func:`read()` when called during the active picture
period or the vertical blanking separating the top and bottom field period or the vertical blanking separating the top and bottom field
depends on the discarding policy. A driver discarding the oldest frames depends on the discarding policy. A driver discarding the oldest frames
keeps capturing into an internal buffer, continuously overwriting the keeps capturing into an internal buffer, continuously overwriting the
previously, not read frame, and returns the frame being received at the previously, not read frame, and returns the frame being received at the
time of the :ref:`read() <func-read>` call as soon as it is complete. time of the :c:func:`read()` call as soon as it is complete.
A driver discarding the newest frames stops capturing until the next A driver discarding the newest frames stops capturing until the next
:ref:`read() <func-read>` call. The frame being received at :ref:`read() <func-read>` :c:func:`read()` call. The frame being received at :c:func:`read()`
time is discarded, returning the following frame instead. Again this time is discarded, returning the following frame instead. Again this
implies a reduction of the capture rate to one half or less of the 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 nominal frame rate. An example of this model is the video read mode of
the bttv driver, initiating a DMA to user memory when :ref:`read() <func-read>` the bttv driver, initiating a DMA to user memory when :c:func:`read()`
is called and returning when the DMA finished. is called and returning when the DMA finished.
In the multiple buffer model drivers maintain a ring of internal In the multiple buffer model drivers maintain a ring of internal
...@@ -94,14 +92,13 @@ the driver with the :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and ...@@ -94,14 +92,13 @@ the driver with the :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
however. The discarding policy is not reported and cannot be changed. however. The discarding policy is not reported and cannot be changed.
For minimum requirements see :ref:`devices`. For minimum requirements see :ref:`devices`.
Return Value Return Value
============ ============
On success, the number of bytes read is returned. It is not an error if On 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 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 of data required for one frame. This may happen for example because
:ref:`read() <func-read>` was interrupted by a signal. On error, -1 is :c:func:`read()` was interrupted by a signal. On error, -1 is
returned, and the ``errno`` variable is set appropriately. In this case 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 the next read will start at the beginning of a new frame. Possible error
codes are: codes are:
...@@ -129,5 +126,5 @@ EIO ...@@ -129,5 +126,5 @@ EIO
communicate with a remote device (USB camera etc.). communicate with a remote device (USB camera etc.).
EINVAL EINVAL
The :ref:`read() <func-read>` function is not supported by this driver, not The :c:func:`read()` function is not supported by this driver, not
on this device, or generally not on this type of device. on this device, or generally not on this type of device.
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _func-select: .. _func-select:
...@@ -11,7 +12,6 @@ Name ...@@ -11,7 +12,6 @@ Name
v4l2-select - Synchronous I/O multiplexing v4l2-select - Synchronous I/O multiplexing
Synopsis Synopsis
======== ========
...@@ -21,9 +21,7 @@ Synopsis ...@@ -21,9 +21,7 @@ Synopsis
#include <sys/types.h> #include <sys/types.h>
#include <unistd.h> #include <unistd.h>
.. c:function:: int select( int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout ) .. c:function:: int select( int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout )
:name: v4l2-select
Arguments Arguments
========= =========
...@@ -43,11 +41,10 @@ Arguments ...@@ -43,11 +41,10 @@ Arguments
``timeout`` ``timeout``
Maximum time to wait. Maximum time to wait.
Description Description
=========== ===========
With the :ref:`select() <func-select>` function applications can suspend With the :c:func:`select()` function applications can suspend
execution until the driver has captured data or is ready to accept data execution until the driver has captured data or is ready to accept data
for output. for output.
...@@ -56,40 +53,39 @@ buffer has been filled or displayed and can be dequeued with the ...@@ -56,40 +53,39 @@ buffer has been filled or displayed and can be dequeued with the
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. When buffers are already in :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. When buffers are already in
the outgoing queue of the driver the function returns immediately. the outgoing queue of the driver the function returns immediately.
On success :ref:`select() <func-select>` returns the total number of bits set in On success :c:func:`select()` returns the total number of bits set in
:c:func:`struct fd_set`. When the function timed out it returns ``fd_set``. When the function timed out it returns
a value of zero. On failure it returns -1 and the ``errno`` variable is a value of zero. On failure it returns -1 and the ``errno`` variable is
set appropriately. When the application did not call set appropriately. When the application did not call
:ref:`VIDIOC_QBUF` or :ref:`VIDIOC_QBUF` or
:ref:`VIDIOC_STREAMON` yet the :ref:`select() <func-select>` :ref:`VIDIOC_STREAMON` yet the :c:func:`select()`
function succeeds, setting the bit of the file descriptor in ``readfds`` function succeeds, setting the bit of the file descriptor in ``readfds``
or ``writefds``, but subsequent :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` or ``writefds``, but subsequent :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`
calls will fail. [#f1]_ calls will fail. [#f1]_
When use of the :ref:`read() <func-read>` function has been negotiated and the When use of the :c:func:`read()` function has been negotiated and the
driver does not capture yet, the :ref:`select() <func-select>` function starts driver does not capture yet, the :c:func:`select()` function starts
capturing. When that fails, :ref:`select() <func-select>` returns successful and capturing. When that fails, :c:func:`select()` returns successful and
a subsequent :ref:`read() <func-read>` call, which also attempts to start a subsequent :c:func:`read()` call, which also attempts to start
capturing, will return an appropriate error code. When the driver capturing, will return an appropriate error code. When the driver
captures continuously (as opposed to, for example, still images) and captures continuously (as opposed to, for example, still images) and
data is already available the :ref:`select() <func-select>` function returns data is already available the :c:func:`select()` function returns
immediately. immediately.
When use of the :ref:`write() <func-write>` function has been negotiated the When use of the :c:func:`write()` function has been negotiated the
:ref:`select() <func-select>` function just waits until the driver is ready for a :c:func:`select()` function just waits until the driver is ready for a
non-blocking :ref:`write() <func-write>` call. non-blocking :c:func:`write()` call.
All drivers implementing the :ref:`read() <func-read>` or :ref:`write() <func-write>` All drivers implementing the :c:func:`read()` or :c:func:`write()`
function or streaming I/O must also support the :ref:`select() <func-select>` function or streaming I/O must also support the :c:func:`select()`
function. function.
For more details see the :ref:`select() <func-select>` manual page. For more details see the :c:func:`select()` manual page.
Return Value Return Value
============ ============
On success, :ref:`select() <func-select>` returns the number of descriptors On success, :c:func:`select()` returns the number of descriptors
contained in the three returned descriptor sets, which will be zero if contained in the three returned descriptor sets, which will be zero if
the timeout expired. On error -1 is returned, and the ``errno`` variable the timeout expired. On error -1 is returned, and the ``errno`` variable
is set appropriately; the sets and ``timeout`` are undefined. Possible is set appropriately; the sets and ``timeout`` are undefined. Possible
...@@ -115,6 +111,6 @@ EINVAL ...@@ -115,6 +111,6 @@ EINVAL
``FD_SETSIZE``. ``FD_SETSIZE``.
.. [#f1] .. [#f1]
The Linux kernel implements :ref:`select() <func-select>` like the The Linux kernel implements :c:func:`select()` like the
:ref:`poll() <func-poll>` function, but :ref:`select() <func-select>` cannot :c:func:`poll()` function, but :c:func:`select()` cannot
return a ``POLLERR``. return a ``POLLERR``.
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _func-write: .. _func-write:
...@@ -11,7 +12,6 @@ Name ...@@ -11,7 +12,6 @@ Name
v4l2-write - Write to a V4L2 device v4l2-write - Write to a V4L2 device
Synopsis Synopsis
======== ========
...@@ -19,15 +19,13 @@ Synopsis ...@@ -19,15 +19,13 @@ Synopsis
#include <unistd.h> #include <unistd.h>
.. c:function:: ssize_t write( int fd, void *buf, size_t count ) .. c:function:: ssize_t write( int fd, void *buf, size_t count )
:name: v4l2-write
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``buf`` ``buf``
Buffer with data to be written Buffer with data to be written
...@@ -38,10 +36,10 @@ Arguments ...@@ -38,10 +36,10 @@ Arguments
Description Description
=========== ===========
:ref:`write() <func-write>` writes up to ``count`` bytes to the device :c:func:`write()` writes up to ``count`` bytes to the device
referenced by the file descriptor ``fd`` from the buffer starting at referenced by the file descriptor ``fd`` from the buffer starting at
``buf``. When the hardware outputs are not active yet, this function ``buf``. When the hardware outputs are not active yet, this function
enables them. When ``count`` is zero, :ref:`write() <func-write>` returns 0 enables them. When ``count`` is zero, :c:func:`write()` returns 0
without any other effect. without any other effect.
When the application does not provide more data in time, the previous When the application does not provide more data in time, the previous
...@@ -49,7 +47,6 @@ video frame, raw VBI image, sliced VPS or WSS data is displayed again. ...@@ -49,7 +47,6 @@ video frame, raw VBI image, sliced VPS or WSS data is displayed again.
Sliced Teletext or Closed Caption data is not repeated, the driver Sliced Teletext or Closed Caption data is not repeated, the driver
inserts a blank line instead. inserts a blank line instead.
Return Value Return Value
============ ============
...@@ -80,5 +77,5 @@ EIO ...@@ -80,5 +77,5 @@ EIO
I/O error. This indicates some hardware problem. I/O error. This indicates some hardware problem.
EINVAL EINVAL
The :ref:`write() <func-write>` function is not supported by this driver, The :c:func:`write()` function is not supported by this driver,
not on this device, or generally not on this type of device. not on this device, or generally not on this type of device.
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _io: .. _io:
...@@ -9,8 +10,8 @@ The V4L2 API defines several different methods to read from or write to ...@@ -9,8 +10,8 @@ The V4L2 API defines several different methods to read from or write to
a device. All drivers exchanging data with applications must support at a device. All drivers exchanging data with applications must support at
least one of them. least one of them.
The classic I/O method using the :ref:`read() <func-read>` and The classic I/O method using the :c:func:`read()` and
:ref:`write() <func-write>` function is automatically selected after opening a :c:func:`write()` function is automatically selected after opening a
V4L2 device. When the driver does not support this method attempts to V4L2 device. When the driver does not support this method attempts to
read or write will fail at any time. read or write will fail at any time.
...@@ -38,7 +39,6 @@ closing and reopening the device. ...@@ -38,7 +39,6 @@ closing and reopening the device.
The following sections describe the various I/O methods in more detail. The following sections describe the various I/O methods in more detail.
.. toctree:: .. toctree::
:maxdepth: 1 :maxdepth: 1
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _libv4l-introduction: .. _libv4l-introduction:
...@@ -17,7 +18,6 @@ An example of using libv4l is provided by ...@@ -17,7 +18,6 @@ An example of using libv4l is provided by
libv4l consists of 3 different libraries: libv4l consists of 3 different libraries:
libv4lconvert libv4lconvert
============= =============
...@@ -65,7 +65,6 @@ libv4lconvert/processing. These controls are stored application wide ...@@ -65,7 +65,6 @@ libv4lconvert/processing. These controls are stored application wide
libv4lconvert/processing offers the actual video processing libv4lconvert/processing offers the actual video processing
functionality. functionality.
libv4l1 libv4l1
======= =======
...@@ -78,7 +77,6 @@ just pass calls through. ...@@ -78,7 +77,6 @@ just pass calls through.
Since those functions are emulations of the old V4L1 API, it shouldn't Since those functions are emulations of the old V4L1 API, it shouldn't
be used for new applications. be used for new applications.
libv4l2 libv4l2
======= =======
...@@ -105,7 +103,6 @@ available in the driver. :ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>` ...@@ -105,7 +103,6 @@ available in the driver. :ref:`VIDIOC_ENUM_FMT <VIDIOC_ENUM_FMT>`
keeps enumerating the hardware supported formats, plus the emulated keeps enumerating the hardware supported formats, plus the emulated
formats offered by libv4l at the end. formats offered by libv4l at the end.
.. _libv4l-ops: .. _libv4l-ops:
Libv4l device control functions Libv4l device control functions
...@@ -115,17 +112,17 @@ The common file operation methods are provided by libv4l. ...@@ -115,17 +112,17 @@ The common file operation methods are provided by libv4l.
Those functions operate just like the gcc function ``dup()`` and Those functions operate just like the gcc function ``dup()`` and
V4L2 functions V4L2 functions
:c:func:`open() <v4l2-open>`, :c:func:`close() <v4l2-close>`, :c:func:`open()`, :c:func:`close()`,
:c:func:`ioctl() <v4l2-ioctl>`, :c:func:`read() <v4l2-read>`, :c:func:`ioctl()`, :c:func:`read()`,
:c:func:`mmap() <v4l2-mmap>` and :c:func:`munmap() <v4l2-munmap>`: :c:func:`mmap()` and :c:func:`munmap()`:
.. c:function:: int v4l2_open(const char *file, int oflag, ...) .. c:function:: int v4l2_open(const char *file, int oflag, ...)
operates like the :c:func:`open() <v4l2-open>` function. operates like the :c:func:`open()` function.
.. c:function:: int v4l2_close(int fd) .. c:function:: int v4l2_close(int fd)
operates like the :c:func:`close() <v4l2-close>` function. operates like the :c:func:`close()` function.
.. c:function:: int v4l2_dup(int fd) .. c:function:: int v4l2_dup(int fd)
...@@ -133,19 +130,19 @@ V4L2 functions ...@@ -133,19 +130,19 @@ V4L2 functions
.. c:function:: int v4l2_ioctl (int fd, unsigned long int request, ...) .. c:function:: int v4l2_ioctl (int fd, unsigned long int request, ...)
operates like the :c:func:`ioctl() <v4l2-ioctl>` function. operates like the :c:func:`ioctl()` function.
.. c:function:: int v4l2_read (int fd, void* buffer, size_t n) .. c:function:: int v4l2_read (int fd, void* buffer, size_t n)
operates like the :c:func:`read() <v4l2-read>` function. operates like the :c:func:`read()` function.
.. c:function:: void v4l2_mmap(void *start, size_t length, int prot, int flags, int fd, int64_t offset); .. c:function:: void v4l2_mmap(void *start, size_t length, int prot, int flags, int fd, int64_t offset);
operates like the :c:func:`munmap() <v4l2-munmap>` function. operates like the :c:func:`munmap()` function.
.. c:function:: int v4l2_munmap(void *_start, size_t length); .. c:function:: int v4l2_munmap(void *_start, size_t length);
operates like the :c:func:`munmap() <v4l2-munmap>` function. operates like the :c:func:`munmap()` function.
Those functions provide additional control: Those functions provide additional control:
...@@ -168,14 +165,13 @@ Those functions provide additional control: ...@@ -168,14 +165,13 @@ Those functions provide additional control:
of the given v4l control id. when the cid does not exist, could not be of the given v4l control id. when the cid does not exist, could not be
accessed for some reason, or some error occurred 0 is returned. accessed for some reason, or some error occurred 0 is returned.
v4l1compat.so wrapper library v4l1compat.so wrapper library
============================= =============================
This library intercepts calls to This library intercepts calls to
:c:func:`open() <v4l2-open>`, :c:func:`close() <v4l2-close>`, :c:func:`open()`, :c:func:`close()`,
:c:func:`ioctl() <v4l2-ioctl>`, :c:func:`mmap() <v4l2-mmap>` and :c:func:`ioctl()`, :c:func:`mmap()` and
:c:func:`munmap() <v4l2-munmap>` :c:func:`munmap()`
operations and redirects them to the libv4l counterparts, by using operations and redirects them to the libv4l counterparts, by using
``LD_PRELOAD=/usr/lib/v4l1compat.so``. It also emulates V4L1 calls via V4L2 ``LD_PRELOAD=/usr/lib/v4l1compat.so``. It also emulates V4L1 calls via V4L2
API. API.
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _mmap: .. _mmap:
...@@ -35,22 +36,22 @@ This ioctl can also be used to change the number of buffers or to free ...@@ -35,22 +36,22 @@ This ioctl can also be used to change the number of buffers or to free
the allocated memory, provided none of the buffers are still mapped. the allocated memory, provided none of the buffers are still mapped.
Before applications can access the buffers they must map them into their Before applications can access the buffers they must map them into their
address space with the :ref:`mmap() <func-mmap>` function. The address space with the :c:func:`mmap()` function. The
location of the buffers in device memory can be determined with the location of the buffers in device memory can be determined with the
:ref:`VIDIOC_QUERYBUF` ioctl. In the single-planar :ref:`VIDIOC_QUERYBUF` ioctl. In the single-planar
API case, the ``m.offset`` and ``length`` returned in a struct API case, the ``m.offset`` and ``length`` returned in a struct
:c:type:`v4l2_buffer` are passed as sixth and second :c:type:`v4l2_buffer` are passed as sixth and second
parameter to the :ref:`mmap() <func-mmap>` function. When using the parameter to the :c:func:`mmap()` function. When using the
multi-planar API, struct :c:type:`v4l2_buffer` contains an multi-planar API, struct :c:type:`v4l2_buffer` contains an
array of struct :c:type:`v4l2_plane` structures, each array of struct :c:type:`v4l2_plane` structures, each
containing its own ``m.offset`` and ``length``. When using the containing its own ``m.offset`` and ``length``. When using the
multi-planar API, every plane of every buffer has to be mapped multi-planar API, every plane of every buffer has to be mapped
separately, so the number of calls to :ref:`mmap() <func-mmap>` should separately, so the number of calls to :c:func:`mmap()` should
be equal to number of buffers times number of planes in each buffer. The be equal to number of buffers times number of planes in each buffer. The
offset and length values must not be modified. Remember, the buffers are offset and length values must not be modified. Remember, the buffers are
allocated in physical memory, as opposed to virtual memory, which can be allocated in physical memory, as opposed to virtual memory, which can be
swapped out to disk. Applications should free the buffers as soon as swapped out to disk. Applications should free the buffers as soon as
possible with the :ref:`munmap() <func-munmap>` function. possible with the :c:func:`munmap()` function.
Example: Mapping buffers in the single-planar API Example: Mapping buffers in the single-planar API
================================================= =================================================
...@@ -122,7 +123,6 @@ Example: Mapping buffers in the single-planar API ...@@ -122,7 +123,6 @@ Example: Mapping buffers in the single-planar API
for (i = 0; i < reqbuf.count; i++) for (i = 0; i < reqbuf.count; i++)
munmap(buffers[i].start, buffers[i].length); munmap(buffers[i].start, buffers[i].length);
Example: Mapping buffers in the multi-planar API Example: Mapping buffers in the multi-planar API
================================================ ================================================
...@@ -238,10 +238,10 @@ be determined at any time using the :ref:`VIDIOC_QUERYBUF` ioctl. Two ...@@ -238,10 +238,10 @@ be determined at any time using the :ref:`VIDIOC_QUERYBUF` ioctl. Two
methods exist to suspend execution of the application until one or more methods exist to suspend execution of the application until one or more
buffers can be dequeued. By default :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` buffers can be dequeued. By default :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`
blocks when no buffer is in the outgoing queue. When the ``O_NONBLOCK`` blocks when no buffer is in the outgoing queue. When the ``O_NONBLOCK``
flag was given to the :ref:`open() <func-open>` function, flag was given to the :c:func:`open()` function,
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN`` :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN``
error code when no buffer is available. The :ref:`select() <func-select>` error code when no buffer is available. The :c:func:`select()`
or :ref:`poll() <func-poll>` functions are always available. or :c:func:`poll()` functions are always available.
To start and stop capturing or output applications call the To start and stop capturing or output applications call the
:ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and :ref:`VIDIOC_STREAMOFF :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` and :ref:`VIDIOC_STREAMOFF
...@@ -259,15 +259,15 @@ Drivers implementing memory mapping I/O must support the ...@@ -259,15 +259,15 @@ Drivers implementing memory mapping I/O must support the
<VIDIOC_QUERYBUF>`, :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_DQBUF <VIDIOC_QUERYBUF>`, :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_DQBUF
<VIDIOC_QBUF>`, :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` <VIDIOC_QBUF>`, :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`
and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, the :ref:`mmap() and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, the :ref:`mmap()
<func-mmap>`, :ref:`munmap() <func-munmap>`, :ref:`select() <func-mmap>`, :c:func:`munmap()`, :ref:`select()
<func-select>` and :ref:`poll() <func-poll>` function. [#f3]_ <func-select>` and :c:func:`poll()` function. [#f3]_
[capture example] [capture example]
.. [#f1] .. [#f1]
One could use one file descriptor and set the buffer type field One could use one file descriptor and set the buffer type field
accordingly when calling :ref:`VIDIOC_QBUF` etc., accordingly when calling :ref:`VIDIOC_QBUF` etc.,
but it makes the :ref:`select() <func-select>` function ambiguous. We also but it makes the :c:func:`select()` function ambiguous. We also
like the clean approach of one file descriptor per logical stream. like the clean approach of one file descriptor per logical stream.
Video overlay for example is also a logical stream, although the CPU Video overlay for example is also a logical stream, although the CPU
is not needed for continuous operation. is not needed for continuous operation.
...@@ -280,6 +280,6 @@ and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, the :ref:`mmap() ...@@ -280,6 +280,6 @@ and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, the :ref:`mmap()
scatter-gather lists and the like. scatter-gather lists and the like.
.. [#f3] .. [#f3]
At the driver level :ref:`select() <func-select>` and :ref:`poll() <func-poll>` are At the driver level :c:func:`select()` and :c:func:`poll()` are
the same, and :ref:`select() <func-select>` is too important to be optional. the same, and :c:func:`select()` is too important to be optional.
The rest should be evident. The rest should be evident.
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _open: .. _open:
...@@ -140,7 +141,6 @@ means applications cannot *reliably* scan for loaded or installed ...@@ -140,7 +141,6 @@ means applications cannot *reliably* scan for loaded or installed
drivers. The user must enter a device name, or the application can try drivers. The user must enter a device name, or the application can try
the conventional device names. the conventional device names.
.. _related: .. _related:
Related Devices Related Devices
...@@ -157,7 +157,7 @@ support all functions. However, in practice this never worked: this ...@@ -157,7 +157,7 @@ support all functions. However, in practice this never worked: this
support it and if they did it was certainly never tested. In addition, support it and if they did it was certainly never tested. In addition,
switching a device node between different functions only works when switching a device node between different functions only works when
using the streaming I/O API, not with the using the streaming I/O API, not with the
:ref:`read() <func-read>`/\ :ref:`write() <func-write>` API. :c:func:`read()`/\ :c:func:`write()` API.
Today each V4L2 device node supports just one function. Today each V4L2 device node supports just one function.
...@@ -178,7 +178,6 @@ the Media Controller. If you want to work on this please write to the ...@@ -178,7 +178,6 @@ the Media Controller. If you want to work on this please write to the
linux-media mailing list: linux-media mailing list:
`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__. `https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__.
Multiple Opens Multiple Opens
============== ==============
...@@ -192,8 +191,8 @@ device should not change the state of the device. [#f2]_ ...@@ -192,8 +191,8 @@ device should not change the state of the device. [#f2]_
Once an application has allocated the memory buffers needed for Once an application has allocated the memory buffers needed for
streaming data (by calling the :ref:`VIDIOC_REQBUFS` streaming data (by calling the :ref:`VIDIOC_REQBUFS`
or :ref:`VIDIOC_CREATE_BUFS` ioctls, or or :ref:`VIDIOC_CREATE_BUFS` ioctls, or
implicitly by calling the :ref:`read() <func-read>` or implicitly by calling the :c:func:`read()` or
:ref:`write() <func-write>` functions) that application (filehandle) :c:func:`write()` functions) that application (filehandle)
becomes the owner of the device. It is no longer allowed to make changes becomes the owner of the device. It is no longer allowed to make changes
that would affect the buffer sizes (e.g. by calling the that would affect the buffer sizes (e.g. by calling the
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl) and other applications are :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl) and other applications are
...@@ -206,7 +205,6 @@ requested type of data, and to change related properties, to this file ...@@ -206,7 +205,6 @@ requested type of data, and to change related properties, to this file
descriptor. Applications can request additional access privileges using descriptor. Applications can request additional access privileges using
the priority mechanism described in :ref:`app-pri`. the priority mechanism described in :ref:`app-pri`.
Shared Data Streams Shared Data Streams
=================== ===================
...@@ -215,12 +213,11 @@ the same data stream on a device by copying buffers, time multiplexing ...@@ -215,12 +213,11 @@ the same data stream on a device by copying buffers, time multiplexing
or similar means. This is better handled by a proxy application in user or similar means. This is better handled by a proxy application in user
space. space.
Functions Functions
========= =========
To open and close V4L2 devices applications use the To open and close V4L2 devices applications use the
:ref:`open() <func-open>` and :ref:`close() <func-close>` function, :c:func:`open()` and :c:func:`close()` function,
respectively. Devices are programmed using the respectively. Devices are programmed using the
:ref:`ioctl() <func-ioctl>` function as explained in the following :ref:`ioctl() <func-ioctl>` function as explained in the following
sections. sections.
...@@ -228,7 +225,7 @@ sections. ...@@ -228,7 +225,7 @@ sections.
.. [#f1] .. [#f1]
There are still some old and obscure drivers that have not been There are still some old and obscure drivers that have not been
updated to allow for multiple opens. This implies that for such updated to allow for multiple opens. This implies that for such
drivers :ref:`open() <func-open>` can return an ``EBUSY`` error code drivers :c:func:`open()` can return an ``EBUSY`` error code
when the device is already in use. when the device is already in use.
.. [#f2] .. [#f2]
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _rw: .. _rw:
...@@ -6,8 +7,8 @@ ...@@ -6,8 +7,8 @@
Read/Write Read/Write
********** **********
Input and output devices support the :ref:`read() <func-read>` and Input and output devices support the :c:func:`read()` and
:ref:`write() <func-write>` function, respectively, when the :c:func:`write()` function, respectively, when the
``V4L2_CAP_READWRITE`` flag in the ``capabilities`` field of struct ``V4L2_CAP_READWRITE`` flag in the ``capabilities`` field of struct
:c:type:`v4l2_capability` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl is set. :ref:`VIDIOC_QUERYCAP` ioctl is set.
...@@ -22,18 +23,17 @@ However this is also the simplest I/O method, requiring little or no ...@@ -22,18 +23,17 @@ However this is also the simplest I/O method, requiring little or no
setup to exchange data. It permits command line stunts like this (the setup to exchange data. It permits command line stunts like this (the
vidctrl tool is fictitious): vidctrl tool is fictitious):
.. code-block:: none .. code-block:: none
$ vidctrl /dev/video --input=0 --format=YUYV --size=352x288 $ vidctrl /dev/video --input=0 --format=YUYV --size=352x288
$ dd if=/dev/video of=myimage.422 bs=202752 count=1 $ dd if=/dev/video of=myimage.422 bs=202752 count=1
To read from the device applications use the :ref:`read() <func-read>` To read from the device applications use the :c:func:`read()`
function, to write the :ref:`write() <func-write>` function. Drivers function, to write the :c:func:`write()` function. Drivers
must implement one I/O method if they exchange data with applications, must implement one I/O method if they exchange data with applications,
but it need not be this. [#f1]_ When reading or writing is supported, the but it need not be this. [#f1]_ When reading or writing is supported, the
driver must also support the :ref:`select() <func-select>` and driver must also support the :c:func:`select()` and
:ref:`poll() <func-poll>` function. [#f2]_ :c:func:`poll()` function. [#f2]_
.. [#f1] .. [#f1]
It would be desirable if applications could depend on drivers It would be desirable if applications could depend on drivers
...@@ -43,5 +43,5 @@ driver must also support the :ref:`select() <func-select>` and ...@@ -43,5 +43,5 @@ driver must also support the :ref:`select() <func-select>` and
capturing still images. capturing still images.
.. [#f2] .. [#f2]
At the driver level :ref:`select() <func-select>` and :ref:`poll() <func-poll>` are At the driver level :c:func:`select()` and :c:func:`poll()` are
the same, and :ref:`select() <func-select>` is too important to be optional. the same, and :c:func:`select()` is too important to be optional.
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _streaming-par: .. _streaming-par:
...@@ -14,13 +15,13 @@ The current video standard determines a nominal number of frames per ...@@ -14,13 +15,13 @@ The current video standard determines a nominal number of frames per
second. If less than this number of frames is to be captured or output, second. If less than this number of frames is to be captured or output,
applications can request frame skipping or duplicating on the driver applications can request frame skipping or duplicating on the driver
side. This is especially useful when using the side. This is especially useful when using the
:ref:`read() <func-read>` or :ref:`write() <func-write>`, which are :c:func:`read()` or :c:func:`write()`, which are
not augmented by timestamps or sequence counters, and to avoid not augmented by timestamps or sequence counters, and to avoid
unnecessary data copying. unnecessary data copying.
Finally these ioctls can be used to determine the number of buffers used Finally these ioctls can be used to determine the number of buffers used
internally by a driver in read/write mode. For implications see the internally by a driver in read/write mode. For implications see the
section discussing the :ref:`read() <func-read>` function. section discussing the :c:func:`read()` function.
To get and set the streaming parameters applications call the To get and set the streaming parameters applications call the
:ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _userp: .. _userp:
...@@ -78,10 +79,10 @@ buffers it must wait until an empty buffer can be dequeued and reused. ...@@ -78,10 +79,10 @@ buffers it must wait until an empty buffer can be dequeued and reused.
Two methods exist to suspend execution of the application until one or Two methods exist to suspend execution of the application until one or
more buffers can be dequeued. By default :ref:`VIDIOC_DQBUF more buffers can be dequeued. By default :ref:`VIDIOC_DQBUF
<VIDIOC_QBUF>` blocks when no buffer is in the outgoing queue. When the <VIDIOC_QBUF>` blocks when no buffer is in the outgoing queue. When the
``O_NONBLOCK`` flag was given to the :ref:`open() <func-open>` function, ``O_NONBLOCK`` flag was given to the :c:func:`open()` function,
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN`` :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` returns immediately with an ``EAGAIN``
error code when no buffer is available. The :ref:`select() error code when no buffer is available. The :ref:`select()
<func-select>` or :ref:`poll() <func-poll>` function are always <func-select>` or :c:func:`poll()` function are always
available. available.
To start and stop capturing or output applications call the To start and stop capturing or output applications call the
...@@ -101,7 +102,7 @@ Drivers implementing user pointer I/O must support the ...@@ -101,7 +102,7 @@ Drivers implementing user pointer I/O must support the
:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`, :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`, :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`,
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`
and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, the and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, the
:ref:`select() <func-select>` and :ref:`poll() <func-poll>` function. [#f2]_ :c:func:`select()` and :c:func:`poll()` function. [#f2]_
.. [#f1] .. [#f1]
We expect that frequently used buffers are typically not swapped out. We expect that frequently used buffers are typically not swapped out.
...@@ -116,6 +117,6 @@ and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, the ...@@ -116,6 +117,6 @@ and :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` ioctls, the
because an application may share them with other processes. because an application may share them with other processes.
.. [#f2] .. [#f2]
At the driver level :ref:`select() <func-select>` and :ref:`poll() <func-poll>` are At the driver level :c:func:`select()` and :c:func:`poll()` are
the same, and :ref:`select() <func-select>` is too important to be optional. the same, and :c:func:`select()` is too important to be optional.
The rest should be evident. The rest should be evident.
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_CREATE_BUFS: .. _VIDIOC_CREATE_BUFS:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_CREATE_BUFS - Create buffers for Memory Mapped or User Pointer or DMA Buffer I/O VIDIOC_CREATE_BUFS - Create buffers for Memory Mapped or User Pointer or DMA Buffer I/O
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_CREATE_BUFS, struct v4l2_create_buffers *argp ) .. c:macro:: VIDIOC_CREATE_BUFS
:name: VIDIOC_CREATE_BUFS
``int ioctl(int fd, VIDIOC_CREATE_BUFS, struct v4l2_create_buffers *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_create_buffers`. Pointer to struct :c:type:`v4l2_create_buffers`.
Description Description
=========== ===========
...@@ -71,7 +70,6 @@ the actual number allocated and the starting index in the ``count`` and ...@@ -71,7 +70,6 @@ the actual number allocated and the starting index in the ``count`` and
the ``index`` fields respectively. On return ``count`` can be smaller the ``index`` fields respectively. On return ``count`` can be smaller
than the number requested. than the number requested.
.. c:type:: v4l2_create_buffers .. c:type:: v4l2_create_buffers
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -119,7 +117,6 @@ than the number requested. ...@@ -119,7 +117,6 @@ than the number requested.
- A place holder for future extensions. Drivers and applications - A place holder for future extensions. Drivers and applications
must set the array to zero. must set the array to zero.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_CROPCAP: .. _VIDIOC_CROPCAP:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_CROPCAP - Information about the video cropping and scaling abilities VIDIOC_CROPCAP - Information about the video cropping and scaling abilities
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_CROPCAP, struct v4l2_cropcap *argp ) .. c:macro:: VIDIOC_CROPCAP
:name: VIDIOC_CROPCAP
``int ioctl(int fd, VIDIOC_CROPCAP, struct v4l2_cropcap *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_cropcap`. Pointer to struct :c:type:`v4l2_cropcap`.
Description Description
=========== ===========
...@@ -95,7 +94,6 @@ overlay devices. ...@@ -95,7 +94,6 @@ overlay devices.
Starting with kernel 4.13 both variations are allowed. Starting with kernel 4.13 both variations are allowed.
.. _v4l2-rect-crop: .. _v4l2-rect-crop:
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -120,7 +118,6 @@ overlay devices. ...@@ -120,7 +118,6 @@ overlay devices.
- ``height`` - ``height``
- Height of the rectangle, in pixels. - Height of the rectangle, in pixels.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_DBG_G_CHIP_INFO: .. _VIDIOC_DBG_G_CHIP_INFO:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_DBG_G_CHIP_INFO - Identify the chips on a TV card VIDIOC_DBG_G_CHIP_INFO - Identify the chips on a TV card
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_DBG_G_CHIP_INFO, struct v4l2_dbg_chip_info *argp ) .. c:macro:: VIDIOC_DBG_G_CHIP_INFO
:name: VIDIOC_DBG_G_CHIP_INFO
``int ioctl(int fd, VIDIOC_DBG_G_CHIP_INFO, struct v4l2_dbg_chip_info *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_dbg_chip_info`. Pointer to struct :c:type:`v4l2_dbg_chip_info`.
Description Description
=========== ===========
...@@ -76,7 +75,6 @@ is available from the LinuxTV v4l-dvb repository; see ...@@ -76,7 +75,6 @@ is available from the LinuxTV v4l-dvb repository; see
`https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access
instructions. instructions.
.. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}|
.. _name-v4l2-dbg-match: .. _name-v4l2-dbg-match:
...@@ -103,7 +101,6 @@ instructions. ...@@ -103,7 +101,6 @@ instructions.
- -
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_dbg_chip_info .. c:type:: v4l2_dbg_chip_info
...@@ -130,7 +127,6 @@ instructions. ...@@ -130,7 +127,6 @@ instructions.
- Reserved fields, both application and driver must set these to 0. - Reserved fields, both application and driver must set these to 0.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _name-chip-match-types: .. _name-chip-match-types:
...@@ -148,7 +144,6 @@ instructions. ...@@ -148,7 +144,6 @@ instructions.
- 4 - 4
- Match the nth sub-device. - Match the nth sub-device.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_DBG_G_REGISTER: .. _VIDIOC_DBG_G_REGISTER:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_DBG_G_REGISTER - VIDIOC_DBG_S_REGISTER - Read or write hardware registers VIDIOC_DBG_G_REGISTER - VIDIOC_DBG_S_REGISTER - Read or write hardware registers
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_DBG_G_REGISTER, struct v4l2_dbg_register *argp ) .. c:macro:: VIDIOC_DBG_G_REGISTER
:name: VIDIOC_DBG_G_REGISTER
``int ioctl(int fd, VIDIOC_DBG_G_REGISTER, struct v4l2_dbg_register *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_DBG_S_REGISTER, const struct v4l2_dbg_register *argp ) .. c:macro:: VIDIOC_DBG_S_REGISTER
:name: VIDIOC_DBG_S_REGISTER
``int ioctl(int fd, VIDIOC_DBG_S_REGISTER, const struct v4l2_dbg_register *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_dbg_register`. Pointer to struct :c:type:`v4l2_dbg_register`.
Description Description
=========== ===========
...@@ -85,7 +85,6 @@ It is available from the LinuxTV v4l-dvb repository; see ...@@ -85,7 +85,6 @@ It is available from the LinuxTV v4l-dvb repository; see
`https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access `https://linuxtv.org/repo/ <https://linuxtv.org/repo/>`__ for access
instructions. instructions.
.. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}|
.. c:type:: v4l2_dbg_match .. c:type:: v4l2_dbg_match
...@@ -112,7 +111,6 @@ instructions. ...@@ -112,7 +111,6 @@ instructions.
- -
.. c:type:: v4l2_dbg_register .. c:type:: v4l2_dbg_register
.. flat-table:: struct v4l2_dbg_register .. flat-table:: struct v4l2_dbg_register
...@@ -133,7 +131,6 @@ instructions. ...@@ -133,7 +131,6 @@ instructions.
- The value read from, or to be written into the register. - The value read from, or to be written into the register.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _chip-match-types: .. _chip-match-types:
...@@ -151,7 +148,6 @@ instructions. ...@@ -151,7 +148,6 @@ instructions.
- 4 - 4
- Match the nth sub-device. - Match the nth sub-device.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_DECODER_CMD: .. _VIDIOC_DECODER_CMD:
...@@ -11,28 +12,26 @@ Name ...@@ -11,28 +12,26 @@ Name
VIDIOC_DECODER_CMD - VIDIOC_TRY_DECODER_CMD - Execute an decoder command VIDIOC_DECODER_CMD - VIDIOC_TRY_DECODER_CMD - Execute an decoder command
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_DECODER_CMD, struct v4l2_decoder_cmd *argp ) .. c:macro:: VIDIOC_DECODER_CMD
:name: VIDIOC_DECODER_CMD
``int ioctl(int fd, VIDIOC_DECODER_CMD, struct v4l2_decoder_cmd *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_TRY_DECODER_CMD, struct v4l2_decoder_cmd *argp ) .. c:macro:: VIDIOC_TRY_DECODER_CMD
:name: VIDIOC_TRY_DECODER_CMD
``int ioctl(int fd, VIDIOC_TRY_DECODER_CMD, struct v4l2_decoder_cmd *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
pointer to struct :c:type:`v4l2_decoder_cmd`. pointer to struct :c:type:`v4l2_decoder_cmd`.
Description Description
=========== ===========
...@@ -47,11 +46,11 @@ this structure. ...@@ -47,11 +46,11 @@ this structure.
The ``cmd`` field must contain the command code. Some commands use the The ``cmd`` field must contain the command code. Some commands use the
``flags`` field for additional information. ``flags`` field for additional information.
A :ref:`write() <func-write>` or :ref:`VIDIOC_STREAMON` A :c:func:`write()` or :ref:`VIDIOC_STREAMON`
call sends an implicit START command to the decoder if it has not been call sends an implicit START command to the decoder if it has not been
started yet. Applies to both queues of mem2mem decoders. started yet. Applies to both queues of mem2mem decoders.
A :ref:`close() <func-close>` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` A :c:func:`close()` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>`
call of a streaming file descriptor sends an implicit immediate STOP call of a streaming file descriptor sends an implicit immediate STOP
command to the decoder, and all buffered data is discarded. Applies to both command to the decoder, and all buffered data is discarded. Applies to both
queues of mem2mem decoders. queues of mem2mem decoders.
...@@ -60,7 +59,6 @@ In principle, these ioctls are optional, not all drivers may support them. They ...@@ -60,7 +59,6 @@ In principle, these ioctls are optional, not all drivers may support them. They
introduced in Linux 3.3. They are, however, mandatory for stateful mem2mem decoders introduced in Linux 3.3. They are, however, mandatory for stateful mem2mem decoders
(as further documented in :ref:`decoder`). (as further documented in :ref:`decoder`).
.. tabularcolumns:: |p{1.1cm}|p{2.4cm}|p{1.2cm}|p{1.6cm}|p{10.6cm}| .. tabularcolumns:: |p{1.1cm}|p{2.4cm}|p{1.2cm}|p{1.6cm}|p{10.6cm}|
.. c:type:: v4l2_decoder_cmd .. c:type:: v4l2_decoder_cmd
...@@ -131,7 +129,6 @@ introduced in Linux 3.3. They are, however, mandatory for stateful mem2mem decod ...@@ -131,7 +129,6 @@ introduced in Linux 3.3. They are, however, mandatory for stateful mem2mem decod
- -
.. tabularcolumns:: |p{5.6cm}|p{0.6cm}|p{11.3cm}| .. tabularcolumns:: |p{5.6cm}|p{0.6cm}|p{11.3cm}|
.. _decoder-cmds: .. _decoder-cmds:
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_DQEVENT: .. _VIDIOC_DQEVENT:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_DQEVENT - Dequeue event VIDIOC_DQEVENT - Dequeue event
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_DQEVENT, struct v4l2_event *argp ) .. c:macro:: VIDIOC_DQEVENT
:name: VIDIOC_DQEVENT
``int ioctl(int fd, VIDIOC_DQEVENT, struct v4l2_event *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_event`. Pointer to struct :c:type:`v4l2_event`.
Description Description
=========== ===========
...@@ -38,7 +37,6 @@ structure are filled by the driver. The file handle will also receive ...@@ -38,7 +37,6 @@ structure are filled by the driver. The file handle will also receive
exceptions which the application may get by e.g. using the select system exceptions which the application may get by e.g. using the select system
call. call.
.. tabularcolumns:: |p{3.0cm}|p{4.4cm}|p{2.4cm}|p{7.7cm}| .. tabularcolumns:: |p{3.0cm}|p{4.4cm}|p{2.4cm}|p{7.7cm}|
.. c:type:: v4l2_event .. c:type:: v4l2_event
...@@ -100,7 +98,6 @@ call. ...@@ -100,7 +98,6 @@ call.
zero. zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. cssclass:: longtable .. cssclass:: longtable
...@@ -191,7 +188,6 @@ call. ...@@ -191,7 +188,6 @@ call.
- Base event number for driver-private events. - Base event number for driver-private events.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_event_vsync .. c:type:: v4l2_event_vsync
...@@ -206,7 +202,6 @@ call. ...@@ -206,7 +202,6 @@ call.
- The upcoming field. See enum :c:type:`v4l2_field`. - The upcoming field. See enum :c:type:`v4l2_field`.
.. tabularcolumns:: |p{3.5cm}|p{3.0cm}|p{1.8cm}|p{8.5cm}| .. tabularcolumns:: |p{3.5cm}|p{3.0cm}|p{1.8cm}|p{8.5cm}|
.. c:type:: v4l2_event_ctrl .. c:type:: v4l2_event_ctrl
...@@ -257,7 +252,6 @@ call. ...@@ -257,7 +252,6 @@ call.
:ref:`v4l2_queryctrl <v4l2-queryctrl>`. :ref:`v4l2_queryctrl <v4l2-queryctrl>`.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_event_frame_sync .. c:type:: v4l2_event_frame_sync
...@@ -272,7 +266,6 @@ call. ...@@ -272,7 +266,6 @@ call.
- The sequence number of the frame being received. - The sequence number of the frame being received.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_event_src_change .. c:type:: v4l2_event_src_change
...@@ -288,7 +281,6 @@ call. ...@@ -288,7 +281,6 @@ call.
:ref:`src-changes-flags`. :ref:`src-changes-flags`.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_event_motion_det .. c:type:: v4l2_event_motion_det
...@@ -318,7 +310,6 @@ call. ...@@ -318,7 +310,6 @@ call.
automatically assigned to the default region 0. automatically assigned to the default region 0.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _ctrl-changes-flags: .. _ctrl-changes-flags:
...@@ -344,7 +335,6 @@ call. ...@@ -344,7 +335,6 @@ call.
step or the default value of the control changed. step or the default value of the control changed.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _src-changes-flags: .. _src-changes-flags:
...@@ -375,7 +365,6 @@ call. ...@@ -375,7 +365,6 @@ call.
loss of signal and so restarting streaming I/O is required in order for loss of signal and so restarting streaming I/O is required in order for
the hardware to synchronize to the video signal. the hardware to synchronize to the video signal.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_DV_TIMINGS_CAP: .. _VIDIOC_DV_TIMINGS_CAP:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_DV_TIMINGS_CAP - VIDIOC_SUBDEV_DV_TIMINGS_CAP - The capabilities of the Digital Video receiver/transmitter VIDIOC_DV_TIMINGS_CAP - VIDIOC_SUBDEV_DV_TIMINGS_CAP - The capabilities of the Digital Video receiver/transmitter
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp ) .. c:macro:: VIDIOC_DV_TIMINGS_CAP
:name: VIDIOC_DV_TIMINGS_CAP
``int ioctl(int fd, VIDIOC_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp ) .. c:macro:: VIDIOC_SUBDEV_DV_TIMINGS_CAP
:name: VIDIOC_SUBDEV_DV_TIMINGS_CAP
``int ioctl(int fd, VIDIOC_SUBDEV_DV_TIMINGS_CAP, struct v4l2_dv_timings_cap *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_dv_timings_cap`. Pointer to struct :c:type:`v4l2_dv_timings_cap`.
Description Description
=========== ===========
...@@ -55,7 +55,6 @@ the desired pad number in the struct ...@@ -55,7 +55,6 @@ the desired pad number in the struct
zero the ``reserved`` array. Attempts to query capabilities on a pad zero the ``reserved`` array. Attempts to query capabilities on a pad
that doesn't support them will return an ``EINVAL`` error code. that doesn't support them will return an ``EINVAL`` error code.
.. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}| .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}|
.. c:type:: v4l2_bt_timings_cap .. c:type:: v4l2_bt_timings_cap
...@@ -97,7 +96,6 @@ that doesn't support them will return an ``EINVAL`` error code. ...@@ -97,7 +96,6 @@ that doesn't support them will return an ``EINVAL`` error code.
Drivers must set the array to zero. Drivers must set the array to zero.
.. tabularcolumns:: |p{1.0cm}|p{4.0cm}|p{3.5cm}|p{9.2cm}| .. tabularcolumns:: |p{1.0cm}|p{4.0cm}|p{3.5cm}|p{9.2cm}|
.. c:type:: v4l2_dv_timings_cap .. c:type:: v4l2_dv_timings_cap
...@@ -153,7 +151,6 @@ that doesn't support them will return an ``EINVAL`` error code. ...@@ -153,7 +151,6 @@ that doesn't support them will return an ``EINVAL`` error code.
- Can support non-standard timings, i.e. timings not belonging to - Can support non-standard timings, i.e. timings not belonging to
the standards set in the ``standards`` field. the standards set in the ``standards`` field.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENCODER_CMD: .. _VIDIOC_ENCODER_CMD:
...@@ -11,22 +12,22 @@ Name ...@@ -11,22 +12,22 @@ Name
VIDIOC_ENCODER_CMD - VIDIOC_TRY_ENCODER_CMD - Execute an encoder command VIDIOC_ENCODER_CMD - VIDIOC_TRY_ENCODER_CMD - Execute an encoder command
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_ENCODER_CMD, struct v4l2_encoder_cmd *argp ) .. c:macro:: VIDIOC_ENCODER_CMD
:name: VIDIOC_ENCODER_CMD
``int ioctl(int fd, VIDIOC_ENCODER_CMD, struct v4l2_encoder_cmd *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_TRY_ENCODER_CMD, struct v4l2_encoder_cmd *argp ) .. c:macro:: VIDIOC_TRY_ENCODER_CMD
:name: VIDIOC_TRY_ENCODER_CMD
``int ioctl(int fd, VIDIOC_TRY_ENCODER_CMD, struct v4l2_encoder_cmd *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_encoder_cmd`. Pointer to struct :c:type:`v4l2_encoder_cmd`.
...@@ -47,16 +48,16 @@ this structure. ...@@ -47,16 +48,16 @@ this structure.
The ``cmd`` field must contain the command code. Some commands use the The ``cmd`` field must contain the command code. Some commands use the
``flags`` field for additional information. ``flags`` field for additional information.
After a STOP command, :ref:`read() <func-read>` calls will read After a STOP command, :c:func:`read()` calls will read
the remaining data buffered by the driver. When the buffer is empty, the remaining data buffered by the driver. When the buffer is empty,
:ref:`read() <func-read>` will return zero and the next :ref:`read() <func-read>` :c:func:`read()` will return zero and the next :c:func:`read()`
call will restart the encoder. call will restart the encoder.
A :ref:`read() <func-read>` or :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>` A :c:func:`read()` or :ref:`VIDIOC_STREAMON <VIDIOC_STREAMON>`
call sends an implicit START command to the encoder if it has not been call sends an implicit START command to the encoder if it has not been
started yet. Applies to both queues of mem2mem encoders. started yet. Applies to both queues of mem2mem encoders.
A :ref:`close() <func-close>` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` A :c:func:`close()` or :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>`
call of a streaming file descriptor sends an implicit immediate STOP to call of a streaming file descriptor sends an implicit immediate STOP to
the encoder, and all buffered data is discarded. Applies to both queues of the encoder, and all buffered data is discarded. Applies to both queues of
mem2mem encoders. mem2mem encoders.
...@@ -65,7 +66,6 @@ These ioctls are optional, not all drivers may support them. They were ...@@ -65,7 +66,6 @@ These ioctls are optional, not all drivers may support them. They were
introduced in Linux 2.6.21. They are, however, mandatory for stateful mem2mem introduced in Linux 2.6.21. They are, however, mandatory for stateful mem2mem
encoders (as further documented in :ref:`encoder`). encoders (as further documented in :ref:`encoder`).
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_encoder_cmd .. c:type:: v4l2_encoder_cmd
...@@ -89,7 +89,6 @@ encoders (as further documented in :ref:`encoder`). ...@@ -89,7 +89,6 @@ encoders (as further documented in :ref:`encoder`).
the array to zero. the array to zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _encoder-cmds: .. _encoder-cmds:
...@@ -134,7 +133,6 @@ encoders (as further documented in :ref:`encoder`). ...@@ -134,7 +133,6 @@ encoders (as further documented in :ref:`encoder`).
the encoder is already running, this command does nothing. No the encoder is already running, this command does nothing. No
flags are defined for this command. flags are defined for this command.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _encoder-flags: .. _encoder-flags:
...@@ -151,7 +149,6 @@ encoders (as further documented in :ref:`encoder`). ...@@ -151,7 +149,6 @@ encoders (as further documented in :ref:`encoder`).
Does not apply to :ref:`encoder`. Does not apply to :ref:`encoder`.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUM_DV_TIMINGS: .. _VIDIOC_ENUM_DV_TIMINGS:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_ENUM_DV_TIMINGS - VIDIOC_SUBDEV_ENUM_DV_TIMINGS - Enumerate supported Digital Video timings VIDIOC_ENUM_DV_TIMINGS - VIDIOC_SUBDEV_ENUM_DV_TIMINGS - Enumerate supported Digital Video timings
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp ) .. c:macro:: VIDIOC_ENUM_DV_TIMINGS
:name: VIDIOC_ENUM_DV_TIMINGS
``int ioctl(int fd, VIDIOC_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp ) .. c:macro:: VIDIOC_SUBDEV_ENUM_DV_TIMINGS
:name: VIDIOC_SUBDEV_ENUM_DV_TIMINGS
``int ioctl(int fd, VIDIOC_SUBDEV_ENUM_DV_TIMINGS, struct v4l2_enum_dv_timings *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_enum_dv_timings`. Pointer to struct :c:type:`v4l2_enum_dv_timings`.
Description Description
=========== ===========
...@@ -65,7 +65,6 @@ pad number in the struct ...@@ -65,7 +65,6 @@ pad number in the struct
Attempts to enumerate timings on a pad that doesn't support them will Attempts to enumerate timings on a pad that doesn't support them will
return an ``EINVAL`` error code. return an ``EINVAL`` error code.
.. c:type:: v4l2_enum_dv_timings .. c:type:: v4l2_enum_dv_timings
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -91,7 +90,6 @@ return an ``EINVAL`` error code. ...@@ -91,7 +90,6 @@ return an ``EINVAL`` error code.
- ``timings`` - ``timings``
- The timings. - The timings.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUM_FMT: .. _VIDIOC_ENUM_FMT:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_ENUM_FMT - Enumerate image formats VIDIOC_ENUM_FMT - Enumerate image formats
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_ENUM_FMT, struct v4l2_fmtdesc *argp ) .. c:macro:: VIDIOC_ENUM_FMT
:name: VIDIOC_ENUM_FMT
``int ioctl(int fd, VIDIOC_ENUM_FMT, struct v4l2_fmtdesc *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_fmtdesc`. Pointer to struct :c:type:`v4l2_fmtdesc`.
Description Description
=========== ===========
...@@ -72,7 +71,6 @@ the ``mbus_code`` field is handled differently: ...@@ -72,7 +71,6 @@ the ``mbus_code`` field is handled differently:
formats shall not depend on the active configuration of the video device formats shall not depend on the active configuration of the video device
or device pipeline. or device pipeline.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_fmtdesc .. c:type:: v4l2_fmtdesc
...@@ -137,7 +135,6 @@ the ``mbus_code`` field is handled differently: ...@@ -137,7 +135,6 @@ the ``mbus_code`` field is handled differently:
zero. zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _fmtdesc-flags: .. _fmtdesc-flags:
...@@ -227,7 +224,6 @@ the ``mbus_code`` field is handled differently: ...@@ -227,7 +224,6 @@ the ``mbus_code`` field is handled differently:
device when calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with device when calling the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with
:ref:`V4L2_PIX_FMT_FLAG_SET_CSC <v4l2-pix-fmt-flag-set-csc>` set. :ref:`V4L2_PIX_FMT_FLAG_SET_CSC <v4l2-pix-fmt-flag-set-csc>` set.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUM_FRAMEINTERVALS: .. _VIDIOC_ENUM_FRAMEINTERVALS:
...@@ -11,25 +12,23 @@ Name ...@@ -11,25 +12,23 @@ Name
VIDIOC_ENUM_FRAMEINTERVALS - Enumerate frame intervals VIDIOC_ENUM_FRAMEINTERVALS - Enumerate frame intervals
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_ENUM_FRAMEINTERVALS, struct v4l2_frmivalenum *argp ) .. c:macro:: VIDIOC_ENUM_FRAMEINTERVALS
:name: VIDIOC_ENUM_FRAMEINTERVALS
``int ioctl(int fd, VIDIOC_ENUM_FRAMEINTERVALS, struct v4l2_frmivalenum *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_frmivalenum` Pointer to struct :c:type:`v4l2_frmivalenum`
that contains a pixel format and size and receives a frame interval. that contains a pixel format and size and receives a frame interval.
Description Description
=========== ===========
...@@ -91,7 +90,6 @@ other ioctl calls while it runs the frame interval enumeration. ...@@ -91,7 +90,6 @@ other ioctl calls while it runs the frame interval enumeration.
frame_rate = 1 / frame_interval frame_rate = 1 / frame_interval
Structs Structs
======= =======
...@@ -99,7 +97,6 @@ In the structs below, *IN* denotes a value that has to be filled in by ...@@ -99,7 +97,6 @@ In the structs below, *IN* denotes a value that has to be filled in by
the application, *OUT* denotes values that the driver fills in. The the application, *OUT* denotes values that the driver fills in. The
application should zero out all members except for the *IN* fields. application should zero out all members except for the *IN* fields.
.. c:type:: v4l2_frmival_stepwise .. c:type:: v4l2_frmival_stepwise
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -120,7 +117,6 @@ application should zero out all members except for the *IN* fields. ...@@ -120,7 +117,6 @@ application should zero out all members except for the *IN* fields.
- Frame interval step size [s]. - Frame interval step size [s].
.. c:type:: v4l2_frmivalenum .. c:type:: v4l2_frmivalenum
.. tabularcolumns:: |p{1.8cm}|p{4.4cm}|p{2.4cm}|p{8.9cm}| .. tabularcolumns:: |p{1.8cm}|p{4.4cm}|p{2.4cm}|p{8.9cm}|
...@@ -163,11 +159,9 @@ application should zero out all members except for the *IN* fields. ...@@ -163,11 +159,9 @@ application should zero out all members except for the *IN* fields.
applications. applications.
Enums Enums
===== =====
.. c:type:: v4l2_frmivaltypes .. c:type:: v4l2_frmivaltypes
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
...@@ -187,7 +181,6 @@ Enums ...@@ -187,7 +181,6 @@ Enums
- 3 - 3
- Step-wise defined frame interval. - Step-wise defined frame interval.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUM_FRAMESIZES: .. _VIDIOC_ENUM_FRAMESIZES:
...@@ -11,26 +12,24 @@ Name ...@@ -11,26 +12,24 @@ Name
VIDIOC_ENUM_FRAMESIZES - Enumerate frame sizes VIDIOC_ENUM_FRAMESIZES - Enumerate frame sizes
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_ENUM_FRAMESIZES, struct v4l2_frmsizeenum *argp ) .. c:macro:: VIDIOC_ENUM_FRAMESIZES
:name: VIDIOC_ENUM_FRAMESIZES
``int ioctl(int fd, VIDIOC_ENUM_FRAMESIZES, struct v4l2_frmsizeenum *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_frmsizeenum` Pointer to struct :c:type:`v4l2_frmsizeenum`
that contains an index and pixel format and receives a frame width that contains an index and pixel format and receives a frame width
and height. and height.
Description Description
=========== ===========
...@@ -81,7 +80,6 @@ without any interaction from the application itself. This means that the ...@@ -81,7 +80,6 @@ without any interaction from the application itself. This means that the
enumeration data is consistent if the application does not perform any enumeration data is consistent if the application does not perform any
other ioctl calls while it runs the frame size enumeration. other ioctl calls while it runs the frame size enumeration.
Structs Structs
======= =======
...@@ -89,7 +87,6 @@ In the structs below, *IN* denotes a value that has to be filled in by ...@@ -89,7 +87,6 @@ In the structs below, *IN* denotes a value that has to be filled in by
the application, *OUT* denotes values that the driver fills in. The the application, *OUT* denotes values that the driver fills in. The
application should zero out all members except for the *IN* fields. application should zero out all members except for the *IN* fields.
.. c:type:: v4l2_frmsize_discrete .. c:type:: v4l2_frmsize_discrete
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -107,7 +104,6 @@ application should zero out all members except for the *IN* fields. ...@@ -107,7 +104,6 @@ application should zero out all members except for the *IN* fields.
- Height of the frame [pixel]. - Height of the frame [pixel].
.. c:type:: v4l2_frmsize_stepwise .. c:type:: v4l2_frmsize_stepwise
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -137,7 +133,6 @@ application should zero out all members except for the *IN* fields. ...@@ -137,7 +133,6 @@ application should zero out all members except for the *IN* fields.
- Frame height step size [pixel]. - Frame height step size [pixel].
.. c:type:: v4l2_frmsizeenum .. c:type:: v4l2_frmsizeenum
.. tabularcolumns:: |p{1.4cm}|p{5.9cm}|p{2.3cm}|p{8.0cm}| .. tabularcolumns:: |p{1.4cm}|p{5.9cm}|p{2.3cm}|p{8.0cm}|
...@@ -173,11 +168,9 @@ application should zero out all members except for the *IN* fields. ...@@ -173,11 +168,9 @@ application should zero out all members except for the *IN* fields.
applications. applications.
Enums Enums
===== =====
.. c:type:: v4l2_frmsizetypes .. c:type:: v4l2_frmsizetypes
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
...@@ -197,7 +190,6 @@ Enums ...@@ -197,7 +190,6 @@ Enums
- 3 - 3
- Step-wise defined frame size. - Step-wise defined frame size.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUM_FREQ_BANDS: .. _VIDIOC_ENUM_FREQ_BANDS:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_ENUM_FREQ_BANDS - Enumerate supported frequency bands VIDIOC_ENUM_FREQ_BANDS - Enumerate supported frequency bands
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_ENUM_FREQ_BANDS, struct v4l2_frequency_band *argp ) .. c:macro:: VIDIOC_ENUM_FREQ_BANDS
:name: VIDIOC_ENUM_FREQ_BANDS
``int ioctl(int fd, VIDIOC_ENUM_FREQ_BANDS, struct v4l2_frequency_band *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_frequency_band`. Pointer to struct :c:type:`v4l2_frequency_band`.
Description Description
=========== ===========
...@@ -41,7 +40,6 @@ fields, and zero out the ``reserved`` array of a struct ...@@ -41,7 +40,6 @@ fields, and zero out the ``reserved`` array of a struct
This ioctl is supported if the ``V4L2_TUNER_CAP_FREQ_BANDS`` capability This ioctl is supported if the ``V4L2_TUNER_CAP_FREQ_BANDS`` capability
of the corresponding tuner/modulator is set. of the corresponding tuner/modulator is set.
.. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}| .. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}|
.. c:type:: v4l2_frequency_band .. c:type:: v4l2_frequency_band
...@@ -110,7 +108,6 @@ of the corresponding tuner/modulator is set. ...@@ -110,7 +108,6 @@ of the corresponding tuner/modulator is set.
Applications and drivers must set the array to zero. Applications and drivers must set the array to zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _band-modulation: .. _band-modulation:
...@@ -130,7 +127,6 @@ of the corresponding tuner/modulator is set. ...@@ -130,7 +127,6 @@ of the corresponding tuner/modulator is set.
- 0x08 - 0x08
- Amplitude Modulation, commonly used for analog radio. - Amplitude Modulation, commonly used for analog radio.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUMAUDIO: .. _VIDIOC_ENUMAUDIO:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_ENUMAUDIO - Enumerate audio inputs VIDIOC_ENUMAUDIO - Enumerate audio inputs
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_ENUMAUDIO, struct v4l2_audio *argp ) .. c:macro:: VIDIOC_ENUMAUDIO
:name: VIDIOC_ENUMAUDIO
``int ioctl(int fd, VIDIOC_ENUMAUDIO, struct v4l2_audio *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_audio`. Pointer to struct :c:type:`v4l2_audio`.
Description Description
=========== ===========
...@@ -43,7 +42,6 @@ zero, incrementing by one until the driver returns ``EINVAL``. ...@@ -43,7 +42,6 @@ zero, incrementing by one until the driver returns ``EINVAL``.
See :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` for a description of struct See :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` for a description of struct
:c:type:`v4l2_audio`. :c:type:`v4l2_audio`.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUMAUDOUT: .. _VIDIOC_ENUMAUDOUT:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_ENUMAUDOUT - Enumerate audio outputs VIDIOC_ENUMAUDOUT - Enumerate audio outputs
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_ENUMAUDOUT, struct v4l2_audioout *argp ) .. c:macro:: VIDIOC_ENUMAUDOUT
:name: VIDIOC_ENUMAUDOUT
``int ioctl(int fd, VIDIOC_ENUMAUDOUT, struct v4l2_audioout *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_audioout`. Pointer to struct :c:type:`v4l2_audioout`.
Description Description
=========== ===========
...@@ -48,7 +47,6 @@ zero, incrementing by one until the driver returns ``EINVAL``. ...@@ -48,7 +47,6 @@ zero, incrementing by one until the driver returns ``EINVAL``.
See :ref:`VIDIOC_G_AUDIOout <VIDIOC_G_AUDOUT>` for a description of struct See :ref:`VIDIOC_G_AUDIOout <VIDIOC_G_AUDOUT>` for a description of struct
:c:type:`v4l2_audioout`. :c:type:`v4l2_audioout`.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUMINPUT: .. _VIDIOC_ENUMINPUT:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_ENUMINPUT - Enumerate video inputs VIDIOC_ENUMINPUT - Enumerate video inputs
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_ENUMINPUT, struct v4l2_input *argp ) .. c:macro:: VIDIOC_ENUMINPUT
:name: VIDIOC_ENUMINPUT
``int ioctl(int fd, VIDIOC_ENUMINPUT, struct v4l2_input *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_input`. Pointer to struct :c:type:`v4l2_input`.
Description Description
=========== ===========
...@@ -39,7 +38,6 @@ fill the rest of the structure or return an ``EINVAL`` error code when the ...@@ -39,7 +38,6 @@ fill the rest of the structure or return an ``EINVAL`` error code when the
index is out of bounds. To enumerate all inputs applications shall begin index is out of bounds. To enumerate all inputs applications shall begin
at index zero, incrementing by one until the driver returns ``EINVAL``. at index zero, incrementing by one until the driver returns ``EINVAL``.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_input .. c:type:: v4l2_input
...@@ -103,7 +101,6 @@ at index zero, incrementing by one until the driver returns ``EINVAL``. ...@@ -103,7 +101,6 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
zero. zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _input-type: .. _input-type:
...@@ -126,7 +123,6 @@ at index zero, incrementing by one until the driver returns ``EINVAL``. ...@@ -126,7 +123,6 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- This input is a touch device for capturing raw touch data. - This input is a touch device for capturing raw touch data.
.. tabularcolumns:: |p{4.8cm}|p{2.6cm}|p{10.1cm}| .. tabularcolumns:: |p{4.8cm}|p{2.6cm}|p{10.1cm}|
.. _input-status: .. _input-status:
...@@ -198,7 +194,6 @@ at index zero, incrementing by one until the driver returns ``EINVAL``. ...@@ -198,7 +194,6 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- VTR time constant. [?] - VTR time constant. [?]
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _input-capabilities: .. _input-capabilities:
...@@ -222,7 +217,6 @@ at index zero, incrementing by one until the driver returns ``EINVAL``. ...@@ -222,7 +217,6 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see
:ref:`v4l2-selections-common`. :ref:`v4l2-selections-common`.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUMOUTPUT: .. _VIDIOC_ENUMOUTPUT:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_ENUMOUTPUT - Enumerate video outputs VIDIOC_ENUMOUTPUT - Enumerate video outputs
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp ) .. c:macro:: VIDIOC_ENUMOUTPUT
:name: VIDIOC_ENUMOUTPUT
``int ioctl(int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_output`. Pointer to struct :c:type:`v4l2_output`.
Description Description
=========== ===========
...@@ -40,7 +39,6 @@ when the index is out of bounds. To enumerate all outputs applications ...@@ -40,7 +39,6 @@ when the index is out of bounds. To enumerate all outputs applications
shall begin at index zero, incrementing by one until the driver returns shall begin at index zero, incrementing by one until the driver returns
``EINVAL``. ``EINVAL``.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_output .. c:type:: v4l2_output
...@@ -98,7 +96,6 @@ shall begin at index zero, incrementing by one until the driver returns ...@@ -98,7 +96,6 @@ shall begin at index zero, incrementing by one until the driver returns
zero. zero.
.. tabularcolumns:: |p{7.0cm}|p{1.8cm}|p{8.7cm}| .. tabularcolumns:: |p{7.0cm}|p{1.8cm}|p{8.7cm}|
.. _output-type: .. _output-type:
...@@ -121,7 +118,6 @@ shall begin at index zero, incrementing by one until the driver returns ...@@ -121,7 +118,6 @@ shall begin at index zero, incrementing by one until the driver returns
- The video output will be copied to a :ref:`video overlay <overlay>`. - The video output will be copied to a :ref:`video overlay <overlay>`.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _output-capabilities: .. _output-capabilities:
...@@ -145,7 +141,6 @@ shall begin at index zero, incrementing by one until the driver returns ...@@ -145,7 +141,6 @@ shall begin at index zero, incrementing by one until the driver returns
``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see
:ref:`v4l2-selections-common`. :ref:`v4l2-selections-common`.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_ENUMSTD: .. _VIDIOC_ENUMSTD:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_ENUMSTD - VIDIOC_SUBDEV_ENUMSTD - Enumerate supported video standards VIDIOC_ENUMSTD - VIDIOC_SUBDEV_ENUMSTD - Enumerate supported video standards
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_ENUMSTD, struct v4l2_standard *argp ) .. c:macro:: VIDIOC_ENUMSTD
:name: VIDIOC_ENUMSTD
``int ioctl(int fd, VIDIOC_ENUMSTD, struct v4l2_standard *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_ENUMSTD, struct v4l2_standard *argp ) .. c:macro:: VIDIOC_SUBDEV_ENUMSTD
:name: VIDIOC_SUBDEV_ENUMSTD
``int ioctl(int fd, VIDIOC_SUBDEV_ENUMSTD, struct v4l2_standard *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_standard`. Pointer to struct :c:type:`v4l2_standard`.
Description Description
=========== ===========
...@@ -45,7 +45,6 @@ zero, incrementing by one until the driver returns ``EINVAL``. Drivers may ...@@ -45,7 +45,6 @@ zero, incrementing by one until the driver returns ``EINVAL``. Drivers may
enumerate a different set of standards after switching the video input enumerate a different set of standards after switching the video input
or output. [#f1]_ or output. [#f1]_
.. c:type:: v4l2_standard .. c:type:: v4l2_standard
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -85,7 +84,6 @@ or output. [#f1]_ ...@@ -85,7 +84,6 @@ or output. [#f1]_
zero. zero.
.. c:type:: v4l2_fract .. c:type:: v4l2_fract
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -102,7 +100,6 @@ or output. [#f1]_ ...@@ -102,7 +100,6 @@ or output. [#f1]_
- ``denominator`` - ``denominator``
- -
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. _v4l2-std-id: .. _v4l2-std-id:
...@@ -120,7 +117,6 @@ or output. [#f1]_ ...@@ -120,7 +117,6 @@ or output. [#f1]_
standards. standards.
.. code-block:: c .. code-block:: c
#define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001) #define V4L2_STD_PAL_B ((v4l2_std_id)0x00000001)
...@@ -142,7 +138,6 @@ rate, and PAL color modulation with a 4.43 MHz color subcarrier. Some ...@@ -142,7 +138,6 @@ rate, and PAL color modulation with a 4.43 MHz color subcarrier. Some
PAL video recorders can play back NTSC tapes in this mode for display on PAL video recorders can play back NTSC tapes in this mode for display on
a 50/60 Hz agnostic PAL TV. a 50/60 Hz agnostic PAL TV.
.. code-block:: c .. code-block:: c
#define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000) #define V4L2_STD_NTSC_M ((v4l2_std_id)0x00001000)
...@@ -152,7 +147,6 @@ a 50/60 Hz agnostic PAL TV. ...@@ -152,7 +147,6 @@ a 50/60 Hz agnostic PAL TV.
``V4L2_STD_NTSC_443`` is a hybrid standard with 525 lines, 60 Hz refresh ``V4L2_STD_NTSC_443`` is a hybrid standard with 525 lines, 60 Hz refresh
rate, and NTSC color modulation with a 4.43 MHz color subcarrier. rate, and NTSC color modulation with a 4.43 MHz color subcarrier.
.. code-block:: c .. code-block:: c
#define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000) #define V4L2_STD_NTSC_M_KR ((v4l2_std_id)0x00008000)
...@@ -175,7 +169,6 @@ terrestrial digital TV standards. Presently the V4L2 API does not ...@@ -175,7 +169,6 @@ terrestrial digital TV standards. Presently the V4L2 API does not
support digital TV. See also the Linux DVB API at support digital TV. See also the Linux DVB API at
`https://linuxtv.org <https://linuxtv.org>`__. `https://linuxtv.org <https://linuxtv.org>`__.
.. code-block:: c .. code-block:: c
#define V4L2_STD_PAL_BG (V4L2_STD_PAL_B | #define V4L2_STD_PAL_BG (V4L2_STD_PAL_B |
...@@ -228,7 +221,6 @@ support digital TV. See also the Linux DVB API at ...@@ -228,7 +221,6 @@ support digital TV. See also the Linux DVB API at
#define V4L2_STD_ALL (V4L2_STD_525_60 | #define V4L2_STD_ALL (V4L2_STD_525_60 |
V4L2_STD_625_50) V4L2_STD_625_50)
.. raw:: latex .. raw:: latex
\begingroup \begingroup
...@@ -303,7 +295,6 @@ support digital TV. See also the Linux DVB API at ...@@ -303,7 +295,6 @@ support digital TV. See also the Linux DVB API at
\endgroup \endgroup
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_EXPBUF: .. _VIDIOC_EXPBUF:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_EXPBUF - Export a buffer as a DMABUF file descriptor. VIDIOC_EXPBUF - Export a buffer as a DMABUF file descriptor.
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_EXPBUF, struct v4l2_exportbuffer *argp ) .. c:macro:: VIDIOC_EXPBUF
:name: VIDIOC_EXPBUF
``int ioctl(int fd, VIDIOC_EXPBUF, struct v4l2_exportbuffer *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_exportbuffer`. Pointer to struct :c:type:`v4l2_exportbuffer`.
Description Description
=========== ===========
...@@ -63,11 +62,9 @@ for details about importing DMABUF files into V4L2 nodes. It is ...@@ -63,11 +62,9 @@ for details about importing DMABUF files into V4L2 nodes. It is
recommended to close a DMABUF file when it is no longer used to allow recommended to close a DMABUF file when it is no longer used to allow
the associated memory to be reclaimed. the associated memory to be reclaimed.
Examples Examples
======== ========
.. code-block:: c .. code-block:: c
int buffer_export(int v4lfd, enum v4l2_buf_type bt, int index, int *dmafd) int buffer_export(int v4lfd, enum v4l2_buf_type bt, int index, int *dmafd)
...@@ -87,7 +84,6 @@ Examples ...@@ -87,7 +84,6 @@ Examples
return 0; return 0;
} }
.. code-block:: c .. code-block:: c
int buffer_export_mp(int v4lfd, enum v4l2_buf_type bt, int index, int buffer_export_mp(int v4lfd, enum v4l2_buf_type bt, int index,
...@@ -114,7 +110,6 @@ Examples ...@@ -114,7 +110,6 @@ Examples
return 0; return 0;
} }
.. c:type:: v4l2_exportbuffer .. c:type:: v4l2_exportbuffer
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -155,7 +150,6 @@ Examples ...@@ -155,7 +150,6 @@ Examples
- Reserved field for future use. Drivers and applications must set - Reserved field for future use. Drivers and applications must set
the array to zero. the array to zero.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_AUDIO: .. _VIDIOC_G_AUDIO:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_AUDIO - VIDIOC_S_AUDIO - Query or select the current audio input and its attributes VIDIOC_G_AUDIO - VIDIOC_S_AUDIO - Query or select the current audio input and its attributes
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_AUDIO, struct v4l2_audio *argp ) .. c:macro:: VIDIOC_G_AUDIO
:name: VIDIOC_G_AUDIO
``int ioctl(int fd, VIDIOC_G_AUDIO, struct v4l2_audio *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_AUDIO, const struct v4l2_audio *argp ) .. c:macro:: VIDIOC_S_AUDIO
:name: VIDIOC_S_AUDIO
``int ioctl(int fd, VIDIOC_S_AUDIO, const struct v4l2_audio *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_audio`. Pointer to struct :c:type:`v4l2_audio`.
Description Description
=========== ===========
...@@ -49,7 +49,6 @@ ioctl. Drivers may switch to a different audio mode if the request ...@@ -49,7 +49,6 @@ ioctl. Drivers may switch to a different audio mode if the request
cannot be satisfied. However, this is a write-only ioctl, it does not cannot be satisfied. However, this is a write-only ioctl, it does not
return the actual new audio mode. return the actual new audio mode.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_audio .. c:type:: v4l2_audio
...@@ -80,7 +79,6 @@ return the actual new audio mode. ...@@ -80,7 +79,6 @@ return the actual new audio mode.
the array to zero. the array to zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _audio-capability: .. _audio-capability:
...@@ -101,7 +99,6 @@ return the actual new audio mode. ...@@ -101,7 +99,6 @@ return the actual new audio mode.
- Automatic Volume Level mode is supported. - Automatic Volume Level mode is supported.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _audio-mode: .. _audio-mode:
...@@ -115,7 +112,6 @@ return the actual new audio mode. ...@@ -115,7 +112,6 @@ return the actual new audio mode.
- 0x00001 - 0x00001
- AVL mode is on. - AVL mode is on.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_AUDOUT: .. _VIDIOC_G_AUDOUT:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_AUDOUT - VIDIOC_S_AUDOUT - Query or select the current audio output VIDIOC_G_AUDOUT - VIDIOC_S_AUDOUT - Query or select the current audio output
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_AUDOUT, struct v4l2_audioout *argp ) .. c:macro:: VIDIOC_G_AUDOUT
:name: VIDIOC_G_AUDOUT
``int ioctl(int fd, VIDIOC_G_AUDOUT, struct v4l2_audioout *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_AUDOUT, const struct v4l2_audioout *argp ) .. c:macro:: VIDIOC_S_AUDOUT
:name: VIDIOC_S_AUDOUT
``int ioctl(int fd, VIDIOC_S_AUDOUT, const struct v4l2_audioout *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_audioout`. Pointer to struct :c:type:`v4l2_audioout`.
Description Description
=========== ===========
...@@ -56,7 +56,6 @@ as ``VIDIOC_G_AUDOUT`` does. ...@@ -56,7 +56,6 @@ as ``VIDIOC_G_AUDOUT`` does.
Connectors on a TV card to loop back the received audio signal Connectors on a TV card to loop back the received audio signal
to a sound card are not audio outputs in this sense. to a sound card are not audio outputs in this sense.
.. c:type:: v4l2_audioout .. c:type:: v4l2_audioout
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -87,7 +86,6 @@ as ``VIDIOC_G_AUDOUT`` does. ...@@ -87,7 +86,6 @@ as ``VIDIOC_G_AUDOUT`` does.
- Reserved for future extensions. Drivers and applications must set - Reserved for future extensions. Drivers and applications must set
the array to zero. the array to zero.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_CROP: .. _VIDIOC_G_CROP:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_CROP - VIDIOC_S_CROP - Get or set the current cropping rectangle VIDIOC_G_CROP - VIDIOC_S_CROP - Get or set the current cropping rectangle
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_CROP, struct v4l2_crop *argp ) .. c:macro:: VIDIOC_G_CROP
:name: VIDIOC_G_CROP
``int ioctl(int fd, VIDIOC_G_CROP, struct v4l2_crop *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_CROP, const struct v4l2_crop *argp ) .. c:macro:: VIDIOC_S_CROP
:name: VIDIOC_S_CROP
``int ioctl(int fd, VIDIOC_S_CROP, const struct v4l2_crop *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_crop`. Pointer to struct :c:type:`v4l2_crop`.
Description Description
=========== ===========
...@@ -69,7 +69,6 @@ been negotiated. ...@@ -69,7 +69,6 @@ been negotiated.
When cropping is not supported then no parameters are changed and When cropping is not supported then no parameters are changed and
:ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` returns the ``EINVAL`` error code. :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` returns the ``EINVAL`` error code.
.. c:type:: v4l2_crop .. c:type:: v4l2_crop
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -100,7 +99,6 @@ When cropping is not supported then no parameters are changed and ...@@ -100,7 +99,6 @@ When cropping is not supported then no parameters are changed and
Starting with kernel 4.13 both variations are allowed. Starting with kernel 4.13 both variations are allowed.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_CTRL: .. _VIDIOC_G_CTRL:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_CTRL - VIDIOC_S_CTRL - Get or set the value of a control VIDIOC_G_CTRL - VIDIOC_S_CTRL - Get or set the value of a control
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_CTRL, struct v4l2_control *argp ) .. c:macro:: VIDIOC_G_CTRL
:name: VIDIOC_G_CTRL
``int ioctl(int fd, VIDIOC_G_CTRL, struct v4l2_control *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_CTRL, struct v4l2_control *argp ) .. c:macro:: VIDIOC_S_CTRL
:name: VIDIOC_S_CTRL
``int ioctl(int fd, VIDIOC_S_CTRL, struct v4l2_control *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_control`. Pointer to struct :c:type:`v4l2_control`.
Description Description
=========== ===========
...@@ -55,7 +55,6 @@ These ioctls work only with user controls. For other control classes the ...@@ -55,7 +55,6 @@ These ioctls work only with user controls. For other control classes the
:ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` or :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` or
:ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` must be used. :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` must be used.
.. c:type:: v4l2_control .. c:type:: v4l2_control
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -72,7 +71,6 @@ These ioctls work only with user controls. For other control classes the ...@@ -72,7 +71,6 @@ These ioctls work only with user controls. For other control classes the
- ``value`` - ``value``
- New value or current value. - New value or current value.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_DV_TIMINGS: .. _VIDIOC_G_DV_TIMINGS:
...@@ -11,33 +12,34 @@ Name ...@@ -11,33 +12,34 @@ Name
VIDIOC_G_DV_TIMINGS - VIDIOC_S_DV_TIMINGS - VIDIOC_SUBDEV_G_DV_TIMINGS - VIDIOC_SUBDEV_S_DV_TIMINGS - Get or set DV timings for input or output VIDIOC_G_DV_TIMINGS - VIDIOC_S_DV_TIMINGS - VIDIOC_SUBDEV_G_DV_TIMINGS - VIDIOC_SUBDEV_S_DV_TIMINGS - Get or set DV timings for input or output
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_DV_TIMINGS, struct v4l2_dv_timings *argp ) .. c:macro:: VIDIOC_G_DV_TIMINGS
:name: VIDIOC_G_DV_TIMINGS
``int ioctl(int fd, VIDIOC_G_DV_TIMINGS, struct v4l2_dv_timings *argp)``
.. c:macro:: VIDIOC_S_DV_TIMINGS
``int ioctl(int fd, VIDIOC_S_DV_TIMINGS, struct v4l2_dv_timings *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_DV_TIMINGS, struct v4l2_dv_timings *argp ) .. c:macro:: VIDIOC_SUBDEV_G_DV_TIMINGS
:name: VIDIOC_S_DV_TIMINGS
.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_DV_TIMINGS, struct v4l2_dv_timings *argp ) ``int ioctl(int fd, VIDIOC_SUBDEV_G_DV_TIMINGS, struct v4l2_dv_timings *argp)``
:name: VIDIOC_SUBDEV_G_DV_TIMINGS
.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_DV_TIMINGS, struct v4l2_dv_timings *argp ) .. c:macro:: VIDIOC_SUBDEV_S_DV_TIMINGS
:name: VIDIOC_SUBDEV_S_DV_TIMINGS
``int ioctl(int fd, VIDIOC_SUBDEV_S_DV_TIMINGS, struct v4l2_dv_timings *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_dv_timings`. Pointer to struct :c:type:`v4l2_dv_timings`.
Description Description
=========== ===========
...@@ -60,7 +62,6 @@ the current input or output does not support DV timings (e.g. if ...@@ -60,7 +62,6 @@ the current input or output does not support DV timings (e.g. if
:ref:`VIDIOC_ENUMINPUT` does not set the :ref:`VIDIOC_ENUMINPUT` does not set the
``V4L2_IN_CAP_DV_TIMINGS`` flag), then ``ENODATA`` error code is returned. ``V4L2_IN_CAP_DV_TIMINGS`` flag), then ``ENODATA`` error code is returned.
Return Value Return Value
============ ============
...@@ -170,7 +171,6 @@ EPERM ...@@ -170,7 +171,6 @@ EPERM
- Reserved for future extensions. Drivers and applications must set - Reserved for future extensions. Drivers and applications must set
the array to zero. the array to zero.
.. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{7.0cm}|p{3.5cm}| .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{7.0cm}|p{3.5cm}|
.. c:type:: v4l2_dv_timings .. c:type:: v4l2_dv_timings
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_EDID: .. _VIDIOC_G_EDID:
...@@ -11,34 +12,34 @@ Name ...@@ -11,34 +12,34 @@ Name
VIDIOC_G_EDID - VIDIOC_S_EDID - VIDIOC_SUBDEV_G_EDID - VIDIOC_SUBDEV_S_EDID - Get or set the EDID of a video receiver/transmitter VIDIOC_G_EDID - VIDIOC_S_EDID - VIDIOC_SUBDEV_G_EDID - VIDIOC_SUBDEV_S_EDID - Get or set the EDID of a video receiver/transmitter
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_EDID, struct v4l2_edid *argp ) .. c:macro:: VIDIOC_G_EDID
:name: VIDIOC_G_EDID
``int ioctl(int fd, VIDIOC_G_EDID, struct v4l2_edid *argp)``
.. c:macro:: VIDIOC_S_EDID
.. c:function:: int ioctl( int fd, VIDIOC_S_EDID, struct v4l2_edid *argp ) ``int ioctl(int fd, VIDIOC_S_EDID, struct v4l2_edid *argp)``
:name: VIDIOC_S_EDID
.. c:macro:: VIDIOC_SUBDEV_G_EDID
.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_EDID, struct v4l2_edid *argp ) ``int ioctl(int fd, VIDIOC_SUBDEV_G_EDID, struct v4l2_edid *argp)``
:name: VIDIOC_SUBDEV_G_EDID
.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_EDID, struct v4l2_edid *argp ) .. c:macro:: VIDIOC_SUBDEV_S_EDID
:name: VIDIOC_SUBDEV_S_EDID
``int ioctl(int fd, VIDIOC_SUBDEV_S_EDID, struct v4l2_edid *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_edid`. Pointer to struct :c:type:`v4l2_edid`.
Description Description
=========== ===========
...@@ -97,7 +98,6 @@ this will drive the hotplug pin low and/or block the source from reading ...@@ -97,7 +98,6 @@ this will drive the hotplug pin low and/or block the source from reading
the EDID data in some way. In any case, the end result is the same: the the EDID data in some way. In any case, the end result is the same: the
EDID is no longer available. EDID is no longer available.
.. c:type:: v4l2_edid .. c:type:: v4l2_edid
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -132,7 +132,6 @@ EDID is no longer available. ...@@ -132,7 +132,6 @@ EDID is no longer available.
- Pointer to memory that contains the EDID. The minimum size is - Pointer to memory that contains the EDID. The minimum size is
``blocks`` * 128. ``blocks`` * 128.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_ENC_INDEX: .. _VIDIOC_G_ENC_INDEX:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_G_ENC_INDEX - Get meta data about a compressed video stream VIDIOC_G_ENC_INDEX - Get meta data about a compressed video stream
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_ENC_INDEX, struct v4l2_enc_idx *argp ) .. c:macro:: VIDIOC_G_ENC_INDEX
:name: VIDIOC_G_ENC_INDEX
``int ioctl(int fd, VIDIOC_G_ENC_INDEX, struct v4l2_enc_idx *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_enc_idx`. Pointer to struct :c:type:`v4l2_enc_idx`.
Description Description
=========== ===========
...@@ -55,7 +54,6 @@ will be zero. ...@@ -55,7 +54,6 @@ will be zero.
Currently this ioctl is only defined for MPEG-2 program streams and Currently this ioctl is only defined for MPEG-2 program streams and
video elementary streams. video elementary streams.
.. tabularcolumns:: |p{3.8cm}|p{5.6cm}|p{8.1cm}| .. tabularcolumns:: |p{3.8cm}|p{5.6cm}|p{8.1cm}|
.. c:type:: v4l2_enc_idx .. c:type:: v4l2_enc_idx
...@@ -83,7 +81,6 @@ video elementary streams. ...@@ -83,7 +81,6 @@ video elementary streams.
their ``offset``. their ``offset``.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_enc_idx_entry .. c:type:: v4l2_enc_idx_entry
...@@ -116,7 +113,6 @@ video elementary streams. ...@@ -116,7 +113,6 @@ video elementary streams.
- Reserved for future extensions. Drivers must set the array to - Reserved for future extensions. Drivers must set the array to
zero. zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _enc-idx-flags: .. _enc-idx-flags:
...@@ -140,7 +136,6 @@ video elementary streams. ...@@ -140,7 +136,6 @@ video elementary streams.
- *AND* the flags field with this mask to obtain the picture coding - *AND* the flags field with this mask to obtain the picture coding
type. type.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_EXT_CTRLS: .. _VIDIOC_G_EXT_CTRLS:
...@@ -11,32 +12,30 @@ Name ...@@ -11,32 +12,30 @@ Name
VIDIOC_G_EXT_CTRLS - VIDIOC_S_EXT_CTRLS - VIDIOC_TRY_EXT_CTRLS - Get or set the value of several controls, try control values VIDIOC_G_EXT_CTRLS - VIDIOC_S_EXT_CTRLS - VIDIOC_TRY_EXT_CTRLS - Get or set the value of several controls, try control values
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_EXT_CTRLS, struct v4l2_ext_controls *argp ) .. c:macro:: VIDIOC_G_EXT_CTRLS
:name: VIDIOC_G_EXT_CTRLS
``int ioctl(int fd, VIDIOC_G_EXT_CTRLS, struct v4l2_ext_controls *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_EXT_CTRLS, struct v4l2_ext_controls *argp ) .. c:macro:: VIDIOC_S_EXT_CTRLS
:name: VIDIOC_S_EXT_CTRLS
``int ioctl(int fd, VIDIOC_S_EXT_CTRLS, struct v4l2_ext_controls *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_TRY_EXT_CTRLS, struct v4l2_ext_controls *argp ) .. c:macro:: VIDIOC_TRY_EXT_CTRLS
:name: VIDIOC_TRY_EXT_CTRLS
``int ioctl(int fd, VIDIOC_TRY_EXT_CTRLS, struct v4l2_ext_controls *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_ext_controls`. Pointer to struct :c:type:`v4l2_ext_controls`.
Description Description
=========== ===========
...@@ -119,7 +118,6 @@ correct. This prevents the situation where only some of the controls ...@@ -119,7 +118,6 @@ correct. This prevents the situation where only some of the controls
were set/get. Only low-level errors (e. g. a failed i2c command) can were set/get. Only low-level errors (e. g. a failed i2c command) can
still cause this situation. still cause this situation.
.. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{1.5cm}|p{11.8cm}| .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{1.5cm}|p{11.8cm}|
.. c:type:: v4l2_ext_control .. c:type:: v4l2_ext_control
...@@ -195,7 +193,6 @@ still cause this situation. ...@@ -195,7 +193,6 @@ still cause this situation.
* - } * - }
- -
.. tabularcolumns:: |p{4.0cm}|p{2.2cm}|p{2.1cm}|p{8.2cm}| .. tabularcolumns:: |p{4.0cm}|p{2.2cm}|p{2.1cm}|p{8.2cm}|
.. c:type:: v4l2_ext_controls .. c:type:: v4l2_ext_controls
...@@ -309,7 +306,6 @@ still cause this situation. ...@@ -309,7 +306,6 @@ still cause this situation.
Ignored if ``count`` equals zero. Ignored if ``count`` equals zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _ctrl-class: .. _ctrl-class:
...@@ -363,7 +359,6 @@ still cause this situation. ...@@ -363,7 +359,6 @@ still cause this situation.
- The class containing RF tuner controls. These controls are - The class containing RF tuner controls. These controls are
described in :ref:`rf-tuner-controls`. described in :ref:`rf-tuner-controls`.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_FBUF: .. _VIDIOC_G_FBUF:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_FBUF - VIDIOC_S_FBUF - Get or set frame buffer overlay parameters VIDIOC_G_FBUF - VIDIOC_S_FBUF - Get or set frame buffer overlay parameters
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_FBUF, struct v4l2_framebuffer *argp ) .. c:macro:: VIDIOC_G_FBUF
:name: VIDIOC_G_FBUF
``int ioctl(int fd, VIDIOC_G_FBUF, struct v4l2_framebuffer *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_FBUF, const struct v4l2_framebuffer *argp ) .. c:macro:: VIDIOC_S_FBUF
:name: VIDIOC_S_FBUF
``int ioctl(int fd, VIDIOC_S_FBUF, const struct v4l2_framebuffer *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_framebuffer`. Pointer to struct :c:type:`v4l2_framebuffer`.
Description Description
=========== ===========
...@@ -75,7 +75,6 @@ jeopardize the system security, its stability or even damage the ...@@ -75,7 +75,6 @@ jeopardize the system security, its stability or even damage the
hardware, therefore only the superuser can set the parameters for a hardware, therefore only the superuser can set the parameters for a
destructive video overlay. destructive video overlay.
.. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}|
.. c:type:: v4l2_framebuffer .. c:type:: v4l2_framebuffer
...@@ -208,7 +207,6 @@ destructive video overlay. ...@@ -208,7 +207,6 @@ destructive video overlay.
- ``priv`` - ``priv``
- Reserved. Drivers and applications must set this field to zero. - Reserved. Drivers and applications must set this field to zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _framebuffer-cap: .. _framebuffer-cap:
...@@ -257,7 +255,6 @@ destructive video overlay. ...@@ -257,7 +255,6 @@ destructive video overlay.
chroma-key colors are replaced by framebuffer pixels, which is chroma-key colors are replaced by framebuffer pixels, which is
exactly opposite of ``V4L2_FBUF_CAP_CHROMAKEY`` exactly opposite of ``V4L2_FBUF_CAP_CHROMAKEY``
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _framebuffer-flags: .. _framebuffer-flags:
...@@ -332,7 +329,6 @@ destructive video overlay. ...@@ -332,7 +329,6 @@ destructive video overlay.
other, so same ``chromakey`` field of struct other, so same ``chromakey`` field of struct
:c:type:`v4l2_window` is being used. :c:type:`v4l2_window` is being used.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_FMT: .. _VIDIOC_G_FMT:
...@@ -11,29 +12,30 @@ Name ...@@ -11,29 +12,30 @@ Name
VIDIOC_G_FMT - VIDIOC_S_FMT - VIDIOC_TRY_FMT - Get or set the data format, try a format VIDIOC_G_FMT - VIDIOC_S_FMT - VIDIOC_TRY_FMT - Get or set the data format, try a format
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_FMT, struct v4l2_format *argp ) .. c:macro:: VIDIOC_G_FMT
:name: VIDIOC_G_FMT
``int ioctl(int fd, VIDIOC_G_FMT, struct v4l2_format *argp)``
.. c:macro:: VIDIOC_S_FMT
``int ioctl(int fd, VIDIOC_S_FMT, struct v4l2_format *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_FMT, struct v4l2_format *argp ) .. c:macro:: VIDIOC_TRY_FMT
:name: VIDIOC_S_FMT
.. c:function:: int ioctl( int fd, VIDIOC_TRY_FMT, struct v4l2_format *argp ) ``int ioctl(int fd, VIDIOC_TRY_FMT, struct v4l2_format *argp)``
:name: VIDIOC_TRY_FMT
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_format`. Pointer to struct :c:type:`v4l2_format`.
Description Description
=========== ===========
...@@ -85,7 +87,6 @@ recommended drivers are not required to implement this ioctl. ...@@ -85,7 +87,6 @@ recommended drivers are not required to implement this ioctl.
The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical to what The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical to what
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` returns for the same input or output. :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` returns for the same input or output.
.. c:type:: v4l2_format .. c:type:: v4l2_format
.. tabularcolumns:: |p{1.2cm}|p{4.6cm}|p{3.0cm}|p{8.6cm}| .. tabularcolumns:: |p{1.2cm}|p{4.6cm}|p{3.0cm}|p{8.6cm}|
...@@ -135,7 +136,6 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical ...@@ -135,7 +136,6 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical
* - } * - }
- -
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_FREQUENCY: .. _VIDIOC_G_FREQUENCY:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_FREQUENCY - VIDIOC_S_FREQUENCY - Get or set tuner or modulator radio frequency VIDIOC_G_FREQUENCY - VIDIOC_S_FREQUENCY - Get or set tuner or modulator radio frequency
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_FREQUENCY, struct v4l2_frequency *argp ) .. c:macro:: VIDIOC_G_FREQUENCY
:name: VIDIOC_G_FREQUENCY
``int ioctl(int fd, VIDIOC_G_FREQUENCY, struct v4l2_frequency *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_FREQUENCY, const struct v4l2_frequency *argp ) .. c:macro:: VIDIOC_S_FREQUENCY
:name: VIDIOC_S_FREQUENCY
``int ioctl(int fd, VIDIOC_S_FREQUENCY, const struct v4l2_frequency *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_frequency`. Pointer to struct :c:type:`v4l2_frequency`.
Description Description
=========== ===========
...@@ -51,7 +51,6 @@ structure. When the requested frequency is not possible the driver ...@@ -51,7 +51,6 @@ structure. When the requested frequency is not possible the driver
assumes the closest possible value. However :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` is a assumes the closest possible value. However :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` is a
write-only ioctl, it does not return the actual new frequency. write-only ioctl, it does not return the actual new frequency.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_frequency .. c:type:: v4l2_frequency
...@@ -89,7 +88,6 @@ write-only ioctl, it does not return the actual new frequency. ...@@ -89,7 +88,6 @@ write-only ioctl, it does not return the actual new frequency.
- Reserved for future extensions. Drivers and applications must set - Reserved for future extensions. Drivers and applications must set
the array to zero. the array to zero.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_INPUT: .. _VIDIOC_G_INPUT:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_INPUT - VIDIOC_S_INPUT - Query or select the current video input VIDIOC_G_INPUT - VIDIOC_S_INPUT - Query or select the current video input
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_INPUT, int *argp ) .. c:macro:: VIDIOC_G_INPUT
:name: VIDIOC_G_INPUT
``int ioctl(int fd, VIDIOC_G_INPUT, int *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_INPUT, int *argp ) .. c:macro:: VIDIOC_S_INPUT
:name: VIDIOC_S_INPUT
``int ioctl(int fd, VIDIOC_S_INPUT, int *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer an integer with input index. Pointer an integer with input index.
Description Description
=========== ===========
...@@ -52,7 +52,6 @@ other parameters. ...@@ -52,7 +52,6 @@ other parameters.
Information about video inputs is available using the Information about video inputs is available using the
:ref:`VIDIOC_ENUMINPUT` ioctl. :ref:`VIDIOC_ENUMINPUT` ioctl.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_JPEGCOMP: .. _VIDIOC_G_JPEGCOMP:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_JPEGCOMP - VIDIOC_S_JPEGCOMP VIDIOC_G_JPEGCOMP - VIDIOC_S_JPEGCOMP
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_JPEGCOMP, v4l2_jpegcompression *argp ) .. c:macro:: VIDIOC_G_JPEGCOMP
:name: VIDIOC_G_JPEGCOMP
``int ioctl(int fd, VIDIOC_G_JPEGCOMP, v4l2_jpegcompression *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_JPEGCOMP, const v4l2_jpegcompression *argp ) .. c:macro:: VIDIOC_S_JPEGCOMP
:name: VIDIOC_S_JPEGCOMP
``int ioctl(int fd, VIDIOC_S_JPEGCOMP, const v4l2_jpegcompression *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_jpegcompression`. Pointer to struct :c:type:`v4l2_jpegcompression`.
Description Description
=========== ===========
...@@ -54,7 +54,6 @@ stored in the JPEG-encoded fields. These define how the JPEG field is ...@@ -54,7 +54,6 @@ stored in the JPEG-encoded fields. These define how the JPEG field is
encoded. If you omit them, applications assume you've used standard encoded. If you omit them, applications assume you've used standard
encoding. You usually do want to add them. encoding. You usually do want to add them.
.. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}| .. tabularcolumns:: |p{1.2cm}|p{3.0cm}|p{13.3cm}|
.. c:type:: v4l2_jpegcompression .. c:type:: v4l2_jpegcompression
...@@ -92,7 +91,6 @@ encoding. You usually do want to add them. ...@@ -92,7 +91,6 @@ encoding. You usually do want to add them.
control is exposed by a driver applications should use it instead control is exposed by a driver applications should use it instead
and ignore this field. and ignore this field.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _jpeg-markers: .. _jpeg-markers:
...@@ -118,7 +116,6 @@ encoding. You usually do want to add them. ...@@ -118,7 +116,6 @@ encoding. You usually do want to add them.
- (1<<7) - (1<<7)
- App segment, driver will always use APP0 - App segment, driver will always use APP0
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_MODULATOR: .. _VIDIOC_G_MODULATOR:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_MODULATOR - VIDIOC_S_MODULATOR - Get or set modulator attributes VIDIOC_G_MODULATOR - VIDIOC_S_MODULATOR - Get or set modulator attributes
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_MODULATOR, struct v4l2_modulator *argp ) .. c:macro:: VIDIOC_G_MODULATOR
:name: VIDIOC_G_MODULATOR
``int ioctl(int fd, VIDIOC_G_MODULATOR, struct v4l2_modulator *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_MODULATOR, const struct v4l2_modulator *argp ) .. c:macro:: VIDIOC_S_MODULATOR
:name: VIDIOC_S_MODULATOR
``int ioctl(int fd, VIDIOC_S_MODULATOR, const struct v4l2_modulator *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_modulator`. Pointer to struct :c:type:`v4l2_modulator`.
Description Description
=========== ===========
...@@ -60,7 +60,6 @@ context. ...@@ -60,7 +60,6 @@ context.
To change the radio frequency the To change the radio frequency the
:ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available. :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available.
.. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}| .. tabularcolumns:: |p{2.9cm}|p{2.9cm}|p{5.8cm}|p{2.9cm}|p{3.0cm}|
.. c:type:: v4l2_modulator .. c:type:: v4l2_modulator
...@@ -121,7 +120,6 @@ To change the radio frequency the ...@@ -121,7 +120,6 @@ To change the radio frequency the
Drivers and applications must set the array to zero. Drivers and applications must set the array to zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _modulator-txsubchans: .. _modulator-txsubchans:
...@@ -182,7 +180,6 @@ To change the radio frequency the ...@@ -182,7 +180,6 @@ To change the radio frequency the
- 0x0010 - 0x0010
- Enable the RDS encoder for a radio FM transmitter. - Enable the RDS encoder for a radio FM transmitter.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_OUTPUT: .. _VIDIOC_G_OUTPUT:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_OUTPUT - VIDIOC_S_OUTPUT - Query or select the current video output VIDIOC_G_OUTPUT - VIDIOC_S_OUTPUT - Query or select the current video output
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_OUTPUT, int *argp ) .. c:macro:: VIDIOC_G_OUTPUT
:name: VIDIOC_G_OUTPUT
``int ioctl(int fd, VIDIOC_G_OUTPUT, int *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_OUTPUT, int *argp ) .. c:macro:: VIDIOC_S_OUTPUT
:name: VIDIOC_S_OUTPUT
``int ioctl(int fd, VIDIOC_S_OUTPUT, int *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to an integer with output index. Pointer to an integer with output index.
Description Description
=========== ===========
...@@ -53,7 +53,6 @@ negotiating any other parameters. ...@@ -53,7 +53,6 @@ negotiating any other parameters.
Information about video outputs is available using the Information about video outputs is available using the
:ref:`VIDIOC_ENUMOUTPUT` ioctl. :ref:`VIDIOC_ENUMOUTPUT` ioctl.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_PARM: .. _VIDIOC_G_PARM:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_PARM - VIDIOC_S_PARM - Get or set streaming parameters VIDIOC_G_PARM - VIDIOC_S_PARM - Get or set streaming parameters
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_PARM, v4l2_streamparm *argp ) .. c:macro:: VIDIOC_G_PARM
:name: VIDIOC_G_PARM
``int ioctl(int fd, VIDIOC_G_PARM, v4l2_streamparm *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_PARM, v4l2_streamparm *argp ) .. c:macro:: VIDIOC_S_PARM
:name: VIDIOC_S_PARM
``int ioctl(int fd, VIDIOC_S_PARM, v4l2_streamparm *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_streamparm`. Pointer to struct :c:type:`v4l2_streamparm`.
Description Description
=========== ===========
...@@ -48,7 +48,7 @@ format, on the other hand, may change the frame interval. ...@@ -48,7 +48,7 @@ format, on the other hand, may change the frame interval.
Further these ioctls can be used to determine the number of buffers used Further these ioctls can be used to determine the number of buffers used
internally by a driver in read/write mode. For implications see the internally by a driver in read/write mode. For implications see the
section discussing the :ref:`read() <func-read>` function. section discussing the :c:func:`read()` function.
To get and set the streaming parameters applications call the To get and set the streaming parameters applications call the
:ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and
...@@ -56,7 +56,6 @@ To get and set the streaming parameters applications call the ...@@ -56,7 +56,6 @@ To get and set the streaming parameters applications call the
pointer to a struct :c:type:`v4l2_streamparm` which contains a pointer to a struct :c:type:`v4l2_streamparm` which contains a
union holding separate parameters for input and output devices. union holding separate parameters for input and output devices.
.. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}| .. tabularcolumns:: |p{3.5cm}|p{3.5cm}|p{3.5cm}|p{7.0cm}|
.. c:type:: v4l2_streamparm .. c:type:: v4l2_streamparm
...@@ -89,7 +88,6 @@ union holding separate parameters for input and output devices. ...@@ -89,7 +88,6 @@ union holding separate parameters for input and output devices.
- -
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_captureparm .. c:type:: v4l2_captureparm
...@@ -138,7 +136,7 @@ union holding separate parameters for input and output devices. ...@@ -138,7 +136,7 @@ union holding separate parameters for input and output devices.
* - __u32 * - __u32
- ``readbuffers`` - ``readbuffers``
- Applications set this field to the desired number of buffers used - Applications set this field to the desired number of buffers used
internally by the driver in :ref:`read() <func-read>` mode. internally by the driver in :c:func:`read()` mode.
Drivers return the actual number of buffers. When an application Drivers return the actual number of buffers. When an application
requests zero buffers, drivers should just return the current requests zero buffers, drivers should just return the current
setting rather than the minimum or an error code. For details see setting rather than the minimum or an error code. For details see
...@@ -149,7 +147,6 @@ union holding separate parameters for input and output devices. ...@@ -149,7 +147,6 @@ union holding separate parameters for input and output devices.
the array to zero. the array to zero.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. c:type:: v4l2_outputparm .. c:type:: v4l2_outputparm
...@@ -172,7 +169,7 @@ union holding separate parameters for input and output devices. ...@@ -172,7 +169,7 @@ union holding separate parameters for input and output devices.
* - :cspan:`2` * - :cspan:`2`
The field is intended to repeat frames on the driver side in The field is intended to repeat frames on the driver side in
:ref:`write() <func-write>` mode (in streaming mode timestamps :c:func:`write()` mode (in streaming mode timestamps
can be used to throttle the output), saving I/O bandwidth. can be used to throttle the output), saving I/O bandwidth.
For stateful encoders (see :ref:`encoder`) this represents the For stateful encoders (see :ref:`encoder`) this represents the
...@@ -199,7 +196,7 @@ union holding separate parameters for input and output devices. ...@@ -199,7 +196,7 @@ union holding separate parameters for input and output devices.
* - __u32 * - __u32
- ``writebuffers`` - ``writebuffers``
- Applications set this field to the desired number of buffers used - Applications set this field to the desired number of buffers used
internally by the driver in :ref:`write() <func-write>` mode. Drivers internally by the driver in :c:func:`write()` mode. Drivers
return the actual number of buffers. When an application requests return the actual number of buffers. When an application requests
zero buffers, drivers should just return the current setting zero buffers, drivers should just return the current setting
rather than the minimum or an error code. For details see rather than the minimum or an error code. For details see
...@@ -210,7 +207,6 @@ union holding separate parameters for input and output devices. ...@@ -210,7 +207,6 @@ union holding separate parameters for input and output devices.
the array to zero. the array to zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _parm-caps: .. _parm-caps:
...@@ -226,7 +222,6 @@ union holding separate parameters for input and output devices. ...@@ -226,7 +222,6 @@ union holding separate parameters for input and output devices.
field. field.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _parm-flags: .. _parm-flags:
...@@ -265,8 +260,7 @@ union holding separate parameters for input and output devices. ...@@ -265,8 +260,7 @@ union holding separate parameters for input and output devices.
- Moving objects in the image might have excessive motion blur. - Moving objects in the image might have excessive motion blur.
- Capture might only work through the :ref:`read() <func-read>` call. - Capture might only work through the :c:func:`read()` call.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_PRIORITY: .. _VIDIOC_G_PRIORITY:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_PRIORITY - VIDIOC_S_PRIORITY - Query or request the access priority associated with a file descriptor VIDIOC_G_PRIORITY - VIDIOC_S_PRIORITY - Query or request the access priority associated with a file descriptor
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_PRIORITY, enum v4l2_priority *argp ) .. c:macro:: VIDIOC_G_PRIORITY
:name: VIDIOC_G_PRIORITY
``int ioctl(int fd, VIDIOC_G_PRIORITY, enum v4l2_priority *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_PRIORITY, const enum v4l2_priority *argp ) .. c:macro:: VIDIOC_S_PRIORITY
:name: VIDIOC_S_PRIORITY
``int ioctl(int fd, VIDIOC_S_PRIORITY, const enum v4l2_priority *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to an enum :c:type:`v4l2_priority` type. Pointer to an enum :c:type:`v4l2_priority` type.
Description Description
=========== ===========
...@@ -43,7 +43,6 @@ To request an access priority applications store the desired priority in ...@@ -43,7 +43,6 @@ To request an access priority applications store the desired priority in
an enum v4l2_priority variable and call :ref:`VIDIOC_S_PRIORITY <VIDIOC_G_PRIORITY>` ioctl an enum v4l2_priority variable and call :ref:`VIDIOC_S_PRIORITY <VIDIOC_G_PRIORITY>` ioctl
with a pointer to this variable. with a pointer to this variable.
.. c:type:: v4l2_priority .. c:type:: v4l2_priority
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
...@@ -78,7 +77,6 @@ with a pointer to this variable. ...@@ -78,7 +77,6 @@ with a pointer to this variable.
it blocks any other fd from changing device properties. Usually it blocks any other fd from changing device properties. Usually
applications which must not be interrupted, like video recording. applications which must not be interrupted, like video recording.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_SELECTION: .. _VIDIOC_G_SELECTION:
...@@ -11,23 +12,22 @@ Name ...@@ -11,23 +12,22 @@ Name
VIDIOC_G_SELECTION - VIDIOC_S_SELECTION - Get or set one of the selection rectangles VIDIOC_G_SELECTION - VIDIOC_S_SELECTION - Get or set one of the selection rectangles
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_SELECTION, struct v4l2_selection *argp ) .. c:macro:: VIDIOC_G_SELECTION
:name: VIDIOC_G_SELECTION
``int ioctl(int fd, VIDIOC_G_SELECTION, struct v4l2_selection *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_SELECTION, struct v4l2_selection *argp ) .. c:macro:: VIDIOC_S_SELECTION
:name: VIDIOC_S_SELECTION
``int ioctl(int fd, VIDIOC_S_SELECTION, struct v4l2_selection *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_selection`. Pointer to struct :c:type:`v4l2_selection`.
...@@ -115,7 +115,6 @@ constraints. ...@@ -115,7 +115,6 @@ constraints.
Selection targets and flags are documented in Selection targets and flags are documented in
:ref:`v4l2-selections-common`. :ref:`v4l2-selections-common`.
.. _sel-const-adjust: .. _sel-const-adjust:
.. kernel-figure:: constraints.svg .. kernel-figure:: constraints.svg
...@@ -128,7 +127,6 @@ Selection targets and flags are documented in ...@@ -128,7 +127,6 @@ Selection targets and flags are documented in
.. c:type:: v4l2_selection .. c:type:: v4l2_selection
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -168,7 +166,6 @@ Selection targets and flags are documented in ...@@ -168,7 +166,6 @@ Selection targets and flags are documented in
Starting with kernel 4.13 both variations are allowed. Starting with kernel 4.13 both variations are allowed.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_SLICED_VBI_CAP: .. _VIDIOC_G_SLICED_VBI_CAP:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_G_SLICED_VBI_CAP - Query sliced VBI capabilities VIDIOC_G_SLICED_VBI_CAP - Query sliced VBI capabilities
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_SLICED_VBI_CAP, struct v4l2_sliced_vbi_cap *argp ) .. c:macro:: VIDIOC_G_SLICED_VBI_CAP
:name: VIDIOC_G_SLICED_VBI_CAP
``int ioctl(int fd, VIDIOC_G_SLICED_VBI_CAP, struct v4l2_sliced_vbi_cap *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_sliced_vbi_cap`. Pointer to struct :c:type:`v4l2_sliced_vbi_cap`.
Description Description
=========== ===========
...@@ -44,7 +43,6 @@ the sliced VBI API is unsupported or ``type`` is invalid. ...@@ -44,7 +43,6 @@ the sliced VBI API is unsupported or ``type`` is invalid.
The ``type`` field was added, and the ioctl changed from read-only The ``type`` field was added, and the ioctl changed from read-only
to write-read, in Linux 2.6.19. to write-read, in Linux 2.6.19.
.. c:type:: v4l2_sliced_vbi_cap .. c:type:: v4l2_sliced_vbi_cap
.. tabularcolumns:: |p{1.2cm}|p{4.2cm}|p{4.1cm}|p{4.0cm}|p{4.0cm}| .. tabularcolumns:: |p{1.2cm}|p{4.2cm}|p{4.1cm}|p{4.0cm}|p{4.0cm}|
...@@ -120,7 +118,6 @@ the sliced VBI API is unsupported or ``type`` is invalid. ...@@ -120,7 +118,6 @@ the sliced VBI API is unsupported or ``type`` is invalid.
See also :ref:`vbi-525` and :ref:`vbi-625`. See also :ref:`vbi-525` and :ref:`vbi-625`.
.. raw:: latex .. raw:: latex
\scriptsize \scriptsize
...@@ -183,7 +180,6 @@ the sliced VBI API is unsupported or ``type`` is invalid. ...@@ -183,7 +180,6 @@ the sliced VBI API is unsupported or ``type`` is invalid.
\normalsize \normalsize
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_STD: .. _VIDIOC_G_STD:
...@@ -11,33 +12,34 @@ Name ...@@ -11,33 +12,34 @@ Name
VIDIOC_G_STD - VIDIOC_S_STD - VIDIOC_SUBDEV_G_STD - VIDIOC_SUBDEV_S_STD - Query or select the video standard of the current input VIDIOC_G_STD - VIDIOC_S_STD - VIDIOC_SUBDEV_G_STD - VIDIOC_SUBDEV_S_STD - Query or select the video standard of the current input
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_STD, v4l2_std_id *argp ) .. c:macro:: VIDIOC_G_STD
:name: VIDIOC_G_STD
``int ioctl(int fd, VIDIOC_G_STD, v4l2_std_id *argp)``
.. c:macro:: VIDIOC_S_STD
.. c:function:: int ioctl( int fd, VIDIOC_S_STD, const v4l2_std_id *argp ) ``int ioctl(int fd, VIDIOC_S_STD, const v4l2_std_id *argp)``
:name: VIDIOC_S_STD
.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_G_STD, v4l2_std_id *argp ) .. c:macro:: VIDIOC_SUBDEV_G_STD
:name: VIDIOC_SUBDEV_G_STD
.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_S_STD, const v4l2_std_id *argp ) ``int ioctl(int fd, VIDIOC_SUBDEV_G_STD, v4l2_std_id *argp)``
:name: VIDIOC_SUBDEV_S_STD
.. c:macro:: VIDIOC_SUBDEV_S_STD
``int ioctl(int fd, VIDIOC_SUBDEV_S_STD, const v4l2_std_id *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to :c:type:`v4l2_std_id`. Pointer to :c:type:`v4l2_std_id`.
Description Description
=========== ===========
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_G_TUNER: .. _VIDIOC_G_TUNER:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_G_TUNER - VIDIOC_S_TUNER - Get or set tuner attributes VIDIOC_G_TUNER - VIDIOC_S_TUNER - Get or set tuner attributes
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_G_TUNER, struct v4l2_tuner *argp ) .. c:macro:: VIDIOC_G_TUNER
:name: VIDIOC_G_TUNER
``int ioctl(int fd, VIDIOC_G_TUNER, struct v4l2_tuner *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_S_TUNER, const struct v4l2_tuner *argp ) .. c:macro:: VIDIOC_S_TUNER
:name: VIDIOC_S_TUNER
``int ioctl(int fd, VIDIOC_S_TUNER, const struct v4l2_tuner *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_tuner`. Pointer to struct :c:type:`v4l2_tuner`.
Description Description
=========== ===========
...@@ -59,7 +59,6 @@ to zero. The term 'tuner' means SDR receiver in this context. ...@@ -59,7 +59,6 @@ to zero. The term 'tuner' means SDR receiver in this context.
To change the radio frequency the To change the radio frequency the
:ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available. :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl is available.
.. tabularcolumns:: |p{1.3cm}|p{3.0cm}|p{6.6cm}|p{6.6cm}| .. tabularcolumns:: |p{1.3cm}|p{3.0cm}|p{6.6cm}|p{6.6cm}|
.. c:type:: v4l2_tuner .. c:type:: v4l2_tuner
...@@ -183,7 +182,6 @@ To change the radio frequency the ...@@ -183,7 +182,6 @@ To change the radio frequency the
Drivers and applications must set the array to zero. Drivers and applications must set the array to zero.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. c:type:: v4l2_tuner_type .. c:type:: v4l2_tuner_type
...@@ -207,7 +205,6 @@ To change the radio frequency the ...@@ -207,7 +205,6 @@ To change the radio frequency the
- 5 - 5
- Tuner controls the RF part of a Software Digital Radio (SDR) - Tuner controls the RF part of a Software Digital Radio (SDR)
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _tuner-capability: .. _tuner-capability:
...@@ -299,7 +296,6 @@ To change the radio frequency the ...@@ -299,7 +296,6 @@ To change the radio frequency the
instead of 62.5 kHz. instead of 62.5 kHz.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _tuner-rxsubchans: .. _tuner-rxsubchans:
...@@ -338,7 +334,6 @@ To change the radio frequency the ...@@ -338,7 +334,6 @@ To change the radio frequency the
- The tuner receives an RDS channel. - The tuner receives an RDS channel.
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
.. _tuner-audmode: .. _tuner-audmode:
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_LOG_STATUS: .. _VIDIOC_LOG_STATUS:
...@@ -11,20 +12,18 @@ Name ...@@ -11,20 +12,18 @@ Name
VIDIOC_LOG_STATUS - Log driver status information VIDIOC_LOG_STATUS - Log driver status information
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_LOG_STATUS) .. c:macro:: VIDIOC_LOG_STATUS
:name: VIDIOC_LOG_STATUS
``int ioctl(int fd, VIDIOC_LOG_STATUS)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
Description Description
=========== ===========
...@@ -40,7 +39,6 @@ Mismatches may give an indication where the problem is. ...@@ -40,7 +39,6 @@ Mismatches may give an indication where the problem is.
This ioctl is optional and not all drivers support it. It was introduced This ioctl is optional and not all drivers support it. It was introduced
in Linux 2.6.15. in Linux 2.6.15.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_OVERLAY: .. _VIDIOC_OVERLAY:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_OVERLAY - Start or stop video overlay VIDIOC_OVERLAY - Start or stop video overlay
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_OVERLAY, const int *argp ) .. c:macro:: VIDIOC_OVERLAY
:name: VIDIOC_OVERLAY
``int ioctl(int fd, VIDIOC_OVERLAY, const int *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to an integer. Pointer to an integer.
Description Description
=========== ===========
...@@ -41,7 +40,6 @@ Drivers do not support :ref:`VIDIOC_STREAMON` or ...@@ -41,7 +40,6 @@ Drivers do not support :ref:`VIDIOC_STREAMON` or
:ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` with :ref:`VIDIOC_STREAMOFF <VIDIOC_STREAMON>` with
``V4L2_BUF_TYPE_VIDEO_OVERLAY``. ``V4L2_BUF_TYPE_VIDEO_OVERLAY``.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_PREPARE_BUF: .. _VIDIOC_PREPARE_BUF:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_PREPARE_BUF - Prepare a buffer for I/O VIDIOC_PREPARE_BUF - Prepare a buffer for I/O
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_PREPARE_BUF, struct v4l2_buffer *argp ) .. c:macro:: VIDIOC_PREPARE_BUF
:name: VIDIOC_PREPARE_BUF
``int ioctl(int fd, VIDIOC_PREPARE_BUF, struct v4l2_buffer *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_buffer`. Pointer to struct :c:type:`v4l2_buffer`.
Description Description
=========== ===========
...@@ -41,7 +40,6 @@ in advance saves time during the actual I/O. ...@@ -41,7 +40,6 @@ in advance saves time during the actual I/O.
The struct :c:type:`v4l2_buffer` structure is specified in The struct :c:type:`v4l2_buffer` structure is specified in
:ref:`buffer`. :ref:`buffer`.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_QBUF: .. _VIDIOC_QBUF:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_QBUF - VIDIOC_DQBUF - Exchange a buffer with the driver VIDIOC_QBUF - VIDIOC_DQBUF - Exchange a buffer with the driver
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_QBUF, struct v4l2_buffer *argp ) .. c:macro:: VIDIOC_QBUF
:name: VIDIOC_QBUF
``int ioctl(int fd, VIDIOC_QBUF, struct v4l2_buffer *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_DQBUF, struct v4l2_buffer *argp ) .. c:macro:: VIDIOC_DQBUF
:name: VIDIOC_DQBUF
``int ioctl(int fd, VIDIOC_DQBUF, struct v4l2_buffer *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_buffer`. Pointer to struct :c:type:`v4l2_buffer`.
Description Description
=========== ===========
...@@ -142,13 +142,12 @@ API is used the ``m.fd`` fields of the passed array of struct ...@@ -142,13 +142,12 @@ API is used the ``m.fd`` fields of the passed array of struct
By default ``VIDIOC_DQBUF`` blocks when no buffer is in the outgoing By default ``VIDIOC_DQBUF`` blocks when no buffer is in the outgoing
queue. When the ``O_NONBLOCK`` flag was given to the queue. When the ``O_NONBLOCK`` flag was given to the
:ref:`open() <func-open>` function, ``VIDIOC_DQBUF`` returns :c:func:`open()` function, ``VIDIOC_DQBUF`` returns
immediately with an ``EAGAIN`` error code when no buffer is available. immediately with an ``EAGAIN`` error code when no buffer is available.
The struct :c:type:`v4l2_buffer` structure is specified in The struct :c:type:`v4l2_buffer` structure is specified in
:ref:`buffer`. :ref:`buffer`.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_QUERY_DV_TIMINGS: .. _VIDIOC_QUERY_DV_TIMINGS:
...@@ -11,27 +12,26 @@ Name ...@@ -11,27 +12,26 @@ Name
VIDIOC_QUERY_DV_TIMINGS - VIDIOC_SUBDEV_QUERY_DV_TIMINGS - Sense the DV preset received by the current input VIDIOC_QUERY_DV_TIMINGS - VIDIOC_SUBDEV_QUERY_DV_TIMINGS - Sense the DV preset received by the current input
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp ) .. c:macro:: VIDIOC_QUERY_DV_TIMINGS
:name: VIDIOC_QUERY_DV_TIMINGS
``int ioctl(int fd, VIDIOC_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp)``
.. c:function:: int ioctl( int fd, VIDIOC_SUBDEV_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp ) .. c:macro:: VIDIOC_SUBDEV_QUERY_DV_TIMINGS
:name: VIDIOC_SUBDEV_QUERY_DV_TIMINGS
``int ioctl(int fd, VIDIOC_SUBDEV_QUERY_DV_TIMINGS, struct v4l2_dv_timings *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_dv_timings`. Pointer to struct :c:type:`v4l2_dv_timings`.
Description Description
=========== ===========
...@@ -65,7 +65,6 @@ and returns ``ERANGE``. In that case the application can call ...@@ -65,7 +65,6 @@ and returns ``ERANGE``. In that case the application can call
found timings with the hardware's capabilities in order to give more found timings with the hardware's capabilities in order to give more
precise feedback to the user. precise feedback to the user.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_QUERYBUF: .. _VIDIOC_QUERYBUF:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_QUERYBUF - Query the status of a buffer VIDIOC_QUERYBUF - Query the status of a buffer
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_QUERYBUF, struct v4l2_buffer *argp ) .. c:macro:: VIDIOC_QUERYBUF
:name: VIDIOC_QUERYBUF
``int ioctl(int fd, VIDIOC_QUERYBUF, struct v4l2_buffer *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_buffer`. Pointer to struct :c:type:`v4l2_buffer`.
Description Description
=========== ===========
...@@ -67,7 +66,6 @@ flags, they are meaningless in this context. ...@@ -67,7 +66,6 @@ flags, they are meaningless in this context.
The struct :c:type:`v4l2_buffer` structure is specified in The struct :c:type:`v4l2_buffer` structure is specified in
:ref:`buffer`. :ref:`buffer`.
Return Value Return Value
============ ============
......
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. c:namespace:: V4L
.. _VIDIOC_QUERYCAP: .. _VIDIOC_QUERYCAP:
...@@ -11,24 +12,22 @@ Name ...@@ -11,24 +12,22 @@ Name
VIDIOC_QUERYCAP - Query device capabilities VIDIOC_QUERYCAP - Query device capabilities
Synopsis Synopsis
======== ========
.. c:function:: int ioctl( int fd, VIDIOC_QUERYCAP, struct v4l2_capability *argp ) .. c:macro:: VIDIOC_QUERYCAP
:name: VIDIOC_QUERYCAP
``int ioctl(int fd, VIDIOC_QUERYCAP, struct v4l2_capability *argp)``
Arguments Arguments
========= =========
``fd`` ``fd``
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :c:func:`open()`.
``argp`` ``argp``
Pointer to struct :c:type:`v4l2_capability`. Pointer to struct :c:type:`v4l2_capability`.
Description Description
=========== ===========
...@@ -39,7 +38,6 @@ pointer to a struct :c:type:`v4l2_capability` which is ...@@ -39,7 +38,6 @@ pointer to a struct :c:type:`v4l2_capability` which is
filled by the driver. When the driver is not compatible with this filled by the driver. When the driver is not compatible with this
specification the ioctl returns an ``EINVAL`` error code. specification the ioctl returns an ``EINVAL`` error code.
.. tabularcolumns:: |p{1.5cm}|p{2.5cm}|p{13cm}| .. tabularcolumns:: |p{1.5cm}|p{2.5cm}|p{13cm}|
.. c:type:: v4l2_capability .. c:type:: v4l2_capability
...@@ -132,7 +130,6 @@ specification the ioctl returns an ``EINVAL`` error code. ...@@ -132,7 +130,6 @@ specification the ioctl returns an ``EINVAL`` error code.
zero. zero.
.. tabularcolumns:: |p{6.1cm}|p{2.2cm}|p{8.7cm}| .. tabularcolumns:: |p{6.1cm}|p{2.2cm}|p{8.7cm}|
.. _device-capabilities: .. _device-capabilities:
...@@ -243,8 +240,8 @@ specification the ioctl returns an ``EINVAL`` error code. ...@@ -243,8 +240,8 @@ specification the ioctl returns an ``EINVAL`` error code.
- The device supports the :ref:`metadata` capture interface. - The device supports the :ref:`metadata` capture interface.
* - ``V4L2_CAP_READWRITE`` * - ``V4L2_CAP_READWRITE``
- 0x01000000 - 0x01000000
- The device supports the :ref:`read() <rw>` and/or - The device supports the :c:func:`read()` and/or
:ref:`write() <rw>` I/O methods. :c:func:`write()` I/O methods.
* - ``V4L2_CAP_ASYNCIO`` * - ``V4L2_CAP_ASYNCIO``
- 0x02000000 - 0x02000000
- The device supports the :ref:`asynchronous <async>` I/O methods. - The device supports the :ref:`asynchronous <async>` I/O methods.
...@@ -269,7 +266,6 @@ specification the ioctl returns an ``EINVAL`` error code. ...@@ -269,7 +266,6 @@ specification the ioctl returns an ``EINVAL`` error code.
only appear in the ``capabilities`` field and never in the only appear in the ``capabilities`` field and never in the
``device_caps`` field. ``device_caps`` field.
Return Value Return Value
============ ============
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment