Add a new struct and ioctl to extend the amount of information you can get for a control. The range is now a s64 type, and array dimensions and element size can be reported through nr_of_dims/dims/elems/elem_size.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -1269,6 +1269,7 @@ struct v4l2_ext_controls { · 1268 unmodified lines | ||
| 1269 | 1269 | #define V4L2_CTRL_ID_MASK (0x0fffffff) |
| 1270 | 1270 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) |
| 1271 | 1271 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) |
| 1272 | +#define V4L2_CTRL_MAX_DIMS (4) | |
| 1272 | 1273 | |
| 1273 | 1274 | enum v4l2_ctrl_type { |
| 1274 | 1275 | V4L2_CTRL_TYPE_INTEGER = 1, |
| @@ -1298,6 +1299,23 @@ struct v4l2_queryctrl { · 23 unmodified lines | ||
| 1298 | 1299 | __u32 reserved[2]; |
| 1299 | 1300 | }; |
| 1300 | 1301 | |
| 1302 | +/* Used in the VIDIOC_QUERY_EXT_CTRL ioctl for querying extended controls */ | |
| 1303 | +struct v4l2_query_ext_ctrl { | |
| 1304 | + __u32 id; | |
| 1305 | + __u32 type; | |
| 1306 | + char name[32]; | |
| 1307 | + __s64 minimum; | |
| 1308 | + __s64 maximum; | |
| 1309 | + __u64 step; | |
| 1310 | + __s64 default_value; | |
| 1311 | + __u32 flags; | |
| 1312 | + __u32 elem_size; | |
| 1313 | + __u32 elems; | |
| 1314 | + __u32 nr_of_dims; | |
| 1315 | + __u32 dims[V4L2_CTRL_MAX_DIMS]; | |
| 1316 | + __u32 reserved[32]; | |
| 1317 | +}; | |
| 1318 | + | |
| 1301 | 1319 | /* Used in the VIDIOC_QUERYMENU ioctl for querying menu items */ |
| 1302 | 1320 | struct v4l2_querymenu { |
| 1303 | 1321 | __u32 id; |
| @@ -2011,6 +2029,8 @@ struct v4l2_create_buffers { · 707 unmodified lines | ||
| 2011 | 2029 | Never use these in applications! */ |
| 2012 | 2030 | #define VIDIOC_DBG_G_CHIP_INFO _IOWR('V', 102, struct v4l2_dbg_chip_info) |
| 2013 | 2031 | |
| 2032 | +#define VIDIOC_QUERY_EXT_CTRL _IOWR('V', 103, struct v4l2_query_ext_ctrl) | |
| 2033 | + | |
| 2014 | 2034 | /* Reminder: when adding new ioctls please add support for them to |
| 2015 | 2035 | drivers/media/video/v4l2-compat-ioctl32.c as well! */ |
| 2016 | 2036 | |