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.
Showing the changes to include/uapi (1 of 1 file). Show all
Unified · Split
| @@ -1476,7 +1476,10 @@ struct v4l2_ext_control { · 1475 unmodified lines | ||
| 1476 | 1476 | } __attribute__ ((packed)); |
| 1477 | 1477 | |
| 1478 | 1478 | struct v4l2_ext_controls { |
| 1479 | − __u32 ctrl_class; | |
| 1479 | + union { | |
| 1480 | + __u32 ctrl_class; | |
| 1481 | + __u32 which; | |
| 1482 | + }; | |
| 1480 | 1483 | __u32 count; |
| 1481 | 1484 | __u32 error_idx; |
| 1482 | 1485 | __u32 reserved[2]; |
| @@ -1487,6 +1490,8 @@ struct v4l2_ext_controls { · 4 unmodified lines | ||
| 1487 | 1490 | #define V4L2_CTRL_ID2CLASS(id) ((id) & 0x0fff0000UL) |
| 1488 | 1491 | #define V4L2_CTRL_DRIVER_PRIV(id) (((id) & 0xffff) >= 0x1000) |
| 1489 | 1492 | #define V4L2_CTRL_MAX_DIMS (4) |
| 1493 | +#define V4L2_CTRL_WHICH_CUR_VAL 0 | |
| 1494 | +#define V4L2_CTRL_WHICH_DEF_VAL 0x0f000000 | |
| 1490 | 1495 | |
| 1491 | 1496 | enum v4l2_ctrl_type { |
| 1492 | 1497 | V4L2_CTRL_TYPE_INTEGER = 1, |