summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2014-06-12 07:55:21 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-17 11:57:18 -0300
commit20d88eef66a86989ea3cffe2a4e0d16cbf2d4563 (patch)
treef59c3f0aea4fc3e50e79e9ef0399d0dfcec4dfa4 /include/media
parent2a9ec3731137f973c6289698de6566a25418b96f (diff)
[media] v4l2-ctrls: prepare for array support
Add dims, nr_of_dims and elems fields to the core control structures in preparation for N-dimensional array support. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r--include/media/v4l2-ctrls.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-ctrls.h
index eb69c52e2f64..d30da09b7b69 100644
--- a/include/media/v4l2-ctrls.h
+++ b/include/media/v4l2-ctrls.h
@@ -129,7 +129,10 @@ typedef void (*v4l2_ctrl_notify_fnc)(struct v4l2_ctrl *ctrl, void *priv);
* @maximum: The control's maximum value.
* @default_value: The control's default value.
* @step: The control's step value for non-menu controls.
+ * @elems: The number of elements in the N-dimensional array.
* @elem_size: The size in bytes of the control.
+ * @dims: The size of each dimension.
+ * @nr_of_dims:The number of dimensions in @dims.
* @menu_skip_mask: The control's skip mask for menu controls. This makes it
* easy to skip menu items that are not valid. If bit X is set,
* then menu item X is skipped. Of course, this only works for
@@ -176,7 +179,10 @@ struct v4l2_ctrl {
const char *name;
enum v4l2_ctrl_type type;
s64 minimum, maximum, default_value;
+ u32 elems;
u32 elem_size;
+ u32 dims[V4L2_CTRL_MAX_DIMS];
+ u32 nr_of_dims;
union {
u64 step;
u64 menu_skip_mask;
@@ -255,6 +261,7 @@ struct v4l2_ctrl_handler {
* @max: The control's maximum value.
* @step: The control's step value for non-menu controls.
* @def: The control's default value.
+ * @dims: The size of each dimension.
* @elem_size: The size in bytes of the control.
* @flags: The control's flags.
* @menu_skip_mask: The control's skip mask for menu controls. This makes it
@@ -280,6 +287,7 @@ struct v4l2_ctrl_config {
s64 max;
u64 step;
s64 def;
+ u32 dims[V4L2_CTRL_MAX_DIMS];
u32 elem_size;
u32 flags;
u64 menu_skip_mask;