vidioc-enumoutput.xml 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. <refentry id="vidioc-enumoutput">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_ENUMOUTPUT</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_ENUMOUTPUT</refname>
  8. <refpurpose>Enumerate video outputs</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_output *<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_ENUMOUTPUT</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. <para>To query the attributes of a video outputs applications
  46. initialize the <structfield>index</structfield> field of &v4l2-output;
  47. and call the <constant>VIDIOC_ENUMOUTPUT</constant> ioctl with a
  48. pointer to this structure. Drivers fill the rest of the structure or
  49. return an &EINVAL; when the index is out of bounds. To enumerate all
  50. outputs applications shall begin at index zero, incrementing by one
  51. until the driver returns <errorcode>EINVAL</errorcode>.</para>
  52. <table frame="none" pgwide="1" id="v4l2-output">
  53. <title>struct <structname>v4l2_output</structname></title>
  54. <tgroup cols="3">
  55. &cs-str;
  56. <tbody valign="top">
  57. <row>
  58. <entry>__u32</entry>
  59. <entry><structfield>index</structfield></entry>
  60. <entry>Identifies the output, set by the
  61. application.</entry>
  62. </row>
  63. <row>
  64. <entry>__u8</entry>
  65. <entry><structfield>name</structfield>[32]</entry>
  66. <entry>Name of the video output, a NUL-terminated ASCII
  67. string, for example: "Vout". This information is intended for the
  68. user, preferably the connector label on the device itself.</entry>
  69. </row>
  70. <row>
  71. <entry>__u32</entry>
  72. <entry><structfield>type</structfield></entry>
  73. <entry>Type of the output, see <xref
  74. linkend="output-type" />.</entry>
  75. </row>
  76. <row>
  77. <entry>__u32</entry>
  78. <entry><structfield>audioset</structfield></entry>
  79. <entry><para>Drivers can enumerate up to 32 video and
  80. audio outputs. This field shows which audio outputs were
  81. selectable as the current output if this was the currently selected
  82. video output. It is a bit mask. The LSB corresponds to audio output 0,
  83. the MSB to output 31. Any number of bits can be set, or
  84. none.</para><para>When the driver does not enumerate audio outputs no
  85. bits must be set. Applications shall not interpret this as lack of
  86. audio support. Drivers may automatically select audio outputs without
  87. enumerating them.</para><para>For details on audio outputs and how to
  88. select the current output see <xref linkend="audio" />.</para></entry>
  89. </row>
  90. <row>
  91. <entry>__u32</entry>
  92. <entry><structfield>modulator</structfield></entry>
  93. <entry>Output devices can have zero or more RF modulators.
  94. When the <structfield>type</structfield> is
  95. <constant>V4L2_OUTPUT_TYPE_MODULATOR</constant> this is an RF
  96. connector and this field identifies the modulator. It corresponds to
  97. &v4l2-modulator; field <structfield>index</structfield>. For details
  98. on modulators see <xref linkend="tuner" />.</entry>
  99. </row>
  100. <row>
  101. <entry>&v4l2-std-id;</entry>
  102. <entry><structfield>std</structfield></entry>
  103. <entry>Every video output supports one or more different
  104. video standards. This field is a set of all supported standards. For
  105. details on video standards and how to switch see <xref
  106. linkend="standard" />.</entry>
  107. </row>
  108. <row>
  109. <entry>__u32</entry>
  110. <entry><structfield>capabilities</structfield></entry>
  111. <entry>This field provides capabilities for the
  112. output. See <xref linkend="output-capabilities" /> for flags.</entry>
  113. </row>
  114. <row>
  115. <entry>__u32</entry>
  116. <entry><structfield>reserved</structfield>[3]</entry>
  117. <entry>Reserved for future extensions. Drivers must set
  118. the array to zero.</entry>
  119. </row>
  120. </tbody>
  121. </tgroup>
  122. </table>
  123. <table frame="none" pgwide="1" id="output-type">
  124. <title>Output Type</title>
  125. <tgroup cols="3">
  126. &cs-def;
  127. <tbody valign="top">
  128. <row>
  129. <entry><constant>V4L2_OUTPUT_TYPE_MODULATOR</constant></entry>
  130. <entry>1</entry>
  131. <entry>This output is an analog TV modulator.</entry>
  132. </row>
  133. <row>
  134. <entry><constant>V4L2_OUTPUT_TYPE_ANALOG</constant></entry>
  135. <entry>2</entry>
  136. <entry>Analog baseband output, for example Composite /
  137. CVBS, S-Video, RGB.</entry>
  138. </row>
  139. <row>
  140. <entry><constant>V4L2_OUTPUT_TYPE_ANALOGVGAOVERLAY</constant></entry>
  141. <entry>3</entry>
  142. <entry>[?]</entry>
  143. </row>
  144. </tbody>
  145. </tgroup>
  146. </table>
  147. <!-- Capabilities flags based on video timings RFC by Muralidharan
  148. Karicheri, titled RFC (v1.2): V4L - Support for video timings at the
  149. input/output interface to linux-media@vger.kernel.org on 19 Oct 2009.
  150. -->
  151. <table frame="none" pgwide="1" id="output-capabilities">
  152. <title>Output capabilities</title>
  153. <tgroup cols="3">
  154. &cs-def;
  155. <tbody valign="top">
  156. <row>
  157. <entry><constant>V4L2_OUT_CAP_DV_TIMINGS</constant></entry>
  158. <entry>0x00000002</entry>
  159. <entry>This output supports setting video timings by using VIDIOC_S_DV_TIMINGS.</entry>
  160. </row>
  161. <row>
  162. <entry><constant>V4L2_OUT_CAP_STD</constant></entry>
  163. <entry>0x00000004</entry>
  164. <entry>This output supports setting the TV standard by using VIDIOC_S_STD.</entry>
  165. </row>
  166. <row>
  167. <entry><constant>V4L2_OUT_CAP_NATIVE_SIZE</constant></entry>
  168. <entry>0x00000008</entry>
  169. <entry>This output supports setting the native size using
  170. the <constant>V4L2_SEL_TGT_NATIVE_SIZE</constant>
  171. selection target, see <xref
  172. linkend="v4l2-selections-common"/>.</entry>
  173. </row>
  174. </tbody>
  175. </tgroup>
  176. </table>
  177. </refsect1>
  178. <refsect1>
  179. &return-value;
  180. <variablelist>
  181. <varlistentry>
  182. <term><errorcode>EINVAL</errorcode></term>
  183. <listitem>
  184. <para>The &v4l2-output; <structfield>index</structfield>
  185. is out of bounds.</para>
  186. </listitem>
  187. </varlistentry>
  188. </variablelist>
  189. </refsect1>
  190. </refentry>