0001 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
0002 .. c:namespace:: V4L
0003
0004 .. _VIDIOC_ENUMOUTPUT:
0005
0006 ***********************
0007 ioctl VIDIOC_ENUMOUTPUT
0008 ***********************
0009
0010 Name
0011 ====
0012
0013 VIDIOC_ENUMOUTPUT - Enumerate video outputs
0014
0015 Synopsis
0016 ========
0017
0018 .. c:macro:: VIDIOC_ENUMOUTPUT
0019
0020 ``int ioctl(int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp)``
0021
0022 Arguments
0023 =========
0024
0025 ``fd``
0026 File descriptor returned by :c:func:`open()`.
0027
0028 ``argp``
0029 Pointer to struct :c:type:`v4l2_output`.
0030
0031 Description
0032 ===========
0033
0034 To query the attributes of a video outputs applications initialize the
0035 ``index`` field of struct :c:type:`v4l2_output` and call
0036 the :ref:`VIDIOC_ENUMOUTPUT` with a pointer to this structure.
0037 Drivers fill the rest of the structure or return an ``EINVAL`` error code
0038 when the index is out of bounds. To enumerate all outputs applications
0039 shall begin at index zero, incrementing by one until the driver returns
0040 ``EINVAL``.
0041
0042 .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}|
0043
0044 .. c:type:: v4l2_output
0045
0046 .. flat-table:: struct v4l2_output
0047 :header-rows: 0
0048 :stub-columns: 0
0049 :widths: 1 1 2
0050
0051 * - __u32
0052 - ``index``
0053 - Identifies the output, set by the application.
0054 * - __u8
0055 - ``name``\ [32]
0056 - Name of the video output, a NUL-terminated ASCII string, for
0057 example: "Vout". This information is intended for the user,
0058 preferably the connector label on the device itself.
0059 * - __u32
0060 - ``type``
0061 - Type of the output, see :ref:`output-type`.
0062 * - __u32
0063 - ``audioset``
0064 - Drivers can enumerate up to 32 video and audio outputs. This field
0065 shows which audio outputs were selectable as the current output if
0066 this was the currently selected video output. It is a bit mask.
0067 The LSB corresponds to audio output 0, the MSB to output 31. Any
0068 number of bits can be set, or none.
0069
0070 When the driver does not enumerate audio outputs no bits must be
0071 set. Applications shall not interpret this as lack of audio
0072 support. Drivers may automatically select audio outputs without
0073 enumerating them.
0074
0075 For details on audio outputs and how to select the current output
0076 see :ref:`audio`.
0077 * - __u32
0078 - ``modulator``
0079 - Output devices can have zero or more RF modulators. When the
0080 ``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector
0081 and this field identifies the modulator. It corresponds to struct
0082 :c:type:`v4l2_modulator` field ``index``. For
0083 details on modulators see :ref:`tuner`.
0084 * - :ref:`v4l2_std_id <v4l2-std-id>`
0085 - ``std``
0086 - Every video output supports one or more different video standards.
0087 This field is a set of all supported standards. For details on
0088 video standards and how to switch see :ref:`standard`.
0089 * - __u32
0090 - ``capabilities``
0091 - This field provides capabilities for the output. See
0092 :ref:`output-capabilities` for flags.
0093 * - __u32
0094 - ``reserved``\ [3]
0095 - Reserved for future extensions. Drivers must set the array to
0096 zero.
0097
0098
0099 .. tabularcolumns:: |p{7.5cm}|p{0.6cm}|p{9.2cm}|
0100
0101 .. _output-type:
0102
0103 .. flat-table:: Output Type
0104 :header-rows: 0
0105 :stub-columns: 0
0106 :widths: 3 1 4
0107
0108 * - ``V4L2_OUTPUT_TYPE_MODULATOR``
0109 - 1
0110 - This output is an analog TV modulator.
0111 * - ``V4L2_OUTPUT_TYPE_ANALOG``
0112 - 2
0113 - Any non-modulator video output, for example Composite Video,
0114 S-Video, HDMI. The naming as ``_TYPE_ANALOG`` is historical,
0115 today we would have called it ``_TYPE_VIDEO``.
0116 * - ``V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY``
0117 - 3
0118 - The video output will be copied to a :ref:`video overlay <overlay>`.
0119
0120
0121 .. tabularcolumns:: |p{6.4cm}|p{2.4cm}|p{8.5cm}|
0122
0123 .. _output-capabilities:
0124
0125 .. flat-table:: Output capabilities
0126 :header-rows: 0
0127 :stub-columns: 0
0128 :widths: 3 1 4
0129
0130 * - ``V4L2_OUT_CAP_DV_TIMINGS``
0131 - 0x00000002
0132 - This output supports setting video timings by using
0133 ``VIDIOC_S_DV_TIMINGS``.
0134 * - ``V4L2_OUT_CAP_STD``
0135 - 0x00000004
0136 - This output supports setting the TV standard by using
0137 ``VIDIOC_S_STD``.
0138 * - ``V4L2_OUT_CAP_NATIVE_SIZE``
0139 - 0x00000008
0140 - This output supports setting the native size using the
0141 ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see
0142 :ref:`v4l2-selections-common`.
0143
0144 Return Value
0145 ============
0146
0147 On success 0 is returned, on error -1 and the ``errno`` variable is set
0148 appropriately. The generic error codes are described at the
0149 :ref:`Generic Error Codes <gen-errors>` chapter.
0150
0151 EINVAL
0152 The struct :c:type:`v4l2_output` ``index`` is out of
0153 bounds.