提交 84d0688d 编写于 作者: L Laurent Pinchart 提交者: Mauro Carvalho Chehab

[media] v4l: Replace enums with fixed-sized fields in public structure

The v4l2_mbus_framefmt structure will be part of the public userspace
API and used (albeit indirectly) as an ioctl argument. As such, its size
must be fixed across userspace ABIs.

Replace the v4l2_field and v4l2_colorspace enums by __u32 fields and add
padding for future enhancements.
Signed-off-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: NHans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 2ef2d5a3
......@@ -63,16 +63,17 @@ enum v4l2_mbus_pixelcode {
* struct v4l2_mbus_framefmt - frame format on the media bus
* @width: frame width
* @height: frame height
* @code: data format code
* @field: used interlacing type
* @colorspace: colorspace of the data
* @code: data format code (from enum v4l2_mbus_pixelcode)
* @field: used interlacing type (from enum v4l2_field)
* @colorspace: colorspace of the data (from enum v4l2_colorspace)
*/
struct v4l2_mbus_framefmt {
__u32 width;
__u32 height;
__u32 code;
enum v4l2_field field;
enum v4l2_colorspace colorspace;
__u32 width;
__u32 height;
__u32 code;
__u32 field;
__u32 colorspace;
__u32 reserved[7];
};
#endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册