The metadata buffer type is used to transfer metadata between userspace and kernelspace through a V4L2 buffers queue. It comes with a new metadata capture capability and format description. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Tested-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> [hans.verkuil@cisco.com: removed left-over 'experimental' note] [hans.verkuil@cisco.com: add newline after _v4l2-meta-format label]
Showing the changes to include/uapi/linux (1 of 12 files). Show all
Unified · Split
| @@ -143,6 +143,7 @@ enum v4l2_buf_type { · 142 unmodified lines | |||
| 143 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, | 143 | V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10, |
| 144 | V4L2_BUF_TYPE_SDR_CAPTURE = 11, | 144 | V4L2_BUF_TYPE_SDR_CAPTURE = 11, |
| 145 | V4L2_BUF_TYPE_SDR_OUTPUT = 12, | 145 | V4L2_BUF_TYPE_SDR_OUTPUT = 12, |
| 146 | V4L2_BUF_TYPE_META_CAPTURE = 13, | ||
| 146 | /* Deprecated, do not use */ | 147 | /* Deprecated, do not use */ |
| 147 | V4L2_BUF_TYPE_PRIVATE = 0x80, | 148 | V4L2_BUF_TYPE_PRIVATE = 0x80, |
| 148 | }; | 149 | }; |
| @@ -451,6 +452,7 @@ struct v4l2_capability { · 302 unmodified lines | |||
| 451 | #define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */ | 452 | #define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */ |
| 452 | #define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 /* Supports the extended pixel format */ | 453 | #define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 /* Supports the extended pixel format */ |
| 453 | #define V4L2_CAP_SDR_OUTPUT 0x00400000 /* Is a SDR output device */ | 454 | #define V4L2_CAP_SDR_OUTPUT 0x00400000 /* Is a SDR output device */ |
| 455 | #define V4L2_CAP_META_CAPTURE 0x00800000 /* Is a metadata capture device */ | ||
| 454 | 456 | ||
| 455 | #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ | 457 | #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */ |
| 456 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ | 458 | #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */ |
| @@ -2085,6 +2087,16 @@ struct v4l2_sdr_format { · 1628 unmodified lines | |||
| 2085 | __u8 reserved[24]; | 2087 | __u8 reserved[24]; |
| 2086 | } __attribute__ ((packed)); | 2088 | } __attribute__ ((packed)); |
| 2087 | 2089 | ||
| 2090 | /** | ||
| 2091 | * struct v4l2_meta_format - metadata format definition | ||
| 2092 | * @dataformat: little endian four character code (fourcc) | ||
| 2093 | * @buffersize: maximum size in bytes required for data | ||
| 2094 | */ | ||
| 2095 | struct v4l2_meta_format { | ||
| 2096 | __u32 dataformat; | ||
| 2097 | __u32 buffersize; | ||
| 2098 | } __attribute__ ((packed)); | ||
| 2099 | |||
| 2088 | /** | 2100 | /** |
| 2089 | * struct v4l2_format - stream data format | 2101 | * struct v4l2_format - stream data format |
| 2090 | * @type: enum v4l2_buf_type; type of the data stream | 2102 | * @type: enum v4l2_buf_type; type of the data stream |
| @@ -2104,6 +2116,7 @@ struct v4l2_format { · 13 unmodified lines | |||
| 2104 | struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ | 2116 | struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */ |
| 2105 | struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ | 2117 | struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */ |
| 2106 | struct v4l2_sdr_format sdr; /* V4L2_BUF_TYPE_SDR_CAPTURE */ | 2118 | struct v4l2_sdr_format sdr; /* V4L2_BUF_TYPE_SDR_CAPTURE */ |
| 2119 | struct v4l2_meta_format meta; /* V4L2_BUF_TYPE_META_CAPTURE */ | ||
| 2107 | __u8 raw_data[200]; /* user-defined */ | 2120 | __u8 raw_data[200]; /* user-defined */ |
| 2108 | } fmt; | 2121 | } fmt; |
| 2109 | }; | 2122 | }; |