]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
media: videodev2.h: add V4L2_FMT_FLAG_DYN_RESOLUTION
authorMaxime Jourdan <mjourdan@baylibre.com>
Thu, 15 Aug 2019 14:44:46 +0000 (11:44 -0300)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 19 Aug 2019 17:56:31 +0000 (14:56 -0300)
Add an enum_fmt format flag to specifically tag coded formats where
dynamic resolution switching is supported by the device.

This is useful for some codec drivers that can support dynamic
resolution switching for one or more of their listed coded formats. It
allows userspace to know whether it should extract the video parameters
itself, or if it can rely on the device to send V4L2_EVENT_SOURCE_CHANGE
when such changes are detected.

Signed-off-by: Maxime Jourdan <mjourdan@baylibre.com>
Reviewed-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Acked-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Documentation/media/uapi/v4l/vidioc-enum-fmt.rst
Documentation/media/videodev2.h.rst.exceptions
include/uapi/linux/videodev2.h

index ebc05ce74bdf02c1aeb26d5f9cf7a249ba4d5371..399ef1062bacb4abc43c741a6bc7bda5ae90e9f8 100644 (file)
@@ -135,6 +135,14 @@ one until ``EINVAL`` is returned.
        between frames/fields. This flag can only be used in combination with
        the ``V4L2_FMT_FLAG_COMPRESSED`` flag, since this applies to compressed
        formats only. This flag is valid for stateful decoders only.
+    * - ``V4L2_FMT_FLAG_DYN_RESOLUTION``
+      - 0x0008
+      - Dynamic resolution switching is supported by the device for this
+       compressed bytestream format (aka coded format). It will notify the user
+       via the event ``V4L2_EVENT_SOURCE_CHANGE`` when changes in the video
+       parameters are detected. This flag can only be used in combination
+       with the ``V4L2_FMT_FLAG_COMPRESSED`` flag, since this applies to
+       compressed formats only. It is also only applies to stateful codecs.
 
 
 Return Value
index a0640b6d0f688cec71480362607020586ef24d9f..adeb6b7a15cb33aa052cd594deec4a6971054ba4 100644 (file)
@@ -181,6 +181,7 @@ replace define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA reserved-formats
 replace define V4L2_FMT_FLAG_COMPRESSED fmtdesc-flags
 replace define V4L2_FMT_FLAG_EMULATED fmtdesc-flags
 replace define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM fmtdesc-flags
+replace define V4L2_FMT_FLAG_DYN_RESOLUTION fmtdesc-flags
 
 # V4L2 timecode types
 replace define V4L2_TC_TYPE_24FPS timecode-type
index 67077d52c59d6d8bd1755bfc04a8a663db01eeac..530638dffd934128352cd39ef1fa3f1de0c6e444 100644 (file)
@@ -777,6 +777,7 @@ struct v4l2_fmtdesc {
 #define V4L2_FMT_FLAG_COMPRESSED               0x0001
 #define V4L2_FMT_FLAG_EMULATED                 0x0002
 #define V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM    0x0004
+#define V4L2_FMT_FLAG_DYN_RESOLUTION           0x0008
 
        /* Frame Size and frame rate enumeration */
 /*