diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2006-06-18 13:11:08 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 01:05:21 -0400 |
commit | 9cb2318b885d2039eeb3eb5394fa215046be058f (patch) | |
tree | 2289616dbbbd60ac93ce56e43c0eaec27bf65604 /include/media | |
parent | 0597691456cf3b08974d9949e4caa830e1d3c520 (diff) |
V4L/DVB (4190): Add helper functions for control processing to v4l2-common.
Control processing is often duplicated in the various drivers. Unfortunately,
simple things like the names of controls are often different between drivers,
even though it is the same controls. Adding in the new extended controls and
the need for having control helper functions became apparent.
Several functions have now been added to v4l2-common to do things like
filling the v4l2_queryctrl and v4l2_querymenu structs, to check for
valid control input and to move to the next control when enumerating
over all controls.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/v4l2-common.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/media/v4l2-common.h b/include/media/v4l2-common.h index 1440d4ab6af9..5564db13c0d5 100644 --- a/include/media/v4l2-common.h +++ b/include/media/v4l2-common.h | |||
@@ -84,6 +84,19 @@ extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg); | |||
84 | 84 | ||
85 | /* ------------------------------------------------------------------------- */ | 85 | /* ------------------------------------------------------------------------- */ |
86 | 86 | ||
87 | /* Control helper functions */ | ||
88 | |||
89 | int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl, | ||
90 | const char **menu_items); | ||
91 | const char **v4l2_ctrl_get_menu(u32 id); | ||
92 | int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 step, s32 def); | ||
93 | int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl); | ||
94 | int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu, | ||
95 | struct v4l2_queryctrl *qctrl, const char **menu_items); | ||
96 | u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id); | ||
97 | |||
98 | /* ------------------------------------------------------------------------- */ | ||
99 | |||
87 | /* Internal ioctls */ | 100 | /* Internal ioctls */ |
88 | 101 | ||
89 | /* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ | 102 | /* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */ |