vidioc-g-sliced-vbi-cap.xml 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. <refentry id="vidioc-g-sliced-vbi-cap">
  2. <refmeta>
  3. <refentrytitle>ioctl VIDIOC_G_SLICED_VBI_CAP</refentrytitle>
  4. &manvol;
  5. </refmeta>
  6. <refnamediv>
  7. <refname>VIDIOC_G_SLICED_VBI_CAP</refname>
  8. <refpurpose>Query sliced VBI capabilities</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_sliced_vbi_cap *<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_G_SLICED_VBI_CAP</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 find out which data services are supported by a sliced
  46. VBI capture or output device, applications initialize the
  47. <structfield>type</structfield> field of a &v4l2-sliced-vbi-cap;,
  48. clear the <structfield>reserved</structfield> array and
  49. call the <constant>VIDIOC_G_SLICED_VBI_CAP</constant> ioctl. The
  50. driver fills in the remaining fields or returns an &EINVAL; if the
  51. sliced VBI API is unsupported or <structfield>type</structfield>
  52. is invalid.</para>
  53. <para>Note the <structfield>type</structfield> field was added,
  54. and the ioctl changed from read-only to write-read, in Linux 2.6.19.</para>
  55. <table pgwide="1" frame="none" id="v4l2-sliced-vbi-cap">
  56. <title>struct <structname>v4l2_sliced_vbi_cap</structname></title>
  57. <tgroup cols="5">
  58. <colspec colname="c1" colwidth="3*" />
  59. <colspec colname="c2" colwidth="3*" />
  60. <colspec colname="c3" colwidth="2*" />
  61. <colspec colname="c4" colwidth="2*" />
  62. <colspec colname="c5" colwidth="2*" />
  63. <spanspec spanname="hspan" namest="c3" nameend="c5" />
  64. <tbody valign="top">
  65. <row>
  66. <entry>__u16</entry>
  67. <entry><structfield>service_set</structfield></entry>
  68. <entry spanname="hspan">A set of all data services
  69. supported by the driver. Equal to the union of all elements of the
  70. <structfield>service_lines </structfield> array.</entry>
  71. </row>
  72. <row>
  73. <entry>__u16</entry>
  74. <entry><structfield>service_lines</structfield>[2][24]</entry>
  75. <entry spanname="hspan">Each element of this array
  76. contains a set of data services the hardware can look for or insert
  77. into a particular scan line. Data services are defined in <xref
  78. linkend="vbi-services" />. Array indices map to ITU-R
  79. line numbers (see also <xref
  80. linkend="vbi-525" /> and <xref
  81. linkend="vbi-625" />) as follows:</entry>
  82. </row>
  83. <row>
  84. <entry></entry>
  85. <entry></entry>
  86. <entry>Element</entry>
  87. <entry>525 line systems</entry>
  88. <entry>625 line systems</entry>
  89. </row>
  90. <row>
  91. <entry></entry>
  92. <entry></entry>
  93. <entry><structfield>service_lines</structfield>[0][1]</entry>
  94. <entry align="center">1</entry>
  95. <entry align="center">1</entry>
  96. </row>
  97. <row>
  98. <entry></entry>
  99. <entry></entry>
  100. <entry><structfield>service_lines</structfield>[0][23]</entry>
  101. <entry align="center">23</entry>
  102. <entry align="center">23</entry>
  103. </row>
  104. <row>
  105. <entry></entry>
  106. <entry></entry>
  107. <entry><structfield>service_lines</structfield>[1][1]</entry>
  108. <entry align="center">264</entry>
  109. <entry align="center">314</entry>
  110. </row>
  111. <row>
  112. <entry></entry>
  113. <entry></entry>
  114. <entry><structfield>service_lines</structfield>[1][23]</entry>
  115. <entry align="center">286</entry>
  116. <entry align="center">336</entry>
  117. </row>
  118. <row>
  119. <entry></entry>
  120. </row>
  121. <row>
  122. <entry></entry>
  123. <entry></entry>
  124. <entry spanname="hspan">The number of VBI lines the
  125. hardware can capture or output per frame, or the number of services it
  126. can identify on a given line may be limited. For example on PAL line
  127. 16 the hardware may be able to look for a VPS or Teletext signal, but
  128. not both at the same time. Applications can learn about these limits
  129. using the &VIDIOC-S-FMT; ioctl as described in <xref
  130. linkend="sliced" />.</entry>
  131. </row>
  132. <row>
  133. <entry></entry>
  134. </row>
  135. <row>
  136. <entry></entry>
  137. <entry></entry>
  138. <entry spanname="hspan">Drivers must set
  139. <structfield>service_lines</structfield>[0][0] and
  140. <structfield>service_lines</structfield>[1][0] to zero.</entry>
  141. </row>
  142. <row>
  143. <entry>__u32</entry>
  144. <entry><structfield>type</structfield></entry>
  145. <entry>Type of the data stream, see <xref
  146. linkend="v4l2-buf-type" />. Should be
  147. <constant>V4L2_BUF_TYPE_SLICED_VBI_CAPTURE</constant> or
  148. <constant>V4L2_BUF_TYPE_SLICED_VBI_OUTPUT</constant>.</entry>
  149. </row>
  150. <row>
  151. <entry>__u32</entry>
  152. <entry><structfield>reserved</structfield>[3]</entry>
  153. <entry spanname="hspan">This array is reserved for future
  154. extensions. Applications and drivers must set it to zero.</entry>
  155. </row>
  156. </tbody>
  157. </tgroup>
  158. </table>
  159. <!-- See also dev-sliced-vbi.sgml -->
  160. <table pgwide="1" frame="none" id="vbi-services">
  161. <title>Sliced VBI services</title>
  162. <tgroup cols="5">
  163. <colspec colname="c1" colwidth="2*" />
  164. <colspec colname="c2" colwidth="1*" />
  165. <colspec colname="c3" colwidth="1*" />
  166. <colspec colname="c4" colwidth="2*" />
  167. <colspec colname="c5" colwidth="2*" />
  168. <spanspec spanname='rlp' namest='c3' nameend='c5' />
  169. <thead>
  170. <row>
  171. <entry>Symbol</entry>
  172. <entry>Value</entry>
  173. <entry>Reference</entry>
  174. <entry>Lines, usually</entry>
  175. <entry>Payload</entry>
  176. </row>
  177. </thead>
  178. <tbody valign="top">
  179. <row>
  180. <entry><constant>V4L2_SLICED_TELETEXT_B</constant> (Teletext
  181. System B)</entry>
  182. <entry>0x0001</entry>
  183. <entry><xref linkend="ets300706" />, <xref linkend="itu653" /></entry>
  184. <entry>PAL/SECAM line 7-22, 320-335 (second field 7-22)</entry>
  185. <entry>Last 42 of the 45 byte Teletext packet, that is
  186. without clock run-in and framing code, lsb first transmitted.</entry>
  187. </row>
  188. <row>
  189. <entry><constant>V4L2_SLICED_VPS</constant></entry>
  190. <entry>0x0400</entry>
  191. <entry><xref linkend="ets300231" /></entry>
  192. <entry>PAL line 16</entry>
  193. <entry>Byte number 3 to 15 according to Figure 9 of
  194. ETS&nbsp;300&nbsp;231, lsb first transmitted.</entry>
  195. </row>
  196. <row>
  197. <entry><constant>V4L2_SLICED_CAPTION_525</constant></entry>
  198. <entry>0x1000</entry>
  199. <entry><xref linkend="cea608" /></entry>
  200. <entry>NTSC line 21, 284 (second field 21)</entry>
  201. <entry>Two bytes in transmission order, including parity
  202. bit, lsb first transmitted.</entry>
  203. </row>
  204. <row>
  205. <entry><constant>V4L2_SLICED_WSS_625</constant></entry>
  206. <entry>0x4000</entry>
  207. <entry><xref linkend="en300294" />, <xref linkend="itu1119" /></entry>
  208. <entry>PAL/SECAM line 23</entry>
  209. <entry><screen>
  210. Byte 0 1
  211. msb lsb msb lsb
  212. Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9
  213. </screen></entry>
  214. </row>
  215. <row>
  216. <entry><constant>V4L2_SLICED_VBI_525</constant></entry>
  217. <entry>0x1000</entry>
  218. <entry spanname="rlp">Set of services applicable to 525
  219. line systems.</entry>
  220. </row>
  221. <row>
  222. <entry><constant>V4L2_SLICED_VBI_625</constant></entry>
  223. <entry>0x4401</entry>
  224. <entry spanname="rlp">Set of services applicable to 625
  225. line systems.</entry>
  226. </row>
  227. </tbody>
  228. </tgroup>
  229. </table>
  230. </refsect1>
  231. <refsect1>
  232. &return-value;
  233. <variablelist>
  234. <varlistentry>
  235. <term><errorcode>EINVAL</errorcode></term>
  236. <listitem>
  237. <para>The value in the <structfield>type</structfield> field is
  238. wrong.</para>
  239. </listitem>
  240. </varlistentry>
  241. </variablelist>
  242. </refsect1>
  243. </refentry>