Path: blob/master/Documentation/DocBook/v4l/dev-sliced-vbi.xml
10821 views
<title>Sliced VBI Data Interface</title>12<para>VBI stands for Vertical Blanking Interval, a gap in the3sequence of lines of an analog video signal. During VBI no picture4information is transmitted, allowing some time while the electron beam5of a cathode ray tube TV returns to the top of the screen.</para>67<para>Sliced VBI devices use hardware to demodulate data transmitted8in the VBI. V4L2 drivers shall <emphasis>not</emphasis> do this by9software, see also the <link linkend="raw-vbi">raw VBI10interface</link>. The data is passed as short packets of fixed size,11covering one scan line each. The number of packets per video frame is12variable.</para>1314<para>Sliced VBI capture and output devices are accessed through the15same character special files as raw VBI devices. When a driver16supports both interfaces, the default function of a17<filename>/dev/vbi</filename> device is <emphasis>raw</emphasis> VBI18capturing or output, and the sliced VBI function is only available19after calling the &VIDIOC-S-FMT; ioctl as defined below. Likewise a20<filename>/dev/video</filename> device may support the sliced VBI API,21however the default function here is video capturing or output.22Different file descriptors must be used to pass raw and sliced VBI23data simultaneously, if this is supported by the driver.</para>2425<section>26<title>Querying Capabilities</title>2728<para>Devices supporting the sliced VBI capturing or output API29set the <constant>V4L2_CAP_SLICED_VBI_CAPTURE</constant> or30<constant>V4L2_CAP_SLICED_VBI_OUTPUT</constant> flag respectively, in31the <structfield>capabilities</structfield> field of &v4l2-capability;32returned by the &VIDIOC-QUERYCAP; ioctl. At least one of the33read/write, streaming or asynchronous <link linkend="io">I/O34methods</link> must be supported. Sliced VBI devices may have a tuner35or modulator.</para>36</section>3738<section>39<title>Supplemental Functions</title>4041<para>Sliced VBI devices shall support <link linkend="video">video42input or output</link> and <link linkend="tuner">tuner or43modulator</link> ioctls if they have these capabilities, and they may44support <link linkend="control">control</link> ioctls. The <link45linkend="standard">video standard</link> ioctls provide information46vital to program a sliced VBI device, therefore must be47supported.</para>48</section>4950<section id="sliced-vbi-format-negotitation">51<title>Sliced VBI Format Negotiation</title>5253<para>To find out which data services are supported by the54hardware applications can call the &VIDIOC-G-SLICED-VBI-CAP; ioctl.55All drivers implementing the sliced VBI interface must support this56ioctl. The results may differ from those of the &VIDIOC-S-FMT; ioctl57when the number of VBI lines the hardware can capture or output per58frame, or the number of services it can identify on a given line are59limited. For example on PAL line 16 the hardware may be able to look60for a VPS or Teletext signal, but not both at the same time.</para>6162<para>To determine the currently selected services applications63set the <structfield>type </structfield> field of &v4l2-format; to64<constant> V4L2_BUF_TYPE_SLICED_VBI_CAPTURE</constant> or <constant>65V4L2_BUF_TYPE_SLICED_VBI_OUTPUT</constant>, and the &VIDIOC-G-FMT;66ioctl fills the <structfield>fmt.sliced</structfield> member, a67&v4l2-sliced-vbi-format;.</para>6869<para>Applications can request different parameters by70initializing or modifying the <structfield>fmt.sliced</structfield>71member and calling the &VIDIOC-S-FMT; ioctl with a pointer to the72<structname>v4l2_format</structname> structure.</para>7374<para>The sliced VBI API is more complicated than the raw VBI API75because the hardware must be told which VBI service to expect on each76scan line. Not all services may be supported by the hardware on all77lines (this is especially true for VBI output where Teletext is often78unsupported and other services can only be inserted in one specific79line). In many cases, however, it is sufficient to just set the80<structfield>service_set</structfield> field to the required services81and let the driver fill the <structfield>service_lines</structfield>82array according to hardware capabilities. Only if more precise control83is needed should the programmer set the84<structfield>service_lines</structfield> array explicitly.</para>8586<para>The &VIDIOC-S-FMT; ioctl modifies the parameters87according to hardware capabilities. When the driver allocates88resources at this point, it may return an &EBUSY; if the required89resources are temporarily unavailable. Other resource allocation90points which may return <errorcode>EBUSY</errorcode> can be the91&VIDIOC-STREAMON; ioctl and the first &func-read;, &func-write; and92&func-select; call.</para>9394<table frame="none" pgwide="1" id="v4l2-sliced-vbi-format">95<title>struct96<structname>v4l2_sliced_vbi_format</structname></title>97<tgroup cols="5">98<colspec colname="c1" colwidth="3*" />99<colspec colname="c2" colwidth="3*" />100<colspec colname="c3" colwidth="2*" />101<colspec colname="c4" colwidth="2*" />102<colspec colname="c5" colwidth="2*" />103<spanspec namest="c3" nameend="c5" spanname="hspan" />104<tbody valign="top">105<row>106<entry>__u32</entry>107<entry><structfield>service_set</structfield></entry>108<entry spanname="hspan"><para>If109<structfield>service_set</structfield> is non-zero when passed with110&VIDIOC-S-FMT; or &VIDIOC-TRY-FMT;, the111<structfield>service_lines</structfield> array will be filled by the112driver according to the services specified in this field. For example,113if <structfield>service_set</structfield> is initialized with114<constant>V4L2_SLICED_TELETEXT_B | V4L2_SLICED_WSS_625</constant>, a115driver for the cx25840 video decoder sets lines 7-22 of both116fields<footnote><para>According to <link117linkend="ets300706">ETS 300 706</link> lines 6-22 of the118first field and lines 5-22 of the second field may carry Teletext119data.</para></footnote> to <constant>V4L2_SLICED_TELETEXT_B</constant>120and line 23 of the first field to121<constant>V4L2_SLICED_WSS_625</constant>. If122<structfield>service_set</structfield> is set to zero, then the values123of <structfield>service_lines</structfield> will be used instead.124</para><para>On return the driver sets this field to the union of all125elements of the returned <structfield>service_lines</structfield>126array. It may contain less services than requested, perhaps just one,127if the hardware cannot handle more services simultaneously. It may be128empty (zero) if none of the requested services are supported by the129hardware.</para></entry>130</row>131<row>132<entry>__u16</entry>133<entry><structfield>service_lines</structfield>[2][24]</entry>134<entry spanname="hspan"><para>Applications initialize this135array with sets of data services the driver shall look for or insert136on the respective scan line. Subject to hardware capabilities drivers137return the requested set, a subset, which may be just a single138service, or an empty set. When the hardware cannot handle multiple139services on the same line the driver shall choose one. No assumptions140can be made on which service the driver chooses.</para><para>Data141services are defined in <xref linkend="vbi-services2" />. Array indices142map to ITU-R line numbers (see also <xref linkend="vbi-525" /> and <xref143linkend="vbi-625" />) as follows: <!-- No nested144tables, sigh. --></para></entry>145</row>146<row>147<entry></entry>148<entry></entry>149<entry>Element</entry>150<entry>525 line systems</entry>151<entry>625 line systems</entry>152</row>153<row>154<entry></entry>155<entry></entry>156<entry><structfield>service_lines</structfield>[0][1]</entry>157<entry align="center">1</entry>158<entry align="center">1</entry>159</row>160<row>161<entry></entry>162<entry></entry>163<entry><structfield>service_lines</structfield>[0][23]</entry>164<entry align="center">23</entry>165<entry align="center">23</entry>166</row>167<row>168<entry></entry>169<entry></entry>170<entry><structfield>service_lines</structfield>[1][1]</entry>171<entry align="center">264</entry>172<entry align="center">314</entry>173</row>174<row>175<entry></entry>176<entry></entry>177<entry><structfield>service_lines</structfield>[1][23]</entry>178<entry align="center">286</entry>179<entry align="center">336</entry>180</row>181<!-- End of line numbers table. -->182<row>183<entry></entry>184<entry></entry>185<entry spanname="hspan">Drivers must set186<structfield>service_lines</structfield>[0][0] and187<structfield>service_lines</structfield>[1][0] to zero.</entry>188</row>189<row>190<entry>__u32</entry>191<entry><structfield>io_size</structfield></entry>192<entry spanname="hspan">Maximum number of bytes passed by193one &func-read; or &func-write; call, and the buffer size in bytes for194the &VIDIOC-QBUF; and &VIDIOC-DQBUF; ioctl. Drivers set this field to195the size of &v4l2-sliced-vbi-data; times the number of non-zero196elements in the returned <structfield>service_lines</structfield>197array (that is the number of lines potentially carrying data).</entry>198</row>199<row>200<entry>__u32</entry>201<entry><structfield>reserved</structfield>[2]</entry>202<entry spanname="hspan">This array is reserved for future203extensions. Applications and drivers must set it to zero.</entry>204</row>205</tbody>206</tgroup>207</table>208209<!-- See also vidioc-g-sliced-vbi-cap.sgml -->210<table frame="none" pgwide="1" id="vbi-services2">211<title>Sliced VBI services</title>212<tgroup cols="5">213<colspec colname="c1" colwidth="2*" />214<colspec colname="c2" colwidth="1*" />215<colspec colname="c3" colwidth="1*" />216<colspec colname="c4" colwidth="2*" />217<colspec colname="c5" colwidth="2*" />218<spanspec namest="c3" nameend="c5" spanname="rlp" />219<thead>220<row>221<entry>Symbol</entry>222<entry>Value</entry>223<entry>Reference</entry>224<entry>Lines, usually</entry>225<entry>Payload</entry>226</row>227</thead>228<tbody valign="top">229<row>230<entry><constant>V4L2_SLICED_TELETEXT_B</constant>231(Teletext System B)</entry>232<entry>0x0001</entry>233<entry><xref linkend="ets300706" />, <xref linkend="itu653" /></entry>234<entry>PAL/SECAM line 7-22, 320-335 (second field 7-22)</entry>235<entry>Last 42 of the 45 byte Teletext packet, that is236without clock run-in and framing code, lsb first transmitted.</entry>237</row>238<row>239<entry><constant>V4L2_SLICED_VPS</constant></entry>240<entry>0x0400</entry>241<entry><xref linkend="ets300231" /></entry>242<entry>PAL line 16</entry>243<entry>Byte number 3 to 15 according to Figure 9 of244ETS 300 231, lsb first transmitted.</entry>245</row>246<row>247<entry><constant>V4L2_SLICED_CAPTION_525</constant></entry>248<entry>0x1000</entry>249<entry><xref linkend="eia608" /></entry>250<entry>NTSC line 21, 284 (second field 21)</entry>251<entry>Two bytes in transmission order, including parity252bit, lsb first transmitted.</entry>253</row>254<row>255<entry><constant>V4L2_SLICED_WSS_625</constant></entry>256<entry>0x4000</entry>257<entry><xref linkend="itu1119" />, <xref linkend="en300294" /></entry>258<entry>PAL/SECAM line 23</entry>259<entry><screen>260Byte 0 1261msb lsb msb lsb262Bit 7 6 5 4 3 2 1 0 x x 13 12 11 10 9263</screen></entry>264</row>265<row>266<entry><constant>V4L2_SLICED_VBI_525</constant></entry>267<entry>0x1000</entry>268<entry spanname="rlp">Set of services applicable to 525269line systems.</entry>270</row>271<row>272<entry><constant>V4L2_SLICED_VBI_625</constant></entry>273<entry>0x4401</entry>274<entry spanname="rlp">Set of services applicable to 625275line systems.</entry>276</row>277</tbody>278</tgroup>279</table>280281<para>Drivers may return an &EINVAL; when applications attempt to282read or write data without prior format negotiation, after switching283the video standard (which may invalidate the negotiated VBI284parameters) and after switching the video input (which may change the285video standard as a side effect). The &VIDIOC-S-FMT; ioctl may return286an &EBUSY; when applications attempt to change the format while i/o is287in progress (between a &VIDIOC-STREAMON; and &VIDIOC-STREAMOFF; call,288and after the first &func-read; or &func-write; call).</para>289</section>290291<section>292<title>Reading and writing sliced VBI data</title>293294<para>A single &func-read; or &func-write; call must pass all data295belonging to one video frame. That is an array of296<structname>v4l2_sliced_vbi_data</structname> structures with one or297more elements and a total size not exceeding298<structfield>io_size</structfield> bytes. Likewise in streaming I/O299mode one buffer of <structfield>io_size</structfield> bytes must300contain data of one video frame. The <structfield>id</structfield> of301unused <structname>v4l2_sliced_vbi_data</structname> elements must be302zero.</para>303304<table frame="none" pgwide="1" id="v4l2-sliced-vbi-data">305<title>struct306<structname>v4l2_sliced_vbi_data</structname></title>307<tgroup cols="3">308&cs-def;309<tbody valign="top">310<row>311<entry>__u32</entry>312<entry><structfield>id</structfield></entry>313<entry>A flag from <xref linkend="vbi-services" />314identifying the type of data in this packet. Only a single bit must be315set. When the <structfield>id</structfield> of a captured packet is316zero, the packet is empty and the contents of other fields are317undefined. Applications shall ignore empty packets. When the318<structfield>id</structfield> of a packet for output is zero the319contents of the <structfield>data</structfield> field are undefined320and the driver must no longer insert data on the requested321<structfield>field</structfield> and322<structfield>line</structfield>.</entry>323</row>324<row>325<entry>__u32</entry>326<entry><structfield>field</structfield></entry>327<entry>The video field number this data has been captured328from, or shall be inserted at. <constant>0</constant> for the first329field, <constant>1</constant> for the second field.</entry>330</row>331<row>332<entry>__u32</entry>333<entry><structfield>line</structfield></entry>334<entry>The field (as opposed to frame) line number this335data has been captured from, or shall be inserted at. See <xref336linkend="vbi-525" /> and <xref linkend="vbi-625" /> for valid337values. Sliced VBI capture devices can set the line number of all338packets to <constant>0</constant> if the hardware cannot reliably339identify scan lines. The field number must always be valid.</entry>340</row>341<row>342<entry>__u32</entry>343<entry><structfield>reserved</structfield></entry>344<entry>This field is reserved for future extensions.345Applications and drivers must set it to zero.</entry>346</row>347<row>348<entry>__u8</entry>349<entry><structfield>data</structfield>[48]</entry>350<entry>The packet payload. See <xref351linkend="vbi-services" /> for the contents and number of352bytes passed for each data type. The contents of padding bytes at the353end of this array are undefined, drivers and applications shall ignore354them.</entry>355</row>356</tbody>357</tgroup>358</table>359360<para>Packets are always passed in ascending line number order,361without duplicate line numbers. The &func-write; function and the362&VIDIOC-QBUF; ioctl must return an &EINVAL; when applications violate363this rule. They must also return an &EINVAL; when applications pass an364incorrect field or line number, or a combination of365<structfield>field</structfield>, <structfield>line</structfield> and366<structfield>id</structfield> which has not been negotiated with the367&VIDIOC-G-FMT; or &VIDIOC-S-FMT; ioctl. When the line numbers are368unknown the driver must pass the packets in transmitted order. The369driver can insert empty packets with <structfield>id</structfield> set370to zero anywhere in the packet array.</para>371372<para>To assure synchronization and to distinguish from frame373dropping, when a captured frame does not carry any of the requested374data services drivers must pass one or more empty packets. When an375application fails to pass VBI data in time for output, the driver376must output the last VPS and WSS packet again, and disable the output377of Closed Caption and Teletext data, or output data which is ignored378by Closed Caption and Teletext decoders.</para>379380<para>A sliced VBI device may support <link381linkend="rw">read/write</link> and/or streaming (<link382linkend="mmap">memory mapping</link> and/or <link linkend="userp">user383pointer</link>) I/O. The latter bears the possibility of synchronizing384video and VBI data by using buffer timestamps.</para>385386</section>387388<section>389<title>Sliced VBI Data in MPEG Streams</title>390391<para>If a device can produce an MPEG output stream, it may be392capable of providing <link393linkend="sliced-vbi-format-negotitation">negotiated sliced VBI394services</link> as data embedded in the MPEG stream. Users or395applications control this sliced VBI data insertion with the <link396linkend="v4l2-mpeg-stream-vbi-fmt">V4L2_CID_MPEG_STREAM_VBI_FMT</link>397control.</para>398399<para>If the driver does not provide the <link400linkend="v4l2-mpeg-stream-vbi-fmt">V4L2_CID_MPEG_STREAM_VBI_FMT</link>401control, or only allows that control to be set to <link402linkend="v4l2-mpeg-stream-vbi-fmt"><constant>403V4L2_MPEG_STREAM_VBI_FMT_NONE</constant></link>, then the device404cannot embed sliced VBI data in the MPEG stream.</para>405406<para>The <link linkend="v4l2-mpeg-stream-vbi-fmt">407V4L2_CID_MPEG_STREAM_VBI_FMT</link> control does not implicitly set408the device driver to capture nor cease capturing sliced VBI data. The409control only indicates to embed sliced VBI data in the MPEG stream, if410an application has negotiated sliced VBI service be captured.</para>411412<para>It may also be the case that a device can embed sliced VBI413data in only certain types of MPEG streams: for example in an MPEG-2414PS but not an MPEG-2 TS. In this situation, if sliced VBI data415insertion is requested, the sliced VBI data will be embedded in MPEG416stream types when supported, and silently omitted from MPEG stream417types where sliced VBI data insertion is not supported by the device.418</para>419420<para>The following subsections specify the format of the421embedded sliced VBI data.</para>422423<section>424<title>MPEG Stream Embedded, Sliced VBI Data Format: NONE</title>425<para>The <link linkend="v4l2-mpeg-stream-vbi-fmt"><constant>426V4L2_MPEG_STREAM_VBI_FMT_NONE</constant></link> embedded sliced VBI427format shall be interpreted by drivers as a control to cease428embedding sliced VBI data in MPEG streams. Neither the device nor429driver shall insert "empty" embedded sliced VBI data packets in the430MPEG stream when this format is set. No MPEG stream data structures431are specified for this format.</para>432</section>433434<section>435<title>MPEG Stream Embedded, Sliced VBI Data Format: IVTV</title>436<para>The <link linkend="v4l2-mpeg-stream-vbi-fmt"><constant>437V4L2_MPEG_STREAM_VBI_FMT_IVTV</constant></link> embedded sliced VBI438format, when supported, indicates to the driver to embed up to 36439lines of sliced VBI data per frame in an MPEG-2 <emphasis>Private440Stream 1 PES</emphasis> packet encapsulated in an MPEG-2 <emphasis>441Program Pack</emphasis> in the MPEG stream.</para>442443<para><emphasis>Historical context</emphasis>: This format444specification originates from a custom, embedded, sliced VBI data445format used by the <filename>ivtv</filename> driver. This format446has already been informally specified in the kernel sources in the447file <filename>Documentation/video4linux/cx2341x/README.vbi</filename>448. The maximum size of the payload and other aspects of this format449are driven by the CX23415 MPEG decoder's capabilities and limitations450with respect to extracting, decoding, and displaying sliced VBI data451embedded within an MPEG stream.</para>452453<para>This format's use is <emphasis>not</emphasis> exclusive to454the <filename>ivtv</filename> driver <emphasis>nor</emphasis>455exclusive to CX2341x devices, as the sliced VBI data packet insertion456into the MPEG stream is implemented in driver software. At least the457<filename>cx18</filename> driver provides sliced VBI data insertion458into an MPEG-2 PS in this format as well.</para>459460<para>The following definitions specify the payload of the461MPEG-2 <emphasis>Private Stream 1 PES</emphasis> packets that contain462sliced VBI data when <link linkend="v4l2-mpeg-stream-vbi-fmt">463<constant>V4L2_MPEG_STREAM_VBI_FMT_IVTV</constant></link> is set.464(The MPEG-2 <emphasis>Private Stream 1 PES</emphasis> packet header465and encapsulating MPEG-2 <emphasis>Program Pack</emphasis> header are466not detailed here. Please refer to the MPEG-2 specifications for467details on those packet headers.)</para>468469<para>The payload of the MPEG-2 <emphasis>Private Stream 1 PES470</emphasis> packets that contain sliced VBI data is specified by471&v4l2-mpeg-vbi-fmt-ivtv;. The payload is variable472length, depending on the actual number of lines of sliced VBI data473present in a video frame. The payload may be padded at the end with474unspecified fill bytes to align the end of the payload to a 4-byte475boundary. The payload shall never exceed 1552 bytes (2 fields with47618 lines/field with 43 bytes of data/line and a 4 byte magic number).477</para>478479<table frame="none" pgwide="1" id="v4l2-mpeg-vbi-fmt-ivtv">480<title>struct <structname>v4l2_mpeg_vbi_fmt_ivtv</structname>481</title>482<tgroup cols="4">483&cs-ustr;484<tbody valign="top">485<row>486<entry>__u8</entry>487<entry><structfield>magic</structfield>[4]</entry>488<entry></entry>489<entry>A "magic" constant from <xref490linkend="v4l2-mpeg-vbi-fmt-ivtv-magic" /> that indicates491this is a valid sliced VBI data payload and also indicates which492member of the anonymous union, <structfield>itv0</structfield> or493<structfield>ITV0</structfield>, to use for the payload data.</entry>494</row>495<row>496<entry>union</entry>497<entry>(anonymous)</entry>498</row>499<row>500<entry></entry>501<entry>struct <link linkend="v4l2-mpeg-vbi-itv0">502<structname>v4l2_mpeg_vbi_itv0</structname></link>503</entry>504<entry><structfield>itv0</structfield></entry>505<entry>The primary form of the sliced VBI data payload506that contains anywhere from 1 to 35 lines of sliced VBI data.507Line masks are provided in this form of the payload indicating508which VBI lines are provided.</entry>509</row>510<row>511<entry></entry>512<entry>struct <link linkend="v4l2-mpeg-vbi-itv0-1">513<structname>v4l2_mpeg_vbi_ITV0</structname></link>514</entry>515<entry><structfield>ITV0</structfield></entry>516<entry>An alternate form of the sliced VBI data payload517used when 36 lines of sliced VBI data are present. No line masks are518provided in this form of the payload; all valid line mask bits are519implcitly set.</entry>520</row>521</tbody>522</tgroup>523</table>524525<table frame="none" pgwide="1" id="v4l2-mpeg-vbi-fmt-ivtv-magic">526<title>Magic Constants for &v4l2-mpeg-vbi-fmt-ivtv;527<structfield>magic</structfield> field</title>528<tgroup cols="3">529&cs-def;530<thead>531<row>532<entry align="left">Defined Symbol</entry>533<entry align="left">Value</entry>534<entry align="left">Description</entry>535</row>536</thead>537<tbody valign="top">538<row>539<entry><constant>V4L2_MPEG_VBI_IVTV_MAGIC0</constant>540</entry>541<entry>"itv0"</entry>542<entry>Indicates the <structfield>itv0</structfield>543member of the union in &v4l2-mpeg-vbi-fmt-ivtv; is valid.</entry>544</row>545<row>546<entry><constant>V4L2_MPEG_VBI_IVTV_MAGIC1</constant>547</entry>548<entry>"ITV0"</entry>549<entry>Indicates the <structfield>ITV0</structfield>550member of the union in &v4l2-mpeg-vbi-fmt-ivtv; is valid and551that 36 lines of sliced VBI data are present.</entry>552</row>553</tbody>554</tgroup>555</table>556557<table frame="none" pgwide="1" id="v4l2-mpeg-vbi-itv0">558<title>struct <structname>v4l2_mpeg_vbi_itv0</structname>559</title>560<tgroup cols="3">561&cs-str;562<tbody valign="top">563<row>564<entry>__le32</entry>565<entry><structfield>linemask</structfield>[2]</entry>566<entry><para>Bitmasks indicating the VBI service lines567present. These <structfield>linemask</structfield> values are stored568in little endian byte order in the MPEG stream. Some reference569<structfield>linemask</structfield> bit positions with their570corresponding VBI line number and video field are given below.571b<subscript>0</subscript> indicates the least significant bit of a572<structfield>linemask</structfield> value:<screen>573<structfield>linemask</structfield>[0] b<subscript>0</subscript>: line 6 first field574<structfield>linemask</structfield>[0] b<subscript>17</subscript>: line 23 first field575<structfield>linemask</structfield>[0] b<subscript>18</subscript>: line 6 second field576<structfield>linemask</structfield>[0] b<subscript>31</subscript>: line 19 second field577<structfield>linemask</structfield>[1] b<subscript>0</subscript>: line 20 second field578<structfield>linemask</structfield>[1] b<subscript>3</subscript>: line 23 second field579<structfield>linemask</structfield>[1] b<subscript>4</subscript>-b<subscript>31</subscript>: unused and set to 0</screen></para></entry>580</row>581<row>582<entry>struct <link linkend="v4l2-mpeg-vbi-itv0-line">583<structname>v4l2_mpeg_vbi_itv0_line</structname></link>584</entry>585<entry><structfield>line</structfield>[35]</entry>586<entry>This is a variable length array that holds from 1587to 35 lines of sliced VBI data. The sliced VBI data lines present588correspond to the bits set in the <structfield>linemask</structfield>589array, starting from b<subscript>0</subscript> of <structfield>590linemask</structfield>[0] up through b<subscript>31</subscript> of591<structfield>linemask</structfield>[0], and from b<subscript>0592</subscript> of <structfield>linemask</structfield>[1] up through b593<subscript>3</subscript> of <structfield>linemask</structfield>[1].594<structfield>line</structfield>[0] corresponds to the first bit595found set in the <structfield>linemask</structfield> array,596<structfield>line</structfield>[1] corresponds to the second bit597found set in the <structfield>linemask</structfield> array, etc.598If no <structfield>linemask</structfield> array bits are set, then599<structfield>line</structfield>[0] may contain one line of600unspecified data that should be ignored by applications.</entry>601</row>602</tbody>603</tgroup>604</table>605606<table frame="none" pgwide="1" id="v4l2-mpeg-vbi-itv0-1">607<title>struct <structname>v4l2_mpeg_vbi_ITV0</structname>608</title>609<tgroup cols="3">610&cs-str;611<tbody valign="top">612<row>613<entry>struct <link linkend="v4l2-mpeg-vbi-itv0-line">614<structname>v4l2_mpeg_vbi_itv0_line</structname></link>615</entry>616<entry><structfield>line</structfield>[36]</entry>617<entry>A fixed length array of 36 lines of sliced VBI618data. <structfield>line</structfield>[0] through <structfield>line619</structfield>[17] correspond to lines 6 through 23 of the620first field. <structfield>line</structfield>[18] through621<structfield>line</structfield>[35] corresponds to lines 6622through 23 of the second field.</entry>623</row>624</tbody>625</tgroup>626</table>627628<table frame="none" pgwide="1" id="v4l2-mpeg-vbi-itv0-line">629<title>struct <structname>v4l2_mpeg_vbi_itv0_line</structname>630</title>631<tgroup cols="3">632&cs-str;633<tbody valign="top">634<row>635<entry>__u8</entry>636<entry><structfield>id</structfield></entry>637<entry>A line identifier value from638<xref linkend="ITV0-Line-Identifier-Constants" /> that indicates639the type of sliced VBI data stored on this line.</entry>640</row>641<row>642<entry>__u8</entry>643<entry><structfield>data</structfield>[42]</entry>644<entry>The sliced VBI data for the line.</entry>645</row>646</tbody>647</tgroup>648</table>649650<table frame="none" pgwide="1" id="ITV0-Line-Identifier-Constants">651<title>Line Identifiers for struct <link652linkend="v4l2-mpeg-vbi-itv0-line"><structname>653v4l2_mpeg_vbi_itv0_line</structname></link> <structfield>id654</structfield> field</title>655<tgroup cols="3">656&cs-def;657<thead>658<row>659<entry align="left">Defined Symbol</entry>660<entry align="left">Value</entry>661<entry align="left">Description</entry>662</row>663</thead>664<tbody valign="top">665<row>666<entry><constant>V4L2_MPEG_VBI_IVTV_TELETEXT_B</constant>667</entry>668<entry>1</entry>669<entry>Refer to <link linkend="vbi-services2">670Sliced VBI services</link> for a description of the line payload.</entry>671</row>672<row>673<entry><constant>V4L2_MPEG_VBI_IVTV_CAPTION_525</constant>674</entry>675<entry>4</entry>676<entry>Refer to <link linkend="vbi-services2">677Sliced VBI services</link> for a description of the line payload.</entry>678</row>679<row>680<entry><constant>V4L2_MPEG_VBI_IVTV_WSS_625</constant>681</entry>682<entry>5</entry>683<entry>Refer to <link linkend="vbi-services2">684Sliced VBI services</link> for a description of the line payload.</entry>685</row>686<row>687<entry><constant>V4L2_MPEG_VBI_IVTV_VPS</constant>688</entry>689<entry>7</entry>690<entry>Refer to <link linkend="vbi-services2">691Sliced VBI services</link> for a description of the line payload.</entry>692</row>693</tbody>694</tgroup>695</table>696697</section>698</section>699700701<!--702Local Variables:703mode: sgml704sgml-parent-document: "v4l2.sgml"705indent-tabs-mode: nil706End:707-->708709710