vidioc-prepare-buf.xml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <refentry id="vidioc-prepare-buf">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_PREPARE_BUF</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_PREPARE_BUF</refname>
  8. <refpurpose>Prepare a buffer for I/O</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_buffer *<parameter>argp</parameter></paramdef>
  17. </funcprototype>
  18. </funcsynopsis>
  19. </refsynopsisdiv>
  20. <refsect1>
  21. <title>Arguments</title>
  22. <variablelist>
  23. <varlistentry>
  24. <term><parameter>fd</parameter></term>
  25. <listitem>
  26. <para>&fd;</para>
  27. </listitem>
  28. </varlistentry>
  29. <varlistentry>
  30. <term><parameter>request</parameter></term>
  31. <listitem>
  32. <para>VIDIOC_PREPARE_BUF</para>
  33. </listitem>
  34. </varlistentry>
  35. <varlistentry>
  36. <term><parameter>argp</parameter></term>
  37. <listitem>
  38. <para></para>
  39. </listitem>
  40. </varlistentry>
  41. </variablelist>
  42. </refsect1>
  43. <refsect1>
  44. <title>Description</title>
  45. <note>
  46. <title>Experimental</title>
  47. <para>This is an <link linkend="experimental"> experimental </link>
  48. interface and may change in the future.</para>
  49. </note>
  50. <para>Applications can optionally call the
  51. <constant>VIDIOC_PREPARE_BUF</constant> ioctl to pass ownership of the buffer
  52. to the driver before actually enqueuing it, using the
  53. <constant>VIDIOC_QBUF</constant> ioctl, and to prepare it for future I/O.
  54. Such preparations may include cache invalidation or cleaning. Performing them
  55. in advance saves time during the actual I/O. In case such cache operations are
  56. not required, the application can use one of
  57. <constant>V4L2_BUF_FLAG_NO_CACHE_INVALIDATE</constant> and
  58. <constant>V4L2_BUF_FLAG_NO_CACHE_CLEAN</constant> flags to skip the respective
  59. step.</para>
  60. <para>The <structname>v4l2_buffer</structname> structure is
  61. specified in <xref linkend="buffer" />.</para>
  62. </refsect1>
  63. <refsect1>
  64. &return-value;
  65. <variablelist>
  66. <varlistentry>
  67. <term><errorcode>EBUSY</errorcode></term>
  68. <listitem>
  69. <para>File I/O is in progress.</para>
  70. </listitem>
  71. </varlistentry>
  72. <varlistentry>
  73. <term><errorcode>EINVAL</errorcode></term>
  74. <listitem>
  75. <para>The buffer <structfield>type</structfield> is not
  76. supported, or the <structfield>index</structfield> is out of bounds,
  77. or no buffers have been allocated yet, or the
  78. <structfield>userptr</structfield> or
  79. <structfield>length</structfield> are invalid.</para>
  80. </listitem>
  81. </varlistentry>
  82. </variablelist>
  83. </refsect1>
  84. </refentry>