1 .. Permission is granted to copy, distribute and/or modify this
2 .. document under the terms of the GNU Free Documentation License,
3 .. Version 1.1 or any later version published by the Free Software
4 .. Foundation, with no Invariant Sections, no Front-Cover Texts
5 .. and no Back-Cover Texts. A copy of the license is included at
6 .. Documentation/media/uapi/fdl-appendix.rst.
8 .. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
10 .. _VIDIOC_ENUMOUTPUT:
12 ***********************
13 ioctl VIDIOC_ENUMOUTPUT
14 ***********************
19 VIDIOC_ENUMOUTPUT - Enumerate video outputs
25 .. c:function:: int ioctl( int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp )
26 :name: VIDIOC_ENUMOUTPUT
33 File descriptor returned by :ref:`open() <func-open>`.
36 Pointer to struct :c:type:`v4l2_output`.
42 To query the attributes of a video outputs applications initialize the
43 ``index`` field of struct :c:type:`v4l2_output` and call
44 the :ref:`VIDIOC_ENUMOUTPUT` with a pointer to this structure.
45 Drivers fill the rest of the structure or return an ``EINVAL`` error code
46 when the index is out of bounds. To enumerate all outputs applications
47 shall begin at index zero, incrementing by one until the driver returns
51 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
53 .. c:type:: v4l2_output
55 .. flat-table:: struct v4l2_output
62 - Identifies the output, set by the application.
65 - Name of the video output, a NUL-terminated ASCII string, for
66 example: "Vout". This information is intended for the user,
67 preferably the connector label on the device itself.
70 - Type of the output, see :ref:`output-type`.
73 - Drivers can enumerate up to 32 video and audio outputs. This field
74 shows which audio outputs were selectable as the current output if
75 this was the currently selected video output. It is a bit mask.
76 The LSB corresponds to audio output 0, the MSB to output 31. Any
77 number of bits can be set, or none.
79 When the driver does not enumerate audio outputs no bits must be
80 set. Applications shall not interpret this as lack of audio
81 support. Drivers may automatically select audio outputs without
84 For details on audio outputs and how to select the current output
88 - Output devices can have zero or more RF modulators. When the
89 ``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector
90 and this field identifies the modulator. It corresponds to struct
91 :c:type:`v4l2_modulator` field ``index``. For
92 details on modulators see :ref:`tuner`.
93 * - :ref:`v4l2_std_id <v4l2-std-id>`
95 - Every video output supports one or more different video standards.
96 This field is a set of all supported standards. For details on
97 video standards and how to switch see :ref:`standard`.
100 - This field provides capabilities for the output. See
101 :ref:`output-capabilities` for flags.
104 - Reserved for future extensions. Drivers must set the array to
109 .. tabularcolumns:: |p{7.0cm}|p{1.8cm}|p{8.7cm}|
113 .. flat-table:: Output Type
118 * - ``V4L2_OUTPUT_TYPE_MODULATOR``
120 - This output is an analog TV modulator.
121 * - ``V4L2_OUTPUT_TYPE_ANALOG``
123 - Any non-modulator video output, for example Composite Video,
124 S-Video, HDMI. The naming as ``_TYPE_ANALOG`` is historical,
125 today we would have called it ``_TYPE_VIDEO``.
126 * - ``V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY``
128 - The video output will be copied to a :ref:`video overlay <overlay>`.
132 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
134 .. _output-capabilities:
136 .. flat-table:: Output capabilities
141 * - ``V4L2_OUT_CAP_DV_TIMINGS``
143 - This output supports setting video timings by using
144 ``VIDIOC_S_DV_TIMINGS``.
145 * - ``V4L2_OUT_CAP_STD``
147 - This output supports setting the TV standard by using
149 * - ``V4L2_OUT_CAP_NATIVE_SIZE``
151 - This output supports setting the native size using the
152 ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see
153 :ref:`v4l2-selections-common`.
159 On success 0 is returned, on error -1 and the ``errno`` variable is set
160 appropriately. The generic error codes are described at the
161 :ref:`Generic Error Codes <gen-errors>` chapter.
164 The struct :c:type:`v4l2_output` ``index`` is out of