Commit e8be7e97 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] docs-rst: convert uAPI structs to C domain

instead of declaring the uAPI structs using usual refs, e. g.:
	.. _foo-struct:

Use the C domain way:
	.. c:type:: foo_struct

This way, the kAPI documentation can use cross-references to
point to the uAPI symbols.

That solves about ~100 undefined warnings like:
	WARNING: c:type reference target not found: foo_struct
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 2257e180
...@@ -40,7 +40,7 @@ A good example of these ``replace``/``merge`` callbacks is in v4l2-event.c: ...@@ -40,7 +40,7 @@ A good example of these ``replace``/``merge`` callbacks is in v4l2-event.c:
In order to queue events to video device, drivers should call: In order to queue events to video device, drivers should call:
:c:func:`v4l2_event_queue <v4l2_event_queue>` :c:func:`v4l2_event_queue <v4l2_event_queue>`
(:c:type:`vdev <video_device>`, :ref:`ev <v4l2-event>`) (:c:type:`vdev <video_device>`, :c:type:`ev <v4l2_event>`)
The driver's only responsibility is to fill in the type and the data fields. The driver's only responsibility is to fill in the type and the data fields.
The other fields will be filled in by V4L2. The other fields will be filled in by V4L2.
...@@ -51,7 +51,7 @@ Event subscription ...@@ -51,7 +51,7 @@ Event subscription
Subscribing to an event is via: Subscribing to an event is via:
:c:func:`v4l2_event_subscribe <v4l2_event_subscribe>` :c:func:`v4l2_event_subscribe <v4l2_event_subscribe>`
(:c:type:`fh <v4l2_fh>`, :ref:`sub <v4l2-event-subscription>` , (:c:type:`fh <v4l2_fh>`, :c:type:`sub <v4l2_event_subscription>` ,
elems, :c:type:`ops <v4l2_subscribed_event_ops>`) elems, :c:type:`ops <v4l2_subscribed_event_ops>`)
...@@ -86,7 +86,7 @@ Unsubscribing an event ...@@ -86,7 +86,7 @@ Unsubscribing an event
Unsubscribing to an event is via: Unsubscribing to an event is via:
:c:func:`v4l2_event_unsubscribe <v4l2_event_unsubscribe>` :c:func:`v4l2_event_unsubscribe <v4l2_event_unsubscribe>`
(:c:type:`fh <v4l2_fh>`, :ref:`sub <v4l2-event-subscription>`) (:c:type:`fh <v4l2_fh>`, :c:type:`sub <v4l2_event_subscription>`)
This function is used to implement :c:type:`video_device`-> This function is used to implement :c:type:`video_device`->
:c:type:`ioctl_ops <v4l2_ioctl_ops>`-> ``vidioc_unsubscribe_event``. :c:type:`ioctl_ops <v4l2_ioctl_ops>`-> ``vidioc_unsubscribe_event``.
......
...@@ -36,12 +36,12 @@ Description ...@@ -36,12 +36,12 @@ Description
All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query All cec devices must support :ref:`ioctl CEC_ADAP_G_CAPS <CEC_ADAP_G_CAPS>`. To query
device information, applications call the ioctl with a pointer to a device information, applications call the ioctl with a pointer to a
struct :ref:`cec_caps <cec-caps>`. The driver fills the structure and struct :c:type:`cec_caps`. The driver fills the structure and
returns the information to the application. The ioctl never fails. returns the information to the application. The ioctl never fails.
.. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.8cm}| .. tabularcolumns:: |p{1.2cm}|p{2.5cm}|p{13.8cm}|
.. _cec-caps: .. c:type:: cec_caps
.. flat-table:: struct cec_caps .. flat-table:: struct cec_caps
:header-rows: 0 :header-rows: 0
......
...@@ -68,7 +68,7 @@ logical address types are already defined will return with error ``EBUSY``. ...@@ -68,7 +68,7 @@ logical address types are already defined will return with error ``EBUSY``.
.. tabularcolumns:: |p{1.0cm}|p{7.5cm}|p{8.0cm}| .. tabularcolumns:: |p{1.0cm}|p{7.5cm}|p{8.0cm}|
.. _cec-log-addrs: .. c:type:: cec_log_addrs
.. cssclass:: longtable .. cssclass:: longtable
......
...@@ -105,7 +105,7 @@ it is guaranteed that the state did change in between the two events. ...@@ -105,7 +105,7 @@ it is guaranteed that the state did change in between the two events.
.. tabularcolumns:: |p{1.0cm}|p{4.2cm}|p{2.5cm}|p{8.8cm}| .. tabularcolumns:: |p{1.0cm}|p{4.2cm}|p{2.5cm}|p{8.8cm}|
.. _cec-event: .. c:type:: cec_event
.. flat-table:: struct cec_event .. flat-table:: struct cec_event
:header-rows: 0 :header-rows: 0
......
...@@ -76,7 +76,7 @@ result. ...@@ -76,7 +76,7 @@ result.
.. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{13.0cm}| .. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{13.0cm}|
.. _cec-msg: .. c:type:: cec_msg
.. cssclass:: longtable .. cssclass:: longtable
......
...@@ -71,7 +71,7 @@ the following values. ...@@ -71,7 +71,7 @@ the following values.
} audio_channel_select_t; } audio_channel_select_t;
.. _audio-status: .. c:type:: audio_status
struct audio_status struct audio_status
=================== ===================
...@@ -93,7 +93,7 @@ about various states of the playback operation. ...@@ -93,7 +93,7 @@ about various states of the playback operation.
} audio_status_t; } audio_status_t;
.. _audio-mixer: .. c:type:: audio_mixer
struct audio_mixer struct audio_mixer
================== ==================
...@@ -132,7 +132,7 @@ following bits set according to the hardwares capabilities. ...@@ -132,7 +132,7 @@ following bits set according to the hardwares capabilities.
#define AUDIO_CAP_AC3 256 #define AUDIO_CAP_AC3 256
.. _audio-karaoke: .. c:type:: audio_karaoke
struct audio_karaoke struct audio_karaoke
==================== ====================
......
...@@ -7,7 +7,7 @@ CA Data Types ...@@ -7,7 +7,7 @@ CA Data Types
************* *************
.. _ca-slot-info: .. c:type:: ca_slot_info
ca_slot_info_t ca_slot_info_t
============== ==============
...@@ -31,7 +31,7 @@ ca_slot_info_t ...@@ -31,7 +31,7 @@ ca_slot_info_t
} ca_slot_info_t; } ca_slot_info_t;
.. _ca-descr-info: .. c:type:: ca_descr_info
ca_descr_info_t ca_descr_info_t
=============== ===============
...@@ -48,7 +48,7 @@ ca_descr_info_t ...@@ -48,7 +48,7 @@ ca_descr_info_t
} ca_descr_info_t; } ca_descr_info_t;
.. _ca-caps: .. c:type:: ca_caps
ca_caps_t ca_caps_t
========= =========
...@@ -64,7 +64,7 @@ ca_caps_t ...@@ -64,7 +64,7 @@ ca_caps_t
} ca_cap_t; } ca_cap_t;
.. _ca-msg: .. c:type:: ca_msg
ca_msg_t ca_msg_t
======== ========
...@@ -81,7 +81,7 @@ ca_msg_t ...@@ -81,7 +81,7 @@ ca_msg_t
} ca_msg_t; } ca_msg_t;
.. _ca-descr: .. c:type:: ca_descr
ca_descr_t ca_descr_t
========== ==========
...@@ -96,7 +96,7 @@ ca_descr_t ...@@ -96,7 +96,7 @@ ca_descr_t
} ca_descr_t; } ca_descr_t;
.. _ca-pid: .. c:type:: ca_pid
ca-pid ca-pid
====== ======
......
...@@ -120,7 +120,7 @@ dmx_pes_type_t ...@@ -120,7 +120,7 @@ dmx_pes_type_t
} dmx_pes_type_t; } dmx_pes_type_t;
.. _dmx-filter: .. c:type:: dmx_filter
struct dmx_filter struct dmx_filter
================= =================
...@@ -136,7 +136,7 @@ struct dmx_filter ...@@ -136,7 +136,7 @@ struct dmx_filter
} dmx_filter_t; } dmx_filter_t;
.. _dmx-sct-filter-params: .. c:type:: dmx_sct_filter_params
struct dmx_sct_filter_params struct dmx_sct_filter_params
============================ ============================
...@@ -157,7 +157,7 @@ struct dmx_sct_filter_params ...@@ -157,7 +157,7 @@ struct dmx_sct_filter_params
}; };
.. _dmx-pes-filter-params: .. c:type:: dmx_pes_filter_params
struct dmx_pes_filter_params struct dmx_pes_filter_params
============================ ============================
...@@ -194,7 +194,7 @@ struct dmx_event ...@@ -194,7 +194,7 @@ struct dmx_event
}; };
.. _dmx-stc: .. c:type:: dmx_stc
struct dmx_stc struct dmx_stc
============== ==============
...@@ -209,7 +209,7 @@ struct dmx_stc ...@@ -209,7 +209,7 @@ struct dmx_stc
}; };
.. _dmx-caps: .. c:type:: dmx_caps
struct dmx_caps struct dmx_caps
=============== ===============
......
.. -*- coding: utf-8; mode: rst -*- .. -*- coding: utf-8; mode: rst -*-
.. _dtv-fe-stats: .. c:type:: dtv_fe_stats
******************* *******************
struct dtv_fe_stats struct dtv_fe_stats
......
.. -*- coding: utf-8; mode: rst -*- .. -*- coding: utf-8; mode: rst -*-
.. _dtv-properties: .. c:type:: dtv_properties
********************* *********************
struct dtv_properties struct dtv_properties
......
.. -*- coding: utf-8; mode: rst -*- .. -*- coding: utf-8; mode: rst -*-
.. _dtv-property: .. c:type:: dtv_property
******************* *******************
struct dtv_property struct dtv_property
......
.. -*- coding: utf-8; mode: rst -*- .. -*- coding: utf-8; mode: rst -*-
.. _dtv-stats: .. c:type:: dtv_stats
**************** ****************
struct dtv_stats struct dtv_stats
......
.. -*- coding: utf-8; mode: rst -*- .. -*- coding: utf-8; mode: rst -*-
.. _dvb-frontend-event: .. c:type:: dvb_frontend_event
*************** ***************
frontend events frontend events
......
.. -*- coding: utf-8; mode: rst -*- .. -*- coding: utf-8; mode: rst -*-
.. _dvb-frontend-parameters: .. c:type:: dvb_frontend_parameters
******************* *******************
frontend parameters frontend parameters
...@@ -49,7 +49,7 @@ frontends the ``frequency`` specifies the absolute frequency and is ...@@ -49,7 +49,7 @@ frontends the ``frequency`` specifies the absolute frequency and is
given in Hz. given in Hz.
.. _dvb-qpsk-parameters: .. c:type:: dvb_qpsk_parameters
QPSK parameters QPSK parameters
=============== ===============
...@@ -66,7 +66,7 @@ structure: ...@@ -66,7 +66,7 @@ structure:
}; };
.. _dvb-qam-parameters: .. c:type:: dvb_qam_parameters
QAM parameters QAM parameters
============== ==============
...@@ -83,7 +83,7 @@ for cable QAM frontend you use the ``dvb_qam_parameters`` structure: ...@@ -83,7 +83,7 @@ for cable QAM frontend you use the ``dvb_qam_parameters`` structure:
}; };
.. _dvb-vsb-parameters: .. c:type:: dvb_vsb_parameters
VSB parameters VSB parameters
============== ==============
...@@ -98,7 +98,7 @@ ATSC frontends are supported by the ``dvb_vsb_parameters`` structure: ...@@ -98,7 +98,7 @@ ATSC frontends are supported by the ``dvb_vsb_parameters`` structure:
}; };
.. _dvb-ofdm-parameters: .. c:type:: dvb_ofdm_parameters
OFDM parameters OFDM parameters
=============== ===============
......
...@@ -23,7 +23,7 @@ union/struct based approach, in favor of a properties set approach. ...@@ -23,7 +23,7 @@ union/struct based approach, in favor of a properties set approach.
.. note:: .. note::
On Linux DVB API version 3, setting a frontend were done via On Linux DVB API version 3, setting a frontend were done via
:ref:`struct dvb_frontend_parameters <dvb-frontend-parameters>`. :c:type:`struct dvb_frontend_parameters <dvb_frontend_parameters>`.
This got replaced on version 5 (also called "S2API", as this API were This got replaced on version 5 (also called "S2API", as this API were
added originally_enabled to provide support for DVB-S2), because the added originally_enabled to provide support for DVB-S2), because the
old API has a very limited support to new standards and new hardware. old API has a very limited support to new standards and new hardware.
......
...@@ -27,7 +27,7 @@ Arguments ...@@ -27,7 +27,7 @@ Arguments
``argp`` ``argp``
pointer to struct pointer to struct
:ref:`dvb_diseqc_slave_reply <dvb-diseqc-slave-reply>` :c:type:`dvb_diseqc_slave_reply`
Description Description
...@@ -35,7 +35,7 @@ Description ...@@ -35,7 +35,7 @@ Description
Receives reply from a DiSEqC 2.0 command. Receives reply from a DiSEqC 2.0 command.
.. _dvb-diseqc-slave-reply: .. c:type:: dvb_diseqc_slave_reply
struct dvb_diseqc_slave_reply struct dvb_diseqc_slave_reply
----------------------------- -----------------------------
......
...@@ -27,7 +27,7 @@ Arguments ...@@ -27,7 +27,7 @@ Arguments
``argp`` ``argp``
pointer to struct pointer to struct
:ref:`dvb_diseqc_master_cmd <dvb-diseqc-master-cmd>` :c:type:`dvb_diseqc_master_cmd`
Description Description
...@@ -35,7 +35,7 @@ Description ...@@ -35,7 +35,7 @@ Description
Sends a DiSEqC command to the antenna subsystem. Sends a DiSEqC command to the antenna subsystem.
.. _dvb-diseqc-master-cmd: .. c:type:: dvb_diseqc_master_cmd
struct dvb_diseqc_master_cmd struct dvb_diseqc_master_cmd
============================ ============================
......
...@@ -27,7 +27,7 @@ Arguments ...@@ -27,7 +27,7 @@ Arguments
``argp`` ``argp``
pointer to struct struct pointer to struct struct
:ref:`dvb_frontend_info <dvb-frontend-info>` :c:type:`dvb_frontend_info`
Description Description
...@@ -40,7 +40,7 @@ takes a pointer to dvb_frontend_info which is filled by the driver. ...@@ -40,7 +40,7 @@ takes a pointer to dvb_frontend_info which is filled by the driver.
When the driver is not compatible with this specification the ioctl When the driver is not compatible with this specification the ioctl
returns an error. returns an error.
.. _dvb-frontend-info: .. c:type:: dvb_frontend_info
struct dvb_frontend_info struct dvb_frontend_info
======================== ========================
......
...@@ -29,7 +29,7 @@ Arguments ...@@ -29,7 +29,7 @@ Arguments
File descriptor returned by :ref:`open() <frontend_f_open>`. File descriptor returned by :ref:`open() <frontend_f_open>`.
``argp`` ``argp``
pointer to struct :ref:`dtv_properties <dtv-properties>` pointer to struct :c:type:`dtv_properties`
Description Description
......
...@@ -78,7 +78,7 @@ at the above, as they're supported via the new ...@@ -78,7 +78,7 @@ at the above, as they're supported via the new
ioctl's, using the :ref:`DTV_DELIVERY_SYSTEM <DTV-DELIVERY-SYSTEM>` ioctl's, using the :ref:`DTV_DELIVERY_SYSTEM <DTV-DELIVERY-SYSTEM>`
parameter. parameter.
In the old days, struct :ref:`dvb_frontend_info <dvb-frontend-info>` In the old days, struct :c:type:`dvb_frontend_info`
used to contain ``fe_type_t`` field to indicate the delivery systems, used to contain ``fe_type_t`` field to indicate the delivery systems,
filled with either FE_QPSK, FE_QAM, FE_OFDM or FE_ATSC. While this filled with either FE_QPSK, FE_QAM, FE_OFDM or FE_ATSC. While this
is still filled to keep backward compatibility, the usage of this field is still filled to keep backward compatibility, the usage of this field
...@@ -87,7 +87,7 @@ devices support multiple delivery systems. Please use ...@@ -87,7 +87,7 @@ devices support multiple delivery systems. Please use
:ref:`DTV_ENUM_DELSYS <DTV-ENUM-DELSYS>` instead. :ref:`DTV_ENUM_DELSYS <DTV-ENUM-DELSYS>` instead.
On devices that support multiple delivery systems, struct On devices that support multiple delivery systems, struct
:ref:`dvb_frontend_info <dvb-frontend-info>`::``fe_type_t`` is :c:type:`dvb_frontend_info`::``fe_type_t`` is
filled with the currently standard, as selected by the last call to filled with the currently standard, as selected by the last call to
:ref:`FE_SET_PROPERTY <FE_GET_PROPERTY>` using the :ref:`FE_SET_PROPERTY <FE_GET_PROPERTY>` using the
:ref:`DTV_DELIVERY_SYSTEM <DTV-DELIVERY-SYSTEM>` property. :ref:`DTV_DELIVERY_SYSTEM <DTV-DELIVERY-SYSTEM>` property.
...@@ -20,7 +20,7 @@ standards, up to 3 groups of statistics can be provided, and ...@@ -20,7 +20,7 @@ standards, up to 3 groups of statistics can be provided, and
plus one metric per each carrier group (called "layer" on ISDB). plus one metric per each carrier group (called "layer" on ISDB).
So, in order to be consistent with other delivery systems, the first So, in order to be consistent with other delivery systems, the first
value at :ref:`dtv_property.stat.dtv_stats <dtv-stats>` array refers value at :c:type:`dtv_property.stat.dtv_stats <dtv_stats>` array refers
to the global metric. The other elements of the array represent each to the global metric. The other elements of the array represent each
layer, starting from layer A(index 1), layer B (index 2) and so on. layer, starting from layer A(index 1), layer B (index 2) and so on.
......
...@@ -26,7 +26,7 @@ Arguments ...@@ -26,7 +26,7 @@ Arguments
File descriptor returned by :ref:`open() <frontend_f_open>`. File descriptor returned by :ref:`open() <frontend_f_open>`.
``net_if`` ``net_if``
pointer to struct :ref:`dvb_net_if <dvb-net-if>` pointer to struct :c:type:`dvb_net_if`
Description Description
...@@ -38,7 +38,7 @@ ULE) and the interface number for the new interface to be created. When ...@@ -38,7 +38,7 @@ ULE) and the interface number for the new interface to be created. When
the system call successfully returns, a new virtual network interface is the system call successfully returns, a new virtual network interface is
created. created.
The struct :ref:`dvb_net_if <dvb-net-if>`::ifnum field will be The struct :c:type:`dvb_net_if`::ifnum field will be
filled with the number of the created interface. filled with the number of the created interface.
...@@ -47,7 +47,7 @@ filled with the number of the created interface. ...@@ -47,7 +47,7 @@ filled with the number of the created interface.
struct dvb_net_if description struct dvb_net_if description
============================= =============================
.. _dvb-net-if: .. c:type:: dvb_net_if
.. flat-table:: struct dvb_net_if .. flat-table:: struct dvb_net_if
:header-rows: 1 :header-rows: 1
......
...@@ -26,15 +26,15 @@ Arguments ...@@ -26,15 +26,15 @@ Arguments
File descriptor returned by :ref:`open() <frontend_f_open>`. File descriptor returned by :ref:`open() <frontend_f_open>`.
``net_if`` ``net_if``
pointer to struct :ref:`dvb_net_if <dvb-net-if>` pointer to struct :c:type:`dvb_net_if`
Description Description
=========== ===========
The NET_GET_IF ioctl uses the interface number given by the struct The NET_GET_IF ioctl uses the interface number given by the struct
:ref:`dvb_net_if <dvb-net-if>`::ifnum field and fills the content of :c:type:`dvb_net_if`::ifnum field and fills the content of
struct :ref:`dvb_net_if <dvb-net-if>` with the packet ID and struct :c:type:`dvb_net_if` with the packet ID and
encapsulation type used on such interface. If the interface was not encapsulation type used on such interface. If the interface was not
created yet with :ref:`NET_ADD_IF <net>`, it will return -1 and fill created yet with :ref:`NET_ADD_IF <net>`, it will return -1 and fill
the ``errno`` with ``EINVAL`` error code. the ``errno`` with ``EINVAL`` error code.
......
...@@ -95,7 +95,7 @@ representing the state of video playback. ...@@ -95,7 +95,7 @@ representing the state of video playback.
} video_play_state_t; } video_play_state_t;
.. _video-command: .. c:type:: video_command
struct video_command struct video_command
==================== ====================
...@@ -146,7 +146,7 @@ video_size_t ...@@ -146,7 +146,7 @@ video_size_t
} video_size_t; } video_size_t;
.. _video-event: .. c:type:: video_event
struct video_event struct video_event
================== ==================
...@@ -172,7 +172,7 @@ VIDEO_GET_EVENT call. ...@@ -172,7 +172,7 @@ VIDEO_GET_EVENT call.
}; };
.. _video-status: .. c:type:: video_status
struct video_status struct video_status
=================== ===================
...@@ -203,7 +203,7 @@ case the source video format is not the same as the format of the output ...@@ -203,7 +203,7 @@ case the source video format is not the same as the format of the output
device. device.
.. _video-still-picture: .. c:type:: video_still_picture
struct video_still_picture struct video_still_picture
========================== ==========================
...@@ -271,7 +271,7 @@ output. The following system types can be set: ...@@ -271,7 +271,7 @@ output. The following system types can be set:
} video_system_t; } video_system_t;
.. _video-highlight: .. c:type:: video_highlight
struct video_highlight struct video_highlight
====================== ======================
...@@ -302,7 +302,7 @@ information. The call expects the following format for that information: ...@@ -302,7 +302,7 @@ information. The call expects the following format for that information:
} video_highlight_t; } video_highlight_t;
.. _video-spu: .. c:type:: video_spu
struct video_spu struct video_spu
================ ================
...@@ -320,7 +320,7 @@ to the following format: ...@@ -320,7 +320,7 @@ to the following format:
} video_spu_t; } video_spu_t;
.. _video-spu-palette: .. c:type:: video_spu_palette
struct video_spu_palette struct video_spu_palette
======================== ========================
...@@ -338,7 +338,7 @@ VIDEO_SPU_PALETTE: ...@@ -338,7 +338,7 @@ VIDEO_SPU_PALETTE:
} video_spu_palette_t; } video_spu_palette_t;
.. _video-navi-pack: .. c:type:: video_navi_pack
struct video_navi_pack struct video_navi_pack
====================== ======================
......
...@@ -33,12 +33,12 @@ Description ...@@ -33,12 +33,12 @@ Description
All media devices must support the ``MEDIA_IOC_DEVICE_INFO`` ioctl. To All media devices must support the ``MEDIA_IOC_DEVICE_INFO`` ioctl. To
query device information, applications call the ioctl with a pointer to query device information, applications call the ioctl with a pointer to
a struct :ref:`media_device_info <media-device-info>`. The driver a struct :c:type:`media_device_info`. The driver
fills the structure and returns the information to the application. The fills the structure and returns the information to the application. The
ioctl never fails. ioctl never fails.
.. _media-device-info: .. c:type:: media_device_info
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
......
...@@ -32,7 +32,7 @@ Description ...@@ -32,7 +32,7 @@ Description
=========== ===========
To query the attributes of an entity, applications set the id field of a To query the attributes of an entity, applications set the id field of a
struct :ref:`media_entity_desc <media-entity-desc>` structure and struct :c:type:`media_entity_desc` structure and
call the MEDIA_IOC_ENUM_ENTITIES ioctl with a pointer to this call the MEDIA_IOC_ENUM_ENTITIES ioctl with a pointer to this
structure. The driver fills the rest of the structure or returns an structure. The driver fills the rest of the structure or returns an
EINVAL error code when the id is invalid. EINVAL error code when the id is invalid.
...@@ -49,7 +49,7 @@ enumerate entities by calling MEDIA_IOC_ENUM_ENTITIES with increasing ...@@ -49,7 +49,7 @@ enumerate entities by calling MEDIA_IOC_ENUM_ENTITIES with increasing
id's until they get an error. id's until they get an error.
.. _media-entity-desc: .. c:type:: media_entity_desc
.. tabularcolumns:: |p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{11.5cm}| .. tabularcolumns:: |p{1.5cm}|p{1.5cm}|p{1.5cm}|p{1.5cm}|p{11.5cm}|
...@@ -195,5 +195,5 @@ appropriately. The generic error codes are described at the ...@@ -195,5 +195,5 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`media_entity_desc <media-entity-desc>` ``id`` The struct :c:type:`media_entity_desc` ``id``
references a non-existing entity. references a non-existing entity.
...@@ -32,10 +32,10 @@ Description ...@@ -32,10 +32,10 @@ Description
=========== ===========
To enumerate pads and/or links for a given entity, applications set the To enumerate pads and/or links for a given entity, applications set the
entity field of a struct :ref:`media_links_enum <media-links-enum>` entity field of a struct :c:type:`media_links_enum`
structure and initialize the struct structure and initialize the struct
:ref:`media_pad_desc <media-pad-desc>` and struct :c:type:`media_pad_desc` and struct
:ref:`media_link_desc <media-link-desc>` structure arrays pointed by :c:type:`media_link_desc` structure arrays pointed by
the ``pads`` and ``links`` fields. They then call the the ``pads`` and ``links`` fields. They then call the
MEDIA_IOC_ENUM_LINKS ioctl with a pointer to this structure. MEDIA_IOC_ENUM_LINKS ioctl with a pointer to this structure.
...@@ -53,7 +53,7 @@ Only forward links that originate at one of the entity's source pads are ...@@ -53,7 +53,7 @@ Only forward links that originate at one of the entity's source pads are
returned during the enumeration process. returned during the enumeration process.
.. _media-links-enum: .. c:type:: media_links_enum
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -73,7 +73,7 @@ returned during the enumeration process. ...@@ -73,7 +73,7 @@ returned during the enumeration process.
- .. row 2 - .. row 2
- struct :ref:`media_pad_desc <media-pad-desc>` - struct :c:type:`media_pad_desc`
- \*\ ``pads`` - \*\ ``pads``
...@@ -82,7 +82,7 @@ returned during the enumeration process. ...@@ -82,7 +82,7 @@ returned during the enumeration process.
- .. row 3 - .. row 3
- struct :ref:`media_link_desc <media-link-desc>` - struct :c:type:`media_link_desc`
- \*\ ``links`` - \*\ ``links``
...@@ -91,7 +91,7 @@ returned during the enumeration process. ...@@ -91,7 +91,7 @@ returned during the enumeration process.
.. _media-pad-desc: .. c:type:: media_pad_desc
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -127,7 +127,7 @@ returned during the enumeration process. ...@@ -127,7 +127,7 @@ returned during the enumeration process.
.. _media-link-desc: .. c:type:: media_link_desc
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -139,7 +139,7 @@ returned during the enumeration process. ...@@ -139,7 +139,7 @@ returned during the enumeration process.
- .. row 1 - .. row 1
- struct :ref:`media_pad_desc <media-pad-desc>` - struct :c:type:`media_pad_desc`
- ``source`` - ``source``
...@@ -147,7 +147,7 @@ returned during the enumeration process. ...@@ -147,7 +147,7 @@ returned during the enumeration process.
- .. row 2 - .. row 2
- struct :ref:`media_pad_desc <media-pad-desc>` - struct :c:type:`media_pad_desc`
- ``sink`` - ``sink``
...@@ -170,5 +170,5 @@ appropriately. The generic error codes are described at the ...@@ -170,5 +170,5 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`media_links_enum <media-links-enum>` ``id`` The struct :c:type:`media_links_enum` ``id``
references a non-existing entity. references a non-existing entity.
...@@ -33,7 +33,7 @@ Description ...@@ -33,7 +33,7 @@ Description
The typical usage of this ioctl is to call it twice. On the first call, The typical usage of this ioctl is to call it twice. On the first call,
the structure defined at struct the structure defined at struct
:ref:`media_v2_topology <media-v2-topology>` should be zeroed. At :c:type:`media_v2_topology` should be zeroed. At
return, if no errors happen, this ioctl will return the return, if no errors happen, this ioctl will return the
``topology_version`` and the total number of entities, interfaces, pads ``topology_version`` and the total number of entities, interfaces, pads
and links. and links.
...@@ -48,7 +48,7 @@ desired arrays with the media graph elements. ...@@ -48,7 +48,7 @@ desired arrays with the media graph elements.
.. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| .. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}|
.. _media-v2-topology: .. c:type:: media_v2_topology
.. flat-table:: struct media_v2_topology .. flat-table:: struct media_v2_topology
:header-rows: 0 :header-rows: 0
...@@ -143,7 +143,7 @@ desired arrays with the media graph elements. ...@@ -143,7 +143,7 @@ desired arrays with the media graph elements.
.. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| .. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}|
.. _media-v2-entity: .. c:type:: media_v2_entity
.. flat-table:: struct media_v2_entity .. flat-table:: struct media_v2_entity
:header-rows: 0 :header-rows: 0
...@@ -187,7 +187,7 @@ desired arrays with the media graph elements. ...@@ -187,7 +187,7 @@ desired arrays with the media graph elements.
.. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| .. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}|
.. _media-v2-interface: .. c:type:: media_v2_interface
.. flat-table:: struct media_v2_interface .. flat-table:: struct media_v2_interface
:header-rows: 0 :header-rows: 0
...@@ -239,7 +239,7 @@ desired arrays with the media graph elements. ...@@ -239,7 +239,7 @@ desired arrays with the media graph elements.
.. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| .. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}|
.. _media-v2-intf-devnode: .. c:type:: media_v2_intf_devnode
.. flat-table:: struct media_v2_interface .. flat-table:: struct media_v2_interface
:header-rows: 0 :header-rows: 0
...@@ -266,7 +266,7 @@ desired arrays with the media graph elements. ...@@ -266,7 +266,7 @@ desired arrays with the media graph elements.
.. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| .. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}|
.. _media-v2-pad: .. c:type:: media_v2_pad
.. flat-table:: struct media_v2_pad .. flat-table:: struct media_v2_pad
:header-rows: 0 :header-rows: 0
...@@ -310,7 +310,7 @@ desired arrays with the media graph elements. ...@@ -310,7 +310,7 @@ desired arrays with the media graph elements.
.. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}| .. tabularcolumns:: |p{1.6cm}|p{3.2cm}|p{12.7cm}|
.. _media-v2-link: .. c:type:: media_v2_link
.. flat-table:: struct media_v2_pad .. flat-table:: struct media_v2_pad
:header-rows: 0 :header-rows: 0
......
...@@ -32,7 +32,7 @@ Description ...@@ -32,7 +32,7 @@ Description
=========== ===========
To change link properties applications fill a struct To change link properties applications fill a struct
:ref:`media_link_desc <media-link-desc>` with link identification :c:type:`media_link_desc` with link identification
information (source and sink pad) and the new requested link flags. They information (source and sink pad) and the new requested link flags. They
then call the MEDIA_IOC_SETUP_LINK ioctl with a pointer to that then call the MEDIA_IOC_SETUP_LINK ioctl with a pointer to that
structure. structure.
...@@ -61,6 +61,6 @@ appropriately. The generic error codes are described at the ...@@ -61,6 +61,6 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`media_link_desc <media-link-desc>` references a The struct :c:type:`media_link_desc` references a
non-existing link, or the link is immutable and an attempt to modify non-existing link, or the link is immutable and an attempt to modify
its configuration was made. its configuration was made.
...@@ -21,15 +21,15 @@ more than one video input or output. Assumed two composite video inputs ...@@ -21,15 +21,15 @@ more than one video input or output. Assumed two composite video inputs
and two audio inputs exist, there may be up to four valid combinations. and two audio inputs exist, there may be up to four valid combinations.
The relation of video and audio connectors is defined in the The relation of video and audio connectors is defined in the
``audioset`` field of the respective struct ``audioset`` field of the respective struct
:ref:`v4l2_input <v4l2-input>` or struct :c:type:`v4l2_input` or struct
:ref:`v4l2_output <v4l2-output>`, where each bit represents the index :c:type:`v4l2_output`, where each bit represents the index
number, starting at zero, of one audio input or output. number, starting at zero, of one audio input or output.
To learn about the number and attributes of the available inputs and To learn about the number and attributes of the available inputs and
outputs applications can enumerate them with the outputs applications can enumerate them with the
:ref:`VIDIOC_ENUMAUDIO` and :ref:`VIDIOC_ENUMAUDIO` and
:ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDOUT>` ioctl, respectively. :ref:`VIDIOC_ENUMAUDOUT <VIDIOC_ENUMAUDOUT>` ioctl, respectively.
The struct :ref:`v4l2_audio <v4l2-audio>` returned by the The struct :c:type:`v4l2_audio` returned by the
:ref:`VIDIOC_ENUMAUDIO` ioctl also contains signal :ref:`VIDIOC_ENUMAUDIO` ioctl also contains signal
:status information applicable when the current audio input is queried. :status information applicable when the current audio input is queried.
...@@ -53,7 +53,7 @@ Drivers must implement all audio input ioctls when the device has ...@@ -53,7 +53,7 @@ Drivers must implement all audio input ioctls when the device has
multiple selectable audio inputs, all audio output ioctls when the multiple selectable audio inputs, all audio output ioctls when the
device has multiple selectable audio outputs. When the device has any device has multiple selectable audio outputs. When the device has any
audio inputs or outputs the driver must set the ``V4L2_CAP_AUDIO`` flag audio inputs or outputs the driver must set the ``V4L2_CAP_AUDIO`` flag
in the struct :ref:`v4l2_capability <v4l2-capability>` returned by in the struct :c:type:`v4l2_capability` returned by
the :ref:`VIDIOC_QUERYCAP` ioctl. the :ref:`VIDIOC_QUERYCAP` ioctl.
...@@ -91,7 +91,7 @@ Example: Switching to the first audio input ...@@ -91,7 +91,7 @@ Example: Switching to the first audio input
} }
.. [#f1] .. [#f1]
Actually struct :ref:`v4l2_audio <v4l2-audio>` ought to have a Actually struct :c:type:`v4l2_audio` ought to have a
``tuner`` field like struct :ref:`v4l2_input <v4l2-input>`, not ``tuner`` field like struct :c:type:`v4l2_input`, not
only making the API more consistent but also permitting radio devices only making the API more consistent but also permitting radio devices
with multiple tuners. with multiple tuners.
...@@ -11,14 +11,14 @@ the Streaming I/O methods. In the multi-planar API, the data is held in ...@@ -11,14 +11,14 @@ the Streaming I/O methods. In the multi-planar API, the data is held in
planes, while the buffer structure acts as a container for the planes. planes, while the buffer structure acts as a container for the planes.
Only pointers to buffers (planes) are exchanged, the data itself is not Only pointers to buffers (planes) are exchanged, the data itself is not
copied. These pointers, together with meta-information like timestamps copied. These pointers, together with meta-information like timestamps
or field parity, are stored in a struct :ref:`struct v4l2_buffer <v4l2-buffer>`, or field parity, are stored in a struct :c:type:`struct v4l2_buffer <v4l2_buffer>`,
argument to the :ref:`VIDIOC_QUERYBUF`, argument to the :ref:`VIDIOC_QUERYBUF`,
:ref:`VIDIOC_QBUF` and :ref:`VIDIOC_QBUF` and
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. In the multi-planar API, :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>` ioctl. In the multi-planar API,
some plane-specific members of struct :ref:`struct v4l2_buffer <v4l2-buffer>`, some plane-specific members of struct :c:type:`struct v4l2_buffer <v4l2_buffer>`,
such as pointers and sizes for each plane, are stored in struct such as pointers and sizes for each plane, are stored in struct
:ref:`struct v4l2_plane <v4l2-plane>` instead. In that case, struct :c:type:`struct v4l2_plane <v4l2_plane>` instead. In that case, struct
:ref:`struct v4l2_buffer <v4l2-buffer>` contains an array of plane structures. :c:type:`struct v4l2_buffer <v4l2_buffer>` contains an array of plane structures.
Dequeued video buffers come with timestamps. The driver decides at which Dequeued video buffers come with timestamps. The driver decides at which
part of the frame and with which clock the timestamp is taken. Please part of the frame and with which clock the timestamp is taken. Please
...@@ -34,7 +34,7 @@ flags are copied from the OUTPUT video buffer to the CAPTURE video ...@@ -34,7 +34,7 @@ flags are copied from the OUTPUT video buffer to the CAPTURE video
buffer. buffer.
.. _v4l2-buffer: .. c:type:: v4l2_buffer
struct v4l2_buffer struct v4l2_buffer
================== ==================
...@@ -60,7 +60,7 @@ struct v4l2_buffer ...@@ -60,7 +60,7 @@ struct v4l2_buffer
:ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, then it is set by the :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, then it is set by the
driver. This field can range from zero to the number of buffers driver. This field can range from zero to the number of buffers
allocated with the :ref:`VIDIOC_REQBUFS` ioctl allocated with the :ref:`VIDIOC_REQBUFS` ioctl
(struct :ref:`v4l2_requestbuffers <v4l2-requestbuffers>` (struct :c:type:`v4l2_requestbuffers`
``count``), plus any buffers allocated with ``count``), plus any buffers allocated with
:ref:`VIDIOC_CREATE_BUFS` minus one. :ref:`VIDIOC_CREATE_BUFS` minus one.
...@@ -72,8 +72,8 @@ struct v4l2_buffer ...@@ -72,8 +72,8 @@ struct v4l2_buffer
- -
- Type of the buffer, same as struct - Type of the buffer, same as struct
:ref:`v4l2_format <v4l2-format>` ``type`` or struct :c:type:`v4l2_format` ``type`` or struct
:ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``, set :c:type:`v4l2_requestbuffers` ``type``, set
by the application. See :ref:`v4l2-buf-type` by the application. See :ref:`v4l2-buf-type`
- .. row 3 - .. row 3
...@@ -134,7 +134,7 @@ struct v4l2_buffer ...@@ -134,7 +134,7 @@ struct v4l2_buffer
- .. row 7 - .. row 7
- struct :ref:`v4l2_timecode <v4l2-timecode>` - struct :c:type:`v4l2_timecode`
- ``timecode`` - ``timecode``
...@@ -229,9 +229,9 @@ struct v4l2_buffer ...@@ -229,9 +229,9 @@ struct v4l2_buffer
- ``*planes`` - ``*planes``
- When using the multi-planar API, contains a userspace pointer to - When using the multi-planar API, contains a userspace pointer to
an array of struct :ref:`v4l2_plane <v4l2-plane>`. The size of an array of struct :c:type:`v4l2_plane`. The size of
the array should be put in the ``length`` field of this the array should be put in the ``length`` field of this
:ref:`struct v4l2_buffer <v4l2-buffer>` structure. :c:type:`struct v4l2_buffer <v4l2_buffer>` structure.
- .. row 15 - .. row 15
...@@ -281,7 +281,7 @@ struct v4l2_buffer ...@@ -281,7 +281,7 @@ struct v4l2_buffer
.. _v4l2-plane: .. c:type:: v4l2_plane
struct v4l2_plane struct v4l2_plane
================= =================
...@@ -344,10 +344,10 @@ struct v4l2_plane ...@@ -344,10 +344,10 @@ struct v4l2_plane
- ``mem_offset`` - ``mem_offset``
- When the memory type in the containing struct - When the memory type in the containing struct
:ref:`v4l2_buffer <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 :ref:`mmap() <func-mmap>`,
similar to the ``offset`` field in struct similar to the ``offset`` field in struct
:ref:`v4l2_buffer <v4l2-buffer>`. :c:type:`v4l2_buffer`.
- .. row 5 - .. row 5
...@@ -357,7 +357,7 @@ struct v4l2_plane ...@@ -357,7 +357,7 @@ struct v4l2_plane
- ``userptr`` - ``userptr``
- When the memory type in the containing struct - When the memory type in the containing struct
:ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_USERPTR``, :c:type:`v4l2_buffer` is ``V4L2_MEMORY_USERPTR``,
this is a userspace pointer to the memory allocated for this plane this is a userspace pointer to the memory allocated for this plane
by an application. by an application.
...@@ -369,9 +369,9 @@ struct v4l2_plane ...@@ -369,9 +369,9 @@ struct v4l2_plane
- ``fd`` - ``fd``
- When the memory type in the containing struct - When the memory type in the containing struct
:ref:`v4l2_buffer <v4l2-buffer>` is ``V4L2_MEMORY_DMABUF``, :c:type:`v4l2_buffer` is ``V4L2_MEMORY_DMABUF``,
this is a file descriptor associated with a DMABUF buffer, similar this is a file descriptor associated with a DMABUF buffer, similar
to the ``fd`` field in struct :ref:`v4l2_buffer <v4l2-buffer>`. to the ``fd`` field in struct :c:type:`v4l2_buffer`.
- .. row 7 - .. row 7
...@@ -823,13 +823,13 @@ enum v4l2_memory ...@@ -823,13 +823,13 @@ enum v4l2_memory
Timecodes Timecodes
========= =========
The :ref:`struct v4l2_timecode <v4l2-timecode>` structure is designed to hold a The :c:type:`struct v4l2_timecode <v4l2_timecode>` structure is designed to hold a
:ref:`smpte12m` or similar timecode. (struct :ref:`smpte12m` or similar timecode. (struct
:c:type:`struct timeval` timestamps are stored in struct :c:type:`struct timeval` timestamps are stored in struct
:ref:`v4l2_buffer <v4l2-buffer>` field ``timestamp``.) :c:type:`v4l2_buffer` field ``timestamp``.)
.. _v4l2-timecode: .. c:type:: v4l2_timecode
struct v4l2_timecode struct v4l2_timecode
-------------------- --------------------
......
...@@ -65,7 +65,7 @@ Cropping Structures ...@@ -65,7 +65,7 @@ Cropping Structures
For capture devices the coordinates of the top left corner, width and For capture devices the coordinates of the top left corner, width and
height of the area which can be sampled is given by the ``bounds`` height of the area which can be sampled is given by the ``bounds``
substructure of the struct :ref:`v4l2_cropcap <v4l2-cropcap>` returned substructure of the struct :c:type:`v4l2_cropcap` returned
by the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>` ioctl. To support a wide by the :ref:`VIDIOC_CROPCAP <VIDIOC_CROPCAP>` ioctl. To support a wide
range of hardware this specification does not define an origin or units. range of hardware this specification does not define an origin or units.
However by convention drivers should horizontally count unscaled samples However by convention drivers should horizontally count unscaled samples
...@@ -77,8 +77,8 @@ can capture both fields. ...@@ -77,8 +77,8 @@ can capture both fields.
The top left corner, width and height of the source rectangle, that is The top left corner, width and height of the source rectangle, that is
the area actually sampled, is given by struct the area actually sampled, is given by struct
:ref:`v4l2_crop <v4l2-crop>` using the same coordinate system as :c:type:`v4l2_crop` using the same coordinate system as
struct :ref:`v4l2_cropcap <v4l2-cropcap>`. Applications can use the struct :c:type:`v4l2_cropcap`. Applications can use the
:ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` and :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>`
ioctls to get and set this rectangle. It must lie completely within the ioctls to get and set this rectangle. It must lie completely within the
capture boundaries and the driver may further adjust the requested size capture boundaries and the driver may further adjust the requested size
...@@ -86,7 +86,7 @@ and/or position according to hardware limitations. ...@@ -86,7 +86,7 @@ and/or position according to hardware limitations.
Each capture device has a default source rectangle, given by the Each capture device has a default source rectangle, given by the
``defrect`` substructure of struct ``defrect`` substructure of struct
:ref:`v4l2_cropcap <v4l2-cropcap>`. The center of this rectangle :c:type:`v4l2_cropcap`. The center of this rectangle
shall align with the center of the active picture area of the video shall align with the center of the active picture area of the video
signal, and cover what the driver writer considers the complete picture. signal, and cover what the driver writer considers the complete picture.
Drivers shall reset the source rectangle to the default when the driver Drivers shall reset the source rectangle to the default when the driver
...@@ -104,11 +104,11 @@ Video hardware can have various cropping, insertion and scaling ...@@ -104,11 +104,11 @@ Video hardware can have various cropping, insertion and scaling
limitations. It may only scale up or down, support only discrete scaling limitations. It may only scale up or down, support only discrete scaling
factors, or have different scaling abilities in horizontal and vertical factors, or have different scaling abilities in horizontal and vertical
direction. Also it may not support scaling at all. At the same time the direction. Also it may not support scaling at all. At the same time the
struct :ref:`v4l2_crop <v4l2-crop>` rectangle may have to be aligned, struct :c:type:`v4l2_crop` rectangle may have to be aligned,
and both the source and target rectangles may have arbitrary upper and and both the source and target rectangles may have arbitrary upper and
lower size limits. In particular the maximum ``width`` and ``height`` in lower size limits. In particular the maximum ``width`` and ``height`` in
struct :ref:`v4l2_crop <v4l2-crop>` may be smaller than the struct struct :c:type:`v4l2_crop` may be smaller than the struct
:ref:`v4l2_cropcap <v4l2-cropcap>`. ``bounds`` area. Therefore, as :c:type:`v4l2_cropcap`. ``bounds`` area. Therefore, as
usual, drivers are expected to adjust the requested parameters and usual, drivers are expected to adjust the requested parameters and
return the actual values selected. return the actual values selected.
......
...@@ -26,7 +26,7 @@ Querying Capabilities ...@@ -26,7 +26,7 @@ Querying Capabilities
Devices supporting the video capture interface set the Devices supporting the video capture interface set the
``V4L2_CAP_VIDEO_CAPTURE`` or ``V4L2_CAP_VIDEO_CAPTURE_MPLANE`` flag in ``V4L2_CAP_VIDEO_CAPTURE`` or ``V4L2_CAP_VIDEO_CAPTURE_MPLANE`` flag in
the ``capabilities`` field of struct the ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl. As secondary device :ref:`VIDIOC_QUERYCAP` ioctl. As secondary device
functions they may also support the :ref:`video overlay <overlay>` functions they may also support the :ref:`video overlay <overlay>`
(``V4L2_CAP_VIDEO_OVERLAY``) and the :ref:`raw VBI capture <raw-vbi>` (``V4L2_CAP_VIDEO_OVERLAY``) and the :ref:`raw VBI capture <raw-vbi>`
...@@ -64,18 +64,18 @@ Cropping initialization at minimum requires to reset the parameters to ...@@ -64,18 +64,18 @@ Cropping initialization at minimum requires to reset the parameters to
defaults. An example is given in :ref:`crop`. defaults. An example is given in :ref:`crop`.
To query the current image format applications set the ``type`` field of To query the current image format applications set the ``type`` field of
a struct :ref:`v4l2_format <v4l2-format>` to a struct :c:type:`v4l2_format` to
``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or
``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and call the ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and call the
:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this
structure. Drivers fill the struct structure. Drivers fill the struct
:ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct :c:type:`v4l2_pix_format` ``pix`` or the struct
:ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp`` :c:type:`v4l2_pix_format_mplane` ``pix_mp``
member of the ``fmt`` union. member of the ``fmt`` union.
To request different parameters applications set the ``type`` field of a To request different parameters applications set the ``type`` field of a
struct :ref:`v4l2_format <v4l2-format>` as above and initialize all struct :c:type:`v4l2_format` as above and initialize all
fields of the struct :ref:`v4l2_pix_format <v4l2-pix-format>` fields of the struct :c:type:`v4l2_pix_format`
``vbi`` member of the ``fmt`` union, or better just modify the results ``vbi`` member of the ``fmt`` union, or better just modify the results
of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
ioctl with a pointer to this structure. Drivers may adjust the ioctl with a pointer to this structure. Drivers may adjust the
...@@ -86,8 +86,8 @@ Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ...@@ -86,8 +86,8 @@ Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`
can be used to learn about hardware limitations without disabling I/O or can be used to learn about hardware limitations without disabling I/O or
possibly time consuming hardware preparations. possibly time consuming hardware preparations.
The contents of struct :ref:`v4l2_pix_format <v4l2-pix-format>` and The contents of struct :c:type:`v4l2_pix_format` and
struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` are struct :c:type:`v4l2_pix_format_mplane` are
discussed in :ref:`pixfmt`. See also the specification of the discussed in :ref:`pixfmt`. See also the specification of the
:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctls for :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctls for
details. Video capture devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` details. Video capture devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`
......
...@@ -28,7 +28,7 @@ Querying Capabilities ...@@ -28,7 +28,7 @@ Querying Capabilities
Devices supporting the *Video Output Overlay* interface set the Devices supporting the *Video Output Overlay* interface set the
``V4L2_CAP_VIDEO_OUTPUT_OVERLAY`` flag in the ``capabilities`` field of ``V4L2_CAP_VIDEO_OUTPUT_OVERLAY`` flag in the ``capabilities`` field of
struct :ref:`v4l2_capability <v4l2-capability>` returned by the struct :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl. :ref:`VIDIOC_QUERYCAP` ioctl.
...@@ -41,7 +41,7 @@ accessible as a framebuffer device (``/dev/fbN``). Given a V4L2 device, ...@@ -41,7 +41,7 @@ accessible as a framebuffer device (``/dev/fbN``). Given a V4L2 device,
applications can find the corresponding framebuffer device by calling applications can find the corresponding framebuffer device by calling
the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` ioctl. It returns, amongst the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` ioctl. It returns, amongst
other information, the physical address of the framebuffer in the other information, the physical address of the framebuffer in the
``base`` field of struct :ref:`v4l2_framebuffer <v4l2-framebuffer>`. ``base`` field of struct :c:type:`v4l2_framebuffer`.
The framebuffer device ioctl ``FBIOGET_FSCREENINFO`` returns the same The framebuffer device ioctl ``FBIOGET_FSCREENINFO`` returns the same
address in the ``smem_start`` field of struct address in the ``smem_start`` field of struct
:c:type:`struct fb_fix_screeninfo`. The ``FBIOGET_FSCREENINFO`` :c:type:`struct fb_fix_screeninfo`. The ``FBIOGET_FSCREENINFO``
...@@ -114,18 +114,18 @@ sizes and positions of these rectangles. Further drivers may support any ...@@ -114,18 +114,18 @@ sizes and positions of these rectangles. Further drivers may support any
(or none) of the clipping/blending methods defined for the (or none) of the clipping/blending methods defined for the
:ref:`Video Overlay <overlay>` interface. :ref:`Video Overlay <overlay>` interface.
A struct :ref:`v4l2_window <v4l2-window>` defines the size of the A struct :c:type:`v4l2_window` defines the size of the
source rectangle, its position in the framebuffer and the source rectangle, its position in the framebuffer and the
clipping/blending method to be used for the overlay. To get the current clipping/blending method to be used for the overlay. To get the current
parameters applications set the ``type`` field of a struct parameters applications set the ``type`` field of a struct
:ref:`v4l2_format <v4l2-format>` to :c:type:`v4l2_format` to
``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY`` and call the ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY`` and call the
:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the
:ref:`struct v4l2_window <v4l2-window>` substructure named ``win``. It is not :c:type:`struct v4l2_window <v4l2_window>` substructure named ``win``. It is not
possible to retrieve a previously programmed clipping list or bitmap. possible to retrieve a previously programmed clipping list or bitmap.
To program the source rectangle applications set the ``type`` field of a To program the source rectangle applications set the ``type`` field of a
struct :ref:`v4l2_format <v4l2-format>` to struct :c:type:`v4l2_format` to
``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY``, initialize the ``win`` ``V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY``, initialize the ``win``
substructure and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. substructure and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl.
The driver adjusts the parameters against hardware limits and returns The driver adjusts the parameters against hardware limits and returns
...@@ -134,10 +134,10 @@ the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to learn ...@@ -134,10 +134,10 @@ the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to learn
about driver capabilities without actually changing driver state. Unlike about driver capabilities without actually changing driver state. Unlike
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` this also works after the overlay has been enabled. :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` this also works after the overlay has been enabled.
A struct :ref:`v4l2_crop <v4l2-crop>` defines the size and position A struct :c:type:`v4l2_crop` defines the size and position
of the target rectangle. The scaling factor of the overlay is implied by of the target rectangle. The scaling factor of the overlay is implied by
the width and height given in struct :ref:`v4l2_window <v4l2-window>` the width and height given in struct :c:type:`v4l2_window`
and struct :ref:`v4l2_crop <v4l2-crop>`. The cropping API applies to and struct :c:type:`v4l2_crop`. The cropping API applies to
*Video Output* and *Video Output Overlay* devices in the same way as to *Video Output* and *Video Output Overlay* devices in the same way as to
*Video Capture* and *Video Overlay* devices, merely reversing the *Video Capture* and *Video Overlay* devices, merely reversing the
direction of the data flow. For more information see :ref:`crop`. direction of the data flow. For more information see :ref:`crop`.
......
...@@ -25,7 +25,7 @@ Querying Capabilities ...@@ -25,7 +25,7 @@ Querying Capabilities
Devices supporting the video output interface set the Devices supporting the video output interface set the
``V4L2_CAP_VIDEO_OUTPUT`` or ``V4L2_CAP_VIDEO_OUTPUT_MPLANE`` flag in ``V4L2_CAP_VIDEO_OUTPUT`` or ``V4L2_CAP_VIDEO_OUTPUT_MPLANE`` flag in
the ``capabilities`` field of struct the ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl. As secondary device :ref:`VIDIOC_QUERYCAP` ioctl. As secondary device
functions they may also support the :ref:`raw VBI output <raw-vbi>` functions they may also support the :ref:`raw VBI output <raw-vbi>`
(``V4L2_CAP_VBI_OUTPUT``) interface. At least one of the read/write or (``V4L2_CAP_VBI_OUTPUT``) interface. At least one of the read/write or
...@@ -62,17 +62,17 @@ Cropping initialization at minimum requires to reset the parameters to ...@@ -62,17 +62,17 @@ Cropping initialization at minimum requires to reset the parameters to
defaults. An example is given in :ref:`crop`. defaults. An example is given in :ref:`crop`.
To query the current image format applications set the ``type`` field of To query the current image format applications set the ``type`` field of
a struct :ref:`v4l2_format <v4l2-format>` to a struct :c:type:`v4l2_format` to
``V4L2_BUF_TYPE_VIDEO_OUTPUT`` or ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE`` ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` or ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``
and call the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer and call the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer
to this structure. Drivers fill the struct to this structure. Drivers fill the struct
:ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct :c:type:`v4l2_pix_format` ``pix`` or the struct
:ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp`` :c:type:`v4l2_pix_format_mplane` ``pix_mp``
member of the ``fmt`` union. member of the ``fmt`` union.
To request different parameters applications set the ``type`` field of a To request different parameters applications set the ``type`` field of a
struct :ref:`v4l2_format <v4l2-format>` as above and initialize all struct :c:type:`v4l2_format` as above and initialize all
fields of the struct :ref:`v4l2_pix_format <v4l2-pix-format>` fields of the struct :c:type:`v4l2_pix_format`
``vbi`` member of the ``fmt`` union, or better just modify the results ``vbi`` member of the ``fmt`` union, or better just modify the results
of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
ioctl with a pointer to this structure. Drivers may adjust the ioctl with a pointer to this structure. Drivers may adjust the
...@@ -83,8 +83,8 @@ Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ...@@ -83,8 +83,8 @@ Like :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` the :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`
can be used to learn about hardware limitations without disabling I/O or can be used to learn about hardware limitations without disabling I/O or
possibly time consuming hardware preparations. possibly time consuming hardware preparations.
The contents of struct :ref:`v4l2_pix_format <v4l2-pix-format>` and The contents of struct :c:type:`v4l2_pix_format` and
struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` are struct :c:type:`v4l2_pix_format_mplane` are
discussed in :ref:`pixfmt`. See also the specification of the discussed in :ref:`pixfmt`. See also the specification of the
:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctls for :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctls for
details. Video output devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` details. Video output devices must implement both the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`
......
...@@ -43,7 +43,7 @@ Querying Capabilities ...@@ -43,7 +43,7 @@ Querying Capabilities
Devices supporting the video overlay interface set the Devices supporting the video overlay interface set the
``V4L2_CAP_VIDEO_OVERLAY`` flag in the ``capabilities`` field of struct ``V4L2_CAP_VIDEO_OVERLAY`` flag in the ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl. The overlay I/O :ref:`VIDIOC_QUERYCAP` ioctl. The overlay I/O
method specified below must be supported. Tuners and audio inputs are method specified below must be supported. Tuners and audio inputs are
optional. optional.
...@@ -119,17 +119,17 @@ at minimum requires to reset the parameters to defaults. An example is ...@@ -119,17 +119,17 @@ at minimum requires to reset the parameters to defaults. An example is
given in :ref:`crop`. given in :ref:`crop`.
The overlay window is described by a struct The overlay window is described by a struct
:ref:`v4l2_window <v4l2-window>`. It defines the size of the image, :c:type:`v4l2_window`. It defines the size of the image,
its position over the graphics surface and the clipping to be applied. its position over the graphics surface and the clipping to be applied.
To get the current parameters applications set the ``type`` field of a To get the current parameters applications set the ``type`` field of a
struct :ref:`v4l2_format <v4l2-format>` to struct :c:type:`v4l2_format` to
``V4L2_BUF_TYPE_VIDEO_OVERLAY`` and call the ``V4L2_BUF_TYPE_VIDEO_OVERLAY`` and call the
:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl. The driver fills the
:ref:`struct v4l2_window <v4l2-window>` substructure named ``win``. It is not :c:type:`struct v4l2_window <v4l2_window>` substructure named ``win``. It is not
possible to retrieve a previously programmed clipping list or bitmap. possible to retrieve a previously programmed clipping list or bitmap.
To program the overlay window applications set the ``type`` field of a To program the overlay window applications set the ``type`` field of a
struct :ref:`v4l2_format <v4l2-format>` to struct :c:type:`v4l2_format` to
``V4L2_BUF_TYPE_VIDEO_OVERLAY``, initialize the ``win`` substructure and ``V4L2_BUF_TYPE_VIDEO_OVERLAY``, initialize the ``win`` substructure and
call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. The driver call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. The driver
adjusts the parameters against hardware limits and returns the actual adjusts the parameters against hardware limits and returns the actual
...@@ -139,7 +139,7 @@ about driver capabilities without actually changing driver state. Unlike ...@@ -139,7 +139,7 @@ about driver capabilities without actually changing driver state. Unlike
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` this also works after the overlay has been enabled. :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` this also works after the overlay has been enabled.
The scaling factor of the overlaid image is implied by the width and The scaling factor of the overlaid image is implied by the width and
height given in struct :ref:`v4l2_window <v4l2-window>` and the size height given in struct :c:type:`v4l2_window` and the size
of the cropping rectangle. For more information see :ref:`crop`. of the cropping rectangle. For more information see :ref:`crop`.
When simultaneous capturing and overlay is supported and the hardware When simultaneous capturing and overlay is supported and the hardware
...@@ -149,7 +149,7 @@ takes precedence. The attempt to capture or overlay as well ...@@ -149,7 +149,7 @@ takes precedence. The attempt to capture or overlay as well
code or return accordingly modified parameters. code or return accordingly modified parameters.
.. _v4l2-window: .. c:type:: v4l2_window
struct v4l2_window struct v4l2_window
------------------ ------------------
...@@ -175,7 +175,7 @@ struct v4l2_window ...@@ -175,7 +175,7 @@ struct v4l2_window
:ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` applications set this field :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` applications set this field
to the desired pixel value for the chroma key. The format is the to the desired pixel value for the chroma key. The format is the
same as the pixel format of the framebuffer (struct same as the pixel format of the framebuffer (struct
:ref:`v4l2_framebuffer <v4l2-framebuffer>` ``fmt.pixelformat`` :c:type:`v4l2_framebuffer` ``fmt.pixelformat``
field), with bytes in host order. E. g. for field), with bytes in host order. E. g. for
:ref:`V4L2_PIX_FMT_BGR24 <V4L2-PIX-FMT-BGR32>` the value should :ref:`V4L2_PIX_FMT_BGR24 <V4L2-PIX-FMT-BGR32>` the value should
be 0xRRGGBB on a little endian, 0xBBGGRR on a big endian host. be 0xRRGGBB on a little endian, 0xBBGGRR on a big endian host.
...@@ -242,11 +242,11 @@ exceeded are undefined. [#f3]_ ...@@ -242,11 +242,11 @@ exceeded are undefined. [#f3]_
This field was added in Linux 2.6.23, extending the This field was added in Linux 2.6.23, extending the
structure. However the :ref:`VIDIOC_[G|S|TRY]_FMT <VIDIOC_G_FMT>` structure. However the :ref:`VIDIOC_[G|S|TRY]_FMT <VIDIOC_G_FMT>`
ioctls, which take a pointer to a :ref:`v4l2_format <v4l2-format>` ioctls, which take a pointer to a :c:type:`v4l2_format`
parent structure with padding bytes at the end, are not affected. parent structure with padding bytes at the end, are not affected.
.. _v4l2-clip: .. c:type:: v4l2_clip
struct v4l2_clip [#f4]_ struct v4l2_clip [#f4]_
----------------------- -----------------------
...@@ -262,7 +262,7 @@ struct v4l2_clip [#f4]_ ...@@ -262,7 +262,7 @@ struct v4l2_clip [#f4]_
linked list of clipping rectangles. linked list of clipping rectangles.
.. _v4l2-rect: .. c:type:: v4l2_rect
struct v4l2_rect struct v4l2_rect
---------------- ----------------
......
...@@ -20,7 +20,7 @@ Querying Capabilities ...@@ -20,7 +20,7 @@ Querying Capabilities
Devices supporting the radio interface set the ``V4L2_CAP_RADIO`` and Devices supporting the radio interface set the ``V4L2_CAP_RADIO`` and
``V4L2_CAP_TUNER`` or ``V4L2_CAP_MODULATOR`` flag in the ``V4L2_CAP_TUNER`` or ``V4L2_CAP_MODULATOR`` flag in the
``capabilities`` field of struct ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl. Other combinations of :ref:`VIDIOC_QUERYCAP` ioctl. Other combinations of
capability flags are reserved for future extensions. capability flags are reserved for future extensions.
......
...@@ -39,7 +39,7 @@ Querying Capabilities ...@@ -39,7 +39,7 @@ Querying Capabilities
Devices supporting the raw VBI capturing or output API set the Devices supporting the raw VBI capturing or output API set the
``V4L2_CAP_VBI_CAPTURE`` or ``V4L2_CAP_VBI_OUTPUT`` flags, respectively, ``V4L2_CAP_VBI_CAPTURE`` or ``V4L2_CAP_VBI_OUTPUT`` flags, respectively,
in the ``capabilities`` field of struct in the ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl. At least one of the :ref:`VIDIOC_QUERYCAP` ioctl. At least one of the
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.
...@@ -69,16 +69,16 @@ always ensure they really get what they want, requesting reasonable ...@@ -69,16 +69,16 @@ always ensure they really get what they want, requesting reasonable
parameters and then checking if the actual parameters are suitable. parameters and then checking if the actual parameters are suitable.
To query the current raw VBI capture parameters applications set the To query the current raw VBI capture parameters applications set the
``type`` field of a struct :ref:`v4l2_format <v4l2-format>` to ``type`` field of a struct :c:type:`v4l2_format` to
``V4L2_BUF_TYPE_VBI_CAPTURE`` or ``V4L2_BUF_TYPE_VBI_OUTPUT``, and call ``V4L2_BUF_TYPE_VBI_CAPTURE`` or ``V4L2_BUF_TYPE_VBI_OUTPUT``, and call
the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this
structure. Drivers fill the struct structure. Drivers fill the struct
:ref:`v4l2_vbi_format <v4l2-vbi-format>` ``vbi`` member of the :c:type:`v4l2_vbi_format` ``vbi`` member of the
``fmt`` union. ``fmt`` union.
To request different parameters applications set the ``type`` field of a To request different parameters applications set the ``type`` field of a
struct :ref:`v4l2_format <v4l2-format>` as above and initialize all struct :c:type:`v4l2_format` as above and initialize all
fields of the struct :ref:`v4l2_vbi_format <v4l2-vbi-format>` fields of the struct :c:type:`v4l2_vbi_format`
``vbi`` member of the ``fmt`` union, or better just modify the results ``vbi`` member of the ``fmt`` union, or better just modify the results
of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` of :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, and call the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
ioctl with a pointer to this structure. Drivers return an ``EINVAL`` error ioctl with a pointer to this structure. Drivers return an ``EINVAL`` error
...@@ -101,7 +101,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does ...@@ -101,7 +101,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
.. tabularcolumns:: |p{2.4cm}|p{4.4cm}|p{10.7cm}| .. tabularcolumns:: |p{2.4cm}|p{4.4cm}|p{10.7cm}|
.. _v4l2-vbi-format: .. c:type:: v4l2_vbi_format
.. cssclass:: longtable .. cssclass:: longtable
...@@ -204,7 +204,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does ...@@ -204,7 +204,7 @@ and always returns default parameters as :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` does
To initialize the ``start`` and ``count`` fields, applications To initialize the ``start`` and ``count`` fields, applications
must first determine the current video standard selection. The must first determine the current video standard selection. The
:ref:`v4l2_std_id <v4l2-std-id>` or the ``framelines`` field :ref:`v4l2_std_id <v4l2-std-id>` or the ``framelines`` field
of struct :ref:`v4l2_standard <v4l2-standard>` can be evaluated of struct :c:type:`v4l2_standard` can be evaluated
for this purpose. for this purpose.
- .. row 8 - .. row 8
......
...@@ -34,10 +34,10 @@ Querying Capabilities ...@@ -34,10 +34,10 @@ Querying Capabilities
Devices supporting the RDS capturing API set the Devices supporting the RDS capturing API set the
``V4L2_CAP_RDS_CAPTURE`` flag in the ``capabilities`` field of struct ``V4L2_CAP_RDS_CAPTURE`` flag in the ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl. Any tuner that :ref:`VIDIOC_QUERYCAP` ioctl. Any tuner that
supports RDS will set the ``V4L2_TUNER_CAP_RDS`` flag in the supports RDS will set the ``V4L2_TUNER_CAP_RDS`` flag in the
``capability`` field of struct :ref:`v4l2_tuner <v4l2-tuner>`. If the ``capability`` field of struct :c:type:`v4l2_tuner`. If the
driver only passes RDS blocks without interpreting the data the driver only passes RDS blocks without interpreting the data the
``V4L2_TUNER_CAP_RDS_BLOCK_IO`` flag has to be set, see ``V4L2_TUNER_CAP_RDS_BLOCK_IO`` flag has to be set, see
:ref:`Reading RDS data <reading-rds-data>`. For future use the flag :ref:`Reading RDS data <reading-rds-data>`. For future use the flag
...@@ -48,19 +48,19 @@ linux-media mailing list: ...@@ -48,19 +48,19 @@ linux-media mailing list:
`https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__. `https://linuxtv.org/lists.php <https://linuxtv.org/lists.php>`__.
Whether an RDS signal is present can be detected by looking at the Whether an RDS signal is present can be detected by looking at the
``rxsubchans`` field of struct :ref:`v4l2_tuner <v4l2-tuner>`: the ``rxsubchans`` field of struct :c:type:`v4l2_tuner`: the
``V4L2_TUNER_SUB_RDS`` will be set if RDS data was detected. ``V4L2_TUNER_SUB_RDS`` will be set if RDS data was detected.
Devices supporting the RDS output API set the ``V4L2_CAP_RDS_OUTPUT`` Devices supporting the RDS output API set the ``V4L2_CAP_RDS_OUTPUT``
flag in the ``capabilities`` field of struct flag in the ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl. Any modulator that :ref:`VIDIOC_QUERYCAP` ioctl. Any modulator that
supports RDS will set the ``V4L2_TUNER_CAP_RDS`` flag in the supports RDS will set the ``V4L2_TUNER_CAP_RDS`` flag in the
``capability`` field of struct ``capability`` field of struct
:ref:`v4l2_modulator <v4l2-modulator>`. In order to enable the RDS :c:type:`v4l2_modulator`. In order to enable the RDS
transmission one must set the ``V4L2_TUNER_SUB_RDS`` bit in the transmission one must set the ``V4L2_TUNER_SUB_RDS`` bit in the
``txsubchans`` field of struct ``txsubchans`` field of struct
:ref:`v4l2_modulator <v4l2-modulator>`. If the driver only passes RDS :c:type:`v4l2_modulator`. If the driver only passes RDS
blocks without interpreting the data the ``V4L2_TUNER_CAP_RDS_BLOCK_IO`` blocks without interpreting the data the ``V4L2_TUNER_CAP_RDS_BLOCK_IO``
flag has to be set. If the tuner is capable of handling RDS entities flag has to be set. If the tuner is capable of handling RDS entities
like program identification codes and radio text, the flag like program identification codes and radio text, the flag
...@@ -93,7 +93,7 @@ RDS datastructures ...@@ -93,7 +93,7 @@ RDS datastructures
================== ==================
.. _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}|
......
...@@ -21,7 +21,7 @@ Querying Capabilities ...@@ -21,7 +21,7 @@ Querying Capabilities
Devices supporting the SDR receiver interface set the Devices supporting the SDR receiver interface set the
``V4L2_CAP_SDR_CAPTURE`` and ``V4L2_CAP_TUNER`` flag in the ``V4L2_CAP_SDR_CAPTURE`` and ``V4L2_CAP_TUNER`` flag in the
``capabilities`` field of struct ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl. That flag means the :ref:`VIDIOC_QUERYCAP` ioctl. That flag means the
device has an Analog to Digital Converter (ADC), which is a mandatory device has an Analog to Digital Converter (ADC), which is a mandatory
element for the SDR receiver. element for the SDR receiver.
...@@ -29,7 +29,7 @@ element for the SDR receiver. ...@@ -29,7 +29,7 @@ element for the SDR receiver.
Devices supporting the SDR transmitter interface set the Devices supporting the SDR transmitter interface set the
``V4L2_CAP_SDR_OUTPUT`` and ``V4L2_CAP_MODULATOR`` flag in the ``V4L2_CAP_SDR_OUTPUT`` and ``V4L2_CAP_MODULATOR`` flag in the
``capabilities`` field of struct ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl. That flag means the :ref:`VIDIOC_QUERYCAP` ioctl. That flag means the
device has an Digital to Analog Converter (DAC), which is a mandatory device has an Digital to Analog Converter (DAC), which is a mandatory
element for the SDR transmitter. element for the SDR transmitter.
...@@ -67,18 +67,18 @@ basic :ref:`format` ioctls, the ...@@ -67,18 +67,18 @@ basic :ref:`format` ioctls, the
well. well.
To use the :ref:`format` ioctls applications set the ``type`` To use the :ref:`format` ioctls applications set the ``type``
field of a struct :ref:`v4l2_format <v4l2-format>` to field of a struct :c:type:`v4l2_format` to
``V4L2_BUF_TYPE_SDR_CAPTURE`` or ``V4L2_BUF_TYPE_SDR_OUTPUT`` and use ``V4L2_BUF_TYPE_SDR_CAPTURE`` or ``V4L2_BUF_TYPE_SDR_OUTPUT`` and use
the struct :ref:`v4l2_sdr_format <v4l2-sdr-format>` ``sdr`` member the struct :c:type:`v4l2_sdr_format` ``sdr`` member
of the ``fmt`` union as needed per the desired operation. Currently of the ``fmt`` union as needed per the desired operation. Currently
there is two fields, ``pixelformat`` and ``buffersize``, of struct there is two fields, ``pixelformat`` and ``buffersize``, of struct
struct :ref:`v4l2_sdr_format <v4l2-sdr-format>` which are used. struct :c:type:`v4l2_sdr_format` which are used.
Content of the ``pixelformat`` is V4L2 FourCC code of the data format. Content of the ``pixelformat`` is V4L2 FourCC code of the data format.
The ``buffersize`` field is maximum buffer size in bytes required for The ``buffersize`` field is maximum buffer size in bytes required for
data transfer, set by the driver in order to inform application. data transfer, set by the driver in order to inform application.
.. _v4l2-sdr-format: .. c:type:: v4l2_sdr_format
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
......
...@@ -34,7 +34,7 @@ Querying Capabilities ...@@ -34,7 +34,7 @@ Querying Capabilities
Devices supporting the sliced VBI capturing or output API set the Devices supporting the sliced VBI capturing or output API set the
``V4L2_CAP_SLICED_VBI_CAPTURE`` or ``V4L2_CAP_SLICED_VBI_OUTPUT`` flag ``V4L2_CAP_SLICED_VBI_CAPTURE`` or ``V4L2_CAP_SLICED_VBI_OUTPUT`` flag
respectively, in the ``capabilities`` field of struct respectively, in the ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl. At least one of the :ref:`VIDIOC_QUERYCAP` ioctl. At least one of the
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.
...@@ -67,17 +67,17 @@ line 16 the hardware may be able to look for a VPS or Teletext signal, ...@@ -67,17 +67,17 @@ line 16 the hardware may be able to look for a VPS or Teletext signal,
but not both at the same time. but not both at the same time.
To determine the currently selected services applications set the To determine the currently selected services applications set the
``type`` field of struct :ref:`v4l2_format <v4l2-format>` to ``type`` field of struct :c:type:`v4l2_format` to
``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or ``V4L2_BUF_TYPE_SLICED_VBI_CAPTURE`` or
``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``, and the ``V4L2_BUF_TYPE_SLICED_VBI_OUTPUT``, and the
:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl fills the ``fmt.sliced`` :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl fills the ``fmt.sliced``
member, a struct member, a struct
:ref:`v4l2_sliced_vbi_format <v4l2-sliced-vbi-format>`. :c:type:`v4l2_sliced_vbi_format`.
Applications can request different parameters by initializing or Applications can request different parameters by initializing or
modifying the ``fmt.sliced`` member and calling the modifying the ``fmt.sliced`` member and calling the
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with a pointer to the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with a pointer to the
:ref:`struct v4l2_format <v4l2-format>` structure. :c:type:`struct v4l2_format <v4l2_format>` structure.
The sliced VBI API is more complicated than the raw VBI API because the The sliced VBI API is more complicated than the raw VBI API because the
hardware must be told which VBI service to expect on each scan line. Not hardware must be told which VBI service to expect on each scan line. Not
...@@ -100,7 +100,7 @@ which may return ``EBUSY`` can be the ...@@ -100,7 +100,7 @@ which may return ``EBUSY`` can be the
:ref:`select() <func-select>` call. :ref:`select() <func-select>` call.
.. _v4l2-sliced-vbi-format: .. c:type:: v4l2_sliced_vbi_format
struct v4l2_sliced_vbi_format struct v4l2_sliced_vbi_format
----------------------------- -----------------------------
...@@ -233,7 +233,7 @@ struct v4l2_sliced_vbi_format ...@@ -233,7 +233,7 @@ struct v4l2_sliced_vbi_format
: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
to the size of struct to the size of struct
:ref:`v4l2_sliced_vbi_data <v4l2-sliced-vbi-data>` times the :c:type:`v4l2_sliced_vbi_data` times the
number of non-zero elements in the returned ``service_lines`` number of non-zero elements in the returned ``service_lines``
array (that is the number of lines potentially carrying data). array (that is the number of lines potentially carrying data).
...@@ -376,14 +376,14 @@ Reading and writing sliced VBI data ...@@ -376,14 +376,14 @@ Reading and writing sliced VBI data
A single :ref:`read() <func-read>` or :ref:`write() <func-write>` A single :ref:`read() <func-read>` or :ref:`write() <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 :ref:`struct v4l2_sliced_vbi_data <v4l2-sliced-vbi-data>` structures with one or of :c:type:`struct v4l2_sliced_vbi_data <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
in streaming I/O mode one buffer of ``io_size`` bytes must contain data 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
:ref:`struct v4l2_sliced_vbi_data <v4l2-sliced-vbi-data>` elements must be zero. :c:type:`struct v4l2_sliced_vbi_data <v4l2_sliced_vbi_data>` elements must be zero.
.. _v4l2-sliced-vbi-data: .. c:type:: v4l2_sliced_vbi_data
struct v4l2_sliced_vbi_data struct v4l2_sliced_vbi_data
--------------------------- ---------------------------
...@@ -561,7 +561,7 @@ refer to the MPEG-2 specifications for details on those packet headers.) ...@@ -561,7 +561,7 @@ refer to the MPEG-2 specifications for details on those packet headers.)
The payload of the MPEG-2 *Private Stream 1 PES* packets that contain The payload of the MPEG-2 *Private Stream 1 PES* packets that contain
sliced VBI data is specified by struct sliced VBI data is specified by struct
:ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>`. The :c:type:`v4l2_mpeg_vbi_fmt_ivtv`. The
payload is variable length, depending on the actual number of lines of payload is variable length, depending on the actual number of lines of
sliced VBI data present in a video frame. The payload may be padded at sliced VBI data present in a video frame. The payload may be padded at
the end with unspecified fill bytes to align the end of the payload to a the end with unspecified fill bytes to align the end of the payload to a
...@@ -570,7 +570,7 @@ with 18 lines/field with 43 bytes of data/line and a 4 byte magic ...@@ -570,7 +570,7 @@ with 18 lines/field with 43 bytes of data/line and a 4 byte magic
number). number).
.. _v4l2-mpeg-vbi-fmt-ivtv: .. c:type:: v4l2_mpeg_vbi_fmt_ivtv
struct v4l2_mpeg_vbi_fmt_ivtv struct v4l2_mpeg_vbi_fmt_ivtv
----------------------------- -----------------------------
...@@ -604,7 +604,7 @@ struct v4l2_mpeg_vbi_fmt_ivtv ...@@ -604,7 +604,7 @@ struct v4l2_mpeg_vbi_fmt_ivtv
- .. row 3 - .. row 3
- -
- struct :ref:`v4l2_mpeg_vbi_itv0 <v4l2-mpeg-vbi-itv0>` - struct :c:type:`v4l2_mpeg_vbi_itv0`
- ``itv0`` - ``itv0``
...@@ -655,7 +655,7 @@ Magic Constants for struct v4l2_mpeg_vbi_fmt_ivtv magic field ...@@ -655,7 +655,7 @@ Magic Constants for struct v4l2_mpeg_vbi_fmt_ivtv magic field
- "itv0" - "itv0"
- Indicates the ``itv0`` member of the union in struct - Indicates the ``itv0`` member of the union in struct
:ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>` is :c:type:`v4l2_mpeg_vbi_fmt_ivtv` is
valid. valid.
- .. row 3 - .. row 3
...@@ -665,12 +665,12 @@ Magic Constants for struct v4l2_mpeg_vbi_fmt_ivtv magic field ...@@ -665,12 +665,12 @@ Magic Constants for struct v4l2_mpeg_vbi_fmt_ivtv magic field
- "ITV0" - "ITV0"
- Indicates the ``ITV0`` member of the union in struct - Indicates the ``ITV0`` member of the union in struct
:ref:`v4l2_mpeg_vbi_fmt_ivtv <v4l2-mpeg-vbi-fmt-ivtv>` is :c:type:`v4l2_mpeg_vbi_fmt_ivtv` is
valid and that 36 lines of sliced VBI data are present. valid and that 36 lines of sliced VBI data are present.
.. _v4l2-mpeg-vbi-itv0: .. c:type:: v4l2_mpeg_vbi_itv0
struct v4l2_mpeg_vbi_itv0 struct v4l2_mpeg_vbi_itv0
------------------------- -------------------------
...@@ -711,7 +711,7 @@ struct v4l2_mpeg_vbi_itv0 ...@@ -711,7 +711,7 @@ struct v4l2_mpeg_vbi_itv0
- .. row 2 - .. row 2
- struct - struct
:ref:`v4l2_mpeg_vbi_itv0_line <v4l2-mpeg-vbi-itv0-line>` :c:type:`v4l2_mpeg_vbi_itv0_line`
- ``line``\ [35] - ``line``\ [35]
...@@ -745,7 +745,7 @@ struct v4l2_mpeg_vbi_ITV0 ...@@ -745,7 +745,7 @@ struct v4l2_mpeg_vbi_ITV0
- .. row 1 - .. row 1
- struct - struct
:ref:`v4l2_mpeg_vbi_itv0_line <v4l2-mpeg-vbi-itv0-line>` :c:type:`v4l2_mpeg_vbi_itv0_line`
- ``line``\ [36] - ``line``\ [36]
...@@ -756,7 +756,7 @@ struct v4l2_mpeg_vbi_ITV0 ...@@ -756,7 +756,7 @@ struct v4l2_mpeg_vbi_ITV0
.. _v4l2-mpeg-vbi-itv0-line: .. c:type:: v4l2_mpeg_vbi_itv0_line
struct v4l2_mpeg_vbi_itv0_line struct v4l2_mpeg_vbi_itv0_line
------------------------------ ------------------------------
......
...@@ -341,7 +341,7 @@ It can also be used as part of digital zoom implementations to select ...@@ -341,7 +341,7 @@ It can also be used as part of digital zoom implementations to select
the area of the image that will be scaled up. the area of the image that will be scaled up.
Crop settings are defined by a crop rectangle and represented in a Crop settings are defined by a crop rectangle and represented in a
struct :ref:`v4l2_rect <v4l2-rect>` by the coordinates of the top struct :c:type:`v4l2_rect` by the coordinates of the top
left corner and the rectangle size. Both the coordinates and sizes are left corner and the rectangle size. Both the coordinates and sizes are
expressed in pixels. expressed in pixels.
...@@ -357,7 +357,7 @@ sub-device for processing. ...@@ -357,7 +357,7 @@ sub-device for processing.
The scaling operation changes the size of the image by scaling it to new The scaling operation changes the size of the image by scaling it to new
dimensions. The scaling ratio isn't specified explicitly, but is implied dimensions. The scaling ratio isn't specified explicitly, but is implied
from the original and scaled image sizes. Both sizes are represented by from the original and scaled image sizes. Both sizes are represented by
struct :ref:`v4l2_rect <v4l2-rect>`. struct :c:type:`v4l2_rect`.
Scaling support is optional. When supported by a subdev, the crop Scaling support is optional. When supported by a subdev, the crop
rectangle on the subdev's sink pad is scaled to the size configured rectangle on the subdev's sink pad is scaled to the size configured
......
...@@ -41,7 +41,7 @@ Querying Capabilities ...@@ -41,7 +41,7 @@ Querying Capabilities
Devices supporting the touch interface set the ``V4L2_CAP_VIDEO_CAPTURE`` flag Devices supporting the touch interface set the ``V4L2_CAP_VIDEO_CAPTURE`` flag
and the ``V4L2_CAP_TOUCH`` flag in the ``capabilities`` field of and the ``V4L2_CAP_TOUCH`` flag in the ``capabilities`` field of
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl. :ref:`VIDIOC_QUERYCAP` ioctl.
At least one of the read/write or streaming I/O methods must be At least one of the read/write or streaming I/O methods must be
......
This diff is collapsed.
...@@ -19,7 +19,7 @@ exporting V4L2 buffers as DMABUF file descriptors. ...@@ -19,7 +19,7 @@ exporting V4L2 buffers as DMABUF file descriptors.
Input and output devices support the streaming I/O method when the Input and output devices support the streaming I/O method when the
``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct ``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is set. Whether :ref:`VIDIOC_QUERYCAP <VIDIOC_QUERYCAP>` ioctl is set. Whether
importing DMA buffers through DMABUF file descriptors is supported is importing DMA buffers through DMABUF file descriptors is supported is
determined by calling the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` determined by calling the :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`
...@@ -31,8 +31,8 @@ DRM). Buffers (planes) are allocated by a driver on behalf of an ...@@ -31,8 +31,8 @@ DRM). Buffers (planes) are allocated by a driver on behalf of an
application. Next, these buffers are exported to the application as file application. Next, these buffers are exported to the application as file
descriptors using an API which is specific for an allocator driver. Only descriptors using an API which is specific for an allocator driver. Only
such file descriptor are exchanged. The descriptors and meta-information such file descriptor are exchanged. The descriptors and meta-information
are passed in struct :ref:`v4l2_buffer <v4l2-buffer>` (or in struct are passed in struct :c:type:`v4l2_buffer` (or in struct
:ref:`v4l2_plane <v4l2-plane>` in the multi-planar API case). The :c:type:`v4l2_plane` in the multi-planar API case). The
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.
...@@ -151,7 +151,7 @@ To start and stop capturing or displaying applications call the ...@@ -151,7 +151,7 @@ To start and stop capturing or displaying applications call the
both queues and unlocks all buffers as a side effect. Since there is no both queues and unlocks all buffers as a side effect. Since there is no
notion of doing anything "now" on a multitasking system, if an notion of doing anything "now" on a multitasking system, if an
application needs to synchronize with another event it should examine application needs to synchronize with another event it should examine
the struct :ref:`v4l2_buffer <v4l2-buffer>` ``timestamp`` of captured or the struct :c:type:`v4l2_buffer` ``timestamp`` of captured or
outputted buffers. outputted buffers.
Drivers implementing DMABUF importing I/O must support the Drivers implementing DMABUF importing I/O must support the
......
...@@ -49,7 +49,7 @@ control). This is needed since it is often required to atomically change ...@@ -49,7 +49,7 @@ control). This is needed since it is often required to atomically change
several controls at once. several controls at once.
Each of the new ioctls expects a pointer to a struct Each of the new ioctls expects a pointer to a struct
:ref:`v4l2_ext_controls <v4l2-ext-controls>`. This structure :c:type:`v4l2_ext_controls`. This structure
contains a pointer to the control array, a count of the number of contains a pointer to the control array, a count of the number of
controls in that array and a control class. Control classes are used to controls in that array and a control class. Control classes are used to
group similar controls into a single class. For example, control class group similar controls into a single class. For example, control class
...@@ -65,12 +65,12 @@ It is also possible to use an empty control array (``count`` == 0) to check ...@@ -65,12 +65,12 @@ It is also possible to use an empty control array (``count`` == 0) to check
whether the specified control class is supported. whether the specified control class is supported.
The control array is a struct The control array is a struct
:ref:`v4l2_ext_control <v4l2-ext-control>` array. The :c:type:`v4l2_ext_control` array. The
:ref:`struct v4l2_ext_control <v4l2-ext-control>` structure is very similar to :c:type:`struct v4l2_ext_control <v4l2_ext_control>` structure is very similar to
struct :ref:`v4l2_control <v4l2-control>`, except for the fact that struct :c:type:`v4l2_control`, except for the fact that
it also allows for 64-bit values and pointers to be passed. it also allows for 64-bit values and pointers to be passed.
Since the struct :ref:`v4l2_ext_control <v4l2-ext-control>` supports Since the struct :c:type:`v4l2_ext_control` supports
pointers it is now also possible to have controls with compound types pointers it is now also possible to have controls with compound types
such as N-dimensional arrays and/or structures. You need to specify the such as N-dimensional arrays and/or structures. You need to specify the
``V4L2_CTRL_FLAG_NEXT_COMPOUND`` when enumerating controls to actually ``V4L2_CTRL_FLAG_NEXT_COMPOUND`` when enumerating controls to actually
......
...@@ -47,7 +47,7 @@ clearer. ...@@ -47,7 +47,7 @@ clearer.
All video capture and output devices must report the current field All video capture and output devices must report the current field
order. Some drivers may permit the selection of a different order, to order. Some drivers may permit the selection of a different order, to
this end applications initialize the ``field`` field of struct this end applications initialize the ``field`` field of struct
:ref:`v4l2_pix_format <v4l2-pix-format>` before calling the :c:type:`v4l2_pix_format` before calling the
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. If this is not desired it :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl. If this is not desired it
should have the value ``V4L2_FIELD_ANY`` (0). should have the value ``V4L2_FIELD_ANY`` (0).
...@@ -80,7 +80,7 @@ enum v4l2_field ...@@ -80,7 +80,7 @@ enum v4l2_field
driver must choose one of the possible field orders during driver must choose one of the possible field orders during
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` or
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`. struct :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`. struct
:ref:`v4l2_buffer <v4l2-buffer>` ``field`` can never be :c:type:`v4l2_buffer` ``field`` can never be
``V4L2_FIELD_ANY``. ``V4L2_FIELD_ANY``.
- .. row 2 - .. row 2
...@@ -156,12 +156,12 @@ enum v4l2_field ...@@ -156,12 +156,12 @@ enum v4l2_field
temporal order, i. e. the older one first. To indicate the field temporal order, i. e. the older one first. To indicate the field
parity (whether the current field is a top or bottom field) the parity (whether the current field is a top or bottom field) the
driver or application, depending on data direction, must set driver or application, depending on data direction, must set
struct :ref:`v4l2_buffer <v4l2-buffer>` ``field`` to struct :c:type:`v4l2_buffer` ``field`` to
``V4L2_FIELD_TOP`` or ``V4L2_FIELD_BOTTOM``. Any two successive ``V4L2_FIELD_TOP`` or ``V4L2_FIELD_BOTTOM``. Any two successive
fields pair to build a frame. If fields are successive, without fields pair to build a frame. If fields are successive, without
any dropped fields between them (fields can drop individually), any dropped fields between them (fields can drop individually),
can be determined from the struct can be determined from the struct
:ref:`v4l2_buffer <v4l2-buffer>` ``sequence`` field. This :c:type:`v4l2_buffer` ``sequence`` field. This
format cannot be selected when using the read/write I/O method format cannot be selected when using the read/write I/O method
since there is no way to communicate if a field was a top or since there is no way to communicate if a field was a top or
bottom field. bottom field.
......
...@@ -22,7 +22,7 @@ to satisfy the request. Of course applications can also just query the ...@@ -22,7 +22,7 @@ to satisfy the request. Of course applications can also just query the
current selection. current selection.
A single mechanism exists to negotiate all data formats using the A single mechanism exists to negotiate all data formats using the
aggregate struct :ref:`v4l2_format <v4l2-format>` and the aggregate struct :c:type:`v4l2_format` and the
:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` and
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls. Additionally the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctls. Additionally the
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to examine :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` ioctl can be used to examine
......
...@@ -37,9 +37,9 @@ Arguments ...@@ -37,9 +37,9 @@ Arguments
``length`` ``length``
Length of the memory area to map. This must be the same value as Length of the memory area to map. This must be the same value as
returned by the driver in the struct returned by the driver in the struct
:ref:`v4l2_buffer <v4l2-buffer>` ``length`` field for the :c:type:`v4l2_buffer` ``length`` field for the
single-planar API, and the same value as returned by the driver in single-planar API, and the same value as returned by the driver in
the struct :ref:`v4l2_plane <v4l2-plane>` ``length`` field for the struct :c:type:`v4l2_plane` ``length`` field for
the multi-planar API. the multi-planar API.
``prot`` ``prot``
...@@ -92,9 +92,9 @@ Arguments ...@@ -92,9 +92,9 @@ Arguments
``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
as returned by the driver in the struct as returned by the driver in the struct
:ref:`v4l2_buffer <v4l2-buffer>` ``m`` union ``offset`` field for :c:type:`v4l2_buffer` ``m`` union ``offset`` field for
the single-planar API, and the same value as returned by the driver the single-planar API, and the same value as returned by the driver
in the struct :ref:`v4l2_plane <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.
......
...@@ -34,9 +34,9 @@ Arguments ...@@ -34,9 +34,9 @@ Arguments
``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 :ref:`mmap() <func-mmap>` and returned by the driver in the struct
:ref:`v4l2_buffer <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
:ref:`v4l2_plane <v4l2-plane>` ``length`` field for the :c:type:`v4l2_plane` ``length`` field for the
multi-planar API. multi-planar API.
......
This diff is collapsed.
...@@ -8,7 +8,7 @@ Streaming I/O (Memory Mapping) ...@@ -8,7 +8,7 @@ Streaming I/O (Memory Mapping)
Input and output devices support this I/O method when the Input and output devices support this I/O method when the
``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct ``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl is set. There are two :ref:`VIDIOC_QUERYCAP` ioctl is set. There are two
streaming methods, to determine if the memory mapping flavor is streaming methods, to determine if the memory mapping flavor is
supported applications must call the :ref:`VIDIOC_REQBUFS` ioctl supported applications must call the :ref:`VIDIOC_REQBUFS` ioctl
...@@ -39,10 +39,10 @@ address space with the :ref:`mmap() <func-mmap>` function. The ...@@ -39,10 +39,10 @@ address space with the :ref:`mmap() <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
:ref:`v4l2_buffer <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 :ref:`mmap() <func-mmap>` function. When using the
multi-planar API, struct :ref:`v4l2_buffer <v4l2-buffer>` contains an multi-planar API, struct :c:type:`v4l2_buffer` contains an
array of struct :ref:`v4l2_plane <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 :ref:`mmap() <func-mmap>` should
...@@ -218,7 +218,7 @@ to function, apart of this no limit exists on the number of buffers ...@@ -218,7 +218,7 @@ to function, apart of this no limit exists on the number of buffers
applications can enqueue in advance, or dequeue and process. They can applications can enqueue in advance, or dequeue and process. They can
also enqueue in a different order than buffers have been dequeued, and also enqueue in a different order than buffers have been dequeued, and
the driver can *fill* enqueued *empty* buffers in any order. [#f2]_ The the driver can *fill* enqueued *empty* buffers in any order. [#f2]_ The
index number of a buffer (struct :ref:`v4l2_buffer <v4l2-buffer>` index number of a buffer (struct :c:type:`v4l2_buffer`
``index``) plays no role here, it only identifies the buffer. ``index``) plays no role here, it only identifies the buffer.
Initially all mapped buffers are in dequeued state, inaccessible by the Initially all mapped buffers are in dequeued state, inaccessible by the
...@@ -251,7 +251,7 @@ To start and stop capturing or output applications call the ...@@ -251,7 +251,7 @@ To start and stop capturing or output applications call the
removes all buffers from both queues as a side effect. Since there is removes all buffers from both queues as a side effect. Since there is
no notion of doing anything "now" on a multitasking system, if an no notion of doing anything "now" on a multitasking system, if an
application needs to synchronize with another event it should examine application needs to synchronize with another event it should examine
the struct ::ref:`v4l2_buffer <v4l2-buffer>` ``timestamp`` of captured the struct ::c:type:`v4l2_buffer` ``timestamp`` of captured
or outputted buffers. or outputted buffers.
Drivers implementing memory mapping I/O must support the Drivers implementing memory mapping I/O must support the
......
...@@ -6,7 +6,7 @@ Single-planar format structure ...@@ -6,7 +6,7 @@ Single-planar format structure
.. tabularcolumns:: |p{4.0cm}|p{2.5cm}|p{11.0cm}| .. tabularcolumns:: |p{4.0cm}|p{2.5cm}|p{11.0cm}|
.. _v4l2-pix-format: .. c:type:: v4l2_pix_format
.. cssclass:: longtable .. cssclass:: longtable
...@@ -136,7 +136,7 @@ Single-planar format structure ...@@ -136,7 +136,7 @@ Single-planar format structure
- ``priv`` - ``priv``
- This field indicates whether the remaining fields of the - This field indicates whether the remaining fields of the
:ref:`struct v4l2_pix_format <v4l2-pix-format>` structure, also called the :c:type:`struct v4l2_pix_format <v4l2_pix_format>` structure, also called the
extended fields, are valid. When set to extended fields, are valid. When set to
``V4L2_PIX_FMT_PRIV_MAGIC``, it indicates that the extended fields ``V4L2_PIX_FMT_PRIV_MAGIC``, it indicates that the extended fields
have been correctly initialized. When set to any other value it have been correctly initialized. When set to any other value it
...@@ -152,7 +152,7 @@ Single-planar format structure ...@@ -152,7 +152,7 @@ Single-planar format structure
To use the extended fields, applications must set the ``priv`` To use the extended fields, applications must set the ``priv``
field to ``V4L2_PIX_FMT_PRIV_MAGIC``, initialize all the extended field to ``V4L2_PIX_FMT_PRIV_MAGIC``, initialize all the extended
fields and zero the unused bytes of the fields and zero the unused bytes of the
:ref:`struct v4l2_format <v4l2-format>` ``raw_data`` field. :c:type:`struct v4l2_format <v4l2_format>` ``raw_data`` field.
When the ``priv`` field isn't set to ``V4L2_PIX_FMT_PRIV_MAGIC`` When the ``priv`` field isn't set to ``V4L2_PIX_FMT_PRIV_MAGIC``
drivers must act as if all the extended fields were set to zero. drivers must act as if all the extended fields were set to zero.
......
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
Multi-planar format structures Multi-planar format structures
****************************** ******************************
The :ref:`struct v4l2_plane_pix_format <v4l2-plane-pix-format>` structures define size The :c:type:`struct v4l2_plane_pix_format <v4l2_plane_pix_format>` structures define size
and layout for each of the planes in a multi-planar format. The and layout for each of the planes in a multi-planar format. The
:ref:`struct v4l2_pix_format_mplane <v4l2-pix-format-mplane>` structure contains :c:type:`struct v4l2_pix_format_mplane <v4l2_pix_format_mplane>` structure contains
information common to all planes (such as image width and height) and an information common to all planes (such as image width and height) and an
array of :ref:`struct v4l2_plane_pix_format <v4l2-plane-pix-format>` structures, array of :c:type:`struct v4l2_plane_pix_format <v4l2_plane_pix_format>` structures,
describing all planes of that format. describing all planes of that format.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. _v4l2-plane-pix-format: .. c:type:: v4l2_plane_pix_format
.. flat-table:: struct v4l2_plane_pix_format .. flat-table:: struct v4l2_plane_pix_format
:header-rows: 0 :header-rows: 0
...@@ -37,7 +37,7 @@ describing all planes of that format. ...@@ -37,7 +37,7 @@ describing all planes of that format.
- ``bytesperline`` - ``bytesperline``
- Distance in bytes between the leftmost pixels in two adjacent - Distance in bytes between the leftmost pixels in two adjacent
lines. See struct :ref:`v4l2_pix_format <v4l2-pix-format>`. lines. See struct :c:type:`v4l2_pix_format`.
- .. row 3 - .. row 3
...@@ -51,7 +51,7 @@ describing all planes of that format. ...@@ -51,7 +51,7 @@ describing all planes of that format.
.. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.5cm}| .. tabularcolumns:: |p{4.4cm}|p{5.6cm}|p{7.5cm}|
.. _v4l2-pix-format-mplane: .. c:type:: v4l2_pix_format_mplane
.. flat-table:: struct v4l2_pix_format_mplane .. flat-table:: struct v4l2_pix_format_mplane
:header-rows: 0 :header-rows: 0
...@@ -66,7 +66,7 @@ describing all planes of that format. ...@@ -66,7 +66,7 @@ describing all planes of that format.
- ``width`` - ``width``
- Image width in pixels. See struct - Image width in pixels. See struct
:ref:`v4l2_pix_format <v4l2-pix-format>`. :c:type:`v4l2_pix_format`.
- .. row 2 - .. row 2
...@@ -75,7 +75,7 @@ describing all planes of that format. ...@@ -75,7 +75,7 @@ describing all planes of that format.
- ``height`` - ``height``
- Image height in pixels. See struct - Image height in pixels. See struct
:ref:`v4l2_pix_format <v4l2-pix-format>`. :c:type:`v4l2_pix_format`.
- .. row 3 - .. row 3
...@@ -92,7 +92,7 @@ describing all planes of that format. ...@@ -92,7 +92,7 @@ describing all planes of that format.
- ``field`` - ``field``
- See struct :ref:`v4l2_pix_format <v4l2-pix-format>`. - See struct :c:type:`v4l2_pix_format`.
- .. row 5 - .. row 5
...@@ -100,11 +100,11 @@ describing all planes of that format. ...@@ -100,11 +100,11 @@ describing all planes of that format.
- ``colorspace`` - ``colorspace``
- See struct :ref:`v4l2_pix_format <v4l2-pix-format>`. - See struct :c:type:`v4l2_pix_format`.
- .. row 6 - .. row 6
- struct :ref:`v4l2_plane_pix_format <v4l2-plane-pix-format>` - struct :c:type:`v4l2_plane_pix_format`
- ``plane_fmt[VIDEO_MAX_PLANES]`` - ``plane_fmt[VIDEO_MAX_PLANES]``
......
...@@ -15,8 +15,8 @@ transfer functions. The third is the Y'CbCr encoding identifier (enum ...@@ -15,8 +15,8 @@ transfer functions. The third is the Y'CbCr encoding identifier (enum
non-standard Y'CbCr encodings and the fourth is the quantization non-standard Y'CbCr encodings and the fourth is the quantization
identifier (enum :ref:`v4l2_quantization <v4l2-quantization>`) to identifier (enum :ref:`v4l2_quantization <v4l2-quantization>`) to
specify non-standard quantization methods. Most of the time only the specify non-standard quantization methods. Most of the time only the
colorspace field of struct :ref:`v4l2_pix_format <v4l2-pix-format>` colorspace field of struct :c:type:`v4l2_pix_format`
or struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` or struct :c:type:`v4l2_pix_format_mplane`
needs to be filled in. needs to be filled in.
.. note:: .. note::
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
Image Formats Image Formats
############# #############
The V4L2 API was primarily designed for devices exchanging image data The V4L2 API was primarily designed for devices exchanging image data
with applications. The :ref:`struct v4l2_pix_format <v4l2-pix-format>` and with applications. The :c:type:`struct v4l2_pix_format <v4l2_pix_format>` and
:ref:`struct v4l2_pix_format_mplane <v4l2-pix-format-mplane>` structures define the :c:type:`struct v4l2_pix_format_mplane <v4l2_pix_format_mplane>` structures define the
format and layout of an image in memory. The former is used with the format and layout of an image in memory. The former is used with the
single-planar API, while the latter is used with the multi-planar single-planar API, while the latter is used with the multi-planar
version (see :ref:`planar-apis`). Image formats are negotiated with version (see :ref:`planar-apis`). Image formats are negotiated with
......
...@@ -46,16 +46,16 @@ Calls that distinguish between single and multi-planar APIs ...@@ -46,16 +46,16 @@ Calls that distinguish between single and multi-planar APIs
:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`, :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>`
New structures for describing multi-planar formats are added: struct New structures for describing multi-planar formats are added: struct
:ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` and :c:type:`v4l2_pix_format_mplane` and
struct :ref:`v4l2_plane_pix_format <v4l2-plane-pix-format>`. struct :c:type:`v4l2_plane_pix_format`.
Drivers may define new multi-planar formats, which have distinct Drivers may define new multi-planar formats, which have distinct
FourCC codes from the existing single-planar ones. FourCC codes from the existing single-planar ones.
:ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>` :ref:`VIDIOC_QBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_DQBUF <VIDIOC_QBUF>`, :ref:`VIDIOC_QUERYBUF <VIDIOC_QUERYBUF>`
A new struct :ref:`v4l2_plane <v4l2-plane>` structure for A new struct :c:type:`v4l2_plane` structure for
describing planes is added. Arrays of this structure are passed in describing planes is added. Arrays of this structure are passed in
the new ``m.planes`` field of struct the new ``m.planes`` field of struct
:ref:`v4l2_buffer <v4l2-buffer>`. :c:type:`v4l2_buffer`.
:ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>` :ref:`VIDIOC_REQBUFS <VIDIOC_REQBUFS>`
Will allocate multi-planar buffers as requested. Will allocate multi-planar buffers as requested.
...@@ -9,7 +9,7 @@ Read/Write ...@@ -9,7 +9,7 @@ Read/Write
Input and output devices support the :ref:`read() <func-read>` and Input and output devices support the :ref:`read() <func-read>` and
:ref:`write() <func-write>` function, respectively, when the :ref:`write() <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
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl is set. :ref:`VIDIOC_QUERYCAP` ioctl is set.
Drivers may need the CPU to copy the data, but they may also support DMA Drivers may need the CPU to copy the data, but they may also support DMA
......
...@@ -16,19 +16,19 @@ cropping from an image inside a memory buffer. The application could ...@@ -16,19 +16,19 @@ cropping from an image inside a memory buffer. The application could
configure a capture device to fill only a part of an image by abusing configure a capture device to fill only a part of an image by abusing
V4L2 API. Cropping a smaller image from a larger one is achieved by V4L2 API. Cropping a smaller image from a larger one is achieved by
setting the field ``bytesperline`` at struct setting the field ``bytesperline`` at struct
:ref:`v4l2_pix_format <v4l2-pix-format>`. :c:type:`v4l2_pix_format`.
Introducing an image offsets could be done by modifying field ``m_userptr`` Introducing an image offsets could be done by modifying field ``m_userptr``
at struct at struct
:ref:`v4l2_buffer <v4l2-buffer>` before calling :c:type:`v4l2_buffer` before calling
:ref:`VIDIOC_QBUF`. Those operations should be avoided because they are not :ref:`VIDIOC_QBUF`. Those operations should be avoided because they are not
portable (endianness), and do not work for macroblock and Bayer formats portable (endianness), and do not work for macroblock and Bayer formats
and mmap buffers. The selection API deals with configuration of buffer and mmap buffers. The selection API deals with configuration of buffer
cropping/composing in a clear, intuitive and portable way. Next, with cropping/composing in a clear, intuitive and portable way. Next, with
the selection API the concepts of the padded target and constraints the selection API the concepts of the padded target and constraints
flags are introduced. Finally, struct :ref:`v4l2_crop <v4l2-crop>` flags are introduced. Finally, struct :c:type:`v4l2_crop`
and struct :ref:`v4l2_cropcap <v4l2-cropcap>` have no reserved and struct :c:type:`v4l2_cropcap` have no reserved
fields. Therefore there is no way to extend their functionality. The new fields. Therefore there is no way to extend their functionality. The new
struct :ref:`v4l2_selection <v4l2-selection>` provides a lot of place struct :c:type:`v4l2_selection` provides a lot of place
for future extensions. Driver developers are encouraged to implement for future extensions. Driver developers are encouraged to implement
only selection API. The former cropping API would be simulated using the only selection API. The former cropping API would be simulated using the
new one. new one.
...@@ -9,8 +9,8 @@ Video Standards ...@@ -9,8 +9,8 @@ Video Standards
Video devices typically support one or more different video standards or Video devices typically support one or more different video standards or
variations of standards. Each video input and output may support another variations of standards. Each video input and output may support another
set of standards. This set is reported by the ``std`` field of struct set of standards. This set is reported by the ``std`` field of struct
:ref:`v4l2_input <v4l2-input>` and struct :c:type:`v4l2_input` and struct
:ref:`v4l2_output <v4l2-output>` returned by the :c:type:`v4l2_output` returned by the
:ref:`VIDIOC_ENUMINPUT` and :ref:`VIDIOC_ENUMINPUT` and
:ref:`VIDIOC_ENUMOUTPUT` ioctls, respectively. :ref:`VIDIOC_ENUMOUTPUT` ioctls, respectively.
...@@ -58,8 +58,8 @@ output device which is: ...@@ -58,8 +58,8 @@ output device which is:
- that does not support the video standard formats at all. - that does not support the video standard formats at all.
Here the driver shall set the ``std`` field of struct Here the driver shall set the ``std`` field of struct
:ref:`v4l2_input <v4l2-input>` and struct :c:type:`v4l2_input` and struct
:ref:`v4l2_output <v4l2-output>` to zero and the :ref:`VIDIOC_G_STD <VIDIOC_G_STD>`, :c:type:`v4l2_output` to zero and the :ref:`VIDIOC_G_STD <VIDIOC_G_STD>`,
:ref:`VIDIOC_S_STD <VIDIOC_G_STD>`, :ref:`VIDIOC_QUERYSTD` and :ref:`VIDIOC_ENUMSTD` ioctls :ref:`VIDIOC_S_STD <VIDIOC_G_STD>`, :ref:`VIDIOC_QUERYSTD` and :ref:`VIDIOC_ENUMSTD` ioctls
shall return the ``ENOTTY`` error code or the ``EINVAL`` error code. shall return the ``ENOTTY`` error code or the ``EINVAL`` error code.
......
...@@ -25,7 +25,7 @@ section discussing the :ref:`read() <func-read>` function. ...@@ -25,7 +25,7 @@ section discussing the :ref:`read() <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
:ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take
a pointer to a struct :ref:`v4l2_streamparm <v4l2-streamparm>`, which a pointer to a struct :c:type:`v4l2_streamparm`, which
contains a union holding separate parameters for input and output contains a union holding separate parameters for input and output
devices. devices.
......
...@@ -13,7 +13,7 @@ Tuners ...@@ -13,7 +13,7 @@ Tuners
Video input devices can have one or more tuners demodulating a RF Video input devices can have one or more tuners demodulating a RF
signal. Each tuner is associated with one or more video inputs, signal. Each tuner is associated with one or more video inputs,
depending on the number of RF connectors on the tuner. The ``type`` depending on the number of RF connectors on the tuner. The ``type``
field of the respective struct :ref:`v4l2_input <v4l2-input>` field of the respective struct :c:type:`v4l2_input`
returned by the :ref:`VIDIOC_ENUMINPUT` ioctl is returned by the :ref:`VIDIOC_ENUMINPUT` ioctl is
set to ``V4L2_INPUT_TYPE_TUNER`` and its ``tuner`` field contains the set to ``V4L2_INPUT_TYPE_TUNER`` and its ``tuner`` field contains the
index number of the tuner. index number of the tuner.
...@@ -24,7 +24,7 @@ inputs. ...@@ -24,7 +24,7 @@ inputs.
To query and change tuner properties applications use the To query and change tuner properties applications use the
:ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` and :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` and
:ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` ioctls, respectively. The :ref:`VIDIOC_S_TUNER <VIDIOC_G_TUNER>` ioctls, respectively. The
struct :ref:`v4l2_tuner <v4l2-tuner>` returned by :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>` struct :c:type:`v4l2_tuner` returned by :ref:`VIDIOC_G_TUNER <VIDIOC_G_TUNER>`
also contains signal status information applicable when the tuner of the also contains signal status information applicable when the tuner of the
current video or radio input is queried. current video or radio input is queried.
...@@ -46,7 +46,7 @@ video signal for radiation or connection to the antenna input of a TV ...@@ -46,7 +46,7 @@ video signal for radiation or connection to the antenna input of a TV
set or video recorder. Each modulator is associated with one or more set or video recorder. Each modulator is associated with one or more
video outputs, depending on the number of RF connectors on the video outputs, depending on the number of RF connectors on the
modulator. The ``type`` field of the respective struct modulator. The ``type`` field of the respective struct
:ref:`v4l2_output <v4l2-output>` returned by the :c:type:`v4l2_output` returned by the
:ref:`VIDIOC_ENUMOUTPUT` ioctl is set to :ref:`VIDIOC_ENUMOUTPUT` ioctl is set to
``V4L2_OUTPUT_TYPE_MODULATOR`` and its ``modulator`` field contains the ``V4L2_OUTPUT_TYPE_MODULATOR`` and its ``modulator`` field contains the
index number of the modulator. index number of the modulator.
...@@ -68,7 +68,7 @@ To query and change modulator properties applications use the ...@@ -68,7 +68,7 @@ To query and change modulator properties applications use the
is more than one at all. The modulator is solely determined by the is more than one at all. The modulator is solely determined by the
current video output. Drivers must support both ioctls and set the current video output. Drivers must support both ioctls and set the
``V4L2_CAP_MODULATOR`` flag in the struct ``V4L2_CAP_MODULATOR`` flag in the struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl when the device has :ref:`VIDIOC_QUERYCAP` ioctl when the device has
one or more modulators. one or more modulators.
...@@ -79,7 +79,7 @@ Radio Frequency ...@@ -79,7 +79,7 @@ Radio Frequency
To get and set the tuner or modulator radio frequency applications use To get and set the tuner or modulator radio frequency applications use
the :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and the :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` and
:ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl which both take :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl which both take
a pointer to a struct :ref:`v4l2_frequency <v4l2-frequency>`. These a pointer to a struct :c:type:`v4l2_frequency`. These
ioctls are used for TV and radio devices alike. Drivers must support ioctls are used for TV and radio devices alike. Drivers must support
both ioctls when the tuner or modulator ioctls are supported, or when both ioctls when the tuner or modulator ioctls are supported, or when
the device is a radio device. the device is a radio device.
...@@ -8,7 +8,7 @@ Streaming I/O (User Pointers) ...@@ -8,7 +8,7 @@ Streaming I/O (User Pointers)
Input and output devices support this I/O method when the Input and output devices support this I/O method when the
``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct ``V4L2_CAP_STREAMING`` flag in the ``capabilities`` field of struct
:ref:`v4l2_capability <v4l2-capability>` returned by the :c:type:`v4l2_capability` returned by the
:ref:`VIDIOC_QUERYCAP` ioctl is set. If the :ref:`VIDIOC_QUERYCAP` ioctl is set. If the
particular user pointer method (not only memory mapping) is supported particular user pointer method (not only memory mapping) is supported
must be determined by calling the :ref:`VIDIOC_REQBUFS` ioctl must be determined by calling the :ref:`VIDIOC_REQBUFS` ioctl
...@@ -18,8 +18,8 @@ This I/O method combines advantages of the read/write and memory mapping ...@@ -18,8 +18,8 @@ This I/O method combines advantages of the read/write and memory mapping
methods. Buffers (planes) are allocated by the application itself, and methods. Buffers (planes) are allocated by the application itself, and
can reside for example in virtual or shared memory. Only pointers to can reside for example in virtual or shared memory. Only pointers to
data are exchanged, these pointers and meta-information are passed in data are exchanged, these pointers and meta-information are passed in
struct :ref:`v4l2_buffer <v4l2-buffer>` (or in struct struct :c:type:`v4l2_buffer` (or in struct
:ref:`v4l2_plane <v4l2-plane>` in the multi-planar API case). The :c:type:`v4l2_plane` in the multi-planar API case). The
driver must be switched into user pointer I/O mode by calling the driver must be switched into user pointer I/O mode by calling the
:ref:`VIDIOC_REQBUFS` with the desired buffer type. :ref:`VIDIOC_REQBUFS` with the desired buffer type.
No buffers (planes) are allocated beforehand, consequently they are not No buffers (planes) are allocated beforehand, consequently they are not
...@@ -94,7 +94,7 @@ To start and stop capturing or output applications call the ...@@ -94,7 +94,7 @@ To start and stop capturing or output applications call the
both queues and unlocks all buffers as a side effect. Since there is no both queues and unlocks all buffers as a side effect. Since there is no
notion of doing anything "now" on a multitasking system, if an notion of doing anything "now" on a multitasking system, if an
application needs to synchronize with another event it should examine application needs to synchronize with another event it should examine
the struct :ref:`v4l2_buffer <v4l2-buffer>` ``timestamp`` of captured or the struct :c:type:`v4l2_buffer` ``timestamp`` of captured or
outputted buffers. outputted buffers.
Drivers implementing user pointer I/O must support the Drivers implementing user pointer I/O must support the
......
...@@ -114,14 +114,14 @@ DVB device nodes. Add support for Tuner sub-device. ...@@ -114,14 +114,14 @@ DVB device nodes. Add support for Tuner sub-device.
Rewrote Colorspace chapter, added new enum Rewrote Colorspace chapter, added new enum
:ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>` and enum :ref:`v4l2_ycbcr_encoding <v4l2-ycbcr-encoding>` and enum
:ref:`v4l2_quantization <v4l2-quantization>` fields to struct :ref:`v4l2_quantization <v4l2-quantization>` fields to struct
:ref:`v4l2_pix_format <v4l2-pix-format>`, struct :c:type:`v4l2_pix_format`, struct
:ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` and struct :c:type:`v4l2_pix_format_mplane` and struct
:ref:`v4l2_mbus_framefmt <v4l2-mbus-framefmt>`. :ref:`v4l2_mbus_framefmt <v4l2-mbus-framefmt>`.
:revision: 3.17 / 2014-08-04 (*lp, hv*) :revision: 3.17 / 2014-08-04 (*lp, hv*)
Extended struct :ref:`v4l2_pix_format <v4l2-pix-format>`. Added Extended struct :c:type:`v4l2_pix_format`. Added
format flags. Added compound control types and VIDIOC_QUERY_EXT_CTRL. format flags. Added compound control types and VIDIOC_QUERY_EXT_CTRL.
......
...@@ -16,7 +16,7 @@ To learn about the number and attributes of the available inputs and ...@@ -16,7 +16,7 @@ To learn about the number and attributes of the available inputs and
outputs applications can enumerate them with the outputs applications can enumerate them with the
:ref:`VIDIOC_ENUMINPUT` and :ref:`VIDIOC_ENUMINPUT` and
:ref:`VIDIOC_ENUMOUTPUT` ioctl, respectively. The :ref:`VIDIOC_ENUMOUTPUT` ioctl, respectively. The
struct :ref:`v4l2_input <v4l2-input>` returned by the struct :c:type:`v4l2_input` returned by the
:ref:`VIDIOC_ENUMINPUT` ioctl also contains signal :ref:`VIDIOC_ENUMINPUT` ioctl also contains signal
:status information applicable when the current video input is queried. :status information applicable when the current video input is queried.
......
...@@ -39,14 +39,14 @@ over buffers is required. This ioctl can be called multiple times to ...@@ -39,14 +39,14 @@ over buffers is required. This ioctl can be called multiple times to
create buffers of different sizes. create buffers of different sizes.
To allocate the device buffers applications must initialize the relevant To allocate the device buffers applications must initialize the relevant
fields of the :ref:`struct v4l2_create_buffers <v4l2-create-buffers>` structure. The fields of the :c:type:`struct v4l2_create_buffers <v4l2_create_buffers>` structure. The
``count`` field must be set to the number of requested buffers, the ``count`` field must be set to the number of requested buffers, the
``memory`` field specifies the requested I/O method and the ``reserved`` ``memory`` field specifies the requested I/O method and the ``reserved``
array must be zeroed. array must be zeroed.
The ``format`` field specifies the image format that the buffers must be The ``format`` field specifies the image format that the buffers must be
able to handle. The application has to fill in this struct able to handle. The application has to fill in this struct
:ref:`v4l2_format <v4l2-format>`. Usually this will be done using the :c:type:`v4l2_format`. Usually this will be done using the
:ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` or :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` or
:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctls to ensure that the :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctls to ensure that the
requested format is supported by the driver. Based on the format's requested format is supported by the driver. Based on the format's
...@@ -71,7 +71,7 @@ the ``index`` fields respectively. On return ``count`` can be smaller ...@@ -71,7 +71,7 @@ the ``index`` fields respectively. On return ``count`` can be smaller
than the number requested. than the number requested.
.. _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}|
...@@ -115,7 +115,7 @@ than the number requested. ...@@ -115,7 +115,7 @@ than the number requested.
- .. row 4 - .. row 4
- struct :ref:`v4l2_format <v4l2-format>` - struct :c:type:`v4l2_format`
- ``format`` - ``format``
......
...@@ -50,7 +50,7 @@ support cropping and/or scaling and/or have non-square pixels, and for ...@@ -50,7 +50,7 @@ support cropping and/or scaling and/or have non-square pixels, and for
overlay devices. overlay devices.
.. _v4l2-cropcap: .. c:type:: v4l2_cropcap
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
...@@ -98,7 +98,7 @@ overlay devices. ...@@ -98,7 +98,7 @@ overlay devices.
- .. row 4 - .. row 4
- struct :ref:`v4l2_fract <v4l2-fract>` - struct :c:type:`v4l2_fract`
- ``pixelaspect`` - ``pixelaspect``
...@@ -165,7 +165,7 @@ appropriately. The generic error codes are described at the ...@@ -165,7 +165,7 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`v4l2_cropcap <v4l2-cropcap>` ``type`` is The struct :c:type:`v4l2_cropcap` ``type`` is
invalid. invalid.
ENODATA ENODATA
......
...@@ -48,7 +48,7 @@ Additionally the Linux kernel must be compiled with the ...@@ -48,7 +48,7 @@ Additionally the Linux kernel must be compiled with the
To query the driver applications must initialize the ``match.type`` and To query the driver applications must initialize the ``match.type`` and
``match.addr`` or ``match.name`` fields of a struct ``match.addr`` or ``match.name`` fields of a struct
:ref:`v4l2_dbg_chip_info <v4l2-dbg-chip-info>` and call :c:type:`v4l2_dbg_chip_info` and call
:ref:`VIDIOC_DBG_G_CHIP_INFO` with a pointer to this structure. On success :ref:`VIDIOC_DBG_G_CHIP_INFO` with a pointer to this structure. On success
the driver stores information about the selected chip in the ``name`` the driver stores information about the selected chip in the ``name``
and ``flags`` fields. and ``flags`` fields.
...@@ -124,7 +124,7 @@ instructions. ...@@ -124,7 +124,7 @@ instructions.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. _v4l2-dbg-chip-info: .. c:type:: v4l2_dbg_chip_info
.. flat-table:: struct v4l2_dbg_chip_info .. flat-table:: struct v4l2_dbg_chip_info
:header-rows: 0 :header-rows: 0
......
...@@ -49,7 +49,7 @@ superuser privileges. Additionally the Linux kernel must be compiled ...@@ -49,7 +49,7 @@ superuser privileges. Additionally the Linux kernel must be compiled
with the ``CONFIG_VIDEO_ADV_DEBUG`` option to enable these ioctls. with the ``CONFIG_VIDEO_ADV_DEBUG`` option to enable these ioctls.
To write a register applications must initialize all fields of a struct To write a register applications must initialize all fields of a struct
:ref:`v4l2_dbg_register <v4l2-dbg-register>` except for ``size`` and :c:type:`v4l2_dbg_register` except for ``size`` and
call ``VIDIOC_DBG_S_REGISTER`` with a pointer to this structure. The call ``VIDIOC_DBG_S_REGISTER`` with a pointer to this structure. The
``match.type`` and ``match.addr`` or ``match.name`` fields select a chip ``match.type`` and ``match.addr`` or ``match.name`` fields select a chip
on the TV card, the ``reg`` field specifies a register number and the on the TV card, the ``reg`` field specifies a register number and the
...@@ -87,7 +87,7 @@ instructions. ...@@ -87,7 +87,7 @@ 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}|
.. _v4l2-dbg-match: .. c:type:: v4l2_dbg_match
.. flat-table:: struct v4l2_dbg_match .. flat-table:: struct v4l2_dbg_match
:header-rows: 0 :header-rows: 0
...@@ -131,7 +131,7 @@ instructions. ...@@ -131,7 +131,7 @@ instructions.
.. _v4l2-dbg-register: .. c:type:: v4l2_dbg_register
.. flat-table:: struct v4l2_dbg_register .. flat-table:: struct v4l2_dbg_register
:header-rows: 0 :header-rows: 0
......
...@@ -30,7 +30,7 @@ Arguments ...@@ -30,7 +30,7 @@ Arguments
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :ref:`open() <func-open>`.
``argp`` ``argp``
pointer to struct :ref:`v4l2_decoder_cmd <v4l2-decoder-cmd>`. pointer to struct :c:type:`v4l2_decoder_cmd`.
Description Description
...@@ -40,7 +40,7 @@ These ioctls control an audio/video (usually MPEG-) decoder. ...@@ -40,7 +40,7 @@ These ioctls control an audio/video (usually MPEG-) decoder.
``VIDIOC_DECODER_CMD`` sends a command to the decoder, ``VIDIOC_DECODER_CMD`` sends a command to the decoder,
``VIDIOC_TRY_DECODER_CMD`` can be used to try a command without actually ``VIDIOC_TRY_DECODER_CMD`` can be used to try a command without actually
executing it. To send a command applications must initialize all fields executing it. To send a command applications must initialize all fields
of a struct :ref:`v4l2_decoder_cmd <v4l2-decoder-cmd>` and call of a struct :c:type:`v4l2_decoder_cmd` and call
``VIDIOC_DECODER_CMD`` or ``VIDIOC_TRY_DECODER_CMD`` with a pointer to ``VIDIOC_DECODER_CMD`` or ``VIDIOC_TRY_DECODER_CMD`` with a pointer to
this structure. this structure.
...@@ -61,7 +61,7 @@ introduced in Linux 3.3. ...@@ -61,7 +61,7 @@ introduced in Linux 3.3.
.. 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}|
.. _v4l2-decoder-cmd: .. c:type:: v4l2_decoder_cmd
.. cssclass:: longtable .. cssclass:: longtable
......
...@@ -32,7 +32,7 @@ Description ...@@ -32,7 +32,7 @@ Description
=========== ===========
Dequeue an event from a video device. No input is required for this Dequeue an event from a video device. No input is required for this
ioctl. All the fields of the struct :ref:`v4l2_event <v4l2-event>` ioctl. All the fields of the struct :c:type:`v4l2_event`
structure are filled by the driver. The file handle will also receive 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.
...@@ -40,7 +40,7 @@ call. ...@@ -40,7 +40,7 @@ call.
.. tabularcolumns:: |p{3.0cm}|p{4.3cm}|p{2.5cm}|p{7.7cm}| .. tabularcolumns:: |p{3.0cm}|p{4.3cm}|p{2.5cm}|p{7.7cm}|
.. _v4l2-event: .. c:type:: v4l2_event
.. cssclass: longtable .. cssclass: longtable
...@@ -71,7 +71,7 @@ call. ...@@ -71,7 +71,7 @@ call.
- .. row 3 - .. row 3
- -
- struct :ref:`v4l2_event_vsync <v4l2-event-vsync>` - struct :c:type:`v4l2_event_vsync`
- ``vsync`` - ``vsync``
...@@ -80,7 +80,7 @@ call. ...@@ -80,7 +80,7 @@ call.
- .. row 4 - .. row 4
- -
- struct :ref:`v4l2_event_ctrl <v4l2-event-ctrl>` - struct :c:type:`v4l2_event_ctrl`
- ``ctrl`` - ``ctrl``
...@@ -89,7 +89,7 @@ call. ...@@ -89,7 +89,7 @@ call.
- .. row 5 - .. row 5
- -
- struct :ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>` - struct :c:type:`v4l2_event_frame_sync`
- ``frame_sync`` - ``frame_sync``
...@@ -98,7 +98,7 @@ call. ...@@ -98,7 +98,7 @@ call.
- .. row 6 - .. row 6
- -
- struct :ref:`v4l2_event_motion_det <v4l2-event-motion-det>` - struct :c:type:`v4l2_event_motion_det`
- ``motion_det`` - ``motion_det``
...@@ -107,7 +107,7 @@ call. ...@@ -107,7 +107,7 @@ call.
- .. row 7 - .. row 7
- -
- struct :ref:`v4l2_event_src_change <v4l2-event-src-change>` - struct :c:type:`v4l2_event_src_change`
- ``src_change`` - ``src_change``
...@@ -205,7 +205,7 @@ call. ...@@ -205,7 +205,7 @@ call.
- 1 - 1
- This event is triggered on the vertical sync. This event has a - This event is triggered on the vertical sync. This event has a
struct :ref:`v4l2_event_vsync <v4l2-event-vsync>` associated struct :c:type:`v4l2_event_vsync` associated
with it. with it.
- .. row 3 - .. row 3
...@@ -228,10 +228,10 @@ call. ...@@ -228,10 +228,10 @@ call.
which you want to receive events. This event is triggered if the which you want to receive events. This event is triggered if the
control's value changes, if a button control is pressed or if the control's value changes, if a button control is pressed or if the
control's flags change. This event has a struct control's flags change. This event has a struct
:ref:`v4l2_event_ctrl <v4l2-event-ctrl>` associated with it. :c:type:`v4l2_event_ctrl` associated with it.
This struct contains much of the same information as struct This struct contains much of the same information as struct
:ref:`v4l2_queryctrl <v4l2-queryctrl>` and struct :ref:`v4l2_queryctrl <v4l2-queryctrl>` and struct
:ref:`v4l2_control <v4l2-control>`. :c:type:`v4l2_control`.
If the event is generated due to a call to If the event is generated due to a call to
:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` or :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` or
...@@ -243,7 +243,7 @@ call. ...@@ -243,7 +243,7 @@ call.
This event type will ensure that no information is lost when more This event type will ensure that no information is lost when more
events are raised than there is room internally. In that case the events are raised than there is room internally. In that case the
struct :ref:`v4l2_event_ctrl <v4l2-event-ctrl>` of the struct :c:type:`v4l2_event_ctrl` of the
second-oldest event is kept, but the ``changes`` field of the second-oldest event is kept, but the ``changes`` field of the
second-oldest event is ORed with the ``changes`` field of the second-oldest event is ORed with the ``changes`` field of the
oldest event. oldest event.
...@@ -256,13 +256,13 @@ call. ...@@ -256,13 +256,13 @@ call.
- Triggered immediately when the reception of a frame has begun. - Triggered immediately when the reception of a frame has begun.
This event has a struct This event has a struct
:ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>` :c:type:`v4l2_event_frame_sync`
associated with it. associated with it.
If the hardware needs to be stopped in the case of a buffer If the hardware needs to be stopped in the case of a buffer
underrun it might not be able to generate this event. In such underrun it might not be able to generate this event. In such
cases the ``frame_sequence`` field in struct cases the ``frame_sequence`` field in struct
:ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>` will not :c:type:`v4l2_event_frame_sync` will not
be incremented. This causes two consecutive frame sequence numbers be incremented. This causes two consecutive frame sequence numbers
to have n times frame interval in between them. to have n times frame interval in between them.
...@@ -281,7 +281,7 @@ call. ...@@ -281,7 +281,7 @@ call.
receive events. receive events.
This event has a struct This event has a struct
:ref:`v4l2_event_src_change <v4l2-event-src-change>` :c:type:`v4l2_event_src_change`
associated with it. The ``changes`` bitfield denotes what has associated with it. The ``changes`` bitfield denotes what has
changed for the subscribed pad. If multiple events occurred before changed for the subscribed pad. If multiple events occurred before
application could dequeue them, then the changes will have the application could dequeue them, then the changes will have the
...@@ -295,7 +295,7 @@ call. ...@@ -295,7 +295,7 @@ call.
- Triggered whenever the motion detection state for one or more of - Triggered whenever the motion detection state for one or more of
the regions changes. This event has a struct the regions changes. This event has a struct
:ref:`v4l2_event_motion_det <v4l2-event-motion-det>` :c:type:`v4l2_event_motion_det`
associated with it. associated with it.
- .. row 8 - .. row 8
...@@ -310,7 +310,7 @@ call. ...@@ -310,7 +310,7 @@ call.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. _v4l2-event-vsync: .. c:type:: v4l2_event_vsync
.. flat-table:: struct v4l2_event_vsync .. flat-table:: struct v4l2_event_vsync
:header-rows: 0 :header-rows: 0
...@@ -330,7 +330,7 @@ call. ...@@ -330,7 +330,7 @@ call.
.. 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}|
.. _v4l2-event-ctrl: .. c:type:: v4l2_event_ctrl
.. flat-table:: struct v4l2_event_ctrl .. flat-table:: struct v4l2_event_ctrl
:header-rows: 0 :header-rows: 0
...@@ -439,7 +439,7 @@ call. ...@@ -439,7 +439,7 @@ call.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. _v4l2-event-frame-sync: .. c:type:: v4l2_event_frame_sync
.. flat-table:: struct v4l2_event_frame_sync .. flat-table:: struct v4l2_event_frame_sync
:header-rows: 0 :header-rows: 0
...@@ -459,7 +459,7 @@ call. ...@@ -459,7 +459,7 @@ call.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. _v4l2-event-src-change: .. c:type:: v4l2_event_src_change
.. flat-table:: struct v4l2_event_src_change .. flat-table:: struct v4l2_event_src_change
:header-rows: 0 :header-rows: 0
...@@ -480,7 +480,7 @@ call. ...@@ -480,7 +480,7 @@ call.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. _v4l2-event-motion-det: .. c:type:: v4l2_event_motion_det
.. flat-table:: struct v4l2_event_motion_det .. flat-table:: struct v4l2_event_motion_det
:header-rows: 0 :header-rows: 0
......
...@@ -36,7 +36,7 @@ Description ...@@ -36,7 +36,7 @@ Description
To query the capabilities of the DV receiver/transmitter applications To query the capabilities of the DV receiver/transmitter applications
initialize the ``pad`` field to 0, zero the reserved array of struct initialize the ``pad`` field to 0, zero the reserved array of struct
:ref:`v4l2_dv_timings_cap <v4l2-dv-timings-cap>` and call the :c:type:`v4l2_dv_timings_cap` and call the
``VIDIOC_DV_TIMINGS_CAP`` ioctl on a video node and the driver will fill ``VIDIOC_DV_TIMINGS_CAP`` ioctl on a video node and the driver will fill
in the structure. in the structure.
...@@ -50,14 +50,14 @@ queried by calling the ``VIDIOC_SUBDEV_DV_TIMINGS_CAP`` ioctl directly ...@@ -50,14 +50,14 @@ queried by calling the ``VIDIOC_SUBDEV_DV_TIMINGS_CAP`` ioctl directly
on a subdevice node. The capabilities are specific to inputs (for DV on a subdevice node. The capabilities are specific to inputs (for DV
receivers) or outputs (for DV transmitters), applications must specify receivers) or outputs (for DV transmitters), applications must specify
the desired pad number in the struct the desired pad number in the struct
:ref:`v4l2_dv_timings_cap <v4l2-dv-timings-cap>` ``pad`` field and :c:type:`v4l2_dv_timings_cap` ``pad`` field and
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}|
.. _v4l2-bt-timings-cap: .. c:type:: v4l2_bt_timings_cap
.. flat-table:: struct v4l2_bt_timings_cap .. flat-table:: struct v4l2_bt_timings_cap
:header-rows: 0 :header-rows: 0
...@@ -144,7 +144,7 @@ that doesn't support them will return an ``EINVAL`` error code. ...@@ -144,7 +144,7 @@ that doesn't support them will return an ``EINVAL`` error code.
.. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{3.5cm}|p{9.5cm}| .. tabularcolumns:: |p{1.0cm}|p{3.5cm}|p{3.5cm}|p{9.5cm}|
.. _v4l2-dv-timings-cap: .. c:type:: v4l2_dv_timings_cap
.. flat-table:: struct v4l2_dv_timings_cap .. flat-table:: struct v4l2_dv_timings_cap
:header-rows: 0 :header-rows: 0
...@@ -190,7 +190,7 @@ that doesn't support them will return an ``EINVAL`` error code. ...@@ -190,7 +190,7 @@ that doesn't support them will return an ``EINVAL`` error code.
- .. row 5 - .. row 5
- -
- struct :ref:`v4l2_bt_timings_cap <v4l2-bt-timings-cap>` - struct :c:type:`v4l2_bt_timings_cap`
- ``bt`` - ``bt``
......
...@@ -40,7 +40,7 @@ These ioctls control an audio/video (usually MPEG-) encoder. ...@@ -40,7 +40,7 @@ These ioctls control an audio/video (usually MPEG-) encoder.
executing it. executing it.
To send a command applications must initialize all fields of a struct To send a command applications must initialize all fields of a struct
:ref:`v4l2_encoder_cmd <v4l2-encoder-cmd>` and call :c:type:`v4l2_encoder_cmd` and call
``VIDIOC_ENCODER_CMD`` or ``VIDIOC_TRY_ENCODER_CMD`` with a pointer to ``VIDIOC_ENCODER_CMD`` or ``VIDIOC_TRY_ENCODER_CMD`` with a pointer to
this structure. this structure.
...@@ -67,7 +67,7 @@ introduced in Linux 2.6.21. ...@@ -67,7 +67,7 @@ introduced in Linux 2.6.21.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. _v4l2-encoder-cmd: .. c:type:: v4l2_encoder_cmd
.. flat-table:: struct v4l2_encoder_cmd .. flat-table:: struct v4l2_encoder_cmd
:header-rows: 0 :header-rows: 0
......
...@@ -43,7 +43,7 @@ this list. ...@@ -43,7 +43,7 @@ this list.
To query the available timings, applications initialize the ``index`` To query the available timings, applications initialize the ``index``
field, set the ``pad`` field to 0, zero the reserved array of struct field, set the ``pad`` field to 0, zero the reserved array of struct
:ref:`v4l2_enum_dv_timings <v4l2-enum-dv-timings>` and call the :c:type:`v4l2_enum_dv_timings` and call the
``VIDIOC_ENUM_DV_TIMINGS`` ioctl on a video node with a pointer to this ``VIDIOC_ENUM_DV_TIMINGS`` ioctl on a video node with a pointer to this
structure. Drivers fill the rest of the structure or return an ``EINVAL`` structure. Drivers fill the rest of the structure or return an ``EINVAL``
error code when the index is out of bounds. To enumerate all supported error code when the index is out of bounds. To enumerate all supported
...@@ -60,12 +60,12 @@ by calling the ``VIDIOC_SUBDEV_ENUM_DV_TIMINGS`` ioctl directly on a ...@@ -60,12 +60,12 @@ by calling the ``VIDIOC_SUBDEV_ENUM_DV_TIMINGS`` ioctl directly on a
subdevice node. The DV timings are specific to inputs (for DV receivers) subdevice node. The DV timings are specific to inputs (for DV receivers)
or outputs (for DV transmitters), applications must specify the desired or outputs (for DV transmitters), applications must specify the desired
pad number in the struct pad number in the struct
:ref:`v4l2_enum_dv_timings <v4l2-enum-dv-timings>` ``pad`` field. :c:type:`v4l2_enum_dv_timings` ``pad`` field.
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.
.. _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}|
...@@ -104,7 +104,7 @@ return an ``EINVAL`` error code. ...@@ -104,7 +104,7 @@ return an ``EINVAL`` error code.
- .. row 4 - .. row 4
- struct :ref:`v4l2_dv_timings <v4l2-dv-timings>` - struct :c:type:`v4l2_dv_timings`
- ``timings`` - ``timings``
...@@ -119,7 +119,7 @@ appropriately. The generic error codes are described at the ...@@ -119,7 +119,7 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`v4l2_enum_dv_timings <v4l2-enum-dv-timings>` The struct :c:type:`v4l2_enum_dv_timings`
``index`` is out of bounds or the ``pad`` number is invalid. ``index`` is out of bounds or the ``pad`` number is invalid.
ENODATA ENODATA
......
...@@ -32,7 +32,7 @@ Description ...@@ -32,7 +32,7 @@ Description
=========== ===========
To enumerate image formats applications initialize the ``type`` and To enumerate image formats applications initialize the ``type`` and
``index`` field of struct :ref:`v4l2_fmtdesc <v4l2-fmtdesc>` and call ``index`` field of struct :c:type:`v4l2_fmtdesc` and call
the :ref:`VIDIOC_ENUM_FMT` ioctl with a pointer to this structure. Drivers the :ref:`VIDIOC_ENUM_FMT` ioctl with a pointer to this structure. Drivers
fill the rest of the structure or return an ``EINVAL`` error code. All fill the rest of the structure or return an ``EINVAL`` error code. All
formats are enumerable by beginning at index zero and incrementing by formats are enumerable by beginning at index zero and incrementing by
...@@ -46,7 +46,7 @@ one until ``EINVAL`` is returned. ...@@ -46,7 +46,7 @@ one until ``EINVAL`` is returned.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. _v4l2-fmtdesc: .. c:type:: v4l2_fmtdesc
.. flat-table:: struct v4l2_fmtdesc .. flat-table:: struct v4l2_fmtdesc
:header-rows: 0 :header-rows: 0
...@@ -167,5 +167,5 @@ appropriately. The generic error codes are described at the ...@@ -167,5 +167,5 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`v4l2_fmtdesc <v4l2-fmtdesc>` ``type`` is not The struct :c:type:`v4l2_fmtdesc` ``type`` is not
supported or the ``index`` is out of bounds. supported or the ``index`` is out of bounds.
...@@ -26,7 +26,7 @@ Arguments ...@@ -26,7 +26,7 @@ Arguments
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :ref:`open() <func-open>`.
``argp`` ``argp``
Pointer to a struct :ref:`v4l2_frmivalenum <v4l2-frmivalenum>` Pointer to a struct :c:type:`v4l2_frmivalenum`
structure that contains a pixel format and size and receives a frame structure that contains a pixel format and size and receives a frame
interval. interval.
...@@ -101,7 +101,7 @@ the application, *OUT* denotes values that the driver fills in. The ...@@ -101,7 +101,7 @@ 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.
.. _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}|
...@@ -113,7 +113,7 @@ application should zero out all members except for the *IN* fields. ...@@ -113,7 +113,7 @@ application should zero out all members except for the *IN* fields.
- .. row 1 - .. row 1
- struct :ref:`v4l2_fract <v4l2-fract>` - struct :c:type:`v4l2_fract`
- ``min`` - ``min``
...@@ -121,7 +121,7 @@ application should zero out all members except for the *IN* fields. ...@@ -121,7 +121,7 @@ application should zero out all members except for the *IN* fields.
- .. row 2 - .. row 2
- struct :ref:`v4l2_fract <v4l2-fract>` - struct :c:type:`v4l2_fract`
- ``max`` - ``max``
...@@ -129,7 +129,7 @@ application should zero out all members except for the *IN* fields. ...@@ -129,7 +129,7 @@ application should zero out all members except for the *IN* fields.
- .. row 3 - .. row 3
- struct :ref:`v4l2_fract <v4l2-fract>` - struct :c:type:`v4l2_fract`
- ``step`` - ``step``
...@@ -137,7 +137,7 @@ application should zero out all members except for the *IN* fields. ...@@ -137,7 +137,7 @@ application should zero out all members except for the *IN* fields.
.. _v4l2-frmivalenum: .. c:type:: v4l2_frmivalenum
.. flat-table:: struct v4l2_frmivalenum .. flat-table:: struct v4l2_frmivalenum
:header-rows: 0 :header-rows: 0
...@@ -200,7 +200,7 @@ application should zero out all members except for the *IN* fields. ...@@ -200,7 +200,7 @@ application should zero out all members except for the *IN* fields.
- .. row 7 - .. row 7
- -
- struct :ref:`v4l2_fract <v4l2-fract>` - struct :c:type:`v4l2_fract`
- ``discrete`` - ``discrete``
...@@ -209,7 +209,7 @@ application should zero out all members except for the *IN* fields. ...@@ -209,7 +209,7 @@ application should zero out all members except for the *IN* fields.
- .. row 8 - .. row 8
- -
- struct :ref:`v4l2_frmival_stepwise <v4l2-frmival-stepwise>` - struct :c:type:`v4l2_frmival_stepwise`
- ``stepwise`` - ``stepwise``
......
...@@ -26,7 +26,7 @@ Arguments ...@@ -26,7 +26,7 @@ Arguments
File descriptor returned by :ref:`open() <func-open>`. File descriptor returned by :ref:`open() <func-open>`.
``argp`` ``argp``
Pointer to a struct :ref:`v4l2_frmsizeenum <v4l2-frmsizeenum>` Pointer to a 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.
...@@ -90,7 +90,7 @@ the application, *OUT* denotes values that the driver fills in. The ...@@ -90,7 +90,7 @@ 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.
.. _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}|
...@@ -118,7 +118,7 @@ application should zero out all members except for the *IN* fields. ...@@ -118,7 +118,7 @@ application should zero out all members except for the *IN* fields.
.. _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}|
...@@ -178,7 +178,7 @@ application should zero out all members except for the *IN* fields. ...@@ -178,7 +178,7 @@ application should zero out all members except for the *IN* fields.
.. _v4l2-frmsizeenum: .. c:type:: v4l2_frmsizeenum
.. flat-table:: struct v4l2_frmsizeenum .. flat-table:: struct v4l2_frmsizeenum
:header-rows: 0 :header-rows: 0
...@@ -223,7 +223,7 @@ application should zero out all members except for the *IN* fields. ...@@ -223,7 +223,7 @@ application should zero out all members except for the *IN* fields.
- .. row 5 - .. row 5
- -
- struct :ref:`v4l2_frmsize_discrete <v4l2-frmsize-discrete>` - struct :c:type:`v4l2_frmsize_discrete`
- ``discrete`` - ``discrete``
...@@ -232,7 +232,7 @@ application should zero out all members except for the *IN* fields. ...@@ -232,7 +232,7 @@ application should zero out all members except for the *IN* fields.
- .. row 6 - .. row 6
- -
- struct :ref:`v4l2_frmsize_stepwise <v4l2-frmsize-stepwise>` - struct :c:type:`v4l2_frmsize_stepwise`
- ``stepwise`` - ``stepwise``
......
...@@ -34,7 +34,7 @@ Description ...@@ -34,7 +34,7 @@ Description
Enumerates the frequency bands that a tuner or modulator supports. To do Enumerates the frequency bands that a tuner or modulator supports. To do
this applications initialize the ``tuner``, ``type`` and ``index`` this applications initialize the ``tuner``, ``type`` and ``index``
fields, and zero out the ``reserved`` array of a struct fields, and zero out the ``reserved`` array of a struct
:ref:`v4l2_frequency_band <v4l2-frequency-band>` and call the :c:type:`v4l2_frequency_band` and call the
:ref:`VIDIOC_ENUM_FREQ_BANDS` ioctl with a pointer to this structure. :ref:`VIDIOC_ENUM_FREQ_BANDS` ioctl with a pointer to this structure.
This ioctl is supported if the ``V4L2_TUNER_CAP_FREQ_BANDS`` capability This ioctl is supported if the ``V4L2_TUNER_CAP_FREQ_BANDS`` capability
...@@ -43,7 +43,7 @@ of the corresponding tuner/modulator is set. ...@@ -43,7 +43,7 @@ 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}|
.. _v4l2-frequency-band: .. c:type:: v4l2_frequency_band
.. flat-table:: struct v4l2_frequency_band .. flat-table:: struct v4l2_frequency_band
:header-rows: 0 :header-rows: 0
...@@ -58,10 +58,10 @@ of the corresponding tuner/modulator is set. ...@@ -58,10 +58,10 @@ of the corresponding tuner/modulator is set.
- ``tuner`` - ``tuner``
- The tuner or modulator index number. This is the same value as in - The tuner or modulator index number. This is the same value as in
the struct :ref:`v4l2_input <v4l2-input>` ``tuner`` field and the struct :c:type:`v4l2_input` ``tuner`` field and
the struct :ref:`v4l2_tuner <v4l2-tuner>` ``index`` field, or the struct :c:type:`v4l2_tuner` ``index`` field, or
the struct :ref:`v4l2_output <v4l2-output>` ``modulator`` field the struct :c:type:`v4l2_output` ``modulator`` field
and the struct :ref:`v4l2_modulator <v4l2-modulator>` ``index`` and the struct :c:type:`v4l2_modulator` ``index``
field. field.
- .. row 2 - .. row 2
...@@ -71,7 +71,7 @@ of the corresponding tuner/modulator is set. ...@@ -71,7 +71,7 @@ of the corresponding tuner/modulator is set.
- ``type`` - ``type``
- The tuner type. This is the same value as in the struct - The tuner type. This is the same value as in the struct
:ref:`v4l2_tuner <v4l2-tuner>` ``type`` field. The type must be :c:type:`v4l2_tuner` ``type`` field. The type must be
set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and
to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to
``V4L2_TUNER_RADIO`` for modulators (currently only radio ``V4L2_TUNER_RADIO`` for modulators (currently only radio
......
...@@ -33,14 +33,14 @@ Description ...@@ -33,14 +33,14 @@ Description
To query the attributes of an audio input applications initialize the To query the attributes of an audio input applications initialize the
``index`` field and zero out the ``reserved`` array of a struct ``index`` field and zero out the ``reserved`` array of a struct
:ref:`v4l2_audio <v4l2-audio>` and call the :ref:`VIDIOC_ENUMAUDIO` :c:type:`v4l2_audio` and call the :ref:`VIDIOC_ENUMAUDIO`
ioctl with a pointer to this structure. Drivers fill the rest of the ioctl with a pointer to this structure. Drivers fill the rest of the
structure or return an ``EINVAL`` error code when the index is out of structure or return an ``EINVAL`` error code when the index is out of
bounds. To enumerate all audio inputs applications shall begin at index bounds. To enumerate all audio inputs applications shall begin at index
zero, incrementing by one until the driver returns ``EINVAL``. 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
:ref:`v4l2_audio <v4l2-audio>`. :c:type:`v4l2_audio`.
Return Value Return Value
......
...@@ -33,7 +33,7 @@ Description ...@@ -33,7 +33,7 @@ Description
To query the attributes of an audio output applications initialize the To query the attributes of an audio output applications initialize the
``index`` field and zero out the ``reserved`` array of a struct ``index`` field and zero out the ``reserved`` array of a struct
:ref:`v4l2_audioout <v4l2-audioout>` and call the ``VIDIOC_G_AUDOUT`` :c:type:`v4l2_audioout` and call the ``VIDIOC_G_AUDOUT``
ioctl with a pointer to this structure. Drivers fill the rest of the ioctl with a pointer to this structure. Drivers fill the rest of the
structure or return an ``EINVAL`` error code when the index is out of structure or return an ``EINVAL`` error code when the index is out of
bounds. To enumerate all audio outputs applications shall begin at index bounds. To enumerate all audio outputs applications shall begin at index
...@@ -45,7 +45,7 @@ zero, incrementing by one until the driver returns ``EINVAL``. ...@@ -45,7 +45,7 @@ zero, incrementing by one until the driver returns ``EINVAL``.
to a sound card are not audio outputs in this sense. to a sound card are not audio outputs in this sense.
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
:ref:`v4l2_audioout <v4l2-audioout>`. :c:type:`v4l2_audioout`.
Return Value Return Value
......
...@@ -32,7 +32,7 @@ Description ...@@ -32,7 +32,7 @@ Description
=========== ===========
To query the attributes of a video input applications initialize the To query the attributes of a video input applications initialize the
``index`` field of struct :ref:`v4l2_input <v4l2-input>` and call the ``index`` field of struct :c:type:`v4l2_input` and call the
:ref:`VIDIOC_ENUMINPUT` ioctl with a pointer to this structure. Drivers :ref:`VIDIOC_ENUMINPUT` ioctl with a pointer to this structure. Drivers
fill the rest of the structure or return an ``EINVAL`` error code when the 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
...@@ -41,7 +41,7 @@ at index zero, incrementing by one until the driver returns ``EINVAL``. ...@@ -41,7 +41,7 @@ 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}|
.. _v4l2-input: .. c:type:: v4l2_input
.. flat-table:: struct v4l2_input .. flat-table:: struct v4l2_input
:header-rows: 0 :header-rows: 0
...@@ -104,7 +104,7 @@ at index zero, incrementing by one until the driver returns ``EINVAL``. ...@@ -104,7 +104,7 @@ at index zero, incrementing by one until the driver returns ``EINVAL``.
- Capture devices can have zero or more tuners (RF demodulators). - Capture devices can have zero or more tuners (RF demodulators).
When the ``type`` is set to ``V4L2_INPUT_TYPE_TUNER`` this is an When the ``type`` is set to ``V4L2_INPUT_TYPE_TUNER`` this is an
RF connector and this field identifies the tuner. It corresponds RF connector and this field identifies the tuner. It corresponds
to struct :ref:`v4l2_tuner <v4l2-tuner>` field ``index``. For to struct :c:type:`v4l2_tuner` field ``index``. For
details on tuners see :ref:`tuner`. details on tuners see :ref:`tuner`.
- .. row 6 - .. row 6
...@@ -377,5 +377,5 @@ appropriately. The generic error codes are described at the ...@@ -377,5 +377,5 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`v4l2_input <v4l2-input>` ``index`` is out of The struct :c:type:`v4l2_input` ``index`` is out of
bounds. bounds.
...@@ -32,7 +32,7 @@ Description ...@@ -32,7 +32,7 @@ Description
=========== ===========
To query the attributes of a video outputs applications initialize the To query the attributes of a video outputs applications initialize the
``index`` field of struct :ref:`v4l2_output <v4l2-output>` and call ``index`` field of struct :c:type:`v4l2_output` and call
the :ref:`VIDIOC_ENUMOUTPUT` ioctl with a pointer to this structure. the :ref:`VIDIOC_ENUMOUTPUT` ioctl with a pointer to this structure.
Drivers fill the rest of the structure or return an ``EINVAL`` error code Drivers fill the rest of the structure or return an ``EINVAL`` error code
when the index is out of bounds. To enumerate all outputs applications when the index is out of bounds. To enumerate all outputs applications
...@@ -42,7 +42,7 @@ EINVAL. ...@@ -42,7 +42,7 @@ EINVAL.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. _v4l2-output: .. c:type:: v4l2_output
.. flat-table:: struct v4l2_output .. flat-table:: struct v4l2_output
:header-rows: 0 :header-rows: 0
...@@ -105,7 +105,7 @@ EINVAL. ...@@ -105,7 +105,7 @@ EINVAL.
- Output devices can have zero or more RF modulators. When the - Output devices can have zero or more RF modulators. When the
``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector ``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector
and this field identifies the modulator. It corresponds to struct and this field identifies the modulator. It corresponds to struct
:ref:`v4l2_modulator <v4l2-modulator>` field ``index``. For :c:type:`v4l2_modulator` field ``index``. For
details on modulators see :ref:`tuner`. details on modulators see :ref:`tuner`.
- .. row 6 - .. row 6
...@@ -222,5 +222,5 @@ appropriately. The generic error codes are described at the ...@@ -222,5 +222,5 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`v4l2_output <v4l2-output>` ``index`` is out of The struct :c:type:`v4l2_output` ``index`` is out of
bounds. bounds.
...@@ -33,7 +33,7 @@ Description ...@@ -33,7 +33,7 @@ Description
To query the attributes of a video standard, especially a custom (driver To query the attributes of a video standard, especially a custom (driver
defined) one, applications initialize the ``index`` field of struct defined) one, applications initialize the ``index`` field of struct
:ref:`v4l2_standard <v4l2-standard>` and call the :ref:`VIDIOC_ENUMSTD` :c:type:`v4l2_standard` and call the :ref:`VIDIOC_ENUMSTD`
ioctl with a pointer to this structure. Drivers fill the rest of the ioctl with a pointer to this structure. Drivers fill the rest of the
structure or return an ``EINVAL`` error code when the index is out of structure or return an ``EINVAL`` error code when the index is out of
bounds. To enumerate all standards applications shall begin at index bounds. To enumerate all standards applications shall begin at index
...@@ -42,7 +42,7 @@ enumerate a different set of standards after switching the video input ...@@ -42,7 +42,7 @@ enumerate a different set of standards after switching the video input
or output. [#f1]_ or output. [#f1]_
.. _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}|
...@@ -71,7 +71,7 @@ or output. [#f1]_ ...@@ -71,7 +71,7 @@ or output. [#f1]_
set as custom standards. Multiple bits can be set if the hardware set as custom standards. Multiple bits can be set if the hardware
does not distinguish between these standards, however separate does not distinguish between these standards, however separate
indices do not indicate the opposite. The ``id`` must be unique. indices do not indicate the opposite. The ``id`` must be unique.
No other enumerated :ref:`struct v4l2_standard <v4l2-standard>` structure, No other enumerated :c:type:`struct v4l2_standard <v4l2_standard>` structure,
for this input or output anyway, can contain the same set of bits. for this input or output anyway, can contain the same set of bits.
- .. row 3 - .. row 3
...@@ -86,7 +86,7 @@ or output. [#f1]_ ...@@ -86,7 +86,7 @@ or output. [#f1]_
- .. row 4 - .. row 4
- struct :ref:`v4l2_fract <v4l2-fract>` - struct :c:type:`v4l2_fract`
- ``frameperiod`` - ``frameperiod``
...@@ -112,7 +112,7 @@ or output. [#f1]_ ...@@ -112,7 +112,7 @@ or output. [#f1]_
.. _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}|
...@@ -411,7 +411,7 @@ appropriately. The generic error codes are described at the ...@@ -411,7 +411,7 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`v4l2_standard <v4l2-standard>` ``index`` is out The struct :c:type:`v4l2_standard` ``index`` is out
of bounds. of bounds.
ENODATA ENODATA
......
...@@ -38,13 +38,13 @@ buffers have been allocated with the ...@@ -38,13 +38,13 @@ buffers have been allocated with the
:ref:`VIDIOC_REQBUFS` ioctl. :ref:`VIDIOC_REQBUFS` ioctl.
To export a buffer, applications fill struct To export a buffer, applications fill struct
:ref:`v4l2_exportbuffer <v4l2-exportbuffer>`. The ``type`` field is :c:type:`v4l2_exportbuffer`. The ``type`` field is
set to the same buffer type as was previously used with struct set to the same buffer type as was previously used with struct
:ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``. :c:type:`v4l2_requestbuffers` ``type``.
Applications must also set the ``index`` field. Valid index numbers Applications must also set the ``index`` field. Valid index numbers
range from zero to the number of buffers allocated with range from zero to the number of buffers allocated with
:ref:`VIDIOC_REQBUFS` (struct :ref:`VIDIOC_REQBUFS` (struct
:ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``count``) minus :c:type:`v4l2_requestbuffers` ``count``) minus
one. For the multi-planar API, applications set the ``plane`` field to one. For the multi-planar API, applications set the ``plane`` field to
the index of the plane to be exported. Valid planes range from zero to the index of the plane to be exported. Valid planes range from zero to
the maximal number of valid planes for the currently active format. For the maximal number of valid planes for the currently active format. For
...@@ -114,7 +114,7 @@ Examples ...@@ -114,7 +114,7 @@ Examples
} }
.. _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}|
...@@ -131,8 +131,8 @@ Examples ...@@ -131,8 +131,8 @@ Examples
- ``type`` - ``type``
- Type of the buffer, same as struct - Type of the buffer, same as struct
:ref:`v4l2_format <v4l2-format>` ``type`` or struct :c:type:`v4l2_format` ``type`` or struct
:ref:`v4l2_requestbuffers <v4l2-requestbuffers>` ``type``, set :c:type:`v4l2_requestbuffers` ``type``, set
by the application. See :ref:`v4l2-buf-type` by the application. See :ref:`v4l2-buf-type`
- .. row 2 - .. row 2
......
...@@ -35,7 +35,7 @@ Description ...@@ -35,7 +35,7 @@ Description
=========== ===========
To query the current audio input applications zero out the ``reserved`` To query the current audio input applications zero out the ``reserved``
array of a struct :ref:`v4l2_audio <v4l2-audio>` and call the array of a struct :c:type:`v4l2_audio` and call the
:ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` ioctl with a pointer to this structure. Drivers fill :ref:`VIDIOC_G_AUDIO <VIDIOC_G_AUDIO>` ioctl with a pointer to this structure. Drivers fill
the rest of the structure or return an ``EINVAL`` error code when the device the rest of the structure or return an ``EINVAL`` error code when the device
has no audio inputs, or none which combine with the current video input. has no audio inputs, or none which combine with the current video input.
...@@ -43,7 +43,7 @@ has no audio inputs, or none which combine with the current video input. ...@@ -43,7 +43,7 @@ has no audio inputs, or none which combine with the current video input.
Audio inputs have one writable property, the audio mode. To select the Audio inputs have one writable property, the audio mode. To select the
current audio input *and* change the audio mode, applications initialize current audio input *and* change the audio mode, applications initialize
the ``index`` and ``mode`` fields, and the ``reserved`` array of a the ``index`` and ``mode`` fields, and the ``reserved`` array of a
:ref:`struct v4l2_audio <v4l2-audio>` structure and call the :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>` :c:type:`struct v4l2_audio <v4l2_audio>` structure and call the :ref:`VIDIOC_S_AUDIO <VIDIOC_G_AUDIO>`
ioctl. Drivers may switch to a different audio mode if the request 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.
...@@ -51,7 +51,7 @@ return the actual new audio mode. ...@@ -51,7 +51,7 @@ 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}|
.. _v4l2-audio: .. c:type:: v4l2_audio
.. flat-table:: struct v4l2_audio .. flat-table:: struct v4l2_audio
:header-rows: 0 :header-rows: 0
......
...@@ -35,7 +35,7 @@ Description ...@@ -35,7 +35,7 @@ Description
=========== ===========
To query the current audio output applications zero out the ``reserved`` To query the current audio output applications zero out the ``reserved``
array of a struct :ref:`v4l2_audioout <v4l2-audioout>` and call the array of a struct :c:type:`v4l2_audioout` and call the
``VIDIOC_G_AUDOUT`` ioctl with a pointer to this structure. Drivers fill ``VIDIOC_G_AUDOUT`` ioctl with a pointer to this structure. Drivers fill
the rest of the structure or return an ``EINVAL`` error code when the device the rest of the structure or return an ``EINVAL`` error code when the device
has no audio inputs, or none which combine with the current video has no audio inputs, or none which combine with the current video
...@@ -44,7 +44,7 @@ output. ...@@ -44,7 +44,7 @@ output.
Audio outputs have no writable properties. Nevertheless, to select the Audio outputs have no writable properties. Nevertheless, to select the
current audio output applications can initialize the ``index`` field and current audio output applications can initialize the ``index`` field and
``reserved`` array (which in the future may contain writable properties) ``reserved`` array (which in the future may contain writable properties)
of a :ref:`struct v4l2_audioout <v4l2-audioout>` structure and call the of a :c:type:`struct v4l2_audioout <v4l2_audioout>` structure and call the
``VIDIOC_S_AUDOUT`` ioctl. Drivers switch to the requested output or ``VIDIOC_S_AUDOUT`` ioctl. Drivers switch to the requested output or
return the ``EINVAL`` error code when the index is out of bounds. This is a return the ``EINVAL`` error code when the index is out of bounds. This is a
write-only ioctl, it does not return the current audio output attributes write-only ioctl, it does not return the current audio output attributes
...@@ -56,7 +56,7 @@ as ``VIDIOC_G_AUDOUT`` does. ...@@ -56,7 +56,7 @@ as ``VIDIOC_G_AUDOUT`` does.
to a sound card are not audio outputs in this sense. to a sound card are not audio outputs in this sense.
.. _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}|
......
...@@ -35,13 +35,13 @@ Description ...@@ -35,13 +35,13 @@ Description
=========== ===========
To query the cropping rectangle size and position applications set the To query the cropping rectangle size and position applications set the
``type`` field of a :ref:`struct v4l2_crop <v4l2-crop>` structure to the ``type`` field of a :c:type:`struct v4l2_crop <v4l2_crop>` structure to the
respective buffer (stream) type and call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` ioctl respective buffer (stream) type and call the :ref:`VIDIOC_G_CROP <VIDIOC_G_CROP>` ioctl
with a pointer to this structure. The driver fills the rest of the with a pointer to this structure. The driver fills the rest of the
structure or returns the ``EINVAL`` error code if cropping is not supported. structure or returns the ``EINVAL`` error code if cropping is not supported.
To change the cropping rectangle applications initialize the ``type`` To change the cropping rectangle applications initialize the ``type``
and struct :ref:`v4l2_rect <v4l2-rect>` substructure named ``c`` of a and struct :c:type:`v4l2_rect` substructure named ``c`` of a
v4l2_crop structure and call the :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctl with a pointer v4l2_crop structure and call the :ref:`VIDIOC_S_CROP <VIDIOC_G_CROP>` ioctl with a pointer
to this structure. to this structure.
...@@ -75,7 +75,7 @@ When cropping is not supported then no parameters are changed and ...@@ -75,7 +75,7 @@ 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.
.. _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}|
...@@ -98,12 +98,12 @@ When cropping is not supported then no parameters are changed and ...@@ -98,12 +98,12 @@ When cropping is not supported then no parameters are changed and
- .. row 2 - .. row 2
- struct :ref:`v4l2_rect <v4l2-rect>` - struct :c:type:`v4l2_rect`
- ``c`` - ``c``
- Cropping rectangle. The same co-ordinate system as for struct - Cropping rectangle. The same co-ordinate system as for struct
:ref:`v4l2_cropcap <v4l2-cropcap>` ``bounds`` is used. :c:type:`v4l2_cropcap` ``bounds`` is used.
Return Value Return Value
......
...@@ -35,10 +35,10 @@ Description ...@@ -35,10 +35,10 @@ Description
=========== ===========
To get the current value of a control applications initialize the ``id`` To get the current value of a control applications initialize the ``id``
field of a struct :ref:`struct v4l2_control <v4l2-control>` and call the field of a struct :c:type:`struct v4l2_control <v4l2_control>` and call the
:ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl with a pointer to this structure. To change the :ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl with a pointer to this structure. To change the
value of a control applications initialize the ``id`` and ``value`` value of a control applications initialize the ``id`` and ``value``
fields of a struct :ref:`struct v4l2_control <v4l2-control>` and call the fields of a struct :c:type:`struct v4l2_control <v4l2_control>` and call the
:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctl. :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` ioctl.
When the ``id`` is invalid drivers return an ``EINVAL`` error code. When the When the ``id`` is invalid drivers return an ``EINVAL`` error code. When the
...@@ -55,7 +55,7 @@ These ioctls work only with user controls. For other control classes the ...@@ -55,7 +55,7 @@ These ioctls work only with user controls. For other control classes the
:ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` must be used. :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` must be used.
.. _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}|
...@@ -90,13 +90,13 @@ appropriately. The generic error codes are described at the ...@@ -90,13 +90,13 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`v4l2_control <v4l2-control>` ``id`` is invalid The struct :c:type:`v4l2_control` ``id`` is invalid
or the ``value`` is inappropriate for the given control (i.e. if a or the ``value`` is inappropriate for the given control (i.e. if a
menu item is selected that is not supported by the driver according menu item is selected that is not supported by the driver according
to :ref:`VIDIOC_QUERYMENU <VIDIOC_QUERYCTRL>`). to :ref:`VIDIOC_QUERYMENU <VIDIOC_QUERYCTRL>`).
ERANGE ERANGE
The struct :ref:`v4l2_control <v4l2-control>` ``value`` is out of The struct :c:type:`v4l2_control` ``value`` is out of
bounds. bounds.
EBUSY EBUSY
......
...@@ -44,8 +44,8 @@ To set DV timings for the input or output, applications use the ...@@ -44,8 +44,8 @@ To set DV timings for the input or output, applications use the
:ref:`VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl and to get the current timings, :ref:`VIDIOC_S_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl and to get the current timings,
applications use the :ref:`VIDIOC_G_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl. The detailed timing applications use the :ref:`VIDIOC_G_DV_TIMINGS <VIDIOC_G_DV_TIMINGS>` ioctl. The detailed timing
information is filled in using the structure struct information is filled in using the structure struct
:ref:`v4l2_dv_timings <v4l2-dv-timings>`. These ioctls take a :c:type:`v4l2_dv_timings`. These ioctls take a
pointer to the struct :ref:`v4l2_dv_timings <v4l2-dv-timings>` pointer to the struct :c:type:`v4l2_dv_timings`
structure as argument. If the ioctl is not supported or the timing structure as argument. If the ioctl is not supported or the timing
values are not correct, the driver returns ``EINVAL`` error code. values are not correct, the driver returns ``EINVAL`` error code.
...@@ -76,7 +76,7 @@ EBUSY ...@@ -76,7 +76,7 @@ EBUSY
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. _v4l2-bt-timings: .. c:type:: v4l2_bt_timings
.. flat-table:: struct v4l2_bt_timings .. flat-table:: struct v4l2_bt_timings
:header-rows: 0 :header-rows: 0
...@@ -239,7 +239,7 @@ EBUSY ...@@ -239,7 +239,7 @@ EBUSY
.. 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}|
.. _v4l2-dv-timings: .. c:type:: v4l2_dv_timings
.. flat-table:: struct v4l2_dv_timings .. flat-table:: struct v4l2_dv_timings
:header-rows: 0 :header-rows: 0
...@@ -266,7 +266,7 @@ EBUSY ...@@ -266,7 +266,7 @@ EBUSY
- .. row 3 - .. row 3
- -
- struct :ref:`v4l2_bt_timings <v4l2-bt-timings>` - struct :c:type:`v4l2_bt_timings`
- ``bt`` - ``bt``
......
...@@ -37,7 +37,7 @@ driver, which is useful for random access into the stream without ...@@ -37,7 +37,7 @@ driver, which is useful for random access into the stream without
decoding it. decoding it.
To read the data applications must call :ref:`VIDIOC_G_ENC_INDEX <VIDIOC_G_ENC_INDEX>` with a To read the data applications must call :ref:`VIDIOC_G_ENC_INDEX <VIDIOC_G_ENC_INDEX>` with a
pointer to a struct :ref:`v4l2_enc_idx <v4l2-enc-idx>`. On success pointer to a struct :c:type:`v4l2_enc_idx`. On success
the driver fills the ``entry`` array, stores the number of elements the driver fills the ``entry`` array, stores the number of elements
written in the ``entries`` field, and initializes the ``entries_cap`` written in the ``entries`` field, and initializes the ``entries_cap``
field. field.
...@@ -57,7 +57,7 @@ video elementary streams. ...@@ -57,7 +57,7 @@ video elementary streams.
.. tabularcolumns:: |p{3.5cm}|p{5.6cm}|p{8.4cm}| .. tabularcolumns:: |p{3.5cm}|p{5.6cm}|p{8.4cm}|
.. _v4l2-enc-idx: .. c:type:: v4l2_enc_idx
.. flat-table:: struct v4l2_enc_idx .. flat-table:: struct v4l2_enc_idx
:header-rows: 0 :header-rows: 0
...@@ -93,7 +93,7 @@ video elementary streams. ...@@ -93,7 +93,7 @@ video elementary streams.
- .. row 4 - .. row 4
- struct :ref:`v4l2_enc_idx_entry <v4l2-enc-idx-entry>` - struct :c:type:`v4l2_enc_idx_entry`
- ``entry``\ [``V4L2_ENC_IDX_ENTRIES``] - ``entry``\ [``V4L2_ENC_IDX_ENTRIES``]
...@@ -105,7 +105,7 @@ video elementary streams. ...@@ -105,7 +105,7 @@ video elementary streams.
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
.. _v4l2-enc-idx-entry: .. c:type:: v4l2_enc_idx_entry
.. flat-table:: struct v4l2_enc_idx_entry .. flat-table:: struct v4l2_enc_idx_entry
:header-rows: 0 :header-rows: 0
......
...@@ -46,13 +46,13 @@ to the same control class. ...@@ -46,13 +46,13 @@ to the same control class.
Applications must always fill in the ``count``, ``which``, ``controls`` Applications must always fill in the ``count``, ``which``, ``controls``
and ``reserved`` fields of struct and ``reserved`` fields of struct
:ref:`v4l2_ext_controls <v4l2-ext-controls>`, and initialize the :c:type:`v4l2_ext_controls`, and initialize the
struct :ref:`v4l2_ext_control <v4l2-ext-control>` array pointed to struct :c:type:`v4l2_ext_control` array pointed to
by the ``controls`` fields. by the ``controls`` fields.
To get the current value of a set of controls applications initialize To get the current value of a set of controls applications initialize
the ``id``, ``size`` and ``reserved2`` fields of each struct the ``id``, ``size`` and ``reserved2`` fields of each struct
:ref:`v4l2_ext_control <v4l2-ext-control>` and call the :c:type:`v4l2_ext_control` and call the
:ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. String controls controls must also set the :ref:`VIDIOC_G_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. String controls controls must also set the
``string`` field. Controls of compound types ``string`` field. Controls of compound types
(``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set) must set the ``ptr`` field. (``V4L2_CTRL_FLAG_HAS_PAYLOAD`` is set) must set the ``ptr`` field.
...@@ -74,14 +74,14 @@ by calling :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`. ...@@ -74,14 +74,14 @@ by calling :ref:`VIDIOC_QUERY_EXT_CTRL <VIDIOC_QUERYCTRL>`.
To change the value of a set of controls applications initialize the To change the value of a set of controls applications initialize the
``id``, ``size``, ``reserved2`` and ``value/value64/string/ptr`` fields ``id``, ``size``, ``reserved2`` and ``value/value64/string/ptr`` fields
of each struct :ref:`v4l2_ext_control <v4l2-ext-control>` and call of each struct :c:type:`v4l2_ext_control` and call
the :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. The controls will only be set if *all* the :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. The controls will only be set if *all*
control values are valid. control values are valid.
To check if a set of controls have correct values applications To check if a set of controls have correct values applications
initialize the ``id``, ``size``, ``reserved2`` and initialize the ``id``, ``size``, ``reserved2`` and
``value/value64/string/ptr`` fields of each struct ``value/value64/string/ptr`` fields of each struct
:ref:`v4l2_ext_control <v4l2-ext-control>` and call the :c:type:`v4l2_ext_control` and call the
:ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. It is up to the driver whether wrong :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctl. It is up to the driver whether wrong
values are automatically adjusted to a valid value or if an error is values are automatically adjusted to a valid value or if an error is
returned. returned.
...@@ -90,7 +90,7 @@ When the ``id`` or ``which`` is invalid drivers return an ``EINVAL`` error ...@@ -90,7 +90,7 @@ When the ``id`` or ``which`` is invalid drivers return an ``EINVAL`` error
code. When the value is out of bounds drivers can choose to take the code. When the value is out of bounds drivers can choose to take the
closest valid value or return an ``ERANGE`` error code, whatever seems more closest valid value or return an ``ERANGE`` error code, whatever seems more
appropriate. In the first case the new value is set in struct appropriate. In the first case the new value is set in struct
:ref:`v4l2_ext_control <v4l2-ext-control>`. If the new control value :c:type:`v4l2_ext_control`. If the new control value
is inappropriate (e.g. the given menu index is not supported by the menu is inappropriate (e.g. the given menu index is not supported by the menu
control), then this will also result in an ``EINVAL`` error code error. control), then this will also result in an ``EINVAL`` error code error.
...@@ -102,7 +102,7 @@ still cause this situation. ...@@ -102,7 +102,7 @@ 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}|
.. _v4l2-ext-control: .. c:type:: v4l2_ext_control
.. cssclass: longtable .. cssclass: longtable
...@@ -236,7 +236,7 @@ still cause this situation. ...@@ -236,7 +236,7 @@ still cause this situation.
.. tabularcolumns:: |p{4.0cm}|p{2.0cm}|p{2.0cm}|p{8.5cm}| .. tabularcolumns:: |p{4.0cm}|p{2.0cm}|p{2.0cm}|p{8.5cm}|
.. _v4l2-ext-controls: .. c:type:: v4l2_ext_controls
.. cssclass:: longtable .. cssclass:: longtable
...@@ -362,7 +362,7 @@ still cause this situation. ...@@ -362,7 +362,7 @@ still cause this situation.
- .. row 7 - .. row 7
- struct :ref:`v4l2_ext_control <v4l2-ext-control>` * - struct :c:type:`v4l2_ext_control` *
- ``controls`` - ``controls``
...@@ -483,17 +483,17 @@ appropriately. The generic error codes are described at the ...@@ -483,17 +483,17 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`v4l2_ext_control <v4l2-ext-control>` ``id`` is The struct :c:type:`v4l2_ext_control` ``id`` is
invalid, the struct :ref:`v4l2_ext_controls <v4l2-ext-controls>` invalid, the struct :c:type:`v4l2_ext_controls`
``which`` is invalid, or the struct ``which`` is invalid, or the struct
:ref:`v4l2_ext_control <v4l2-ext-control>` ``value`` was :c:type:`v4l2_ext_control` ``value`` was
inappropriate (e.g. the given menu index is not supported by the inappropriate (e.g. the given menu index is not supported by the
driver). This error code is also returned by the driver). This error code is also returned by the
:ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctls if two or :ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` and :ref:`VIDIOC_TRY_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>` ioctls if two or
more control values are in conflict. more control values are in conflict.
ERANGE ERANGE
The struct :ref:`v4l2_ext_control <v4l2-ext-control>` ``value`` The struct :c:type:`v4l2_ext_control` ``value``
is out of bounds. is out of bounds.
EBUSY EBUSY
......
...@@ -49,13 +49,13 @@ VGA signal or graphics into a video signal. *Video Output Overlays* are ...@@ -49,13 +49,13 @@ VGA signal or graphics into a video signal. *Video Output Overlays* are
always non-destructive. always non-destructive.
To get the current parameters applications call the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>` To get the current parameters applications call the :ref:`VIDIOC_G_FBUF <VIDIOC_G_FBUF>`
ioctl with a pointer to a :ref:`struct v4l2_framebuffer <v4l2-framebuffer>` ioctl with a pointer to a :c:type:`struct v4l2_framebuffer <v4l2_framebuffer>`
structure. The driver fills all fields of the structure or returns an structure. The driver fills all fields of the structure or returns an
EINVAL error code when overlays are not supported. EINVAL error code when overlays are not supported.
To set the parameters for a *Video Output Overlay*, applications must To set the parameters for a *Video Output Overlay*, applications must
initialize the ``flags`` field of a struct initialize the ``flags`` field of a struct
:ref:`struct v4l2_framebuffer <v4l2-framebuffer>`. Since the framebuffer is :c:type:`struct v4l2_framebuffer <v4l2_framebuffer>`. Since the framebuffer is
implemented on the TV card all other parameters are determined by the implemented on the TV card all other parameters are determined by the
driver. When an application calls :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` with a pointer to driver. When an application calls :ref:`VIDIOC_S_FBUF <VIDIOC_G_FBUF>` with a pointer to
this structure, the driver prepares for the overlay and returns the this structure, the driver prepares for the overlay and returns the
...@@ -77,7 +77,7 @@ destructive video overlay. ...@@ -77,7 +77,7 @@ 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}|
.. _v4l2-framebuffer: .. c:type:: v4l2_framebuffer
.. cssclass:: longtable .. cssclass:: longtable
...@@ -172,7 +172,7 @@ destructive video overlay. ...@@ -172,7 +172,7 @@ destructive video overlay.
- -
- -
- For *non-destructive Video Overlays* this field only defines a - For *non-destructive Video Overlays* this field only defines a
format for the struct :ref:`v4l2_window <v4l2-window>` format for the struct :c:type:`v4l2_window`
``chromakey`` field. ``chromakey`` field.
- .. row 10 - .. row 10
...@@ -207,7 +207,7 @@ destructive video overlay. ...@@ -207,7 +207,7 @@ destructive video overlay.
- Drivers and applications shall ignore this field. If applicable, - Drivers and applications shall ignore this field. If applicable,
the field order is selected with the the field order is selected with the
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, using the ``field`` :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, using the ``field``
field of struct :ref:`v4l2_window <v4l2-window>`. field of struct :c:type:`v4l2_window`.
- .. row 13 - .. row 13
...@@ -422,7 +422,7 @@ destructive video overlay. ...@@ -422,7 +422,7 @@ destructive video overlay.
- 0x0004 - 0x0004
- Use chroma-keying. The chroma-key color is determined by the - Use chroma-keying. The chroma-key color is determined by the
``chromakey`` field of struct :ref:`v4l2_window <v4l2-window>` ``chromakey`` field of struct :c:type:`v4l2_window`
and negotiated with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` and negotiated with the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>`
ioctl, see :ref:`overlay` and :ref:`osd`. ioctl, see :ref:`overlay` and :ref:`osd`.
...@@ -454,7 +454,7 @@ destructive video overlay. ...@@ -454,7 +454,7 @@ destructive video overlay.
images. The blend function is: output = (framebuffer pixel * alpha images. The blend function is: output = (framebuffer pixel * alpha
+ video pixel * (255 - alpha)) / 255. The alpha value is + video pixel * (255 - alpha)) / 255. The alpha value is
determined by the ``global_alpha`` field of struct determined by the ``global_alpha`` field of struct
:ref:`v4l2_window <v4l2-window>` and negotiated with the :c:type:`v4l2_window` and negotiated with the
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay` :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay`
and :ref:`osd`. and :ref:`osd`.
...@@ -478,11 +478,11 @@ destructive video overlay. ...@@ -478,11 +478,11 @@ destructive video overlay.
- Use source chroma-keying. The source chroma-key color is - Use source chroma-keying. The source chroma-key color is
determined by the ``chromakey`` field of struct determined by the ``chromakey`` field of struct
:ref:`v4l2_window <v4l2-window>` and negotiated with the :c:type:`v4l2_window` and negotiated with the
:ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay` :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl, see :ref:`overlay`
and :ref:`osd`. Both chroma-keying are mutual exclusive to each and :ref:`osd`. Both chroma-keying are mutual exclusive to each
other, so same ``chromakey`` field of struct other, so same ``chromakey`` field of struct
:ref:`v4l2_window <v4l2-window>` is being used. :c:type:`v4l2_window` is being used.
Return Value Return Value
......
...@@ -40,15 +40,15 @@ These ioctls are used to negotiate the format of data (typically image ...@@ -40,15 +40,15 @@ These ioctls are used to negotiate the format of data (typically image
format) exchanged between driver and application. format) exchanged between driver and application.
To query the current parameters applications set the ``type`` field of a To query the current parameters applications set the ``type`` field of a
struct :ref:`struct v4l2_format <v4l2-format>` to the respective buffer (stream) struct :c:type:`struct v4l2_format <v4l2_format>` to the respective buffer (stream)
type. For example video capture devices use type. For example video capture devices use
``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` or
``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``. When the application calls the ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``. When the application calls the
:ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this structure the driver fills :ref:`VIDIOC_G_FMT <VIDIOC_G_FMT>` ioctl with a pointer to this structure the driver fills
the respective member of the ``fmt`` union. In case of video capture the respective member of the ``fmt`` union. In case of video capture
devices that is either the struct devices that is either the struct
:ref:`v4l2_pix_format <v4l2-pix-format>` ``pix`` or the struct :c:type:`v4l2_pix_format` ``pix`` or the struct
:ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` ``pix_mp`` :c:type:`v4l2_pix_format_mplane` ``pix_mp``
member. When the requested buffer type is not supported drivers return member. When the requested buffer type is not supported drivers return
an ``EINVAL`` error code. an ``EINVAL`` error code.
...@@ -58,7 +58,7 @@ For details see the documentation of the various devices types in ...@@ -58,7 +58,7 @@ For details see the documentation of the various devices types in
:ref:`devices`. Good practice is to query the current parameters :ref:`devices`. Good practice is to query the current parameters
first, and to modify only those parameters not suitable for the first, and to modify only those parameters not suitable for the
application. When the application calls the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with application. When the application calls the :ref:`VIDIOC_S_FMT <VIDIOC_G_FMT>` ioctl with
a pointer to a :ref:`struct v4l2_format <v4l2-format>` structure the driver a pointer to a :c:type:`struct v4l2_format <v4l2_format>` structure the driver
checks and adjusts the parameters against hardware abilities. Drivers checks and adjusts the parameters against hardware abilities. Drivers
should not return an error code unless the ``type`` field is invalid, should not return an error code unless the ``type`` field is invalid,
this is a mechanism to fathom device capabilities and to approach this is a mechanism to fathom device capabilities and to approach
...@@ -85,7 +85,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical ...@@ -85,7 +85,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical
: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.
.. _v4l2-format: .. c:type:: v4l2_format
.. tabularcolumns:: |p{1.2cm}|p{4.3cm}|p{3.0cm}|p{9.0cm}| .. tabularcolumns:: |p{1.2cm}|p{4.3cm}|p{3.0cm}|p{9.0cm}|
...@@ -112,7 +112,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical ...@@ -112,7 +112,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical
- .. row 3 - .. row 3
- -
- struct :ref:`v4l2_pix_format <v4l2-pix-format>` - struct :c:type:`v4l2_pix_format`
- ``pix`` - ``pix``
...@@ -122,7 +122,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical ...@@ -122,7 +122,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical
- .. row 4 - .. row 4
- -
- struct :ref:`v4l2_pix_format_mplane <v4l2-pix-format-mplane>` - struct :c:type:`v4l2_pix_format_mplane`
- ``pix_mp`` - ``pix_mp``
...@@ -133,7 +133,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical ...@@ -133,7 +133,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical
- .. row 5 - .. row 5
- -
- struct :ref:`v4l2_window <v4l2-window>` - struct :c:type:`v4l2_window`
- ``win`` - ``win``
...@@ -143,7 +143,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical ...@@ -143,7 +143,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical
- .. row 6 - .. row 6
- -
- struct :ref:`v4l2_vbi_format <v4l2-vbi-format>` - struct :c:type:`v4l2_vbi_format`
- ``vbi`` - ``vbi``
...@@ -154,7 +154,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical ...@@ -154,7 +154,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical
- .. row 7 - .. row 7
- -
- struct :ref:`v4l2_sliced_vbi_format <v4l2-sliced-vbi-format>` - struct :c:type:`v4l2_sliced_vbi_format`
- ``sliced`` - ``sliced``
...@@ -164,7 +164,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical ...@@ -164,7 +164,7 @@ The format as returned by :ref:`VIDIOC_TRY_FMT <VIDIOC_G_FMT>` must be identical
- .. row 8 - .. row 8
- -
- struct :ref:`v4l2_sdr_format <v4l2-sdr-format>` - struct :c:type:`v4l2_sdr_format`
- ``sdr`` - ``sdr``
...@@ -189,5 +189,5 @@ appropriately. The generic error codes are described at the ...@@ -189,5 +189,5 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`v4l2_format <v4l2-format>` ``type`` field is The struct :c:type:`v4l2_format` ``type`` field is
invalid or the requested buffer type not supported. invalid or the requested buffer type not supported.
...@@ -36,7 +36,7 @@ Description ...@@ -36,7 +36,7 @@ Description
To get the current tuner or modulator radio frequency applications set To get the current tuner or modulator radio frequency applications set
the ``tuner`` field of a struct the ``tuner`` field of a struct
:ref:`v4l2_frequency <v4l2-frequency>` to the respective tuner or :c:type:`v4l2_frequency` to the respective tuner or
modulator number (only input devices have tuners, only output devices modulator number (only input devices have tuners, only output devices
have modulators), zero out the ``reserved`` array and call the have modulators), zero out the ``reserved`` array and call the
:ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl with a pointer to this structure. The :ref:`VIDIOC_G_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl with a pointer to this structure. The
...@@ -44,7 +44,7 @@ driver stores the current frequency in the ``frequency`` field. ...@@ -44,7 +44,7 @@ driver stores the current frequency in the ``frequency`` field.
To change the current tuner or modulator radio frequency applications To change the current tuner or modulator radio frequency applications
initialize the ``tuner``, ``type`` and ``frequency`` fields, and the initialize the ``tuner``, ``type`` and ``frequency`` fields, and the
``reserved`` array of a struct :ref:`v4l2_frequency <v4l2-frequency>` ``reserved`` array of a struct :c:type:`v4l2_frequency`
and call the :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl with a pointer to this and call the :ref:`VIDIOC_S_FREQUENCY <VIDIOC_G_FREQUENCY>` ioctl with a pointer to this
structure. When the requested frequency is not possible the driver 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
...@@ -53,7 +53,7 @@ write-only ioctl, it does not return the actual new frequency. ...@@ -53,7 +53,7 @@ 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}|
.. _v4l2-frequency: .. c:type:: v4l2_frequency
.. flat-table:: struct v4l2_frequency .. flat-table:: struct v4l2_frequency
:header-rows: 0 :header-rows: 0
...@@ -68,10 +68,10 @@ write-only ioctl, it does not return the actual new frequency. ...@@ -68,10 +68,10 @@ write-only ioctl, it does not return the actual new frequency.
- ``tuner`` - ``tuner``
- The tuner or modulator index number. This is the same value as in - The tuner or modulator index number. This is the same value as in
the struct :ref:`v4l2_input <v4l2-input>` ``tuner`` field and the struct :c:type:`v4l2_input` ``tuner`` field and
the struct :ref:`v4l2_tuner <v4l2-tuner>` ``index`` field, or the struct :c:type:`v4l2_tuner` ``index`` field, or
the struct :ref:`v4l2_output <v4l2-output>` ``modulator`` field the struct :c:type:`v4l2_output` ``modulator`` field
and the struct :ref:`v4l2_modulator <v4l2-modulator>` ``index`` and the struct :c:type:`v4l2_modulator` ``index``
field. field.
- .. row 2 - .. row 2
...@@ -81,7 +81,7 @@ write-only ioctl, it does not return the actual new frequency. ...@@ -81,7 +81,7 @@ write-only ioctl, it does not return the actual new frequency.
- ``type`` - ``type``
- The tuner type. This is the same value as in the struct - The tuner type. This is the same value as in the struct
:ref:`v4l2_tuner <v4l2-tuner>` ``type`` field. The type must be :c:type:`v4l2_tuner` ``type`` field. The type must be
set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and set to ``V4L2_TUNER_RADIO`` for ``/dev/radioX`` device nodes, and
to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to to ``V4L2_TUNER_ANALOG_TV`` for all others. Set this field to
``V4L2_TUNER_RADIO`` for modulators (currently only radio ``V4L2_TUNER_RADIO`` for modulators (currently only radio
...@@ -94,8 +94,8 @@ write-only ioctl, it does not return the actual new frequency. ...@@ -94,8 +94,8 @@ write-only ioctl, it does not return the actual new frequency.
- ``frequency`` - ``frequency``
- Tuning frequency in units of 62.5 kHz, or if the struct - Tuning frequency in units of 62.5 kHz, or if the struct
:ref:`v4l2_tuner <v4l2-tuner>` or struct :c:type:`v4l2_tuner` or struct
:ref:`v4l2_modulator <v4l2-modulator>` ``capability`` flag :c:type:`v4l2_modulator` ``capability`` flag
``V4L2_TUNER_CAP_LOW`` is set, in units of 62.5 Hz. A 1 Hz unit is ``V4L2_TUNER_CAP_LOW`` is set, in units of 62.5 Hz. A 1 Hz unit is
used when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set. used when the ``capability`` flag ``V4L2_TUNER_CAP_1HZ`` is set.
......
...@@ -37,7 +37,7 @@ Description ...@@ -37,7 +37,7 @@ Description
To query the current video input applications call the To query the current video input applications call the
:ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer to an integer where the driver :ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer to an integer where the driver
stores the number of the input, as in the struct stores the number of the input, as in the struct
:ref:`v4l2_input <v4l2-input>` ``index`` field. This ioctl will fail :c:type:`v4l2_input` ``index`` field. This ioctl will fail
only when there are no video inputs, returning ``EINVAL``. only when there are no video inputs, returning ``EINVAL``.
To select a video input applications store the number of the desired To select a video input applications store the number of the desired
......
...@@ -56,7 +56,7 @@ encoding. You usually do want to add them. ...@@ -56,7 +56,7 @@ 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}|
.. _v4l2-jpegcompression: .. c:type:: v4l2_jpegcompression
.. flat-table:: struct v4l2_jpegcompression .. flat-table:: struct v4l2_jpegcompression
:header-rows: 0 :header-rows: 0
......
...@@ -36,7 +36,7 @@ Description ...@@ -36,7 +36,7 @@ Description
To query the attributes of a modulator applications initialize the To query the attributes of a modulator applications initialize the
``index`` field and zero out the ``reserved`` array of a struct ``index`` field and zero out the ``reserved`` array of a struct
:ref:`v4l2_modulator <v4l2-modulator>` and call the :c:type:`v4l2_modulator` and call the
:ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl with a pointer to this structure. Drivers :ref:`VIDIOC_G_MODULATOR <VIDIOC_G_MODULATOR>` ioctl with a pointer to this structure. Drivers
fill the rest of the structure or return an ``EINVAL`` error code when the fill the rest of the structure or return an ``EINVAL`` error code when the
index is out of bounds. To enumerate all modulators applications shall index is out of bounds. To enumerate all modulators applications shall
...@@ -62,7 +62,7 @@ To change the radio frequency the ...@@ -62,7 +62,7 @@ To change the radio frequency the
.. 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}|
.. _v4l2-modulator: .. c:type:: v4l2_modulator
.. flat-table:: struct v4l2_modulator .. flat-table:: struct v4l2_modulator
:header-rows: 0 :header-rows: 0
...@@ -95,7 +95,7 @@ To change the radio frequency the ...@@ -95,7 +95,7 @@ To change the radio frequency the
- ``capability`` - ``capability``
- Modulator capability flags. No flags are defined for this field, - Modulator capability flags. No flags are defined for this field,
the tuner flags in struct :ref:`v4l2_tuner <v4l2-tuner>` are the tuner flags in struct :c:type:`v4l2_tuner` are
used accordingly. The audio flags indicate the ability to encode used accordingly. The audio flags indicate the ability to encode
audio subprograms. They will *not* change for example with the audio subprograms. They will *not* change for example with the
current video standard. current video standard.
...@@ -260,5 +260,5 @@ appropriately. The generic error codes are described at the ...@@ -260,5 +260,5 @@ appropriately. The generic error codes are described at the
:ref:`Generic Error Codes <gen-errors>` chapter. :ref:`Generic Error Codes <gen-errors>` chapter.
EINVAL EINVAL
The struct :ref:`v4l2_modulator <v4l2-modulator>` ``index`` is The struct :c:type:`v4l2_modulator` ``index`` is
out of bounds. out of bounds.
...@@ -37,7 +37,7 @@ Description ...@@ -37,7 +37,7 @@ Description
To query the current video output applications call the To query the current video output applications call the
:ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a pointer to an integer where the driver :ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a pointer to an integer where the driver
stores the number of the output, as in the struct stores the number of the output, as in the struct
:ref:`v4l2_output <v4l2-output>` ``index`` field. This ioctl will :c:type:`v4l2_output` ``index`` field. This ioctl will
fail only when there are no video outputs, returning the ``EINVAL`` error fail only when there are no video outputs, returning the ``EINVAL`` error
code. code.
......
...@@ -47,13 +47,13 @@ section discussing the :ref:`read() <func-read>` function. ...@@ -47,13 +47,13 @@ section discussing the :ref:`read() <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_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take a :ref:`VIDIOC_G_PARM <VIDIOC_G_PARM>` and :ref:`VIDIOC_S_PARM <VIDIOC_G_PARM>` ioctl, respectively. They take a
pointer to a struct :ref:`struct v4l2_streamparm <v4l2-streamparm>` which contains a pointer to a struct :c:type:`struct v4l2_streamparm <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}|
.. _v4l2-streamparm: .. c:type:: v4l2_streamparm
.. flat-table:: struct v4l2_streamparm .. flat-table:: struct v4l2_streamparm
:header-rows: 0 :header-rows: 0
...@@ -69,7 +69,7 @@ union holding separate parameters for input and output devices. ...@@ -69,7 +69,7 @@ union holding separate parameters for input and output devices.
- -
- The buffer (stream) type, same as struct - The buffer (stream) type, same as struct
:ref:`v4l2_format <v4l2-format>` ``type``, set by the :c:type:`v4l2_format` ``type``, set by the
application. See :ref:`v4l2-buf-type` application. See :ref:`v4l2-buf-type`
- .. row 2 - .. row 2
...@@ -84,7 +84,7 @@ union holding separate parameters for input and output devices. ...@@ -84,7 +84,7 @@ union holding separate parameters for input and output devices.
- .. row 3 - .. row 3
- -
- struct :ref:`v4l2_captureparm <v4l2-captureparm>` - struct :c:type:`v4l2_captureparm`
- ``capture`` - ``capture``
...@@ -94,7 +94,7 @@ union holding separate parameters for input and output devices. ...@@ -94,7 +94,7 @@ union holding separate parameters for input and output devices.
- .. row 4 - .. row 4
- -
- struct :ref:`v4l2_outputparm <v4l2-outputparm>` - struct :c:type:`v4l2_outputparm`
- ``output`` - ``output``
...@@ -114,7 +114,7 @@ union holding separate parameters for input and output devices. ...@@ -114,7 +114,7 @@ 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}|
.. _v4l2-captureparm: .. c:type:: v4l2_captureparm
.. flat-table:: struct v4l2_captureparm .. flat-table:: struct v4l2_captureparm
:header-rows: 0 :header-rows: 0
...@@ -140,7 +140,7 @@ union holding separate parameters for input and output devices. ...@@ -140,7 +140,7 @@ union holding separate parameters for input and output devices.
- .. row 3 - .. row 3
- struct :ref:`v4l2_fract <v4l2-fract>` - struct :c:type:`v4l2_fract`
- ``timeperframe`` - ``timeperframe``
...@@ -151,7 +151,7 @@ union holding separate parameters for input and output devices. ...@@ -151,7 +151,7 @@ union holding separate parameters for input and output devices.
Applications store here the desired frame period, drivers return Applications store here the desired frame period, drivers return
the actual frame period, which must be greater or equal to the the actual frame period, which must be greater or equal to the
nominal frame period determined by the current video standard nominal frame period determined by the current video standard
(struct :ref:`v4l2_standard <v4l2-standard>` ``frameperiod`` (struct :c:type:`v4l2_standard` ``frameperiod``
field). Changing the video standard (also implicitly by switching field). Changing the video standard (also implicitly by switching
the video input) may reset this parameter to the nominal frame the video input) may reset this parameter to the nominal frame
period. To reset manually applications can just set this field to period. To reset manually applications can just set this field to
...@@ -197,7 +197,7 @@ union holding separate parameters for input and output devices. ...@@ -197,7 +197,7 @@ 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}|
.. _v4l2-outputparm: .. c:type:: v4l2_outputparm
.. flat-table:: struct v4l2_outputparm .. flat-table:: struct v4l2_outputparm
:header-rows: 0 :header-rows: 0
...@@ -223,7 +223,7 @@ union holding separate parameters for input and output devices. ...@@ -223,7 +223,7 @@ union holding separate parameters for input and output devices.
- .. row 3 - .. row 3
- struct :ref:`v4l2_fract <v4l2-fract>` - struct :c:type:`v4l2_fract`
- ``timeperframe`` - ``timeperframe``
...@@ -241,7 +241,7 @@ union holding separate parameters for input and output devices. ...@@ -241,7 +241,7 @@ union holding separate parameters for input and output devices.
Applications store here the desired frame period, drivers return Applications store here the desired frame period, drivers return
the actual frame period, which must be greater or equal to the the actual frame period, which must be greater or equal to the
nominal frame period determined by the current video standard nominal frame period determined by the current video standard
(struct :ref:`v4l2_standard <v4l2-standard>` ``frameperiod`` (struct :c:type:`v4l2_standard` ``frameperiod``
field). Changing the video standard (also implicitly by switching field). Changing the video standard (also implicitly by switching
the video output) may reset this parameter to the nominal frame the video output) may reset this parameter to the nominal frame
period. To reset manually applications can just set this field to period. To reset manually applications can just set this field to
......
...@@ -41,43 +41,43 @@ Description ...@@ -41,43 +41,43 @@ Description
The ioctls are used to query and configure selection rectangles. The ioctls are used to query and configure selection rectangles.
To query the cropping (composing) rectangle set struct To query the cropping (composing) rectangle set struct
:ref:`v4l2_selection <v4l2-selection>` ``type`` field to the :c:type:`v4l2_selection` ``type`` field to the
respective buffer type. Do not use the multiplanar buffer types. Use respective buffer type. Do not use the multiplanar buffer types. Use
``V4L2_BUF_TYPE_VIDEO_CAPTURE`` instead of ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` instead of
``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and use ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and use
``V4L2_BUF_TYPE_VIDEO_OUTPUT`` instead of ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` instead of
``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``. The next step is setting the ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``. The next step is setting the
value of struct :ref:`v4l2_selection <v4l2-selection>` ``target`` value of struct :c:type:`v4l2_selection` ``target``
field to ``V4L2_SEL_TGT_CROP`` (``V4L2_SEL_TGT_COMPOSE``). Please refer field to ``V4L2_SEL_TGT_CROP`` (``V4L2_SEL_TGT_COMPOSE``). Please refer
to table :ref:`v4l2-selections-common` or :ref:`selection-api` for to table :ref:`v4l2-selections-common` or :ref:`selection-api` for
additional targets. The ``flags`` and ``reserved`` fields of struct additional targets. The ``flags`` and ``reserved`` fields of struct
:ref:`v4l2_selection <v4l2-selection>` are ignored and they must be :c:type:`v4l2_selection` are ignored and they must be
filled with zeros. The driver fills the rest of the structure or returns filled with zeros. The driver fills the rest of the structure or returns
EINVAL error code if incorrect buffer type or target was used. If EINVAL error code if incorrect buffer type or target was used. If
cropping (composing) is not supported then the active rectangle is not cropping (composing) is not supported then the active rectangle is not
mutable and it is always equal to the bounds rectangle. Finally, the mutable and it is always equal to the bounds rectangle. Finally, the
struct :ref:`v4l2_rect <v4l2-rect>` ``r`` rectangle is filled with struct :c:type:`v4l2_rect` ``r`` rectangle is filled with
the current cropping (composing) coordinates. The coordinates are the current cropping (composing) coordinates. The coordinates are
expressed in driver-dependent units. The only exception are rectangles expressed in driver-dependent units. The only exception are rectangles
for images in raw formats, whose coordinates are always expressed in for images in raw formats, whose coordinates are always expressed in
pixels. pixels.
To change the cropping (composing) rectangle set the struct To change the cropping (composing) rectangle set the struct
:ref:`v4l2_selection <v4l2-selection>` ``type`` field to the :c:type:`v4l2_selection` ``type`` field to the
respective buffer type. Do not use multiplanar buffers. Use respective buffer type. Do not use multiplanar buffers. Use
``V4L2_BUF_TYPE_VIDEO_CAPTURE`` instead of ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` instead of
``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``. Use ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``. Use
``V4L2_BUF_TYPE_VIDEO_OUTPUT`` instead of ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` instead of
``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``. The next step is setting the ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``. The next step is setting the
value of struct :ref:`v4l2_selection <v4l2-selection>` ``target`` to value of struct :c:type:`v4l2_selection` ``target`` to
``V4L2_SEL_TGT_CROP`` (``V4L2_SEL_TGT_COMPOSE``). Please refer to table ``V4L2_SEL_TGT_CROP`` (``V4L2_SEL_TGT_COMPOSE``). Please refer to table
:ref:`v4l2-selections-common` or :ref:`selection-api` for additional :ref:`v4l2-selections-common` or :ref:`selection-api` for additional
targets. The struct :ref:`v4l2_rect <v4l2-rect>` ``r`` rectangle need targets. The struct :c:type:`v4l2_rect` ``r`` rectangle need
to be set to the desired active area. Field struct to be set to the desired active area. Field struct
:ref:`v4l2_selection <v4l2-selection>` ``reserved`` is ignored and :c:type:`v4l2_selection` ``reserved`` is ignored and
must be filled with zeros. The driver may adjust coordinates of the must be filled with zeros. The driver may adjust coordinates of the
requested rectangle. An application may introduce constraints to control requested rectangle. An application may introduce constraints to control
rounding behaviour. The struct :ref:`v4l2_selection <v4l2-selection>` rounding behaviour. The struct :c:type:`v4l2_selection`
``flags`` field must be set to one of the following: ``flags`` field must be set to one of the following:
- ``0`` - The driver can adjust the rectangle size freely and shall - ``0`` - The driver can adjust the rectangle size freely and shall
...@@ -102,7 +102,7 @@ horizontal and vertical offset and sizes are chosen according to ...@@ -102,7 +102,7 @@ horizontal and vertical offset and sizes are chosen according to
following priority: following priority:
1. Satisfy constraints from struct 1. Satisfy constraints from struct
:ref:`v4l2_selection <v4l2-selection>` ``flags``. :c:type:`v4l2_selection` ``flags``.
2. Adjust width, height, left, and top to hardware limits and 2. Adjust width, height, left, and top to hardware limits and
alignments. alignments.
...@@ -115,7 +115,7 @@ following priority: ...@@ -115,7 +115,7 @@ following priority:
5. Keep horizontal and vertical offset as close as possible to original 5. Keep horizontal and vertical offset as close as possible to original
ones. ones.
On success the struct :ref:`v4l2_rect <v4l2-rect>` ``r`` field On success the struct :c:type:`v4l2_rect` ``r`` field
contains the adjusted rectangle. When the parameters are unsuitable the contains the adjusted rectangle. When the parameters are unsuitable the
application may modify the cropping (composing) or image parameters and application may modify the cropping (composing) or image parameters and
repeat the cycle until satisfactory parameters have been negotiated. If repeat the cycle until satisfactory parameters have been negotiated. If
...@@ -140,7 +140,7 @@ Selection targets and flags are documented in ...@@ -140,7 +140,7 @@ Selection targets and flags are documented in
.. _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}|
...@@ -179,7 +179,7 @@ Selection targets and flags are documented in ...@@ -179,7 +179,7 @@ Selection targets and flags are documented in
- .. row 4 - .. row 4
- struct :ref:`v4l2_rect <v4l2-rect>` - struct :c:type:`v4l2_rect`
- ``r`` - ``r``
...@@ -207,7 +207,7 @@ EINVAL ...@@ -207,7 +207,7 @@ EINVAL
supported, or the ``flags`` argument is not valid. supported, or the ``flags`` argument is not valid.
ERANGE ERANGE
It is not possible to adjust struct :ref:`v4l2_rect <v4l2-rect>` It is not possible to adjust struct :c:type:`v4l2_rect`
``r`` rectangle to satisfy all constraints given in the ``flags`` ``r`` rectangle to satisfy all constraints given in the ``flags``
argument. argument.
......
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