vidioc-streamon.xml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <refentry id="vidioc-streamon">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_STREAMON, VIDIOC_STREAMOFF</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_STREAMON</refname>
  8. <refname>VIDIOC_STREAMOFF</refname>
  9. <refpurpose>Start or stop streaming I/O</refpurpose>
  10. </refnamediv>
  11. <refsynopsisdiv>
  12. <funcsynopsis>
  13. <funcprototype>
  14. <funcdef>int <function>ioctl</function></funcdef>
  15. <paramdef>int <parameter>fd</parameter></paramdef>
  16. <paramdef>int <parameter>request</parameter></paramdef>
  17. <paramdef>const int *<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_STREAMON, VIDIOC_STREAMOFF</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>The <constant>VIDIOC_STREAMON</constant> and
  47. <constant>VIDIOC_STREAMOFF</constant> ioctl start and stop the capture
  48. or output process during streaming (<link linkend="mmap">memory
  49. mapping</link> or <link linkend="userp">user pointer</link>) I/O.</para>
  50. <para>Specifically the capture hardware is disabled and no input
  51. buffers are filled (if there are any empty buffers in the incoming
  52. queue) until <constant>VIDIOC_STREAMON</constant> has been called.
  53. Accordingly the output hardware is disabled, no video signal is
  54. produced until <constant>VIDIOC_STREAMON</constant> has been called.
  55. The ioctl will succeed only when at least one output buffer is in the
  56. incoming queue.</para>
  57. <para>The <constant>VIDIOC_STREAMOFF</constant> ioctl, apart of
  58. aborting or finishing any DMA in progress, unlocks any user pointer
  59. buffers locked in physical memory, and it removes all buffers from the
  60. incoming and outgoing queues. That means all images captured but not
  61. dequeued yet will be lost, likewise all images enqueued for output but
  62. not transmitted yet. I/O returns to the same state as after calling
  63. &VIDIOC-REQBUFS; and can be restarted accordingly.</para>
  64. <para>Both ioctls take a pointer to an integer, the desired buffer or
  65. stream type. This is the same as &v4l2-requestbuffers;
  66. <structfield>type</structfield>.</para>
  67. <para>Note applications can be preempted for unknown periods right
  68. before or after the <constant>VIDIOC_STREAMON</constant> or
  69. <constant>VIDIOC_STREAMOFF</constant> calls, there is no notion of
  70. starting or stopping "now". Buffer timestamps can be used to
  71. synchronize with other events.</para>
  72. </refsect1>
  73. <refsect1>
  74. &return-value;
  75. <variablelist>
  76. <varlistentry>
  77. <term><errorcode>EINVAL</errorcode></term>
  78. <listitem>
  79. <para>Streaming I/O is not supported, the buffer
  80. <structfield>type</structfield> is not supported, or no buffers have
  81. been allocated (memory mapping) or enqueued (output) yet.</para>
  82. </listitem>
  83. </varlistentry>
  84. </variablelist>
  85. </refsect1>
  86. </refentry>
  87. <!--
  88. Local Variables:
  89. mode: sgml
  90. sgml-parent-document: "v4l2.sgml"
  91. indent-tabs-mode: nil
  92. End:
  93. -->