• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
2<HTML
3><HEAD
4><TITLE
5>ioctl VIDIOC_G_SLICED_VBI_CAP</TITLE
6><META
7NAME="GENERATOR"
8CONTENT="Modular DocBook HTML Stylesheet Version 1.79"><LINK
9REL="HOME"
10TITLE="Video for Linux Two API Specification"
11HREF="book1.htm"><LINK
12REL="UP"
13TITLE="Function Reference"
14HREF="r7624.htm"><LINK
15REL="PREVIOUS"
16TITLE="ioctl VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY"
17HREF="r11946.htm"><LINK
18REL="NEXT"
19TITLE="ioctl VIDIOC_G_STD, VIDIOC_S_STD"
20HREF="r12265.htm"></HEAD
21><BODY
22CLASS="REFENTRY"
23BGCOLOR="#FFFFFF"
24TEXT="#000000"
25LINK="#0000FF"
26VLINK="#840084"
27ALINK="#0000FF"
28><DIV
29CLASS="NAVHEADER"
30><TABLE
31SUMMARY="Header navigation table"
32WIDTH="100%"
33BORDER="0"
34CELLPADDING="0"
35CELLSPACING="0"
36><TR
37><TH
38COLSPAN="3"
39ALIGN="center"
40>Video for Linux Two API Specification: Revision 0.24</TH
41></TR
42><TR
43><TD
44WIDTH="10%"
45ALIGN="left"
46VALIGN="bottom"
47><A
48HREF="r11946.htm"
49ACCESSKEY="P"
50>Prev</A
51></TD
52><TD
53WIDTH="80%"
54ALIGN="center"
55VALIGN="bottom"
56></TD
57><TD
58WIDTH="10%"
59ALIGN="right"
60VALIGN="bottom"
61><A
62HREF="r12265.htm"
63ACCESSKEY="N"
64>Next</A
65></TD
66></TR
67></TABLE
68><HR
69ALIGN="LEFT"
70WIDTH="100%"></DIV
71><H1
72><A
73NAME="VIDIOC-G-SLICED-VBI-CAP"
74></A
75>ioctl VIDIOC_G_SLICED_VBI_CAP</H1
76><DIV
77CLASS="REFNAMEDIV"
78><A
79NAME="AEN12055"
80></A
81><H2
82>Name</H2
83>VIDIOC_G_SLICED_VBI_CAP&nbsp;--&nbsp;Query sliced VBI capabilities</DIV
84><DIV
85CLASS="REFSYNOPSISDIV"
86><A
87NAME="AEN12058"
88></A
89><H2
90>Synopsis</H2
91><DIV
92CLASS="FUNCSYNOPSIS"
93><P
94></P
95><A
96NAME="AEN12059"
97></A
98><P
99><CODE
100><CODE
101CLASS="FUNCDEF"
102>int ioctl</CODE
103>(int fd, int request, struct v4l2_sliced_vbi_cap *argp);</CODE
104></P
105><P
106></P
107></DIV
108></DIV
109><DIV
110CLASS="REFSECT1"
111><A
112NAME="AEN12069"
113></A
114><H2
115>Arguments</H2
116><P
117></P
118><DIV
119CLASS="VARIABLELIST"
120><DL
121><DT
122><CODE
123CLASS="PARAMETER"
124>fd</CODE
125></DT
126><DD
127><P
128>File descriptor returned by <A
129HREF="r14090.htm"
130><CODE
131CLASS="FUNCTION"
132>open()</CODE
133></A
134>.</P
135></DD
136><DT
137><CODE
138CLASS="PARAMETER"
139>request</CODE
140></DT
141><DD
142><P
143>VIDIOC_G_SLICED_VBI_CAP</P
144></DD
145><DT
146><CODE
147CLASS="PARAMETER"
148>argp</CODE
149></DT
150><DD
151><P
152></P
153></DD
154></DL
155></DIV
156></DIV
157><DIV
158CLASS="REFSECT1"
159><A
160NAME="AEN12089"
161></A
162><H2
163>Description</H2
164><P
165>To find out which data services are supported by a sliced
166VBI capture or output device, applications initialize the
167<CODE
168CLASS="STRUCTFIELD"
169>type</CODE
170> field of a struct&nbsp;<A
171HREF="r12051.htm#V4L2-SLICED-VBI-CAP"
172>v4l2_sliced_vbi_cap</A
173>,
174clear the <CODE
175CLASS="STRUCTFIELD"
176>reserved</CODE
177> array and
178call the <CODE
179CLASS="CONSTANT"
180>VIDIOC_G_SLICED_VBI_CAP</CODE
181> ioctl. The
182driver fills in the remaining fields or returns an <SPAN
183CLASS="ERRORCODE"
184>EINVAL</SPAN
185> error code if the
186sliced VBI API is unsupported or <CODE
187CLASS="STRUCTFIELD"
188>type</CODE
189>
190is invalid.</P
191><P
192>Note the <CODE
193CLASS="STRUCTFIELD"
194>type</CODE
195> field was added,
196and the ioctl changed from read-only to write-read, in Linux 2.6.19.</P
197><DIV
198CLASS="TABLE"
199><A
200NAME="V4L2-SLICED-VBI-CAP"
201></A
202><P
203><B
204>Table 1. struct <CODE
205CLASS="STRUCTNAME"
206>v4l2_sliced_vbi_cap</CODE
207></B
208></P
209><TABLE
210BORDER="0"
211FRAME="void"
212WIDTH="100%"
213CLASS="CALSTABLE"
214><COL
215WIDTH="25%"
216TITLE="C1"><COL
217WIDTH="25%"
218TITLE="C2"><COL
219WIDTH="17%"
220TITLE="C3"><COL
221WIDTH="17%"
222TITLE="C4"><COL
223WIDTH="17%"
224TITLE="C5"><TBODY
225VALIGN="TOP"
226><TR
227><TD
228>__u16</TD
229><TD
230><CODE
231CLASS="STRUCTFIELD"
232>service_set</CODE
233></TD
234><TD
235COLSPAN="3"
236>A set of all data services
237supported by the driver. Equal to the union of all elements of the
238<CODE
239CLASS="STRUCTFIELD"
240>service_lines </CODE
241> array.</TD
242></TR
243><TR
244><TD
245>__u16</TD
246><TD
247><CODE
248CLASS="STRUCTFIELD"
249>service_lines</CODE
250>[2][24]</TD
251><TD
252COLSPAN="3"
253>Each element of this array
254contains a set of data services the hardware can look for or insert
255into a particular scan line. Data services are defined in <A
256HREF="r12051.htm#VBI-SERVICES"
257>Table 2</A
258>. Array indices map to ITU-R
259line numbers (see also <A
260HREF="x7013.htm#VBI-525"
261>Figure 4-2</A
262> and <A
263HREF="x7013.htm#VBI-625"
264>Figure 4-3</A
265>) as follows:</TD
266></TR
267><TR
268><TD
269>&nbsp;</TD
270><TD
271>&nbsp;</TD
272><TD
273>Element</TD
274><TD
275>525 line systems</TD
276><TD
277>625 line systems</TD
278></TR
279><TR
280><TD
281>&nbsp;</TD
282><TD
283>&nbsp;</TD
284><TD
285><CODE
286CLASS="STRUCTFIELD"
287>service_lines</CODE
288>[0][1]</TD
289><TD
290ALIGN="CENTER"
291>1</TD
292><TD
293ALIGN="CENTER"
294>1</TD
295></TR
296><TR
297><TD
298>&nbsp;</TD
299><TD
300>&nbsp;</TD
301><TD
302><CODE
303CLASS="STRUCTFIELD"
304>service_lines</CODE
305>[0][23]</TD
306><TD
307ALIGN="CENTER"
308>23</TD
309><TD
310ALIGN="CENTER"
311>23</TD
312></TR
313><TR
314><TD
315>&nbsp;</TD
316><TD
317>&nbsp;</TD
318><TD
319><CODE
320CLASS="STRUCTFIELD"
321>service_lines</CODE
322>[1][1]</TD
323><TD
324ALIGN="CENTER"
325>264</TD
326><TD
327ALIGN="CENTER"
328>314</TD
329></TR
330><TR
331><TD
332>&nbsp;</TD
333><TD
334>&nbsp;</TD
335><TD
336><CODE
337CLASS="STRUCTFIELD"
338>service_lines</CODE
339>[1][23]</TD
340><TD
341ALIGN="CENTER"
342>286</TD
343><TD
344ALIGN="CENTER"
345>336</TD
346></TR
347><TR
348><TD
349>&nbsp;</TD
350><TD
351>&nbsp;</TD
352><TD
353>&nbsp;</TD
354><TD
355>&nbsp;</TD
356><TD
357>&nbsp;</TD
358></TR
359><TR
360><TD
361>&nbsp;</TD
362><TD
363>&nbsp;</TD
364><TD
365COLSPAN="3"
366>The number of VBI lines the
367hardware can capture or output per frame, or the number of services it
368can identify on a given line may be limited. For example on PAL line
36916 the hardware may be able to look for a VPS or Teletext signal, but
370not both at the same time. Applications can learn about these limits
371using the <A
372HREF="r10944.htm"
373><CODE
374CLASS="CONSTANT"
375>VIDIOC_S_FMT</CODE
376></A
377> ioctl as described in <A
378HREF="x7236.htm"
379>Section 4.8</A
380>.</TD
381></TR
382><TR
383><TD
384>&nbsp;</TD
385><TD
386>&nbsp;</TD
387><TD
388>&nbsp;</TD
389><TD
390>&nbsp;</TD
391><TD
392>&nbsp;</TD
393></TR
394><TR
395><TD
396>&nbsp;</TD
397><TD
398>&nbsp;</TD
399><TD
400COLSPAN="3"
401>Drivers must set
402<CODE
403CLASS="STRUCTFIELD"
404>service_lines</CODE
405>[0][0] and
406<CODE
407CLASS="STRUCTFIELD"
408>service_lines</CODE
409>[1][0] to zero.</TD
410></TR
411><TR
412><TD
413>enum&nbsp;<A
414HREF="x5953.htm#V4L2-BUF-TYPE"
415>v4l2_buf_type</A
416></TD
417><TD
418><CODE
419CLASS="STRUCTFIELD"
420>type</CODE
421></TD
422><TD
423>Type of the data stream, see <A
424HREF="x5953.htm#V4L2-BUF-TYPE"
425>Table 3-2</A
426>. Should be
427<CODE
428CLASS="CONSTANT"
429>V4L2_BUF_TYPE_SLICED_VBI_CAPTURE</CODE
430> or
431<CODE
432CLASS="CONSTANT"
433>V4L2_BUF_TYPE_SLICED_VBI_OUTPUT</CODE
434>.</TD
435><TD
436>&nbsp;</TD
437><TD
438>&nbsp;</TD
439></TR
440><TR
441><TD
442>__u32</TD
443><TD
444><CODE
445CLASS="STRUCTFIELD"
446>reserved</CODE
447>[3]</TD
448><TD
449COLSPAN="3"
450>This array is reserved for future
451extensions. Applications and drivers must set it to zero.</TD
452></TR
453></TBODY
454></TABLE
455></DIV
456><DIV
457CLASS="TABLE"
458><A
459NAME="VBI-SERVICES"
460></A
461><P
462><B
463>Table 2. Sliced VBI services</B
464></P
465><TABLE
466BORDER="0"
467FRAME="void"
468WIDTH="100%"
469CLASS="CALSTABLE"
470><COL
471WIDTH="25%"
472TITLE="C1"><COL
473WIDTH="12%"
474TITLE="C2"><COL
475WIDTH="12%"
476TITLE="C3"><COL
477WIDTH="25%"
478TITLE="C4"><COL
479WIDTH="25%"
480TITLE="C5"><THEAD
481><TR
482><TH
483>Symbol</TH
484><TH
485>Value</TH
486><TH
487>Reference</TH
488><TH
489>Lines, usually</TH
490><TH
491>Payload</TH
492></TR
493></THEAD
494><TBODY
495VALIGN="TOP"
496><TR
497><TD
498><CODE
499CLASS="CONSTANT"
500>V4L2_SLICED_TELETEXT_B</CODE
501> (Teletext
502System B)</TD
503><TD
504>0x0001</TD
505><TD
506><A
507HREF="b17127.htm#ETS300706"
508><ABBR
509CLASS="ABBREV"
510>ETS&nbsp;300&nbsp;706</ABBR
511></A
512>, <A
513HREF="b17127.htm#ITU653"
514><ABBR
515CLASS="ABBREV"
516>ITU&nbsp;BT.653</ABBR
517></A
518></TD
519><TD
520>PAL/SECAM line 7-22, 320-335 (second field 7-22)</TD
521><TD
522>Last 42 of the 45 byte Teletext packet, that is
523without clock run-in and framing code, lsb first transmitted.</TD
524></TR
525><TR
526><TD
527><CODE
528CLASS="CONSTANT"
529>V4L2_SLICED_VPS</CODE
530></TD
531><TD
532>0x0400</TD
533><TD
534><A
535HREF="b17127.htm#ETS300231"
536><ABBR
537CLASS="ABBREV"
538>ETS&nbsp;300&nbsp;231</ABBR
539></A
540></TD
541><TD
542>PAL line 16</TD
543><TD
544>Byte number 3 to 15 according to Figure 9 of
545ETS&nbsp;300&nbsp;231, lsb first transmitted.</TD
546></TR
547><TR
548><TD
549><CODE
550CLASS="CONSTANT"
551>V4L2_SLICED_CAPTION_525</CODE
552></TD
553><TD
554>0x1000</TD
555><TD
556><A
557HREF="b17127.htm#EIA608"
558><ABBR
559CLASS="ABBREV"
560>EIA&nbsp;608-B</ABBR
561></A
562></TD
563><TD
564>NTSC line 21, 284 (second field 21)</TD
565><TD
566>Two bytes in transmission order, including parity
567bit, lsb first transmitted.</TD
568></TR
569><TR
570><TD
571><CODE
572CLASS="CONSTANT"
573>V4L2_SLICED_WSS_625</CODE
574></TD
575><TD
576>0x4000</TD
577><TD
578><A
579HREF="b17127.htm#EN300294"
580><ABBR
581CLASS="ABBREV"
582>EN&nbsp;300&nbsp;294</ABBR
583></A
584>, <A
585HREF="b17127.htm#ITU1119"
586><ABBR
587CLASS="ABBREV"
588>ITU&nbsp;BT.1119</ABBR
589></A
590></TD
591><TD
592>PAL/SECAM line 23</TD
593><TD
594><PRE
595CLASS="SCREEN"
596>Byte        0                 1
597     msb         lsb  msb           lsb
598Bit  7 6 5 4 3 2 1 0  x x 13 12 11 10 9</PRE
599></TD
600></TR
601><TR
602><TD
603><CODE
604CLASS="CONSTANT"
605>V4L2_SLICED_VBI_525</CODE
606></TD
607><TD
608>0x1000</TD
609><TD
610COLSPAN="3"
611>Set of services applicable to 525
612line systems.</TD
613></TR
614><TR
615><TD
616><CODE
617CLASS="CONSTANT"
618>V4L2_SLICED_VBI_625</CODE
619></TD
620><TD
621>0x4401</TD
622><TD
623COLSPAN="3"
624>Set of services applicable to 625
625line systems.</TD
626></TR
627></TBODY
628></TABLE
629></DIV
630></DIV
631><DIV
632CLASS="REFSECT1"
633><A
634NAME="AEN12252"
635></A
636><H2
637>Return Value</H2
638><P
639>On success <SPAN
640CLASS="RETURNVALUE"
641>0</SPAN
642> is returned, on error <SPAN
643CLASS="RETURNVALUE"
644>-1</SPAN
645> and the <CODE
646CLASS="VARNAME"
647>errno</CODE
648> variable is set appropriately:</P
649><P
650></P
651><DIV
652CLASS="VARIABLELIST"
653><DL
654><DT
655><SPAN
656CLASS="ERRORCODE"
657>EINVAL</SPAN
658></DT
659><DD
660><P
661>The device does not support sliced VBI capturing or
662output, or the value in the <CODE
663CLASS="STRUCTFIELD"
664>type</CODE
665> field is
666wrong.</P
667></DD
668></DL
669></DIV
670></DIV
671><DIV
672CLASS="NAVFOOTER"
673><HR
674ALIGN="LEFT"
675WIDTH="100%"><TABLE
676SUMMARY="Footer navigation table"
677WIDTH="100%"
678BORDER="0"
679CELLPADDING="0"
680CELLSPACING="0"
681><TR
682><TD
683WIDTH="33%"
684ALIGN="left"
685VALIGN="top"
686><A
687HREF="r11946.htm"
688ACCESSKEY="P"
689>Prev</A
690></TD
691><TD
692WIDTH="34%"
693ALIGN="center"
694VALIGN="top"
695><A
696HREF="book1.htm"
697ACCESSKEY="H"
698>Home</A
699></TD
700><TD
701WIDTH="33%"
702ALIGN="right"
703VALIGN="top"
704><A
705HREF="r12265.htm"
706ACCESSKEY="N"
707>Next</A
708></TD
709></TR
710><TR
711><TD
712WIDTH="33%"
713ALIGN="left"
714VALIGN="top"
715>ioctl VIDIOC_G_PRIORITY, VIDIOC_S_PRIORITY</TD
716><TD
717WIDTH="34%"
718ALIGN="center"
719VALIGN="top"
720><A
721HREF="r7624.htm"
722ACCESSKEY="U"
723>Up</A
724></TD
725><TD
726WIDTH="33%"
727ALIGN="right"
728VALIGN="top"
729>ioctl VIDIOC_G_STD, VIDIOC_S_STD</TD
730></TR
731></TABLE
732></DIV
733></BODY
734></HTML
735>
736