1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct v4l2_ctrl</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux Device Drivers"><link rel="up" href="mediadev.html#id-1.8.2" title="Video2Linux devices"><link rel="prev" href="API-struct-v4l2-ctrl-type-ops.html" title="struct v4l2_ctrl_type_ops"><link rel="next" href="API-struct-v4l2-ctrl-ref.html" title="struct v4l2_ctrl_ref"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct v4l2_ctrl</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-v4l2-ctrl-type-ops.html">Prev</a> </td><th width="60%" align="center">Video2Linux devices</th><td width="20%" align="right"> <a accesskey="n" href="API-struct-v4l2-ctrl-ref.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-v4l2-ctrl"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct v4l2_ctrl — 
2     The control structure.
3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting">
4struct v4l2_ctrl {
5  struct list_head node;
6  struct list_head ev_subs;
7  struct v4l2_ctrl_handler * handler;
8  struct v4l2_ctrl ** cluster;
9  unsigned ncontrols;
10  unsigned int done:1;
11  unsigned int is_new:1;
12  unsigned int has_changed:1;
13  unsigned int is_private:1;
14  unsigned int is_auto:1;
15  unsigned int is_int:1;
16  unsigned int is_string:1;
17  unsigned int is_ptr:1;
18  unsigned int is_array:1;
19  unsigned int has_volatiles:1;
20  unsigned int call_notify:1;
21  unsigned int manual_mode_value:8;
22  const struct v4l2_ctrl_ops * ops;
23  const struct v4l2_ctrl_type_ops * type_ops;
24  u32 id;
25  const char * name;
26  enum v4l2_ctrl_type type;
27  s64 minimum;
28  s64 maximum;
29  s64 default_value;
30  u32 elems;
31  u32 elem_size;
32  u32 dims[V4L2_CTRL_MAX_DIMS];
33  u32 nr_of_dims;
34  union cur;
35  union v4l2_ctrl_ptr p_new;
36  union v4l2_ctrl_ptr p_cur;
37};  </pre></div><div class="refsect1"><a name="id-1.8.2.16.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">node</span></dt><dd><p>
38   The list node.
39      </p></dd><dt><span class="term">ev_subs</span></dt><dd><p>
40   The list of control event subscriptions.
41      </p></dd><dt><span class="term">handler</span></dt><dd><p>
42   The handler that owns the control.
43      </p></dd><dt><span class="term">cluster</span></dt><dd><p>
44   Point to start of cluster array.
45      </p></dd><dt><span class="term">ncontrols</span></dt><dd><p>
46   Number of controls in cluster array.
47      </p></dd><dt><span class="term">done</span></dt><dd><p>
48   Internal flag: set for each processed control.
49      </p></dd><dt><span class="term">is_new</span></dt><dd><p>
50   Set when the user specified a new value for this control. It
51   is also set when called from v4l2_ctrl_handler_setup. Drivers
52   should never set this flag.
53      </p></dd><dt><span class="term">has_changed</span></dt><dd><p>
54   Set when the current value differs from the new value. Drivers
55   should never use this flag.
56      </p></dd><dt><span class="term">is_private</span></dt><dd><p>
57   If set, then this control is private to its handler and it
58   will not be added to any other handlers. Drivers can set
59   this flag.
60      </p></dd><dt><span class="term">is_auto</span></dt><dd><p>
61   If set, then this control selects whether the other cluster
62   members are in 'automatic' mode or 'manual' mode. This is
63   used for autogain/gain type clusters. Drivers should never
64   set this flag directly.
65      </p></dd><dt><span class="term">is_int</span></dt><dd><p>
66   If set, then this control has a simple integer value (i.e. it
67   uses ctrl-&gt;val).
68      </p></dd><dt><span class="term">is_string</span></dt><dd><p>
69   If set, then this control has type V4L2_CTRL_TYPE_STRING.
70      </p></dd><dt><span class="term">is_ptr</span></dt><dd><p>
71   If set, then this control is an array and/or has type &gt;= V4L2_CTRL_COMPOUND_TYPES
72   and/or has type V4L2_CTRL_TYPE_STRING. In other words, struct
73   v4l2_ext_control uses field p to point to the data.
74      </p></dd><dt><span class="term">is_array</span></dt><dd><p>
75   If set, then this control contains an N-dimensional array.
76      </p></dd><dt><span class="term">has_volatiles</span></dt><dd><p>
77   If set, then one or more members of the cluster are volatile.
78   Drivers should never touch this flag.
79      </p></dd><dt><span class="term">call_notify</span></dt><dd><p>
80   If set, then call the handler's notify function whenever the
81   control's value changes.
82      </p></dd><dt><span class="term">manual_mode_value</span></dt><dd><p>
83   If the is_auto flag is set, then this is the value
84   of the auto control that determines if that control is in
85   manual mode. So if the value of the auto control equals this
86   value, then the whole cluster is in manual mode. Drivers should
87   never set this flag directly.
88      </p></dd><dt><span class="term">ops</span></dt><dd><p>
89   The control ops.
90      </p></dd><dt><span class="term">type_ops</span></dt><dd><p>
91   The control type ops.
92      </p></dd><dt><span class="term">id</span></dt><dd><p>
93   The control ID.
94      </p></dd><dt><span class="term">name</span></dt><dd><p>
95   The control name.
96      </p></dd><dt><span class="term">type</span></dt><dd><p>
97   The control type.
98      </p></dd><dt><span class="term">minimum</span></dt><dd><p>
99   The control's minimum value.
100      </p></dd><dt><span class="term">maximum</span></dt><dd><p>
101   The control's maximum value.
102      </p></dd><dt><span class="term">default_value</span></dt><dd><p>
103   The control's default value.
104      </p></dd><dt><span class="term">elems</span></dt><dd><p>
105   The number of elements in the N-dimensional array.
106      </p></dd><dt><span class="term">elem_size</span></dt><dd><p>
107   The size in bytes of the control.
108      </p></dd><dt><span class="term">dims[V4L2_CTRL_MAX_DIMS]</span></dt><dd><p>
109   The size of each dimension.
110      </p></dd><dt><span class="term">nr_of_dims</span></dt><dd><p>
111   The number of dimensions in <em class="parameter"><code>dims</code></em>.
112      </p></dd><dt><span class="term">cur</span></dt><dd><p>
113   The control's current value.
114      </p></dd><dt><span class="term">p_new</span></dt><dd><p>
115   The control's new value represented via an union with provides
116   a standard way of accessing control types
117   through a pointer.
118      </p></dd><dt><span class="term">p_cur</span></dt><dd><p>
119   The control's current value represented via an union with
120   provides a standard way of accessing control types
121   through a pointer.
122      </p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-v4l2-ctrl-type-ops.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="mediadev.html#id-1.8.2">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-struct-v4l2-ctrl-ref.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct v4l2_ctrl_type_ops</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">struct v4l2_ctrl_ref</span></td></tr></table></div></body></html>
123