diff options
| author | Hans Verkuil <hverkuil@xs4all.nl> | 2011-01-11 12:45:03 -0500 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-01-19 08:45:32 -0500 |
| commit | 2a863793beaa0fc9ee7aeb87efe85544a6b129c0 (patch) | |
| tree | 9316b12b95a707eb5541db2e24d6033d9b0e2805 /Documentation | |
| parent | 45f6f84af3ae9db19f39bc5d0976d626b0ef626e (diff) | |
[media] v4l2-ctrls: v4l2_ctrl_handler_setup must set is_new to 1
Renamed has_new to is_new.
Drivers can use the is_new field to determine if a new value was specified
for a control. The v4l2_ctrl_handler_setup() must always set this to 1 since
the setup has to force a full update of all controls.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/video4linux/v4l2-controls.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt index 8773778d23f..881e7f44491 100644 --- a/Documentation/video4linux/v4l2-controls.txt +++ b/Documentation/video4linux/v4l2-controls.txt | |||
| @@ -285,6 +285,9 @@ implement g_volatile_ctrl like this: | |||
| 285 | The 'new value' union is not used in g_volatile_ctrl. In general controls | 285 | The 'new value' union is not used in g_volatile_ctrl. In general controls |
| 286 | that need to implement g_volatile_ctrl are read-only controls. | 286 | that need to implement g_volatile_ctrl are read-only controls. |
| 287 | 287 | ||
| 288 | Note that if one or more controls in a control cluster are marked as volatile, | ||
| 289 | then all the controls in the cluster are seen as volatile. | ||
| 290 | |||
| 288 | To mark a control as volatile you have to set the is_volatile flag: | 291 | To mark a control as volatile you have to set the is_volatile flag: |
| 289 | 292 | ||
| 290 | ctrl = v4l2_ctrl_new_std(&sd->ctrl_handler, ...); | 293 | ctrl = v4l2_ctrl_new_std(&sd->ctrl_handler, ...); |
| @@ -462,6 +465,15 @@ pointer to the v4l2_ctrl_ops struct that is used for that cluster. | |||
| 462 | Obviously, all controls in the cluster array must be initialized to either | 465 | Obviously, all controls in the cluster array must be initialized to either |
| 463 | a valid control or to NULL. | 466 | a valid control or to NULL. |
| 464 | 467 | ||
| 468 | In rare cases you might want to know which controls of a cluster actually | ||
| 469 | were set explicitly by the user. For this you can check the 'is_new' flag of | ||
| 470 | each control. For example, in the case of a volume/mute cluster the 'is_new' | ||
| 471 | flag of the mute control would be set if the user called VIDIOC_S_CTRL for | ||
| 472 | mute only. If the user would call VIDIOC_S_EXT_CTRLS for both mute and volume | ||
| 473 | controls, then the 'is_new' flag would be 1 for both controls. | ||
| 474 | |||
| 475 | The 'is_new' flag is always 1 when called from v4l2_ctrl_handler_setup(). | ||
| 476 | |||
| 465 | 477 | ||
| 466 | VIDIOC_LOG_STATUS Support | 478 | VIDIOC_LOG_STATUS Support |
| 467 | ========================= | 479 | ========================= |
