Commit 35ec2a2f authored by Ricardo Ribalda's avatar Ricardo Ribalda Committed by Mauro Carvalho Chehab

[media] videodev2.h: Extend struct v4l2_ext_controls

So it can be used to get the default value of a control.

Without this change it is not possible to get the
default value of array controls.
Signed-off-by: default avatarRicardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent dc5e0205
...@@ -1476,7 +1476,10 @@ struct v4l2_ext_control { ...@@ -1476,7 +1476,10 @@ struct v4l2_ext_control {
} __attribute__ ((packed)); } __attribute__ ((packed));
struct v4l2_ext_controls { struct v4l2_ext_controls {
__u32 ctrl_class; union {
__u32 ctrl_class;
__u32 which;
};
__u32 count; __u32 count;
__u32 error_idx; __u32 error_idx;
__u32 reserved[2]; __u32 reserved[2];
...@@ -1487,6 +1490,8 @@ struct v4l2_ext_controls { ...@@ -1487,6 +1490,8 @@ struct v4l2_ext_controls {
#define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL)
#define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000)
#define V4L2_CTRL_MAX_DIMS (4) #define V4L2_CTRL_MAX_DIMS (4)
#define V4L2_CTRL_WHICH_CUR_VAL 0
#define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000
enum v4l2_ctrl_type { enum v4l2_ctrl_type {
V4L2_CTRL_TYPE_INTEGER = 1, V4L2_CTRL_TYPE_INTEGER = 1,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment