1<refentry id="vidioc-subscribe-event"> 2 <refmeta> 3 <refentrytitle>ioctl VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT</refentrytitle> 4 &manvol; 5 </refmeta> 6 7 <refnamediv> 8 <refname>VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT</refname> 9 <refpurpose>Subscribe or unsubscribe event</refpurpose> 10 </refnamediv> 11 12 <refsynopsisdiv> 13 <funcsynopsis> 14 <funcprototype> 15 <funcdef>int <function>ioctl</function></funcdef> 16 <paramdef>int <parameter>fd</parameter></paramdef> 17 <paramdef>int <parameter>request</parameter></paramdef> 18 <paramdef>struct v4l2_event_subscription 19*<parameter>argp</parameter></paramdef> 20 </funcprototype> 21 </funcsynopsis> 22 </refsynopsisdiv> 23 24 <refsect1> 25 <title>Arguments</title> 26 27 <variablelist> 28 <varlistentry> 29 <term><parameter>fd</parameter></term> 30 <listitem> 31 <para>&fd;</para> 32 </listitem> 33 </varlistentry> 34 <varlistentry> 35 <term><parameter>request</parameter></term> 36 <listitem> 37 <para>VIDIOC_SUBSCRIBE_EVENT, VIDIOC_UNSUBSCRIBE_EVENT</para> 38 </listitem> 39 </varlistentry> 40 <varlistentry> 41 <term><parameter>argp</parameter></term> 42 <listitem> 43 <para></para> 44 </listitem> 45 </varlistentry> 46 </variablelist> 47 </refsect1> 48 49 <refsect1> 50 <title>Description</title> 51 52 <para>Subscribe or unsubscribe V4L2 event. Subscribed events are 53 dequeued by using the &VIDIOC-DQEVENT; ioctl.</para> 54 55 <table frame="none" pgwide="1" id="v4l2-event-subscription"> 56 <title>struct <structname>v4l2_event_subscription</structname></title> 57 <tgroup cols="3"> 58 &cs-str; 59 <tbody valign="top"> 60 <row> 61 <entry>__u32</entry> 62 <entry><structfield>type</structfield></entry> 63 <entry>Type of the event.</entry> 64 </row> 65 <row> 66 <entry>__u32</entry> 67 <entry><structfield>reserved</structfield>[7]</entry> 68 <entry>Reserved for future extensions. Drivers and applications 69 must set the array to zero.</entry> 70 </row> 71 </tbody> 72 </tgroup> 73 </table> 74 75 <table frame="none" pgwide="1" id="event-type"> 76 <title>Event Types</title> 77 <tgroup cols="3"> 78 &cs-def; 79 <tbody valign="top"> 80 <row> 81 <entry><constant>V4L2_EVENT_ALL</constant></entry> 82 <entry>0</entry> 83 <entry>All events. V4L2_EVENT_ALL is valid only for 84 VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once. 85 </entry> 86 </row> 87 <row> 88 <entry><constant>V4L2_EVENT_VSYNC</constant></entry> 89 <entry>1</entry> 90 <entry>This event is triggered on the vertical sync. 91 This event has &v4l2-event-vsync; associated with it. 92 </entry> 93 </row> 94 <row> 95 <entry><constant>V4L2_EVENT_EOS</constant></entry> 96 <entry>2</entry> 97 <entry>This event is triggered when the end of a stream is reached. 98 This is typically used with MPEG decoders to report to the application 99 when the last of the MPEG stream has been decoded. 100 </entry> 101 </row> 102 <row> 103 <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry> 104 <entry>0x08000000</entry> 105 <entry>Base event number for driver-private events.</entry> 106 </row> 107 </tbody> 108 </tgroup> 109 </table> 110 111 <table frame="none" pgwide="1" id="v4l2-event-vsync"> 112 <title>struct <structname>v4l2_event_vsync</structname></title> 113 <tgroup cols="3"> 114 &cs-str; 115 <tbody valign="top"> 116 <row> 117 <entry>__u8</entry> 118 <entry><structfield>field</structfield></entry> 119 <entry>The upcoming field. See &v4l2-field;.</entry> 120 </row> 121 </tbody> 122 </tgroup> 123 </table> 124 125 </refsect1> 126</refentry> 127<!-- 128Local Variables: 129mode: sgml 130sgml-parent-document: "v4l2.sgml" 131indent-tabs-mode: nil 132End: 133--> 134