vidioc-subdev-enum-frame-interval.xml 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. <refentry id="vidioc-subdev-enum-frame-interval">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</refname>
  8. <refpurpose>Enumerate frame intervals</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_subdev_frame_interval_enum *
  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_SUBDEV_ENUM_FRAME_INTERVAL</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. <note>
  47. <title>Experimental</title>
  48. <para>This is an <link linkend="experimental">experimental</link>
  49. interface and may change in the future.</para>
  50. </note>
  51. <para>This ioctl lets applications enumerate available frame intervals on a
  52. given sub-device pad. Frame intervals only makes sense for sub-devices that
  53. can control the frame period on their own. This includes, for instance,
  54. image sensors and TV tuners.</para>
  55. <para>For the common use case of image sensors, the frame intervals
  56. available on the sub-device output pad depend on the frame format and size
  57. on the same pad. Applications must thus specify the desired format and size
  58. when enumerating frame intervals.</para>
  59. <para>To enumerate frame intervals applications initialize the
  60. <structfield>index</structfield>, <structfield>pad</structfield>,
  61. <structfield>which</structfield>, <structfield>code</structfield>,
  62. <structfield>width</structfield> and <structfield>height</structfield>
  63. fields of &v4l2-subdev-frame-interval-enum; and call the
  64. <constant>VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL</constant> ioctl with a pointer
  65. to this structure. Drivers fill the rest of the structure or return
  66. an &EINVAL; if one of the input fields is invalid. All frame intervals are
  67. enumerable by beginning at index zero and incrementing by one until
  68. <errorcode>EINVAL</errorcode> is returned.</para>
  69. <para>Available frame intervals may depend on the current 'try' formats
  70. at other pads of the sub-device, as well as on the current active links. See
  71. &VIDIOC-SUBDEV-G-FMT; for more information about the try formats.</para>
  72. <para>Sub-devices that support the frame interval enumeration ioctl should
  73. implemented it on a single pad only. Its behaviour when supported on
  74. multiple pads of the same sub-device is not defined.</para>
  75. <table pgwide="1" frame="none" id="v4l2-subdev-frame-interval-enum">
  76. <title>struct <structname>v4l2_subdev_frame_interval_enum</structname></title>
  77. <tgroup cols="3">
  78. &cs-str;
  79. <tbody valign="top">
  80. <row>
  81. <entry>__u32</entry>
  82. <entry><structfield>index</structfield></entry>
  83. <entry>Number of the format in the enumeration, set by the
  84. application.</entry>
  85. </row>
  86. <row>
  87. <entry>__u32</entry>
  88. <entry><structfield>pad</structfield></entry>
  89. <entry>Pad number as reported by the media controller API.</entry>
  90. </row>
  91. <row>
  92. <entry>__u32</entry>
  93. <entry><structfield>code</structfield></entry>
  94. <entry>The media bus format code, as defined in
  95. <xref linkend="v4l2-mbus-format" />.</entry>
  96. </row>
  97. <row>
  98. <entry>__u32</entry>
  99. <entry><structfield>width</structfield></entry>
  100. <entry>Frame width, in pixels.</entry>
  101. </row>
  102. <row>
  103. <entry>__u32</entry>
  104. <entry><structfield>height</structfield></entry>
  105. <entry>Frame height, in pixels.</entry>
  106. </row>
  107. <row>
  108. <entry>&v4l2-fract;</entry>
  109. <entry><structfield>interval</structfield></entry>
  110. <entry>Period, in seconds, between consecutive video frames.</entry>
  111. </row>
  112. <row>
  113. <entry>__u32</entry>
  114. <entry><structfield>which</structfield></entry>
  115. <entry>Frame intervals to be enumerated, from &v4l2-subdev-format-whence;.</entry>
  116. </row>
  117. <row>
  118. <entry>__u32</entry>
  119. <entry><structfield>reserved</structfield>[8]</entry>
  120. <entry>Reserved for future extensions. Applications and drivers must
  121. set the array to zero.</entry>
  122. </row>
  123. </tbody>
  124. </tgroup>
  125. </table>
  126. </refsect1>
  127. <refsect1>
  128. &return-value;
  129. <variablelist>
  130. <varlistentry>
  131. <term><errorcode>EINVAL</errorcode></term>
  132. <listitem>
  133. <para>The &v4l2-subdev-frame-interval-enum;
  134. <structfield>pad</structfield> references a non-existing pad, one of
  135. the <structfield>code</structfield>, <structfield>width</structfield>
  136. or <structfield>height</structfield> fields are invalid for the given
  137. pad or the <structfield>index</structfield> field is out of bounds.
  138. </para>
  139. </listitem>
  140. </varlistentry>
  141. </variablelist>
  142. </refsect1>
  143. </refentry>