From 7e060a1f1573031a7925ebba3789faf730c97ecb Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 8 Aug 2008 12:55:00 +0200 Subject: v4l2: add v4l2_ctrl_get_name control support function. From: Hans Verkuil Add function that returns the control name. Allows this to be used in places where the normal v4l2_ctrl_query_fill() function cannot be used (e.g. uvc). Priority: normal Signed-off-by: Hans Verkuil --- linux/include/media/v4l2-common.h | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/include/media/v4l2-common.h') diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h index 07d3a9a57..8b678e0d4 100644 --- a/linux/include/media/v4l2-common.h +++ b/linux/include/media/v4l2-common.h @@ -76,6 +76,7 @@ int v4l2_prio_check(struct v4l2_prio_state *global, enum v4l2_priority *local); int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl, const char **menu_items); +const char *v4l2_ctrl_get_name(u32 id); const char **v4l2_ctrl_get_menu(u32 id); int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 step, s32 def); int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl); -- cgit v1.2.3 From c43087924dbe5c50c0198979ed5a40e3e00c3bab Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 8 Aug 2008 13:34:19 +0200 Subject: v4l2: add v4l2_ctrl_query_menu_valid_items support function From: Hans Verkuil v4l2_ctrl_query_menu_valid_items() makes it easy to handle control menus that have a lot of invalid 'holes'. For example, many MPEG encoders only support a limited subset of audio bitrates. In that case a driver can specify an array listing the set of valid bitrates and pass that to this function. Priority: normal Signed-off-by: Hans Verkuil --- linux/include/media/v4l2-common.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'linux/include/media/v4l2-common.h') diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h index 8b678e0d4..0c195ccd4 100644 --- a/linux/include/media/v4l2-common.h +++ b/linux/include/media/v4l2-common.h @@ -82,6 +82,8 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl); int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu, struct v4l2_queryctrl *qctrl, const char **menu_items); +#define V4L2_CTRL_MENU_IDS_END (0xffffffff) +int v4l2_ctrl_query_menu_valid_items(struct v4l2_querymenu *qmenu, const u32 *ids); u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id); /* ------------------------------------------------------------------------- */ -- cgit v1.2.3