media: videodev2: Add flag to unconditionally enumerate pixel formats

When the index is ORed with V4L2_FMTDESC_FLAG_ENUM_ALL the
driver clears the flag and enumerate all the possible formats,
ignoring any limitations from the current configuration.
Drivers which do not support this flag yet always return an EINVAL.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
[hverkuil: improved doc when the new flag is not supported by the driver]
This commit is contained in:
Benjamin Gaignard
2024-08-26 17:24:09 +00:00
committed by Hans Verkuil
parent 0567d0f1cc
commit 06f5531958
3 changed files with 21 additions and 1 deletions

View File

@@ -907,6 +907,9 @@ struct v4l2_fmtdesc {
#define V4L2_FMT_FLAG_CSC_QUANTIZATION 0x0100
#define V4L2_FMT_FLAG_META_LINE_BASED 0x0200
/* Format description flag, to be ORed with the index */
#define V4L2_FMTDESC_FLAG_ENUM_ALL 0x80000000
/* Frame Size and frame rate enumeration */
/*
* F R A M E S I Z E E N U M E R A T I O N