154 lines · plain
1.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later2.. c:namespace:: V4L3 4.. _VIDIOC_ENUMOUTPUT:5 6***********************7ioctl VIDIOC_ENUMOUTPUT8***********************9 10Name11====12 13VIDIOC_ENUMOUTPUT - Enumerate video outputs14 15Synopsis16========17 18.. c:macro:: VIDIOC_ENUMOUTPUT19 20``int ioctl(int fd, VIDIOC_ENUMOUTPUT, struct v4l2_output *argp)``21 22Arguments23=========24 25``fd``26 File descriptor returned by :c:func:`open()`.27 28``argp``29 Pointer to struct :c:type:`v4l2_output`.30 31Description32===========33 34To query the attributes of a video outputs applications initialize the35``index`` field of struct :c:type:`v4l2_output` and call36the :ref:`VIDIOC_ENUMOUTPUT` with a pointer to this structure.37Drivers fill the rest of the structure or return an ``EINVAL`` error code38when the index is out of bounds. To enumerate all outputs applications39shall begin at index zero, incrementing by one until the driver returns40``EINVAL``.41 42.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.5cm}|43 44.. c:type:: v4l2_output45 46.. flat-table:: struct v4l2_output47 :header-rows: 048 :stub-columns: 049 :widths: 1 1 250 51 * - __u3252 - ``index``53 - Identifies the output, set by the application.54 * - __u855 - ``name``\ [32]56 - Name of the video output, a NUL-terminated ASCII string, for57 example: "Vout". This information is intended for the user,58 preferably the connector label on the device itself.59 * - __u3260 - ``type``61 - Type of the output, see :ref:`output-type`.62 * - __u3263 - ``audioset``64 - Drivers can enumerate up to 32 video and audio outputs. This field65 shows which audio outputs were selectable as the current output if66 this was the currently selected video output. It is a bit mask.67 The LSB corresponds to audio output 0, the MSB to output 31. Any68 number of bits can be set, or none.69 70 When the driver does not enumerate audio outputs no bits must be71 set. Applications shall not interpret this as lack of audio72 support. Drivers may automatically select audio outputs without73 enumerating them.74 75 For details on audio outputs and how to select the current output76 see :ref:`audio`.77 * - __u3278 - ``modulator``79 - Output devices can have zero or more RF modulators. When the80 ``type`` is ``V4L2_OUTPUT_TYPE_MODULATOR`` this is an RF connector81 and this field identifies the modulator. It corresponds to struct82 :c:type:`v4l2_modulator` field ``index``. For83 details on modulators see :ref:`tuner`.84 * - :ref:`v4l2_std_id <v4l2-std-id>`85 - ``std``86 - Every video output supports one or more different video standards.87 This field is a set of all supported standards. For details on88 video standards and how to switch see :ref:`standard`.89 * - __u3290 - ``capabilities``91 - This field provides capabilities for the output. See92 :ref:`output-capabilities` for flags.93 * - __u3294 - ``reserved``\ [3]95 - Reserved for future extensions. Drivers must set the array to96 zero.97 98 99.. tabularcolumns:: |p{7.5cm}|p{0.6cm}|p{9.2cm}|100 101.. _output-type:102 103.. flat-table:: Output Type104 :header-rows: 0105 :stub-columns: 0106 :widths: 3 1 4107 108 * - ``V4L2_OUTPUT_TYPE_MODULATOR``109 - 1110 - This output is an analog TV modulator.111 * - ``V4L2_OUTPUT_TYPE_ANALOG``112 - 2113 - Any non-modulator video output, for example Composite Video,114 S-Video, HDMI. The naming as ``_TYPE_ANALOG`` is historical,115 today we would have called it ``_TYPE_VIDEO``.116 * - ``V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY``117 - 3118 - The video output will be copied to a :ref:`video overlay <overlay>`.119 120 121.. tabularcolumns:: |p{6.4cm}|p{2.4cm}|p{8.5cm}|122 123.. _output-capabilities:124 125.. flat-table:: Output capabilities126 :header-rows: 0127 :stub-columns: 0128 :widths: 3 1 4129 130 * - ``V4L2_OUT_CAP_DV_TIMINGS``131 - 0x00000002132 - This output supports setting video timings by using133 ``VIDIOC_S_DV_TIMINGS``.134 * - ``V4L2_OUT_CAP_STD``135 - 0x00000004136 - This output supports setting the TV standard by using137 ``VIDIOC_S_STD``.138 * - ``V4L2_OUT_CAP_NATIVE_SIZE``139 - 0x00000008140 - This output supports setting the native size using the141 ``V4L2_SEL_TGT_NATIVE_SIZE`` selection target, see142 :ref:`v4l2-selections-common`.143 144Return Value145============146 147On success 0 is returned, on error -1 and the ``errno`` variable is set148appropriately. The generic error codes are described at the149:ref:`Generic Error Codes <gen-errors>` chapter.150 151EINVAL152 The struct :c:type:`v4l2_output` ``index`` is out of153 bounds.154