vidioc-subscribe-event.xml 3.6 KB

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