diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2012-09-14 06:15:03 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-10-01 16:07:07 -0400 |
commit | 34a6b7d093d8fe738ada191b36648d00bc18b7eb (patch) | |
tree | 854584731068996a381af03b95884911c07074b5 /Documentation/video4linux/v4l2-controls.txt | |
parent | a4f64407b9b33122a58cb78afd73f86d4bb022c4 (diff) |
[media] v4l2-ctrls: add a filter function to v4l2_ctrl_add_handler
With a filter function you can control more precisely which controls
are added. This is useful in particular for radio device nodes for
combined TV/Radio cards where you want to show just the radio-specific
controls and not controls like brightness.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/video4linux/v4l2-controls.txt')
-rw-r--r-- | Documentation/video4linux/v4l2-controls.txt | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Documentation/video4linux/v4l2-controls.txt b/Documentation/video4linux/v4l2-controls.txt index 43da22b89728..54270df99d5c 100644 --- a/Documentation/video4linux/v4l2-controls.txt +++ b/Documentation/video4linux/v4l2-controls.txt | |||
@@ -594,7 +594,11 @@ handler and finally add the first handler to the second. For example: | |||
594 | v4l2_ctrl_new_std(&radio_ctrl_handler, &radio_ops, V4L2_CID_AUDIO_MUTE, ...); | 594 | v4l2_ctrl_new_std(&radio_ctrl_handler, &radio_ops, V4L2_CID_AUDIO_MUTE, ...); |
595 | v4l2_ctrl_new_std(&video_ctrl_handler, &video_ops, V4L2_CID_BRIGHTNESS, ...); | 595 | v4l2_ctrl_new_std(&video_ctrl_handler, &video_ops, V4L2_CID_BRIGHTNESS, ...); |
596 | v4l2_ctrl_new_std(&video_ctrl_handler, &video_ops, V4L2_CID_CONTRAST, ...); | 596 | v4l2_ctrl_new_std(&video_ctrl_handler, &video_ops, V4L2_CID_CONTRAST, ...); |
597 | v4l2_ctrl_add_handler(&video_ctrl_handler, &radio_ctrl_handler); | 597 | v4l2_ctrl_add_handler(&video_ctrl_handler, &radio_ctrl_handler, NULL); |
598 | |||
599 | The last argument to v4l2_ctrl_add_handler() is a filter function that allows | ||
600 | you to filter which controls will be added. Set it to NULL if you want to add | ||
601 | all controls. | ||
598 | 602 | ||
599 | Or you can add specific controls to a handler: | 603 | Or you can add specific controls to a handler: |
600 | 604 | ||