History

[media] v4l: Add metadata buffer type and format

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]

Laurent Pinchart committed 10 years ago

Commit fb9ffa61 parent 3e9a0e012 files · +164 −6Browse files

Showing the changes to include/uapi/linux (1 of 12 files). Show all

Unified · Split

include/uapi/linux/videodev2.h+13−0
@@ -143,6 +143,7 @@ enum v4l2_buf_type { · 142 unmodified lines
143143 V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE = 10,
144144 V4L2_BUF_TYPE_SDR_CAPTURE = 11,
145145 V4L2_BUF_TYPE_SDR_OUTPUT = 12,
146+ V4L2_BUF_TYPE_META_CAPTURE = 13,
146147 /* Deprecated, do not use */
147148 V4L2_BUF_TYPE_PRIVATE = 0x80,
148149 };
@@ -451,6 +452,7 @@ struct v4l2_capability { · 302 unmodified lines
451452 #define V4L2_CAP_SDR_CAPTURE 0x00100000 /* Is a SDR capture device */
452453 #define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 /* Supports the extended pixel format */
453454 #define V4L2_CAP_SDR_OUTPUT 0x00400000 /* Is a SDR output device */
455+#define V4L2_CAP_META_CAPTURE 0x00800000 /* Is a metadata capture device */
454456
455457 #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */
456458 #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */
@@ -2085,6 +2087,16 @@ struct v4l2_sdr_format { · 1628 unmodified lines
20852087 __u8 reserved[24];
20862088 } __attribute__ ((packed));
20872089
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+
20882100 /**
20892101 * struct v4l2_format - stream data format
20902102 * @type: enum v4l2_buf_type; type of the data stream
@@ -2104,6 +2116,7 @@ struct v4l2_format { · 13 unmodified lines
21042116 struct v4l2_vbi_format vbi; /* V4L2_BUF_TYPE_VBI_CAPTURE */
21052117 struct v4l2_sliced_vbi_format sliced; /* V4L2_BUF_TYPE_SLICED_VBI_CAPTURE */
21062118 struct v4l2_sdr_format sdr; /* V4L2_BUF_TYPE_SDR_CAPTURE */
2119+ struct v4l2_meta_format meta; /* V4L2_BUF_TYPE_META_CAPTURE */
21072120 __u8 raw_data[200]; /* user-defined */
21082121 } fmt;
21092122 };