diff options
| author | Hans Verkuil <hverkuil@xs4all.nl> | 2015-03-18 06:05:31 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-04-02 21:04:07 -0400 |
| commit | b766586b1a87c5417ee6d1f3806f06ccfc335277 (patch) | |
| tree | 0f66ce380a83c11b8e756b3941f71280c51fa430 /Documentation/DocBook | |
| parent | 9a68c9fa760c958653def811ed7257e3e9bb2ee5 (diff) | |
[media] DocBook media: improve event documentation
It always annoyed me that the event type documentation was separate from the struct
v4l2_event documentation. This patch moves it all to one place, VIDIOC_DQEVENT.
This makes much more sense.
Also changed the 'changes-flags' ref to 'ctrl-changes-flags' since this referred to
control changes. There is a src-changes-flags as well, so 'changes-flags' was a bit
vague.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'Documentation/DocBook')
| -rw-r--r-- | Documentation/DocBook/media/v4l/compat.xml | 2 | ||||
| -rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-dqevent.xml | 115 | ||||
| -rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml | 111 |
3 files changed, 115 insertions, 113 deletions
diff --git a/Documentation/DocBook/media/v4l/compat.xml b/Documentation/DocBook/media/v4l/compat.xml index 350dfb3d71ea..a0aef85d33c1 100644 --- a/Documentation/DocBook/media/v4l/compat.xml +++ b/Documentation/DocBook/media/v4l/compat.xml | |||
| @@ -2491,7 +2491,7 @@ that used it. It was originally scheduled for removal in 2.6.35. | |||
| 2491 | </listitem> | 2491 | </listitem> |
| 2492 | <listitem> | 2492 | <listitem> |
| 2493 | <para>Added <constant>V4L2_EVENT_CTRL_CH_RANGE</constant> control event | 2493 | <para>Added <constant>V4L2_EVENT_CTRL_CH_RANGE</constant> control event |
| 2494 | changes flag. See <xref linkend="changes-flags"/>.</para> | 2494 | changes flag. See <xref linkend="ctrl-changes-flags"/>.</para> |
| 2495 | </listitem> | 2495 | </listitem> |
| 2496 | </orderedlist> | 2496 | </orderedlist> |
| 2497 | </section> | 2497 | </section> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml index b036f8963353..a31eea07d455 100644 --- a/Documentation/DocBook/media/v4l/vidioc-dqevent.xml +++ b/Documentation/DocBook/media/v4l/vidioc-dqevent.xml | |||
| @@ -64,7 +64,7 @@ | |||
| 64 | <entry>__u32</entry> | 64 | <entry>__u32</entry> |
| 65 | <entry><structfield>type</structfield></entry> | 65 | <entry><structfield>type</structfield></entry> |
| 66 | <entry></entry> | 66 | <entry></entry> |
| 67 | <entry>Type of the event.</entry> | 67 | <entry>Type of the event, see <xref linkend="event-type" />.</entry> |
| 68 | </row> | 68 | </row> |
| 69 | <row> | 69 | <row> |
| 70 | <entry>union</entry> | 70 | <entry>union</entry> |
| @@ -154,6 +154,113 @@ | |||
| 154 | </tgroup> | 154 | </tgroup> |
| 155 | </table> | 155 | </table> |
| 156 | 156 | ||
| 157 | <table frame="none" pgwide="1" id="event-type"> | ||
| 158 | <title>Event Types</title> | ||
| 159 | <tgroup cols="3"> | ||
| 160 | &cs-def; | ||
| 161 | <tbody valign="top"> | ||
| 162 | <row> | ||
| 163 | <entry><constant>V4L2_EVENT_ALL</constant></entry> | ||
| 164 | <entry>0</entry> | ||
| 165 | <entry>All events. V4L2_EVENT_ALL is valid only for | ||
| 166 | VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once. | ||
| 167 | </entry> | ||
| 168 | </row> | ||
| 169 | <row> | ||
| 170 | <entry><constant>V4L2_EVENT_VSYNC</constant></entry> | ||
| 171 | <entry>1</entry> | ||
| 172 | <entry>This event is triggered on the vertical sync. | ||
| 173 | This event has a &v4l2-event-vsync; associated with it. | ||
| 174 | </entry> | ||
| 175 | </row> | ||
| 176 | <row> | ||
| 177 | <entry><constant>V4L2_EVENT_EOS</constant></entry> | ||
| 178 | <entry>2</entry> | ||
| 179 | <entry>This event is triggered when the end of a stream is reached. | ||
| 180 | This is typically used with MPEG decoders to report to the application | ||
| 181 | when the last of the MPEG stream has been decoded. | ||
| 182 | </entry> | ||
| 183 | </row> | ||
| 184 | <row> | ||
| 185 | <entry><constant>V4L2_EVENT_CTRL</constant></entry> | ||
| 186 | <entry>3</entry> | ||
| 187 | <entry><para>This event requires that the <structfield>id</structfield> | ||
| 188 | matches the control ID from which you want to receive events. | ||
| 189 | This event is triggered if the control's value changes, if a | ||
| 190 | button control is pressed or if the control's flags change. | ||
| 191 | This event has a &v4l2-event-ctrl; associated with it. This struct | ||
| 192 | contains much of the same information as &v4l2-queryctrl; and | ||
| 193 | &v4l2-control;.</para> | ||
| 194 | |||
| 195 | <para>If the event is generated due to a call to &VIDIOC-S-CTRL; or | ||
| 196 | &VIDIOC-S-EXT-CTRLS;, then the event will <emphasis>not</emphasis> be sent to | ||
| 197 | the file handle that called the ioctl function. This prevents | ||
| 198 | nasty feedback loops. If you <emphasis>do</emphasis> want to get the | ||
| 199 | event, then set the <constant>V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK</constant> | ||
| 200 | flag. | ||
| 201 | </para> | ||
| 202 | |||
| 203 | <para>This event type will ensure that no information is lost when | ||
| 204 | more events are raised than there is room internally. In that | ||
| 205 | case the &v4l2-event-ctrl; of the second-oldest event is kept, | ||
| 206 | but the <structfield>changes</structfield> field of the | ||
| 207 | second-oldest event is ORed with the <structfield>changes</structfield> | ||
| 208 | field of the oldest event.</para> | ||
| 209 | </entry> | ||
| 210 | </row> | ||
| 211 | <row> | ||
| 212 | <entry><constant>V4L2_EVENT_FRAME_SYNC</constant></entry> | ||
| 213 | <entry>4</entry> | ||
| 214 | <entry> | ||
| 215 | <para>Triggered immediately when the reception of a | ||
| 216 | frame has begun. This event has a | ||
| 217 | &v4l2-event-frame-sync; associated with it.</para> | ||
| 218 | |||
| 219 | <para>If the hardware needs to be stopped in the case of a | ||
| 220 | buffer underrun it might not be able to generate this event. | ||
| 221 | In such cases the <structfield>frame_sequence</structfield> | ||
| 222 | field in &v4l2-event-frame-sync; will not be incremented. This | ||
| 223 | causes two consecutive frame sequence numbers to have n times | ||
| 224 | frame interval in between them.</para> | ||
| 225 | </entry> | ||
| 226 | </row> | ||
| 227 | <row> | ||
| 228 | <entry><constant>V4L2_EVENT_SOURCE_CHANGE</constant></entry> | ||
| 229 | <entry>5</entry> | ||
| 230 | <entry> | ||
| 231 | <para>This event is triggered when a source parameter change is | ||
| 232 | detected during runtime by the video device. It can be a | ||
| 233 | runtime resolution change triggered by a video decoder or the | ||
| 234 | format change happening on an input connector. | ||
| 235 | This event requires that the <structfield>id</structfield> | ||
| 236 | matches the input index (when used with a video device node) | ||
| 237 | or the pad index (when used with a subdevice node) from which | ||
| 238 | you want to receive events.</para> | ||
| 239 | |||
| 240 | <para>This event has a &v4l2-event-src-change; associated | ||
| 241 | with it. The <structfield>changes</structfield> bitfield denotes | ||
| 242 | what has changed for the subscribed pad. If multiple events | ||
| 243 | occurred before application could dequeue them, then the changes | ||
| 244 | will have the ORed value of all the events generated.</para> | ||
| 245 | </entry> | ||
| 246 | </row> | ||
| 247 | <row> | ||
| 248 | <entry><constant>V4L2_EVENT_MOTION_DET</constant></entry> | ||
| 249 | <entry>6</entry> | ||
| 250 | <entry> | ||
| 251 | <para>Triggered whenever the motion detection state for one or more of the regions | ||
| 252 | changes. This event has a &v4l2-event-motion-det; associated with it.</para> | ||
| 253 | </entry> | ||
| 254 | </row> | ||
| 255 | <row> | ||
| 256 | <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry> | ||
| 257 | <entry>0x08000000</entry> | ||
| 258 | <entry>Base event number for driver-private events.</entry> | ||
| 259 | </row> | ||
| 260 | </tbody> | ||
| 261 | </tgroup> | ||
| 262 | </table> | ||
| 263 | |||
| 157 | <table frame="none" pgwide="1" id="v4l2-event-vsync"> | 264 | <table frame="none" pgwide="1" id="v4l2-event-vsync"> |
| 158 | <title>struct <structname>v4l2_event_vsync</structname></title> | 265 | <title>struct <structname>v4l2_event_vsync</structname></title> |
| 159 | <tgroup cols="3"> | 266 | <tgroup cols="3"> |
| @@ -177,7 +284,7 @@ | |||
| 177 | <entry>__u32</entry> | 284 | <entry>__u32</entry> |
| 178 | <entry><structfield>changes</structfield></entry> | 285 | <entry><structfield>changes</structfield></entry> |
| 179 | <entry></entry> | 286 | <entry></entry> |
| 180 | <entry>A bitmask that tells what has changed. See <xref linkend="changes-flags" />.</entry> | 287 | <entry>A bitmask that tells what has changed. See <xref linkend="ctrl-changes-flags" />.</entry> |
| 181 | </row> | 288 | </row> |
| 182 | <row> | 289 | <row> |
| 183 | <entry>__u32</entry> | 290 | <entry>__u32</entry> |
| @@ -309,8 +416,8 @@ | |||
| 309 | </tgroup> | 416 | </tgroup> |
| 310 | </table> | 417 | </table> |
| 311 | 418 | ||
| 312 | <table pgwide="1" frame="none" id="changes-flags"> | 419 | <table pgwide="1" frame="none" id="ctrl-changes-flags"> |
| 313 | <title>Changes</title> | 420 | <title>Control Changes</title> |
| 314 | <tgroup cols="3"> | 421 | <tgroup cols="3"> |
| 315 | &cs-def; | 422 | &cs-def; |
| 316 | <tbody valign="top"> | 423 | <tbody valign="top"> |
diff --git a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml index d7c9365ecdbe..d0332f610929 100644 --- a/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml +++ b/Documentation/DocBook/media/v4l/vidioc-subscribe-event.xml | |||
| @@ -60,7 +60,9 @@ | |||
| 60 | <row> | 60 | <row> |
| 61 | <entry>__u32</entry> | 61 | <entry>__u32</entry> |
| 62 | <entry><structfield>type</structfield></entry> | 62 | <entry><structfield>type</structfield></entry> |
| 63 | <entry>Type of the event.</entry> | 63 | <entry>Type of the event, see <xref linkend="event-type" />. Note that |
| 64 | <constant>V4L2_EVENT_ALL</constant> can be used with VIDIOC_UNSUBSCRIBE_EVENT | ||
| 65 | for unsubscribing all events at once.</entry> | ||
| 64 | </row> | 66 | </row> |
| 65 | <row> | 67 | <row> |
| 66 | <entry>__u32</entry> | 68 | <entry>__u32</entry> |
| @@ -84,113 +86,6 @@ | |||
| 84 | </tgroup> | 86 | </tgroup> |
| 85 | </table> | 87 | </table> |
| 86 | 88 | ||
| 87 | <table frame="none" pgwide="1" id="event-type"> | ||
| 88 | <title>Event Types</title> | ||
| 89 | <tgroup cols="3"> | ||
| 90 | &cs-def; | ||
| 91 | <tbody valign="top"> | ||
| 92 | <row> | ||
| 93 | <entry><constant>V4L2_EVENT_ALL</constant></entry> | ||
| 94 | <entry>0</entry> | ||
| 95 | <entry>All events. V4L2_EVENT_ALL is valid only for | ||
| 96 | VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once. | ||
| 97 | </entry> | ||
| 98 | </row> | ||
| 99 | <row> | ||
| 100 | <entry><constant>V4L2_EVENT_VSYNC</constant></entry> | ||
| 101 | <entry>1</entry> | ||
| 102 | <entry>This event is triggered on the vertical sync. | ||
| 103 | This event has a &v4l2-event-vsync; associated with it. | ||
| 104 | </entry> | ||
| 105 | </row> | ||
| 106 | <row> | ||
| 107 | <entry><constant>V4L2_EVENT_EOS</constant></entry> | ||
| 108 | <entry>2</entry> | ||
| 109 | <entry>This event is triggered when the end of a stream is reached. | ||
| 110 | This is typically used with MPEG decoders to report to the application | ||
| 111 | when the last of the MPEG stream has been decoded. | ||
| 112 | </entry> | ||
| 113 | </row> | ||
| 114 | <row> | ||
| 115 | <entry><constant>V4L2_EVENT_CTRL</constant></entry> | ||
| 116 | <entry>3</entry> | ||
| 117 | <entry><para>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 a &v4l2-event-ctrl; associated with it. This struct | ||
| 122 | contains much of the same information as &v4l2-queryctrl; and | ||
| 123 | &v4l2-control;.</para> | ||
| 124 | |||
| 125 | <para>If the event is generated due to a call to &VIDIOC-S-CTRL; or | ||
| 126 | &VIDIOC-S-EXT-CTRLS;, then the event will <emphasis>not</emphasis> be sent to | ||
| 127 | the file handle that called the ioctl function. This prevents | ||
| 128 | nasty feedback loops. If you <emphasis>do</emphasis> want to get the | ||
| 129 | event, then set the <constant>V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK</constant> | ||
| 130 | flag. | ||
| 131 | </para> | ||
| 132 | |||
| 133 | <para>This event type will ensure that no information is lost when | ||
| 134 | more events are raised than there is room internally. In that | ||
| 135 | case the &v4l2-event-ctrl; of the second-oldest event is kept, | ||
| 136 | but the <structfield>changes</structfield> field of the | ||
| 137 | second-oldest event is ORed with the <structfield>changes</structfield> | ||
| 138 | field of the oldest event.</para> | ||
| 139 | </entry> | ||
| 140 | </row> | ||
| 141 | <row> | ||
| 142 | <entry><constant>V4L2_EVENT_FRAME_SYNC</constant></entry> | ||
| 143 | <entry>4</entry> | ||
| 144 | <entry> | ||
| 145 | <para>Triggered immediately when the reception of a | ||
| 146 | frame has begun. This event has a | ||
| 147 | &v4l2-event-frame-sync; associated with it.</para> | ||
| 148 | |||
| 149 | <para>If the hardware needs to be stopped in the case of a | ||
| 150 | buffer underrun it might not be able to generate this event. | ||
| 151 | In such cases the <structfield>frame_sequence</structfield> | ||
| 152 | field in &v4l2-event-frame-sync; will not be incremented. This | ||
| 153 | causes two consecutive frame sequence numbers to have n times | ||
| 154 | frame interval in between them.</para> | ||
| 155 | </entry> | ||
| 156 | </row> | ||
| 157 | <row> | ||
| 158 | <entry><constant>V4L2_EVENT_SOURCE_CHANGE</constant></entry> | ||
| 159 | <entry>5</entry> | ||
| 160 | <entry> | ||
| 161 | <para>This event is triggered when a source parameter change is | ||
| 162 | detected during runtime by the video device. It can be a | ||
| 163 | runtime resolution change triggered by a video decoder or the | ||
| 164 | format change happening on an input connector. | ||
| 165 | This event requires that the <structfield>id</structfield> | ||
| 166 | matches the input index (when used with a video device node) | ||
| 167 | or the pad index (when used with a subdevice node) from which | ||
| 168 | you want to receive events.</para> | ||
| 169 | |||
| 170 | <para>This event has a &v4l2-event-src-change; associated | ||
| 171 | with it. The <structfield>changes</structfield> bitfield denotes | ||
| 172 | what has changed for the subscribed pad. If multiple events | ||
| 173 | occurred before application could dequeue them, then the changes | ||
| 174 | will have the ORed value of all the events generated.</para> | ||
| 175 | </entry> | ||
| 176 | </row> | ||
| 177 | <row> | ||
| 178 | <entry><constant>V4L2_EVENT_MOTION_DET</constant></entry> | ||
| 179 | <entry>6</entry> | ||
| 180 | <entry> | ||
| 181 | <para>Triggered whenever the motion detection state for one or more of the regions | ||
| 182 | changes. This event has a &v4l2-event-motion-det; associated with it.</para> | ||
| 183 | </entry> | ||
| 184 | </row> | ||
| 185 | <row> | ||
| 186 | <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry> | ||
| 187 | <entry>0x08000000</entry> | ||
| 188 | <entry>Base event number for driver-private events.</entry> | ||
| 189 | </row> | ||
| 190 | </tbody> | ||
| 191 | </tgroup> | ||
| 192 | </table> | ||
| 193 | |||
| 194 | <table pgwide="1" frame="none" id="event-flags"> | 89 | <table pgwide="1" frame="none" id="event-flags"> |
| 195 | <title>Event Flags</title> | 90 | <title>Event Flags</title> |
| 196 | <tgroup cols="3"> | 91 | <tgroup cols="3"> |
