mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-17 18:56:24 +00:00
media: v4l2-ctrls: add change flag for when dimensions change
Add a new V4L2_EVENT_CTRL_CH_DIMENSIONS change flag that is issued when the dimensions of an array change as a result of a __v4l2_ctrl_modify_dimensions() call. This will inform userspace that there are new dimensions. Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
parent
0975274557
commit
43cc0ec381
@ -332,6 +332,11 @@ call.
|
||||
- 0x0004
|
||||
- This control event was triggered because the minimum, maximum,
|
||||
step or the default value of the control changed.
|
||||
* - ``V4L2_EVENT_CTRL_CH_DIMENSIONS``
|
||||
- 0x0008
|
||||
- This control event was triggered because the dimensions of the
|
||||
control changed. Note that the number of dimensions remains the
|
||||
same.
|
||||
|
||||
|
||||
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.5cm}|
|
||||
|
@ -514,6 +514,7 @@ replace define V4L2_EVENT_PRIVATE_START event-type
|
||||
replace define V4L2_EVENT_CTRL_CH_VALUE ctrl-changes-flags
|
||||
replace define V4L2_EVENT_CTRL_CH_FLAGS ctrl-changes-flags
|
||||
replace define V4L2_EVENT_CTRL_CH_RANGE ctrl-changes-flags
|
||||
replace define V4L2_EVENT_CTRL_CH_DIMENSIONS ctrl-changes-flags
|
||||
|
||||
replace define V4L2_EVENT_SRC_CH_RESOLUTION src-changes-flags
|
||||
|
||||
|
@ -1020,7 +1020,8 @@ int __v4l2_ctrl_modify_dimensions(struct v4l2_ctrl *ctrl,
|
||||
for (i = 0; i < elems; i++)
|
||||
ctrl->type_ops->init(ctrl, i, ctrl->p_cur);
|
||||
cur_to_new(ctrl);
|
||||
send_event(NULL, ctrl, V4L2_EVENT_CTRL_CH_VALUE);
|
||||
send_event(NULL, ctrl, V4L2_EVENT_CTRL_CH_VALUE |
|
||||
V4L2_EVENT_CTRL_CH_DIMENSIONS);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(__v4l2_ctrl_modify_dimensions);
|
||||
|
@ -2435,6 +2435,7 @@ struct v4l2_event_vsync {
|
||||
#define V4L2_EVENT_CTRL_CH_VALUE (1 << 0)
|
||||
#define V4L2_EVENT_CTRL_CH_FLAGS (1 << 1)
|
||||
#define V4L2_EVENT_CTRL_CH_RANGE (1 << 2)
|
||||
#define V4L2_EVENT_CTRL_CH_DIMENSIONS (1 << 3)
|
||||
|
||||
struct v4l2_event_ctrl {
|
||||
__u32 changes;
|
||||
|
Loading…
x
Reference in New Issue
Block a user