diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2011-06-07 08:53:37 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-07-27 16:53:20 -0400 |
commit | 85724983c4d212c24116d45f6585a1c4ff845dd3 (patch) | |
tree | df40b351ce71f73b99dad597e69b08c5ee1d5c35 /Documentation/DocBook | |
parent | ce7275747bd548e0da7425ba0b7edb6f2c7657a2 (diff) |
[media] V4L2 spec: document control events
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'Documentation/DocBook')
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-dqevent.xml | 17 | ||||
-rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml | 142 |
2 files changed, 157 insertions, 2 deletions
diff --git a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml index 4e0a7cc30812..b8c4f7657d69 100644 --- a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml +++ b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml | |||
@@ -81,6 +81,13 @@ | |||
81 | </row> | 81 | </row> |
82 | <row> | 82 | <row> |
83 | <entry></entry> | 83 | <entry></entry> |
84 | <entry>&v4l2-event-ctrl;</entry> | ||
85 | <entry><structfield>ctrl</structfield></entry> | ||
86 | <entry>Event data for event V4L2_EVENT_CTRL. | ||
87 | </entry> | ||
88 | </row> | ||
89 | <row> | ||
90 | <entry></entry> | ||
84 | <entry>__u8</entry> | 91 | <entry>__u8</entry> |
85 | <entry><structfield>data</structfield>[64]</entry> | 92 | <entry><structfield>data</structfield>[64]</entry> |
86 | <entry>Event data. Defined by the event type. The union | 93 | <entry>Event data. Defined by the event type. The union |
@@ -110,8 +117,16 @@ | |||
110 | <entry>Event timestamp.</entry> | 117 | <entry>Event timestamp.</entry> |
111 | </row> | 118 | </row> |
112 | <row> | 119 | <row> |
120 | <entry>u32</entry> | ||
121 | <entry><structfield>id</structfield></entry> | ||
122 | <entry></entry> | ||
123 | <entry>The ID associated with the event source. If the event does not | ||
124 | have an associated ID (this depends on the event type), then this | ||
125 | is 0.</entry> | ||
126 | </row> | ||
127 | <row> | ||
113 | <entry>__u32</entry> | 128 | <entry>__u32</entry> |
114 | <entry><structfield>reserved</structfield>[9]</entry> | 129 | <entry><structfield>reserved</structfield>[8]</entry> |
115 | <entry></entry> | 130 | <entry></entry> |
116 | <entry>Reserved for future extensions. Drivers must set | 131 | <entry>Reserved for future extensions. Drivers must set |
117 | the array to zero.</entry> | 132 | the array to zero.</entry> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml index 8b501791aa68..975f603a42ee 100644 --- a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml +++ b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml | |||
@@ -64,7 +64,19 @@ | |||
64 | </row> | 64 | </row> |
65 | <row> | 65 | <row> |
66 | <entry>__u32</entry> | 66 | <entry>__u32</entry> |
67 | <entry><structfield>reserved</structfield>[7]</entry> | 67 | <entry><structfield>id</structfield></entry> |
68 | <entry>ID of the event source. If there is no ID associated with | ||
69 | the event source, then set this to 0. Whether or not an event | ||
70 | needs an ID depends on the event type.</entry> | ||
71 | </row> | ||
72 | <row> | ||
73 | <entry>__u32</entry> | ||
74 | <entry><structfield>flags</structfield></entry> | ||
75 | <entry>Event flags, see <xref linkend="event-flags" />.</entry> | ||
76 | </row> | ||
77 | <row> | ||
78 | <entry>__u32</entry> | ||
79 | <entry><structfield>reserved</structfield>[5]</entry> | ||
68 | <entry>Reserved for future extensions. Drivers and applications | 80 | <entry>Reserved for future extensions. Drivers and applications |
69 | must set the array to zero.</entry> | 81 | must set the array to zero.</entry> |
70 | </row> | 82 | </row> |
@@ -100,6 +112,23 @@ | |||
100 | </entry> | 112 | </entry> |
101 | </row> | 113 | </row> |
102 | <row> | 114 | <row> |
115 | <entry><constant>V4L2_EVENT_CTRL</constant></entry> | ||
116 | <entry>3</entry> | ||
117 | <entry>This event requires that the <structfield>id</structfield> | ||
118 | matches the control ID from which you want to receive events. | ||
119 | This event is triggered if the control's value changes, if a | ||
120 | button control is pressed or if the control's flags change. | ||
121 | This event has &v4l2-event-ctrl; associated with it. This struct | ||
122 | contains much of the same information as &v4l2-queryctrl; and | ||
123 | &v4l2-control;. | ||
124 | |||
125 | If the event is generated due to a call to &VIDIOC-S-CTRL; or | ||
126 | &VIDIOC-S-EXT-CTRLS;, then the event will not be sent to | ||
127 | the file handle that called the ioctl function. This prevents | ||
128 | nasty feedback loops. | ||
129 | </entry> | ||
130 | </row> | ||
131 | <row> | ||
103 | <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry> | 132 | <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry> |
104 | <entry>0x08000000</entry> | 133 | <entry>0x08000000</entry> |
105 | <entry>Base event number for driver-private events.</entry> | 134 | <entry>Base event number for driver-private events.</entry> |
@@ -108,6 +137,23 @@ | |||
108 | </tgroup> | 137 | </tgroup> |
109 | </table> | 138 | </table> |
110 | 139 | ||
140 | <table pgwide="1" frame="none" id="event-flags"> | ||
141 | <title>Event Flags</title> | ||
142 | <tgroup cols="3"> | ||
143 | &cs-def; | ||
144 | <tbody valign="top"> | ||
145 | <row> | ||
146 | <entry><constant>V4L2_EVENT_SUB_FL_SEND_INITIAL</constant></entry> | ||
147 | <entry>0x0001</entry> | ||
148 | <entry>When this event is subscribed an initial event will be sent | ||
149 | containing the current status. This only makes sense for events | ||
150 | that are triggered by a status change. Other events will ignore | ||
151 | this flag.</entry> | ||
152 | </row> | ||
153 | </tbody> | ||
154 | </tgroup> | ||
155 | </table> | ||
156 | |||
111 | <table frame="none" pgwide="1" id="v4l2-event-vsync"> | 157 | <table frame="none" pgwide="1" id="v4l2-event-vsync"> |
112 | <title>struct <structname>v4l2_event_vsync</structname></title> | 158 | <title>struct <structname>v4l2_event_vsync</structname></title> |
113 | <tgroup cols="3"> | 159 | <tgroup cols="3"> |
@@ -122,6 +168,100 @@ | |||
122 | </tgroup> | 168 | </tgroup> |
123 | </table> | 169 | </table> |
124 | 170 | ||
171 | <table frame="none" pgwide="1" id="v4l2-event-ctrl"> | ||
172 | <title>struct <structname>v4l2_event_ctrl</structname></title> | ||
173 | <tgroup cols="4"> | ||
174 | &cs-str; | ||
175 | <tbody valign="top"> | ||
176 | <row> | ||
177 | <entry>__u32</entry> | ||
178 | <entry><structfield>changes</structfield></entry> | ||
179 | <entry></entry> | ||
180 | <entry>A bitmask that tells what has changed. See <xref linkend="changes-flags" />.</entry> | ||
181 | </row> | ||
182 | <row> | ||
183 | <entry>__u32</entry> | ||
184 | <entry><structfield>type</structfield></entry> | ||
185 | <entry></entry> | ||
186 | <entry>The type of the control. See &v4l2-ctrl-type;.</entry> | ||
187 | </row> | ||
188 | <row> | ||
189 | <entry>union (anonymous)</entry> | ||
190 | <entry></entry> | ||
191 | <entry></entry> | ||
192 | <entry></entry> | ||
193 | </row> | ||
194 | <row> | ||
195 | <entry></entry> | ||
196 | <entry>__s32</entry> | ||
197 | <entry><structfield>value</structfield></entry> | ||
198 | <entry>The 32-bit value of the control for 32-bit control types. | ||
199 | This is 0 for string controls since the value of a string | ||
200 | cannot be passed using &VIDIOC-DQEVENT;.</entry> | ||
201 | </row> | ||
202 | <row> | ||
203 | <entry></entry> | ||
204 | <entry>__s64</entry> | ||
205 | <entry><structfield>value64</structfield></entry> | ||
206 | <entry>The 64-bit value of the control for 64-bit control types.</entry> | ||
207 | </row> | ||
208 | <row> | ||
209 | <entry>__u32</entry> | ||
210 | <entry><structfield>flags</structfield></entry> | ||
211 | <entry></entry> | ||
212 | <entry>The control flags. See <xref linkend="control-flags" />.</entry> | ||
213 | </row> | ||
214 | <row> | ||
215 | <entry>__s32</entry> | ||
216 | <entry><structfield>minimum</structfield></entry> | ||
217 | <entry></entry> | ||
218 | <entry>The minimum value of the control. See &v4l2-queryctrl;.</entry> | ||
219 | </row> | ||
220 | <row> | ||
221 | <entry>__s32</entry> | ||
222 | <entry><structfield>maximum</structfield></entry> | ||
223 | <entry></entry> | ||
224 | <entry>The maximum value of the control. See &v4l2-queryctrl;.</entry> | ||
225 | </row> | ||
226 | <row> | ||
227 | <entry>__s32</entry> | ||
228 | <entry><structfield>step</structfield></entry> | ||
229 | <entry></entry> | ||
230 | <entry>The step value of the control. See &v4l2-queryctrl;.</entry> | ||
231 | </row> | ||
232 | <row> | ||
233 | <entry>__s32</entry> | ||
234 | <entry><structfield>default_value</structfield></entry> | ||
235 | <entry></entry> | ||
236 | <entry>The default value value of the control. See &v4l2-queryctrl;.</entry> | ||
237 | </row> | ||
238 | </tbody> | ||
239 | </tgroup> | ||
240 | </table> | ||
241 | |||
242 | <table pgwide="1" frame="none" id="changes-flags"> | ||
243 | <title>Changes</title> | ||
244 | <tgroup cols="3"> | ||
245 | &cs-def; | ||
246 | <tbody valign="top"> | ||
247 | <row> | ||
248 | <entry><constant>V4L2_EVENT_CTRL_CH_VALUE</constant></entry> | ||
249 | <entry>0x0001</entry> | ||
250 | <entry>This control event was triggered because the value of the control | ||
251 | changed. Special case: if a button control is pressed, then this | ||
252 | event is sent as well, even though there is not explicit value | ||
253 | associated with a button control.</entry> | ||
254 | </row> | ||
255 | <row> | ||
256 | <entry><constant>V4L2_EVENT_CTRL_CH_FLAGS</constant></entry> | ||
257 | <entry>0x0002</entry> | ||
258 | <entry>This control event was triggered because the control flags | ||
259 | changed.</entry> | ||
260 | </row> | ||
261 | </tbody> | ||
262 | </tgroup> | ||
263 | </table> | ||
264 | |||
125 | </refsect1> | 265 | </refsect1> |
126 | </refentry> | 266 | </refentry> |
127 | <!-- | 267 | <!-- |