Lines Matching +full:capture +full:- +full:only
1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
13 VIDIOC_ENUM_FMT - Enumerate image formats
41 (that is, with lower ``index`` value) less-preferred formats.
43 Depending on the ``V4L2_CAP_IO_MC`` :ref:`capability <device-capabilities>`,
46 1) ``V4L2_CAP_IO_MC`` is not set (also known as a 'video-node-centric' driver)
58 2) ``V4L2_CAP_IO_MC`` is set (also known as an 'MC-centric' driver)
63 If the ``mbus_code`` field is initialized to a valid (non-zero)
64 :ref:`media bus format code <v4l2-mbus-pixelcode>`, then drivers
65 shall restrict enumeration to only the image formats that can produce
66 (for video output devices) or be produced from (for video capture
80 .. flat-table:: struct v4l2_fmtdesc
81 :header-rows: 0
82 :stub-columns: 0
85 * - __u32
86 - ``index``
87 - Number of the format in the enumeration, set by the application.
89 * - __u32
90 - ``type``
91 - Type of the data stream, set by the application. Only these types
102 * - __u32
103 - ``flags``
104 - See :ref:`fmtdesc-flags`
105 * - __u8
106 - ``description``\ [32]
107 - Description of the format, a NUL-terminated ASCII string. This
109 * - __u32
110 - ``pixelformat``
111 - The image format identifier. This is a four character code as
113 * - :cspan:`2`
115 .. _v4l2-fourcc:
128 * - __u32
129 - ``mbus_code``
130 - Media bus code restricting the enumerated formats, set by the
131 application. Only applicable to drivers that advertise the
132 ``V4L2_CAP_IO_MC`` :ref:`capability <device-capabilities>`, shall be 0
134 * - __u32
135 - ``reserved``\ [3]
136 - Reserved for future extensions. Drivers must set the array to
144 .. _fmtdesc-flags:
146 .. flat-table:: Image Format Description Flags
147 :header-rows: 0
148 :stub-columns: 0
151 * - ``V4L2_FMT_FLAG_COMPRESSED``
152 - 0x0001
153 - This is a compressed format.
154 * - ``V4L2_FMT_FLAG_EMULATED``
155 - 0x0002
156 - This format is not native to the device but emulated through
159 * - ``V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM``
160 - 0x0004
161 - The hardware decoder for this compressed bytestream format (aka coded
166 This flag can only be used in combination with the
168 formats only. This flag is valid for stateful decoders only.
169 * - ``V4L2_FMT_FLAG_DYN_RESOLUTION``
170 - 0x0008
171 - Dynamic resolution switching is supported by the device for this
176 This flag can only be used in combination with the
178 compressed formats only. This flag is valid for stateful codecs only.
179 * - ``V4L2_FMT_FLAG_ENC_CAP_FRAME_INTERVAL``
180 - 0x0010
181 - The hardware encoder supports setting the ``CAPTURE`` coded frame
184 also sets the ``CAPTURE`` coded frame interval to the same value.
185 If this flag is set, then the ``CAPTURE`` coded frame interval can be
188 a hint for reserving hardware encoder resources and the ``CAPTURE`` coded
192 This flag can only be used in combination with the
194 compressed formats only. This flag is valid for stateful encoders only.
195 * - ``V4L2_FMT_FLAG_CSC_COLORSPACE``
196 - 0x0020
197 - The driver allows the application to try to change the default
198 colorspace. This flag is relevant only for capture devices.
199 The application can ask to configure the colorspace of the capture device
201 :ref:`V4L2_PIX_FMT_FLAG_SET_CSC <v4l2-pix-fmt-flag-set-csc>` set.
202 * - ``V4L2_FMT_FLAG_CSC_XFER_FUNC``
203 - 0x0040
204 - The driver allows the application to try to change the default
205 transfer function. This flag is relevant only for capture devices.
206 The application can ask to configure the transfer function of the capture
208 :ref:`V4L2_PIX_FMT_FLAG_SET_CSC <v4l2-pix-fmt-flag-set-csc>` set.
209 * - ``V4L2_FMT_FLAG_CSC_YCBCR_ENC``
210 - 0x0080
211 - The driver allows the application to try to change the default
212 Y'CbCr encoding. This flag is relevant only for capture devices.
213 The application can ask to configure the Y'CbCr encoding of the capture device
215 :ref:`V4L2_PIX_FMT_FLAG_SET_CSC <v4l2-pix-fmt-flag-set-csc>` set.
216 * - ``V4L2_FMT_FLAG_CSC_HSV_ENC``
217 - 0x0080
218 - The driver allows the application to try to change the default
219 HSV encoding. This flag is relevant only for capture devices.
220 The application can ask to configure the HSV encoding of the capture device
222 :ref:`V4L2_PIX_FMT_FLAG_SET_CSC <v4l2-pix-fmt-flag-set-csc>` set.
223 * - ``V4L2_FMT_FLAG_CSC_QUANTIZATION``
224 - 0x0100
225 - The driver allows the application to try to change the default
226 quantization. This flag is relevant only for capture devices.
227 The application can ask to configure the quantization of the capture
229 :ref:`V4L2_PIX_FMT_FLAG_SET_CSC <v4l2-pix-fmt-flag-set-csc>` set.
234 On success 0 is returned, on error -1 and the ``errno`` variable is set
236 :ref:`Generic Error Codes <gen-errors>` chapter.