summaryrefslogtreecommitdiff
path: root/linux/include/media
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2006-06-18 19:11:08 +0200
committerHans Verkuil <hverkuil@xs4all.nl>2006-06-18 19:11:08 +0200
commit1a96c8458e3bc1a8fd44dd305323a254e7776443 (patch)
treeecd66c75cd888c1fdaa584d36d07353ee8a7fae2 /linux/include/media
parent13df997912f6bd6191afa971517b5dd138c2a013 (diff)
downloadmediapointer-dvb-s2-1a96c8458e3bc1a8fd44dd305323a254e7776443.tar.gz
mediapointer-dvb-s2-1a96c8458e3bc1a8fd44dd305323a254e7776443.tar.bz2
Add helper functions for control processing to v4l2-common.
From: Hans Verkuil <hverkuil@xs4all.nl> 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>
Diffstat (limited to 'linux/include/media')
-rw-r--r--linux/include/media/v4l2-common.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h
index f1d7a063a..98976fd3b 100644
--- a/linux/include/media/v4l2-common.h
+++ b/linux/include/media/v4l2-common.h
@@ -90,6 +90,19 @@ extern void v4l_printk_ioctl_arg(char *s,unsigned int cmd, void *arg);
/* ------------------------------------------------------------------------- */
+/* Control helper functions */
+
+int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl,
+ const char **menu_items);
+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);
+int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu,
+ struct v4l2_queryctrl *qctrl, const char **menu_items);
+u32 v4l2_ctrl_next(const u32 * const *ctrl_classes, u32 id);
+
+/* ------------------------------------------------------------------------- */
+
/* Internal ioctls */
/* VIDIOC_INT_G_REGISTER and VIDIOC_INT_S_REGISTER */