1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>ioctl VIDIOC_G_SLICED_VBI_CAP</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API"><link rel="up" href="user-func.html" title="Appendix&#160;A.&#160;Function Reference"><link rel="prev" href="vidioc-g-selection.html" title="ioctl VIDIOC_G_SELECTION, VIDIOC_S_SELECTION"><link rel="next" href="vidioc-g-std.html" title="ioctl VIDIOC_G_STD, VIDIOC_S_STD"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">ioctl VIDIOC_G_SLICED_VBI_CAP</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="vidioc-g-selection.html">Prev</a>&#160;</td><th width="60%" align="center">Appendix&#160;A.&#160;Function Reference</th><td width="20%" align="right">&#160;<a accesskey="n" href="vidioc-g-std.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="vidioc-g-sliced-vbi-cap"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>VIDIOC_G_SLICED_VBI_CAP &#8212; Query sliced VBI capabilities</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">ioctl</b>(</code></td><td>int <var class="pdparam">fd</var>, </td></tr><tr><td>&#160;</td><td>int <var class="pdparam">request</var>, </td></tr><tr><td>&#160;</td><td>struct v4l2_sliced_vbi_cap *<var class="pdparam">argp</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer">&#160;</div></div></div><div class="refsect1"><a name="idp1115184148"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>fd</code></em></span></dt><dd><p>File descriptor returned by <a class="link" href="func-open.html" title="V4L2 open()"><code class="function">open()</code></a>.</p></dd><dt><span class="term"><em class="parameter"><code>request</code></em></span></dt><dd><p>VIDIOC_G_SLICED_VBI_CAP</p></dd><dt><span class="term"><em class="parameter"><code>argp</code></em></span></dt><dd><p></p></dd></dl></div></div><div class="refsect1"><a name="idp1115188244"></a><h2>Description</h2><p>To find out which data services are supported by a sliced
2VBI capture or output device, applications initialize the
3<em class="structfield"><code>type</code></em> field of a struct&#160;<a class="link" href="vidioc-g-sliced-vbi-cap.html#v4l2-sliced-vbi-cap" title="Table&#160;A.85.&#160;struct v4l2_sliced_vbi_cap">v4l2_sliced_vbi_cap</a>,
4clear the <em class="structfield"><code>reserved</code></em> array and
5call the <code class="constant">VIDIOC_G_SLICED_VBI_CAP</code> ioctl. The
6driver fills in the remaining fields or returns an <span class="errorcode">EINVAL</span> error code if the
7sliced VBI API is unsupported or <em class="structfield"><code>type</code></em>
8is invalid.</p><p>Note the <em class="structfield"><code>type</code></em> field was added,
9and the ioctl changed from read-only to write-read, in Linux 2.6.19.</p><div class="table"><a name="v4l2-sliced-vbi-cap"></a><p class="title"><b>Table&#160;A.85.&#160;struct <span class="structname">v4l2_sliced_vbi_cap</span></b></p><div class="table-contents"><table summary="struct v4l2_sliced_vbi_cap" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"><col class="c4"><col class="c5"></colgroup><tbody valign="top"><tr><td valign="top">__u16</td><td valign="top"><em class="structfield"><code>service_set</code></em></td><td colspan="3" valign="top">A set of all data services
10supported by the driver. Equal to the union of all elements of the
11<em class="structfield"><code>service_lines </code></em> array.</td></tr><tr><td valign="top">__u16</td><td valign="top"><em class="structfield"><code>service_lines</code></em>[2][24]</td><td colspan="3" valign="top">Each element of this array
12contains a set of data services the hardware can look for or insert
13into a particular scan line. Data services are defined in <a class="xref" href="vidioc-g-sliced-vbi-cap.html#vbi-services" title="Table&#160;A.86.&#160;Sliced VBI services">Table&#160;A.86, &#8220;Sliced VBI services&#8221;</a>. Array indices map to ITU-R
14line numbers (see also <a class="xref" href="raw-vbi.html#vbi-525" title="Figure&#160;4.2.&#160;ITU-R 525 line numbering (M/NTSC and M/PAL)">Figure&#160;4.2, &#8220;ITU-R 525 line numbering (M/NTSC and M/PAL)&#8221;</a> and <a class="xref" href="raw-vbi.html#vbi-625" title="Figure&#160;4.3.&#160;ITU-R 625 line numbering">Figure&#160;4.3, &#8220;ITU-R 625 line numbering&#8221;</a>) as follows:</td></tr><tr><td valign="top">&#160;</td><td valign="top">&#160;</td><td valign="top">Element</td><td valign="top">525 line systems</td><td valign="top">625 line systems</td></tr><tr><td valign="top">&#160;</td><td valign="top">&#160;</td><td valign="top"><em class="structfield"><code>service_lines</code></em>[0][1]</td><td align="center" valign="top">1</td><td align="center" valign="top">1</td></tr><tr><td valign="top">&#160;</td><td valign="top">&#160;</td><td valign="top"><em class="structfield"><code>service_lines</code></em>[0][23]</td><td align="center" valign="top">23</td><td align="center" valign="top">23</td></tr><tr><td valign="top">&#160;</td><td valign="top">&#160;</td><td valign="top"><em class="structfield"><code>service_lines</code></em>[1][1]</td><td align="center" valign="top">264</td><td align="center" valign="top">314</td></tr><tr><td valign="top">&#160;</td><td valign="top">&#160;</td><td valign="top"><em class="structfield"><code>service_lines</code></em>[1][23]</td><td align="center" valign="top">286</td><td align="center" valign="top">336</td></tr><tr><td valign="top">&#160;</td><td class="auto-generated">&#160;</td><td class="auto-generated">&#160;</td><td class="auto-generated">&#160;</td><td class="auto-generated">&#160;</td></tr><tr><td valign="top">&#160;</td><td valign="top">&#160;</td><td colspan="3" valign="top">The number of VBI lines the
15hardware can capture or output per frame, or the number of services it
16can identify on a given line may be limited. For example on PAL line
1716 the hardware may be able to look for a VPS or Teletext signal, but
18not both at the same time. Applications can learn about these limits
19using the <a class="link" href="vidioc-g-fmt.html" title="ioctl VIDIOC_G_FMT, VIDIOC_S_FMT, VIDIOC_TRY_FMT"><code class="constant">VIDIOC_S_FMT</code></a> ioctl as described in <a class="xref" href="sliced.html" title="Sliced VBI Data Interface">the section called &#8220;Sliced VBI Data Interface&#8221;</a>.</td></tr><tr><td valign="top">&#160;</td><td class="auto-generated">&#160;</td><td class="auto-generated">&#160;</td><td class="auto-generated">&#160;</td><td class="auto-generated">&#160;</td></tr><tr><td valign="top">&#160;</td><td valign="top">&#160;</td><td colspan="3" valign="top">Drivers must set
20<em class="structfield"><code>service_lines</code></em>[0][0] and
21<em class="structfield"><code>service_lines</code></em>[1][0] to zero.</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>type</code></em></td><td valign="top">Type of the data stream, see <a class="xref" href="buffer.html#v4l2-buf-type" title="Table&#160;3.3.&#160;enum v4l2_buf_type">Table&#160;3.3, &#8220;enum v4l2_buf_type&#8221;</a>. Should be
22<code class="constant">V4L2_BUF_TYPE_SLICED_VBI_CAPTURE</code> or
23<code class="constant">V4L2_BUF_TYPE_SLICED_VBI_OUTPUT</code>.</td><td class="auto-generated">&#160;</td><td class="auto-generated">&#160;</td></tr><tr><td valign="top">__u32</td><td valign="top"><em class="structfield"><code>reserved</code></em>[3]</td><td colspan="3" valign="top">This array is reserved for future
24extensions. Applications and drivers must set it to zero.</td></tr></tbody></table></div></div><br class="table-break"><div class="table"><a name="vbi-services"></a><p class="title"><b>Table&#160;A.86.&#160;Sliced VBI services</b></p><div class="table-contents"><table summary="Sliced VBI services" width="100%" border="0"><colgroup><col class="c1"><col class="c2"><col class="c3"><col class="c4"><col class="c5"></colgroup><thead><tr><th>Symbol</th><th>Value</th><th>Reference</th><th>Lines, usually</th><th>Payload</th></tr></thead><tbody valign="top"><tr><td valign="top"><code class="constant">V4L2_SLICED_TELETEXT_B</code> (Teletext
25System B)</td><td valign="top">0x0001</td><td valign="top"><a class="xref" href="bi01.html#ets300706" title='ETS 300 706 "Enhanced Teletext specification"'>[<abbr class="abbrev">ETS&#160;300&#160;706</abbr>]</a>, <a class="xref" href="bi01.html#itu653" title='ITU-R Recommendation BT.653-3 "Teletext systems"'>[<abbr class="abbrev">ITU&#160;BT.653</abbr>]</a></td><td valign="top">PAL/SECAM line 7-22, 320-335 (second field 7-22)</td><td valign="top">Last 42 of the 45 byte Teletext packet, that is
26without clock run-in and framing code, lsb first transmitted.</td></tr><tr><td valign="top"><code class="constant">V4L2_SLICED_VPS</code></td><td valign="top">0x0400</td><td valign="top"><a class="xref" href="bi01.html#ets300231" title='ETS 300 231 "Specification of the domestic video Programme Delivery Control system (PDC)"'>[<abbr class="abbrev">ETS&#160;300&#160;231</abbr>]</a></td><td valign="top">PAL line 16</td><td valign="top">Byte number 3 to 15 according to Figure 9 of
27ETS&#160;300&#160;231, lsb first transmitted.</td></tr><tr><td valign="top"><code class="constant">V4L2_SLICED_CAPTION_525</code></td><td valign="top">0x1000</td><td valign="top"><a class="xref" href="bi01.html#cea608" title='CEA-608-E R-2014 "Line 21 Data Services"'>[<abbr class="abbrev">CEA&#160;608-E</abbr>]</a></td><td valign="top">NTSC line 21, 284 (second field 21)</td><td valign="top">Two bytes in transmission order, including parity
28bit, lsb first transmitted.</td></tr><tr><td valign="top"><code class="constant">V4L2_SLICED_WSS_625</code></td><td valign="top">0x4000</td><td valign="top"><a class="xref" href="bi01.html#en300294" title='EN 300 294 "625-line television Wide Screen Signalling (WSS)"'>[<abbr class="abbrev">EN&#160;300&#160;294</abbr>]</a>, <a class="xref" href="bi01.html#itu1119" title='ITU-R Recommendation BT.1119 "625-line television Wide Screen Signalling (WSS)"'>[<abbr class="abbrev">ITU&#160;BT.1119</abbr>]</a></td><td valign="top">PAL/SECAM line 23</td><td valign="top"><pre class="screen">
29Byte        0                 1
30     msb         lsb  msb           lsb
31Bit  7 6 5 4 3 2 1 0  x x 13 12 11 10 9
32</pre></td></tr><tr><td valign="top"><code class="constant">V4L2_SLICED_VBI_525</code></td><td valign="top">0x1000</td><td colspan="3" valign="top">Set of services applicable to 525
33line systems.</td></tr><tr><td valign="top"><code class="constant">V4L2_SLICED_VBI_625</code></td><td valign="top">0x4401</td><td colspan="3" valign="top">Set of services applicable to 625
34line systems.</td></tr></tbody></table></div></div><br class="table-break"></div><div class="refsect1"><a name="idp1115227452"></a><h2>Return Value</h2><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p><div class="variablelist"><dl class="variablelist"><dt><span class="term"><span class="errorcode">EINVAL</span></span></dt><dd><p>The value in the <em class="structfield"><code>type</code></em> field is
35wrong.</p></dd></dl></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="vidioc-g-selection.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="user-func.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="vidioc-g-std.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ioctl VIDIOC_G_SELECTION, VIDIOC_S_SELECTION&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;ioctl VIDIOC_G_STD, VIDIOC_S_STD</td></tr></table></div></body></html>
36