1<title>DVB Video Device</title>
2<para>The DVB video device controls the MPEG2 video decoder of the DVB hardware. It
3can be accessed through <emphasis role="tt">/dev/dvb/adapter0/video0</emphasis>. Data types and and
4ioctl definitions can be accessed by including <emphasis role="tt">linux/dvb/video.h</emphasis> in your
5application.
6</para>
7<para>Note that the DVB video device only controls decoding of the MPEG video stream, not
8its presentation on the TV or computer screen. On PCs this is typically handled by an
9associated video4linux device, e.g. <emphasis role="tt">/dev/video</emphasis>, which allows scaling and defining output
10windows.
11</para>
12<para>Some DVB cards don&#8217;t have their own MPEG decoder, which results in the omission of
13the audio and video device as well as the video4linux device.
14</para>
15<para>The ioctls that deal with SPUs (sub picture units) and navigation packets are only
16supported on some MPEG decoders made for DVD playback.
17</para>
18<para>
19These ioctls were also used by V4L2 to control MPEG decoders implemented in V4L2. The use
20of these ioctls for that purpose has been made obsolete and proper V4L2 ioctls or controls
21have been created to replace that functionality.</para>
22<section id="video_types">
23<title>Video Data Types</title>
24
25<section id="video-format-t">
26<title>video_format_t</title>
27<para>The <emphasis role="tt">video_format_t</emphasis> data type defined by
28</para>
29<programlisting>
30typedef enum {
31	VIDEO_FORMAT_4_3,     /&#x22C6; Select 4:3 format &#x22C6;/
32	VIDEO_FORMAT_16_9,    /&#x22C6; Select 16:9 format. &#x22C6;/
33	VIDEO_FORMAT_221_1    /&#x22C6; 2.21:1 &#x22C6;/
34} video_format_t;
35</programlisting>
36<para>is used in the VIDEO_SET_FORMAT function (??) to tell the driver which aspect ratio
37the output hardware (e.g. TV) has. It is also used in the data structures video_status
38(??) returned by VIDEO_GET_STATUS (??) and video_event (??) returned by
39VIDEO_GET_EVENT (??) which report about the display format of the current video
40stream.
41</para>
42</section>
43
44<section id="video-displayformat-t">
45<title>video_displayformat_t</title>
46<para>In case the display format of the video stream and of the display hardware differ the
47application has to specify how to handle the cropping of the picture. This can be done using
48the VIDEO_SET_DISPLAY_FORMAT call (??) which accepts
49</para>
50<programlisting>
51typedef enum {
52	VIDEO_PAN_SCAN,       /&#x22C6; use pan and scan format &#x22C6;/
53	VIDEO_LETTER_BOX,     /&#x22C6; use letterbox format &#x22C6;/
54	VIDEO_CENTER_CUT_OUT  /&#x22C6; use center cut out format &#x22C6;/
55} video_displayformat_t;
56</programlisting>
57<para>as argument.
58</para>
59</section>
60
61<section id="video-stream-source-t">
62<title>video_stream_source_t</title>
63<para>The video stream source is set through the VIDEO_SELECT_SOURCE call and can take
64the following values, depending on whether we are replaying from an internal (demuxer) or
65external (user write) source.
66</para>
67<programlisting>
68typedef enum {
69	VIDEO_SOURCE_DEMUX, /&#x22C6; Select the demux as the main source &#x22C6;/
70	VIDEO_SOURCE_MEMORY /&#x22C6; If this source is selected, the stream
71			       comes from the user through the write
72			       system call &#x22C6;/
73} video_stream_source_t;
74</programlisting>
75<para>VIDEO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the
76DVR device) as the source of the video stream. If VIDEO_SOURCE_MEMORY
77is selected the stream comes from the application through the <emphasis role="tt">write()</emphasis> system
78call.
79</para>
80</section>
81
82<section id="video-play-state-t">
83<title>video_play_state_t</title>
84<para>The following values can be returned by the VIDEO_GET_STATUS call representing the
85state of video playback.
86</para>
87<programlisting>
88typedef enum {
89	VIDEO_STOPPED, /&#x22C6; Video is stopped &#x22C6;/
90	VIDEO_PLAYING, /&#x22C6; Video is currently playing &#x22C6;/
91	VIDEO_FREEZED  /&#x22C6; Video is freezed &#x22C6;/
92} video_play_state_t;
93</programlisting>
94</section>
95
96<section id="video-command">
97<title>struct video_command</title>
98<para>The structure must be zeroed before use by the application
99This ensures it can be extended safely in the future.</para>
100<programlisting>
101struct video_command {
102	__u32 cmd;
103	__u32 flags;
104	union {
105		struct {
106			__u64 pts;
107		} stop;
108
109		struct {
110			/&#x22C6; 0 or 1000 specifies normal speed,
111			   1 specifies forward single stepping,
112			   -1 specifies backward single stepping,
113			   &gt;>1: playback at speed/1000 of the normal speed,
114			   &lt;-1: reverse playback at (-speed/1000) of the normal speed. &#x22C6;/
115			__s32 speed;
116			__u32 format;
117		} play;
118
119		struct {
120			__u32 data[16];
121		} raw;
122	};
123};
124</programlisting>
125</section>
126
127<section id="video-size-t">
128<title>video_size_t</title>
129<programlisting>
130typedef struct {
131	int w;
132	int h;
133	video_format_t aspect_ratio;
134} video_size_t;
135</programlisting>
136</section>
137
138
139<section id="video-event">
140<title>struct video_event</title>
141<para>The following is the structure of a video event as it is returned by the VIDEO_GET_EVENT
142call.
143</para>
144<programlisting>
145struct video_event {
146	__s32 type;
147#define VIDEO_EVENT_SIZE_CHANGED	1
148#define VIDEO_EVENT_FRAME_RATE_CHANGED	2
149#define VIDEO_EVENT_DECODER_STOPPED 	3
150#define VIDEO_EVENT_VSYNC 		4
151	__kernel_time_t timestamp;
152	union {
153		video_size_t size;
154		unsigned int frame_rate;	/&#x22C6; in frames per 1000sec &#x22C6;/
155		unsigned char vsync_field;	/&#x22C6; unknown/odd/even/progressive &#x22C6;/
156	} u;
157};
158</programlisting>
159</section>
160
161<section id="video-status">
162<title>struct video_status</title>
163<para>The VIDEO_GET_STATUS call returns the following structure informing about various
164states of the playback operation.
165</para>
166<programlisting>
167struct video_status {
168	int                   video_blank;   /&#x22C6; blank video on freeze? &#x22C6;/
169	video_play_state_t    play_state;    /&#x22C6; current state of playback &#x22C6;/
170	video_stream_source_t stream_source; /&#x22C6; current source (demux/memory) &#x22C6;/
171	video_format_t        video_format;  /&#x22C6; current aspect ratio of stream &#x22C6;/
172	video_displayformat_t display_format;/&#x22C6; selected cropping mode &#x22C6;/
173};
174</programlisting>
175<para>If video_blank is set video will be blanked out if the channel is changed or if playback is
176stopped. Otherwise, the last picture will be displayed. play_state indicates if the video is
177currently frozen, stopped, or being played back. The stream_source corresponds to the seleted
178source for the video stream. It can come either from the demultiplexer or from memory.
179The video_format indicates the aspect ratio (one of 4:3 or 16:9) of the currently
180played video stream. Finally, display_format corresponds to the selected cropping
181mode in case the source video format is not the same as the format of the output
182device.
183</para>
184</section>
185
186<section id="video-still-picture">
187<title>struct video_still_picture</title>
188<para>An I-frame displayed via the VIDEO_STILLPICTURE call is passed on within the
189following structure.
190</para>
191<programlisting>
192/&#x22C6; pointer to and size of a single iframe in memory &#x22C6;/
193struct video_still_picture {
194	char &#x22C6;iFrame;        /&#x22C6; pointer to a single iframe in memory &#x22C6;/
195	int32_t size;
196};
197</programlisting>
198</section>
199
200<section id="video_caps">
201<title>video capabilities</title>
202<para>A call to VIDEO_GET_CAPABILITIES returns an unsigned integer with the following
203bits set according to the hardwares capabilities.
204</para>
205<programlisting>
206 /&#x22C6; bit definitions for capabilities: &#x22C6;/
207 /&#x22C6; can the hardware decode MPEG1 and/or MPEG2? &#x22C6;/
208 #define VIDEO_CAP_MPEG1   1
209 #define VIDEO_CAP_MPEG2   2
210 /&#x22C6; can you send a system and/or program stream to video device?
211    (you still have to open the video and the audio device but only
212     send the stream to the video device) &#x22C6;/
213 #define VIDEO_CAP_SYS     4
214 #define VIDEO_CAP_PROG    8
215 /&#x22C6; can the driver also handle SPU, NAVI and CSS encoded data?
216    (CSS API is not present yet) &#x22C6;/
217 #define VIDEO_CAP_SPU    16
218 #define VIDEO_CAP_NAVI   32
219 #define VIDEO_CAP_CSS    64
220</programlisting>
221</section>
222
223<section id="video-system">
224<title>video_system_t</title>
225<para>A call to VIDEO_SET_SYSTEM sets the desired video system for TV output. The
226following system types can be set:
227</para>
228<programlisting>
229typedef enum {
230	 VIDEO_SYSTEM_PAL,
231	 VIDEO_SYSTEM_NTSC,
232	 VIDEO_SYSTEM_PALN,
233	 VIDEO_SYSTEM_PALNc,
234	 VIDEO_SYSTEM_PALM,
235	 VIDEO_SYSTEM_NTSC60,
236	 VIDEO_SYSTEM_PAL60,
237	 VIDEO_SYSTEM_PALM60
238} video_system_t;
239</programlisting>
240</section>
241
242<section id="video-highlight">
243<title>struct video_highlight</title>
244<para>Calling the ioctl VIDEO_SET_HIGHLIGHTS posts the SPU highlight information. The
245call expects the following format for that information:
246</para>
247<programlisting>
248 typedef
249 struct video_highlight {
250	 boolean active;      /&#x22C6;    1=show highlight, 0=hide highlight &#x22C6;/
251	 uint8_t contrast1;   /&#x22C6;    7- 4  Pattern pixel contrast &#x22C6;/
252			      /&#x22C6;    3- 0  Background pixel contrast &#x22C6;/
253	 uint8_t contrast2;   /&#x22C6;    7- 4  Emphasis pixel-2 contrast &#x22C6;/
254			      /&#x22C6;    3- 0  Emphasis pixel-1 contrast &#x22C6;/
255	 uint8_t color1;      /&#x22C6;    7- 4  Pattern pixel color &#x22C6;/
256			      /&#x22C6;    3- 0  Background pixel color &#x22C6;/
257	 uint8_t color2;      /&#x22C6;    7- 4  Emphasis pixel-2 color &#x22C6;/
258			      /&#x22C6;    3- 0  Emphasis pixel-1 color &#x22C6;/
259	 uint32_t ypos;       /&#x22C6;   23-22  auto action mode &#x22C6;/
260			      /&#x22C6;   21-12  start y &#x22C6;/
261			      /&#x22C6;    9- 0  end y &#x22C6;/
262	 uint32_t xpos;       /&#x22C6;   23-22  button color number &#x22C6;/
263			      /&#x22C6;   21-12  start x &#x22C6;/
264			      /&#x22C6;    9- 0  end x &#x22C6;/
265 } video_highlight_t;
266</programlisting>
267
268</section>
269<section id="video-spu">
270<title>struct video_spu</title>
271<para>Calling VIDEO_SET_SPU deactivates or activates SPU decoding, according to the
272following format:
273</para>
274<programlisting>
275 typedef
276 struct video_spu {
277	 boolean active;
278	 int stream_id;
279 } video_spu_t;
280</programlisting>
281
282</section>
283<section id="video-spu-palette">
284<title>struct video_spu_palette</title>
285<para>The following structure is used to set the SPU palette by calling VIDEO_SPU_PALETTE:
286</para>
287<programlisting>
288 typedef
289 struct video_spu_palette {
290	 int length;
291	 uint8_t &#x22C6;palette;
292 } video_spu_palette_t;
293</programlisting>
294
295</section>
296<section id="video-navi-pack">
297<title>struct video_navi_pack</title>
298<para>In order to get the navigational data the following structure has to be passed to the ioctl
299VIDEO_GET_NAVI:
300</para>
301<programlisting>
302 typedef
303 struct video_navi_pack {
304	 int length;         /&#x22C6; 0 ... 1024 &#x22C6;/
305	 uint8_t data[1024];
306 } video_navi_pack_t;
307</programlisting>
308</section>
309
310
311<section id="video-attributes-t">
312<title>video_attributes_t</title>
313<para>The following attributes can be set by a call to VIDEO_SET_ATTRIBUTES:
314</para>
315<programlisting>
316 typedef uint16_t video_attributes_t;
317 /&#x22C6;   bits: descr. &#x22C6;/
318 /&#x22C6;   15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) &#x22C6;/
319 /&#x22C6;   13-12 TV system (0=525/60, 1=625/50) &#x22C6;/
320 /&#x22C6;   11-10 Aspect ratio (0=4:3, 3=16:9) &#x22C6;/
321 /&#x22C6;    9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca &#x22C6;/
322 /&#x22C6;    7    line 21-1 data present in GOP (1=yes, 0=no) &#x22C6;/
323 /&#x22C6;    6    line 21-2 data present in GOP (1=yes, 0=no) &#x22C6;/
324 /&#x22C6;    5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 &#x22C6;/
325 /&#x22C6;    2    source letterboxed (1=yes, 0=no) &#x22C6;/
326 /&#x22C6;    0    film/camera mode (0=camera, 1=film (625/50 only)) &#x22C6;/
327</programlisting>
328</section></section>
329
330
331<section id="video_function_calls">
332<title>Video Function Calls</title>
333
334
335<section id="video_fopen">
336<title>open()</title>
337<para>DESCRIPTION
338</para>
339<informaltable><tgroup cols="1"><tbody><row><entry
340 align="char">
341<para>This system call opens a named video device (e.g. /dev/dvb/adapter0/video0)
342 for subsequent use.</para>
343<para>When an open() call has succeeded, the device will be ready for use.
344 The significance of blocking or non-blocking mode is described in the
345 documentation for functions where there is a difference. It does not affect the
346 semantics of the open() call itself. A device opened in blocking mode can later
347 be put into non-blocking mode (and vice versa) using the F_SETFL command
348 of the fcntl system call. This is a standard system call, documented in the Linux
349 manual page for fcntl. Only one user can open the Video Device in O_RDWR
350 mode. All other attempts to open the device in this mode will fail, and an
351 error-code will be returned. If the Video Device is opened in O_RDONLY
352 mode, the only ioctl call that can be used is VIDEO_GET_STATUS. All other
353 call will return an error code.</para>
354</entry>
355 </row></tbody></tgroup></informaltable>
356
357<para>SYNOPSIS
358</para>
359<informaltable><tgroup cols="1"><tbody><row><entry
360 align="char">
361<para>int open(const char &#x22C6;deviceName, int flags);</para>
362</entry>
363 </row></tbody></tgroup></informaltable>
364<para>PARAMETERS
365</para>
366<informaltable><tgroup cols="2"><tbody><row><entry
367 align="char">
368<para>const char
369 *deviceName</para>
370</entry><entry
371 align="char">
372<para>Name of specific video device.</para>
373</entry>
374 </row><row><entry
375 align="char">
376<para>int flags</para>
377</entry><entry
378 align="char">
379<para>A bit-wise OR of the following flags:</para>
380</entry>
381 </row><row><entry
382 align="char">
383</entry><entry
384 align="char">
385<para>O_RDONLY read-only access</para>
386</entry>
387 </row><row><entry
388 align="char">
389</entry><entry
390 align="char">
391<para>O_RDWR read/write access</para>
392</entry>
393 </row><row><entry
394 align="char">
395</entry><entry
396 align="char">
397<para>O_NONBLOCK open in non-blocking mode</para>
398</entry>
399 </row><row><entry
400 align="char">
401</entry><entry
402 align="char">
403<para>(blocking mode is the default)</para>
404</entry>
405 </row></tbody></tgroup></informaltable>
406<para>RETURN VALUE</para>
407<informaltable><tgroup cols="2"><tbody><row><entry
408 align="char">
409<para>ENODEV</para>
410</entry><entry
411 align="char">
412<para>Device driver not loaded/available.</para>
413</entry>
414 </row><row><entry
415 align="char">
416<para>EINTERNAL</para>
417</entry><entry
418 align="char">
419<para>Internal error.</para>
420</entry>
421 </row><row><entry
422 align="char">
423<para>EBUSY</para>
424</entry><entry
425 align="char">
426<para>Device or resource busy.</para>
427</entry>
428 </row><row><entry
429 align="char">
430<para>EINVAL</para>
431</entry><entry
432 align="char">
433<para>Invalid argument.</para>
434</entry>
435 </row></tbody></tgroup></informaltable>
436
437</section>
438<section id="video_fclose">
439<title>close()</title>
440<para>DESCRIPTION
441</para>
442<informaltable><tgroup cols="1"><tbody><row><entry
443 align="char">
444<para>This system call closes a previously opened video device.</para>
445</entry>
446 </row></tbody></tgroup></informaltable>
447<para>SYNOPSIS
448</para>
449<informaltable><tgroup cols="1"><tbody><row><entry
450 align="char">
451<para>int close(int fd);</para>
452</entry>
453 </row></tbody></tgroup></informaltable>
454<para>PARAMETERS
455</para>
456<informaltable><tgroup cols="2"><tbody><row><entry
457 align="char">
458<para>int fd</para>
459</entry><entry
460 align="char">
461<para>File descriptor returned by a previous call to open().</para>
462</entry>
463 </row></tbody></tgroup></informaltable>
464<para>RETURN VALUE</para>
465<informaltable><tgroup cols="2"><tbody><row><entry
466 align="char">
467<para>EBADF</para>
468</entry><entry
469 align="char">
470<para>fd is not a valid open file descriptor.</para>
471</entry>
472 </row></tbody></tgroup></informaltable>
473
474</section>
475<section id="video_fwrite">
476<title>write()</title>
477<para>DESCRIPTION
478</para>
479<informaltable><tgroup cols="1"><tbody><row><entry
480 align="char">
481<para>This system call can only be used if VIDEO_SOURCE_MEMORY is selected
482 in the ioctl call VIDEO_SELECT_SOURCE. The data provided shall be in
483 PES format, unless the capability allows other formats. If O_NONBLOCK is
484 not specified the function will block until buffer space is available. The amount
485 of data to be transferred is implied by count.</para>
486</entry>
487 </row></tbody></tgroup></informaltable>
488<para>SYNOPSIS
489</para>
490<informaltable><tgroup cols="1"><tbody><row><entry
491 align="char">
492<para>size_t write(int fd, const void &#x22C6;buf, size_t count);</para>
493</entry>
494 </row></tbody></tgroup></informaltable>
495<para>PARAMETERS
496</para>
497<informaltable><tgroup cols="2"><tbody><row><entry
498 align="char">
499<para>int fd</para>
500</entry><entry
501 align="char">
502<para>File descriptor returned by a previous call to open().</para>
503</entry>
504 </row><row><entry
505 align="char">
506<para>void *buf</para>
507</entry><entry
508 align="char">
509<para>Pointer to the buffer containing the PES data.</para>
510</entry>
511 </row><row><entry
512 align="char">
513<para>size_t count</para>
514</entry><entry
515 align="char">
516<para>Size of buf.</para>
517</entry>
518 </row></tbody></tgroup></informaltable>
519<para>RETURN VALUE</para>
520<informaltable><tgroup cols="2"><tbody><row><entry
521 align="char">
522<para>EPERM</para>
523</entry><entry
524 align="char">
525<para>Mode VIDEO_SOURCE_MEMORY not selected.</para>
526</entry>
527 </row><row><entry
528 align="char">
529<para>ENOMEM</para>
530</entry><entry
531 align="char">
532<para>Attempted to write more data than the internal buffer can
533 hold.</para>
534</entry>
535 </row><row><entry
536 align="char">
537<para>EBADF</para>
538</entry><entry
539 align="char">
540<para>fd is not a valid open file descriptor.</para>
541</entry>
542 </row></tbody></tgroup></informaltable>
543
544</section><section id="VIDEO_STOP"
545role="subsection"><title>VIDEO_STOP</title>
546<para>DESCRIPTION
547</para>
548<para>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
549&VIDIOC-DECODER-CMD; instead.</para>
550<informaltable><tgroup cols="1"><tbody><row><entry
551 align="char">
552<para>This ioctl call asks the Video Device to stop playing the current stream.
553 Depending on the input parameter, the screen can be blanked out or displaying
554 the last decoded frame.</para>
555</entry>
556 </row></tbody></tgroup></informaltable>
557<para>SYNOPSIS
558</para>
559<informaltable><tgroup cols="1"><tbody><row><entry
560 align="char">
561<para>int ioctl(fd, int request = VIDEO_STOP, boolean
562 mode);</para>
563</entry>
564 </row></tbody></tgroup></informaltable>
565<para>PARAMETERS
566</para>
567<informaltable><tgroup cols="2"><tbody><row><entry
568 align="char">
569<para>int fd</para>
570</entry><entry
571 align="char">
572<para>File descriptor returned by a previous call to open().</para>
573</entry>
574 </row><row><entry
575 align="char">
576<para>int request</para>
577</entry><entry
578 align="char">
579<para>Equals VIDEO_STOP for this command.</para>
580</entry>
581 </row><row><entry
582 align="char">
583<para>Boolean mode</para>
584</entry><entry
585 align="char">
586<para>Indicates how the screen shall be handled.</para>
587</entry>
588 </row><row><entry
589 align="char">
590</entry><entry
591 align="char">
592<para>TRUE: Blank screen when stop.</para>
593</entry>
594 </row><row><entry
595 align="char">
596</entry><entry
597 align="char">
598<para>FALSE: Show last decoded frame.</para>
599</entry>
600 </row></tbody></tgroup></informaltable>
601&return-value-dvb;
602
603</section><section id="VIDEO_PLAY"
604role="subsection"><title>VIDEO_PLAY</title>
605<para>DESCRIPTION
606</para>
607<para>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
608&VIDIOC-DECODER-CMD; instead.</para>
609<informaltable><tgroup cols="1"><tbody><row><entry
610 align="char">
611<para>This ioctl call asks the Video Device to start playing a video stream from the
612 selected source.</para>
613</entry>
614 </row></tbody></tgroup></informaltable>
615<para>SYNOPSIS
616</para>
617<informaltable><tgroup cols="1"><tbody><row><entry
618 align="char">
619<para>int ioctl(fd, int request = VIDEO_PLAY);</para>
620</entry>
621 </row></tbody></tgroup></informaltable>
622<para>PARAMETERS
623</para>
624<informaltable><tgroup cols="2"><tbody><row><entry
625 align="char">
626<para>int fd</para>
627</entry><entry
628 align="char">
629<para>File descriptor returned by a previous call to open().</para>
630</entry>
631 </row><row><entry
632 align="char">
633<para>int request</para>
634</entry><entry
635 align="char">
636<para>Equals VIDEO_PLAY for this command.</para>
637</entry>
638 </row></tbody></tgroup></informaltable>
639&return-value-dvb;
640
641</section><section id="VIDEO_FREEZE"
642role="subsection"><title>VIDEO_FREEZE</title>
643<para>DESCRIPTION
644</para>
645<para>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
646&VIDIOC-DECODER-CMD; instead.</para>
647<informaltable><tgroup cols="1"><tbody><row><entry
648 align="char">
649<para>This ioctl call suspends the live video stream being played. Decoding
650 and playing are frozen. It is then possible to restart the decoding
651 and playing process of the video stream using the VIDEO_CONTINUE
652 command. If VIDEO_SOURCE_MEMORY is selected in the ioctl call
653 VIDEO_SELECT_SOURCE, the DVB subsystem will not decode any more
654 data until the ioctl call VIDEO_CONTINUE or VIDEO_PLAY is performed.</para>
655</entry>
656 </row></tbody></tgroup></informaltable>
657<para>SYNOPSIS
658</para>
659<informaltable><tgroup cols="1"><tbody><row><entry
660 align="char">
661<para>int ioctl(fd, int request = VIDEO_FREEZE);</para>
662</entry>
663 </row></tbody></tgroup></informaltable>
664<para>PARAMETERS
665</para>
666<informaltable><tgroup cols="2"><tbody><row><entry
667 align="char">
668<para>int fd</para>
669</entry><entry
670 align="char">
671<para>File descriptor returned by a previous call to open().</para>
672</entry>
673 </row><row><entry
674 align="char">
675<para>int request</para>
676</entry><entry
677 align="char">
678<para>Equals VIDEO_FREEZE for this command.</para>
679</entry>
680 </row></tbody></tgroup></informaltable>
681&return-value-dvb;
682
683</section><section id="VIDEO_CONTINUE"
684role="subsection"><title>VIDEO_CONTINUE</title>
685<para>DESCRIPTION
686</para>
687<para>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
688&VIDIOC-DECODER-CMD; instead.</para>
689<informaltable><tgroup cols="1"><tbody><row><entry
690 align="char">
691<para>This ioctl call restarts decoding and playing processes of the video stream
692 which was played before a call to VIDEO_FREEZE was made.</para>
693</entry>
694 </row></tbody></tgroup></informaltable>
695<para>SYNOPSIS
696</para>
697<informaltable><tgroup cols="1"><tbody><row><entry
698 align="char">
699<para>int ioctl(fd, int request = VIDEO_CONTINUE);</para>
700</entry>
701 </row></tbody></tgroup></informaltable>
702<para>PARAMETERS
703</para>
704<informaltable><tgroup cols="2"><tbody><row><entry
705 align="char">
706<para>int fd</para>
707</entry><entry
708 align="char">
709<para>File descriptor returned by a previous call to open().</para>
710</entry>
711 </row><row><entry
712 align="char">
713<para>int request</para>
714</entry><entry
715 align="char">
716<para>Equals VIDEO_CONTINUE for this command.</para>
717</entry>
718 </row></tbody></tgroup></informaltable>
719&return-value-dvb;
720
721</section><section id="VIDEO_SELECT_SOURCE"
722role="subsection"><title>VIDEO_SELECT_SOURCE</title>
723<para>DESCRIPTION
724</para>
725<para>This ioctl is for DVB devices only. This ioctl was also supported by the
726V4L2 ivtv driver, but that has been replaced by the ivtv-specific
727<constant>IVTV_IOC_PASSTHROUGH_MODE</constant> ioctl.</para>
728<informaltable><tgroup cols="1"><tbody><row><entry
729 align="char">
730<para>This ioctl call informs the video device which source shall be used for the input
731 data. The possible sources are demux or memory. If memory is selected, the
732 data is fed to the video device through the write command.</para>
733</entry>
734 </row></tbody></tgroup></informaltable>
735<para>SYNOPSIS
736</para>
737<informaltable><tgroup cols="1"><tbody><row><entry
738 align="char">
739<para>int ioctl(fd, int request = VIDEO_SELECT_SOURCE,
740 video_stream_source_t source);</para>
741</entry>
742 </row></tbody></tgroup></informaltable>
743<para>PARAMETERS
744</para>
745<informaltable><tgroup cols="2"><tbody><row><entry
746 align="char">
747<para>int fd</para>
748</entry><entry
749 align="char">
750<para>File descriptor returned by a previous call to open().</para>
751</entry>
752 </row><row><entry
753 align="char">
754<para>int request</para>
755</entry><entry
756 align="char">
757<para>Equals VIDEO_SELECT_SOURCE for this command.</para>
758</entry>
759 </row><row><entry
760 align="char">
761<para>video_stream_source_t
762 source</para>
763</entry><entry
764 align="char">
765<para>Indicates which source shall be used for the Video stream.</para>
766</entry>
767 </row></tbody></tgroup></informaltable>
768&return-value-dvb;
769
770</section><section id="VIDEO_SET_BLANK"
771role="subsection"><title>VIDEO_SET_BLANK</title>
772<para>DESCRIPTION
773</para>
774<informaltable><tgroup cols="1"><tbody><row><entry
775 align="char">
776<para>This ioctl call asks the Video Device to blank out the picture.</para>
777</entry>
778 </row></tbody></tgroup></informaltable>
779<para>SYNOPSIS
780</para>
781<informaltable><tgroup cols="1"><tbody><row><entry
782 align="char">
783<para>int ioctl(fd, int request = VIDEO_SET_BLANK, boolean
784 mode);</para>
785</entry>
786 </row></tbody></tgroup></informaltable>
787<para>PARAMETERS
788</para>
789<informaltable><tgroup cols="2"><tbody><row><entry
790 align="char">
791<para>int fd</para>
792</entry><entry
793 align="char">
794<para>File descriptor returned by a previous call to open().</para>
795</entry>
796 </row><row><entry
797 align="char">
798<para>int request</para>
799</entry><entry
800 align="char">
801<para>Equals VIDEO_SET_BLANK for this command.</para>
802</entry>
803 </row><row><entry
804 align="char">
805<para>boolean mode</para>
806</entry><entry
807 align="char">
808<para>TRUE: Blank screen when stop.</para>
809</entry>
810 </row><row><entry
811 align="char">
812</entry><entry
813 align="char">
814<para>FALSE: Show last decoded frame.</para>
815</entry>
816 </row></tbody></tgroup></informaltable>
817&return-value-dvb;
818
819</section><section id="VIDEO_GET_STATUS"
820role="subsection"><title>VIDEO_GET_STATUS</title>
821<para>DESCRIPTION
822</para>
823<informaltable><tgroup cols="1"><tbody><row><entry
824 align="char">
825<para>This ioctl call asks the Video Device to return the current status of the device.</para>
826</entry>
827 </row></tbody></tgroup></informaltable>
828<para>SYNOPSIS
829</para>
830<informaltable><tgroup cols="1"><tbody><row><entry
831 align="char">
832<para> int ioctl(fd, int request = VIDEO_GET_STATUS, struct
833 video_status &#x22C6;status);</para>
834</entry>
835 </row></tbody></tgroup></informaltable>
836<para>PARAMETERS
837</para>
838<informaltable><tgroup cols="2"><tbody><row><entry
839 align="char">
840<para>int fd</para>
841</entry><entry
842 align="char">
843<para>File descriptor returned by a previous call to open().</para>
844</entry>
845 </row><row><entry
846 align="char">
847<para>int request</para>
848</entry><entry
849 align="char">
850<para>Equals VIDEO_GET_STATUS for this command.</para>
851</entry>
852 </row><row><entry
853 align="char">
854<para>struct video_status
855 *status</para>
856</entry><entry
857 align="char">
858<para>Returns the current status of the Video Device.</para>
859</entry>
860 </row></tbody></tgroup></informaltable>
861&return-value-dvb;
862
863</section><section id="VIDEO_GET_FRAME_COUNT"
864role="subsection"><title>VIDEO_GET_FRAME_COUNT</title>
865<para>DESCRIPTION
866</para>
867<para>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this
868ioctl has been replaced by the <constant>V4L2_CID_MPEG_VIDEO_DEC_FRAME</constant> control.</para>
869<informaltable><tgroup cols="1"><tbody><row><entry
870 align="char">
871<para>This ioctl call asks the Video Device to return the number of displayed frames
872since the decoder was started.</para>
873</entry>
874 </row></tbody></tgroup></informaltable>
875<para>SYNOPSIS
876</para>
877<informaltable><tgroup cols="1"><tbody><row><entry
878 align="char">
879<para>int ioctl(int fd, int request =
880 VIDEO_GET_FRAME_COUNT, __u64 *pts);</para>
881</entry>
882 </row></tbody></tgroup></informaltable>
883<para>PARAMETERS
884</para>
885<informaltable><tgroup cols="2"><tbody><row><entry
886 align="char">
887<para>int fd</para>
888</entry><entry
889 align="char">
890<para>File descriptor returned by a previous call to open().</para>
891</entry>
892 </row><row><entry
893 align="char">
894<para>int request</para>
895</entry><entry
896 align="char">
897<para>Equals VIDEO_GET_FRAME_COUNT for this
898 command.</para>
899</entry>
900 </row><row><entry
901 align="char">
902<para>__u64 *pts
903</para>
904</entry><entry
905 align="char">
906<para>Returns the number of frames displayed since the decoder was started.
907</para>
908</entry>
909 </row></tbody></tgroup></informaltable>
910&return-value-dvb;
911
912</section><section id="VIDEO_GET_PTS"
913role="subsection"><title>VIDEO_GET_PTS</title>
914<para>DESCRIPTION
915</para>
916<para>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this
917ioctl has been replaced by the <constant>V4L2_CID_MPEG_VIDEO_DEC_PTS</constant> control.</para>
918<informaltable><tgroup cols="1"><tbody><row><entry
919 align="char">
920<para>This ioctl call asks the Video Device to return the current PTS timestamp.</para>
921</entry>
922 </row></tbody></tgroup></informaltable>
923<para>SYNOPSIS
924</para>
925<informaltable><tgroup cols="1"><tbody><row><entry
926 align="char">
927<para>int ioctl(int fd, int request =
928 VIDEO_GET_PTS, __u64 *pts);</para>
929</entry>
930 </row></tbody></tgroup></informaltable>
931<para>PARAMETERS
932</para>
933<informaltable><tgroup cols="2"><tbody><row><entry
934 align="char">
935<para>int fd</para>
936</entry><entry
937 align="char">
938<para>File descriptor returned by a previous call to open().</para>
939</entry>
940 </row><row><entry
941 align="char">
942<para>int request</para>
943</entry><entry
944 align="char">
945<para>Equals VIDEO_GET_PTS for this
946 command.</para>
947</entry>
948 </row><row><entry
949 align="char">
950<para>__u64 *pts
951</para>
952</entry><entry
953 align="char">
954<para>Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 / ISO/IEC 13818-1.
955</para>
956<para>
957The PTS should belong to the currently played
958frame if possible, but may also be a value close to it
959like the PTS of the last decoded frame or the last PTS
960extracted by the PES parser.</para>
961</entry>
962 </row></tbody></tgroup></informaltable>
963&return-value-dvb;
964
965</section><section id="VIDEO_GET_FRAME_RATE"
966role="subsection"><title>VIDEO_GET_FRAME_RATE</title>
967<para>DESCRIPTION
968</para>
969<informaltable><tgroup cols="1"><tbody><row><entry
970 align="char">
971<para>This ioctl call asks the Video Device to return the current framerate.</para>
972</entry>
973 </row></tbody></tgroup></informaltable>
974<para>SYNOPSIS
975</para>
976<informaltable><tgroup cols="1"><tbody><row><entry
977 align="char">
978<para>int ioctl(int fd, int request =
979 VIDEO_GET_FRAME_RATE, unsigned int *rate);</para>
980</entry>
981 </row></tbody></tgroup></informaltable>
982<para>PARAMETERS
983</para>
984<informaltable><tgroup cols="2"><tbody><row><entry
985 align="char">
986<para>int fd</para>
987</entry><entry
988 align="char">
989<para>File descriptor returned by a previous call to open().</para>
990</entry>
991 </row><row><entry
992 align="char">
993<para>int request</para>
994</entry><entry
995 align="char">
996<para>Equals VIDEO_GET_FRAME_RATE for this
997 command.</para>
998</entry>
999 </row><row><entry
1000 align="char">
1001<para>unsigned int *rate
1002</para>
1003</entry><entry
1004 align="char">
1005<para>Returns the framerate in number of frames per 1000 seconds.
1006</para>
1007</entry>
1008 </row></tbody></tgroup></informaltable>
1009&return-value-dvb;
1010
1011</section><section id="VIDEO_GET_EVENT"
1012role="subsection"><title>VIDEO_GET_EVENT</title>
1013<para>DESCRIPTION
1014</para>
1015<para>This ioctl is for DVB devices only. To get events from a V4L2 decoder use the V4L2
1016&VIDIOC-DQEVENT; ioctl instead.</para>
1017<informaltable><tgroup cols="1"><tbody><row><entry
1018 align="char">
1019<para>This ioctl call returns an event of type video_event if available. If an event is
1020 not available, the behavior depends on whether the device is in blocking or
1021 non-blocking mode. In the latter case, the call fails immediately with errno
1022 set to EWOULDBLOCK. In the former case, the call blocks until an event
1023 becomes available. The standard Linux poll() and/or select() system calls can
1024 be used with the device file descriptor to watch for new events. For select(),
1025 the file descriptor should be included in the exceptfds argument, and for
1026 poll(), POLLPRI should be specified as the wake-up condition. Read-only
1027 permissions are sufficient for this ioctl call.</para>
1028</entry>
1029 </row></tbody></tgroup></informaltable>
1030<para>SYNOPSIS
1031</para>
1032<informaltable><tgroup cols="1"><tbody><row><entry
1033 align="char">
1034<para> int ioctl(fd, int request = VIDEO_GET_EVENT, struct
1035 video_event &#x22C6;ev);</para>
1036</entry>
1037 </row></tbody></tgroup></informaltable>
1038<para>PARAMETERS
1039</para>
1040<informaltable><tgroup cols="2"><tbody><row><entry
1041 align="char">
1042<para>int fd</para>
1043</entry><entry
1044 align="char">
1045<para>File descriptor returned by a previous call to open().</para>
1046</entry>
1047 </row><row><entry
1048 align="char">
1049<para>int request</para>
1050</entry><entry
1051 align="char">
1052<para>Equals VIDEO_GET_EVENT for this command.</para>
1053</entry>
1054 </row><row><entry
1055 align="char">
1056<para>struct video_event
1057 *ev</para>
1058</entry><entry
1059 align="char">
1060<para>Points to the location where the event, if any, is to be
1061 stored.</para>
1062</entry>
1063 </row></tbody></tgroup></informaltable>
1064&return-value-dvb;
1065<informaltable><tgroup cols="2"><tbody><row><entry
1066 align="char">
1067<para>EWOULDBLOCK</para>
1068</entry><entry
1069 align="char">
1070<para>There is no event pending, and the device is in
1071 non-blocking mode.</para>
1072</entry>
1073 </row><row><entry
1074 align="char">
1075<para>EOVERFLOW</para>
1076</entry><entry
1077 align="char">
1078<para>Overflow in event queue - one or more events were lost.</para>
1079</entry>
1080 </row></tbody></tgroup></informaltable>
1081
1082</section><section id="VIDEO_COMMAND"
1083role="subsection"><title>VIDEO_COMMAND</title>
1084<para>DESCRIPTION
1085</para>
1086<para>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this
1087ioctl has been replaced by the &VIDIOC-DECODER-CMD; ioctl.</para>
1088<informaltable><tgroup cols="1"><tbody><row><entry
1089 align="char">
1090<para>This ioctl commands the decoder. The <constant>video_command</constant> struct
1091is a subset of the <constant>v4l2_decoder_cmd</constant> struct, so refer to the
1092&VIDIOC-DECODER-CMD; documentation for more information.</para>
1093</entry>
1094 </row></tbody></tgroup></informaltable>
1095<para>SYNOPSIS
1096</para>
1097<informaltable><tgroup cols="1"><tbody><row><entry
1098 align="char">
1099<para>int ioctl(int fd, int request =
1100 VIDEO_COMMAND, struct video_command *cmd);</para>
1101</entry>
1102 </row></tbody></tgroup></informaltable>
1103<para>PARAMETERS
1104</para>
1105<informaltable><tgroup cols="2"><tbody><row><entry
1106 align="char">
1107<para>int fd</para>
1108</entry><entry
1109 align="char">
1110<para>File descriptor returned by a previous call to open().</para>
1111</entry>
1112 </row><row><entry
1113 align="char">
1114<para>int request</para>
1115</entry><entry
1116 align="char">
1117<para>Equals VIDEO_COMMAND for this
1118 command.</para>
1119</entry>
1120 </row><row><entry
1121 align="char">
1122<para>struct video_command *cmd
1123</para>
1124</entry><entry
1125 align="char">
1126<para>Commands the decoder.
1127</para>
1128</entry>
1129 </row></tbody></tgroup></informaltable>
1130&return-value-dvb;
1131
1132</section><section id="VIDEO_TRY_COMMAND"
1133role="subsection"><title>VIDEO_TRY_COMMAND</title>
1134<para>DESCRIPTION
1135</para>
1136<para>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this
1137ioctl has been replaced by the &VIDIOC-TRY-DECODER-CMD; ioctl.</para>
1138<informaltable><tgroup cols="1"><tbody><row><entry
1139 align="char">
1140<para>This ioctl tries a decoder command. The <constant>video_command</constant> struct
1141is a subset of the <constant>v4l2_decoder_cmd</constant> struct, so refer to the
1142&VIDIOC-TRY-DECODER-CMD; documentation for more information.</para>
1143</entry>
1144 </row></tbody></tgroup></informaltable>
1145<para>SYNOPSIS
1146</para>
1147<informaltable><tgroup cols="1"><tbody><row><entry
1148 align="char">
1149<para>int ioctl(int fd, int request =
1150 VIDEO_TRY_COMMAND, struct video_command *cmd);</para>
1151</entry>
1152 </row></tbody></tgroup></informaltable>
1153<para>PARAMETERS
1154</para>
1155<informaltable><tgroup cols="2"><tbody><row><entry
1156 align="char">
1157<para>int fd</para>
1158</entry><entry
1159 align="char">
1160<para>File descriptor returned by a previous call to open().</para>
1161</entry>
1162 </row><row><entry
1163 align="char">
1164<para>int request</para>
1165</entry><entry
1166 align="char">
1167<para>Equals VIDEO_TRY_COMMAND for this
1168 command.</para>
1169</entry>
1170 </row><row><entry
1171 align="char">
1172<para>struct video_command *cmd
1173</para>
1174</entry><entry
1175 align="char">
1176<para>Try a decoder command.
1177</para>
1178</entry>
1179 </row></tbody></tgroup></informaltable>
1180&return-value-dvb;
1181
1182</section><section id="VIDEO_GET_SIZE"
1183role="subsection"><title>VIDEO_GET_SIZE</title>
1184<para>DESCRIPTION
1185</para>
1186<informaltable><tgroup cols="1"><tbody><row><entry
1187 align="char">
1188<para>This ioctl returns the size and aspect ratio.</para>
1189</entry>
1190 </row></tbody></tgroup></informaltable>
1191<para>SYNOPSIS
1192</para>
1193<informaltable><tgroup cols="1"><tbody><row><entry
1194 align="char">
1195<para>int ioctl(int fd, int request =
1196 VIDEO_GET_SIZE, video_size_t *size);</para>
1197</entry>
1198 </row></tbody></tgroup></informaltable>
1199<para>PARAMETERS
1200</para>
1201<informaltable><tgroup cols="2"><tbody><row><entry
1202 align="char">
1203<para>int fd</para>
1204</entry><entry
1205 align="char">
1206<para>File descriptor returned by a previous call to open().</para>
1207</entry>
1208 </row><row><entry
1209 align="char">
1210<para>int request</para>
1211</entry><entry
1212 align="char">
1213<para>Equals VIDEO_GET_SIZE for this
1214 command.</para>
1215</entry>
1216 </row><row><entry
1217 align="char">
1218<para>video_size_t *size
1219</para>
1220</entry><entry
1221 align="char">
1222<para>Returns the size and aspect ratio.
1223</para>
1224</entry>
1225 </row></tbody></tgroup></informaltable>
1226&return-value-dvb;
1227
1228</section><section id="VIDEO_SET_DISPLAY_FORMAT"
1229role="subsection"><title>VIDEO_SET_DISPLAY_FORMAT</title>
1230<para>DESCRIPTION
1231</para>
1232<informaltable><tgroup cols="1"><tbody><row><entry
1233 align="char">
1234<para>This ioctl call asks the Video Device to select the video format to be applied
1235 by the MPEG chip on the video.</para>
1236</entry>
1237 </row></tbody></tgroup></informaltable>
1238<para>SYNOPSIS
1239</para>
1240<informaltable><tgroup cols="1"><tbody><row><entry
1241 align="char">
1242<para> int ioctl(fd, int request =
1243 VIDEO_SET_DISPLAY_FORMAT, video_display_format_t
1244 format);</para>
1245</entry>
1246 </row></tbody></tgroup></informaltable>
1247<para>PARAMETERS
1248</para>
1249<informaltable><tgroup cols="2"><tbody><row><entry
1250 align="char">
1251<para>int fd</para>
1252</entry><entry
1253 align="char">
1254<para>File descriptor returned by a previous call to open().</para>
1255</entry>
1256 </row><row><entry
1257 align="char">
1258<para>int request</para>
1259</entry><entry
1260 align="char">
1261<para>Equals VIDEO_SET_DISPLAY_FORMAT for this
1262 command.</para>
1263</entry>
1264 </row><row><entry
1265 align="char">
1266<para>video_display_format_t
1267 format</para>
1268</entry><entry
1269 align="char">
1270<para>Selects the video format to be used.</para>
1271</entry>
1272 </row></tbody></tgroup></informaltable>
1273&return-value-dvb;
1274
1275</section><section id="VIDEO_STILLPICTURE"
1276role="subsection"><title>VIDEO_STILLPICTURE</title>
1277<para>DESCRIPTION
1278</para>
1279<informaltable><tgroup cols="1"><tbody><row><entry
1280 align="char">
1281<para>This ioctl call asks the Video Device to display a still picture (I-frame). The
1282 input data shall contain an I-frame. If the pointer is NULL, then the current
1283 displayed still picture is blanked.</para>
1284</entry>
1285 </row></tbody></tgroup></informaltable>
1286<para>SYNOPSIS
1287</para>
1288<informaltable><tgroup cols="1"><tbody><row><entry
1289 align="char">
1290<para>int ioctl(fd, int request = VIDEO_STILLPICTURE,
1291 struct video_still_picture &#x22C6;sp);</para>
1292</entry>
1293 </row></tbody></tgroup></informaltable>
1294<para>PARAMETERS
1295</para>
1296<informaltable><tgroup cols="2"><tbody><row><entry
1297 align="char">
1298<para>int fd</para>
1299</entry><entry
1300 align="char">
1301<para>File descriptor returned by a previous call to open().</para>
1302</entry>
1303 </row><row><entry
1304 align="char">
1305<para>int request</para>
1306</entry><entry
1307 align="char">
1308<para>Equals VIDEO_STILLPICTURE for this command.</para>
1309</entry>
1310 </row><row><entry
1311 align="char">
1312<para>struct
1313 video_still_picture
1314 *sp</para>
1315</entry><entry
1316 align="char">
1317<para>Pointer to a location where an I-frame and size is stored.</para>
1318</entry>
1319 </row></tbody></tgroup></informaltable>
1320&return-value-dvb;
1321
1322</section><section id="VIDEO_FAST_FORWARD"
1323role="subsection"><title>VIDEO_FAST_FORWARD</title>
1324<para>DESCRIPTION
1325</para>
1326<informaltable><tgroup cols="1"><tbody><row><entry
1327 align="char">
1328<para>This ioctl call asks the Video Device to skip decoding of N number of I-frames.
1329 This call can only be used if VIDEO_SOURCE_MEMORY is selected.</para>
1330</entry>
1331 </row></tbody></tgroup></informaltable>
1332<para>SYNOPSIS
1333</para>
1334<informaltable><tgroup cols="1"><tbody><row><entry
1335 align="char">
1336<para>int ioctl(fd, int request = VIDEO_FAST_FORWARD, int
1337 nFrames);</para>
1338</entry>
1339 </row></tbody></tgroup></informaltable>
1340<para>PARAMETERS
1341</para>
1342<informaltable><tgroup cols="2"><tbody><row><entry
1343 align="char">
1344<para>int fd</para>
1345</entry><entry
1346 align="char">
1347<para>File descriptor returned by a previous call to open().</para>
1348</entry>
1349 </row><row><entry
1350 align="char">
1351<para>int request</para>
1352</entry><entry
1353 align="char">
1354<para>Equals VIDEO_FAST_FORWARD for this command.</para>
1355</entry>
1356 </row><row><entry
1357 align="char">
1358<para>int nFrames</para>
1359</entry><entry
1360 align="char">
1361<para>The number of frames to skip.</para>
1362</entry>
1363 </row></tbody></tgroup></informaltable>
1364&return-value-dvb;
1365<informaltable><tgroup cols="2"><tbody><row><entry
1366 align="char">
1367<para>EPERM</para>
1368</entry><entry
1369 align="char">
1370<para>Mode VIDEO_SOURCE_MEMORY not selected.</para>
1371</entry>
1372 </row></tbody></tgroup></informaltable>
1373
1374</section><section id="VIDEO_SLOWMOTION"
1375role="subsection"><title>VIDEO_SLOWMOTION</title>
1376<para>DESCRIPTION
1377</para>
1378<informaltable><tgroup cols="1"><tbody><row><entry
1379 align="char">
1380<para>This ioctl call asks the video device to repeat decoding frames N number of
1381 times. This call can only be used if VIDEO_SOURCE_MEMORY is selected.</para>
1382</entry>
1383 </row></tbody></tgroup></informaltable>
1384<para>SYNOPSIS
1385</para>
1386<informaltable><tgroup cols="1"><tbody><row><entry
1387 align="char">
1388<para>int ioctl(fd, int request = VIDEO_SLOWMOTION, int
1389 nFrames);</para>
1390</entry>
1391 </row></tbody></tgroup></informaltable>
1392<para>PARAMETERS
1393</para>
1394<informaltable><tgroup cols="2"><tbody><row><entry
1395 align="char">
1396<para>int fd</para>
1397</entry><entry
1398 align="char">
1399<para>File descriptor returned by a previous call to open().</para>
1400</entry>
1401 </row><row><entry
1402 align="char">
1403<para>int request</para>
1404</entry><entry
1405 align="char">
1406<para>Equals VIDEO_SLOWMOTION for this command.</para>
1407</entry>
1408 </row><row><entry
1409 align="char">
1410<para>int nFrames</para>
1411</entry><entry
1412 align="char">
1413<para>The number of times to repeat each frame.</para>
1414</entry>
1415 </row></tbody></tgroup></informaltable>
1416&return-value-dvb;
1417<informaltable><tgroup cols="2"><tbody><row><entry
1418 align="char">
1419<para>EPERM</para>
1420</entry><entry
1421 align="char">
1422<para>Mode VIDEO_SOURCE_MEMORY not selected.</para>
1423</entry>
1424 </row></tbody></tgroup></informaltable>
1425
1426</section><section id="VIDEO_GET_CAPABILITIES"
1427role="subsection"><title>VIDEO_GET_CAPABILITIES</title>
1428<para>DESCRIPTION
1429</para>
1430<informaltable><tgroup cols="1"><tbody><row><entry
1431 align="char">
1432<para>This ioctl call asks the video device about its decoding capabilities. On success
1433 it returns and integer which has bits set according to the defines in section ??.</para>
1434</entry>
1435 </row></tbody></tgroup></informaltable>
1436<para>SYNOPSIS
1437</para>
1438<informaltable><tgroup cols="1"><tbody><row><entry
1439 align="char">
1440<para>int ioctl(fd, int request = VIDEO_GET_CAPABILITIES,
1441 unsigned int &#x22C6;cap);</para>
1442</entry>
1443 </row></tbody></tgroup></informaltable>
1444<para>PARAMETERS
1445</para>
1446<informaltable><tgroup cols="2"><tbody><row><entry
1447 align="char">
1448<para>int fd</para>
1449</entry><entry
1450 align="char">
1451<para>File descriptor returned by a previous call to open().</para>
1452</entry>
1453 </row><row><entry
1454 align="char">
1455<para>int request</para>
1456</entry><entry
1457 align="char">
1458<para>Equals VIDEO_GET_CAPABILITIES for this
1459 command.</para>
1460</entry>
1461 </row><row><entry
1462 align="char">
1463<para>unsigned int *cap</para>
1464</entry><entry
1465 align="char">
1466<para>Pointer to a location where to store the capability
1467 information.</para>
1468</entry>
1469 </row></tbody></tgroup></informaltable>
1470&return-value-dvb;
1471
1472</section><section id="VIDEO_SET_ID"
1473role="subsection"><title>VIDEO_SET_ID</title>
1474<para>DESCRIPTION
1475</para>
1476<informaltable><tgroup cols="1"><tbody><row><entry
1477 align="char">
1478<para>This ioctl selects which sub-stream is to be decoded if a program or system
1479 stream is sent to the video device.</para>
1480</entry>
1481 </row></tbody></tgroup></informaltable>
1482<para>SYNOPSIS
1483</para>
1484<informaltable><tgroup cols="1"><tbody><row><entry
1485 align="char">
1486<para>int ioctl(int fd, int request = VIDEO_SET_ID, int
1487 id);</para>
1488</entry>
1489 </row></tbody></tgroup></informaltable>
1490<para>PARAMETERS
1491</para>
1492<informaltable><tgroup cols="2"><tbody><row><entry
1493 align="char">
1494<para>int fd</para>
1495</entry><entry
1496 align="char">
1497<para>File descriptor returned by a previous call to open().</para>
1498</entry>
1499 </row><row><entry
1500 align="char">
1501<para>int request</para>
1502</entry><entry
1503 align="char">
1504<para>Equals VIDEO_SET_ID for this command.</para>
1505</entry>
1506 </row><row><entry
1507 align="char">
1508<para>int id</para>
1509</entry><entry
1510 align="char">
1511<para>video sub-stream id</para>
1512</entry>
1513 </row></tbody></tgroup></informaltable>
1514&return-value-dvb;
1515<informaltable><tgroup cols="2"><tbody><row><entry
1516 align="char">
1517<para>EINVAL</para>
1518</entry><entry
1519 align="char">
1520<para>Invalid sub-stream id.</para>
1521</entry>
1522 </row></tbody></tgroup></informaltable>
1523
1524</section><section id="VIDEO_CLEAR_BUFFER"
1525role="subsection"><title>VIDEO_CLEAR_BUFFER</title>
1526<para>DESCRIPTION
1527</para>
1528<informaltable><tgroup cols="1"><tbody><row><entry
1529 align="char">
1530<para>This ioctl call clears all video buffers in the driver and in the decoder hardware.</para>
1531</entry>
1532 </row></tbody></tgroup></informaltable>
1533<para>SYNOPSIS
1534</para>
1535<informaltable><tgroup cols="1"><tbody><row><entry
1536 align="char">
1537<para>int ioctl(fd, int request = VIDEO_CLEAR_BUFFER);</para>
1538</entry>
1539 </row></tbody></tgroup></informaltable>
1540<para>PARAMETERS
1541</para>
1542<informaltable><tgroup cols="2"><tbody><row><entry
1543 align="char">
1544<para>int fd</para>
1545</entry><entry
1546 align="char">
1547<para>File descriptor returned by a previous call to open().</para>
1548</entry>
1549 </row><row><entry
1550 align="char">
1551<para>int request</para>
1552</entry><entry
1553 align="char">
1554<para>Equals VIDEO_CLEAR_BUFFER for this command.</para>
1555</entry>
1556 </row></tbody></tgroup></informaltable>
1557&return-value-dvb;
1558
1559</section><section id="VIDEO_SET_STREAMTYPE"
1560role="subsection"><title>VIDEO_SET_STREAMTYPE</title>
1561<para>DESCRIPTION
1562</para>
1563<informaltable><tgroup cols="1"><tbody><row><entry
1564 align="char">
1565<para>This ioctl tells the driver which kind of stream to expect being written to it. If
1566 this call is not used the default of video PES is used. Some drivers might not
1567 support this call and always expect PES.</para>
1568</entry>
1569 </row></tbody></tgroup></informaltable>
1570<para>SYNOPSIS
1571</para>
1572<informaltable><tgroup cols="1"><tbody><row><entry
1573 align="char">
1574<para>int ioctl(fd, int request = VIDEO_SET_STREAMTYPE,
1575 int type);</para>
1576</entry>
1577 </row></tbody></tgroup></informaltable>
1578<para>PARAMETERS
1579</para>
1580<informaltable><tgroup cols="2"><tbody><row><entry
1581 align="char">
1582<para>int fd</para>
1583</entry><entry
1584 align="char">
1585<para>File descriptor returned by a previous call to open().</para>
1586</entry>
1587 </row><row><entry
1588 align="char">
1589<para>int request</para>
1590</entry><entry
1591 align="char">
1592<para>Equals VIDEO_SET_STREAMTYPE for this command.</para>
1593</entry>
1594 </row><row><entry
1595 align="char">
1596<para>int type</para>
1597</entry><entry
1598 align="char">
1599<para>stream type</para>
1600</entry>
1601 </row></tbody></tgroup></informaltable>
1602&return-value-dvb;
1603
1604</section><section id="VIDEO_SET_FORMAT"
1605role="subsection"><title>VIDEO_SET_FORMAT</title>
1606<para>DESCRIPTION
1607</para>
1608<informaltable><tgroup cols="1"><tbody><row><entry
1609 align="char">
1610<para>This ioctl sets the screen format (aspect ratio) of the connected output device
1611 (TV) so that the output of the decoder can be adjusted accordingly.</para>
1612</entry>
1613 </row></tbody></tgroup></informaltable>
1614<para>SYNOPSIS
1615</para>
1616<informaltable><tgroup cols="1"><tbody><row><entry
1617 align="char">
1618<para> int ioctl(fd, int request = VIDEO_SET_FORMAT,
1619 video_format_t format);</para>
1620</entry>
1621 </row></tbody></tgroup></informaltable>
1622<para>PARAMETERS
1623</para>
1624<informaltable><tgroup cols="2"><tbody><row><entry
1625 align="char">
1626<para>int fd</para>
1627</entry><entry
1628 align="char">
1629<para>File descriptor returned by a previous call to open().</para>
1630</entry>
1631 </row><row><entry
1632 align="char">
1633<para>int request</para>
1634</entry><entry
1635 align="char">
1636<para>Equals VIDEO_SET_FORMAT for this command.</para>
1637</entry>
1638 </row><row><entry
1639 align="char">
1640<para>video_format_t
1641 format</para>
1642</entry><entry
1643 align="char">
1644<para>video format of TV as defined in section ??.</para>
1645</entry>
1646 </row></tbody></tgroup></informaltable>
1647&return-value-dvb;
1648<informaltable><tgroup cols="2"><tbody><row><entry
1649 align="char">
1650<para>EINVAL</para>
1651</entry><entry
1652 align="char">
1653<para>format is not a valid video format.</para>
1654</entry>
1655 </row></tbody></tgroup></informaltable>
1656
1657</section><section id="VIDEO_SET_SYSTEM"
1658role="subsection"><title>VIDEO_SET_SYSTEM</title>
1659<para>DESCRIPTION
1660</para>
1661<informaltable><tgroup cols="1"><tbody><row><entry
1662 align="char">
1663<para>This ioctl sets the television output format. The format (see section ??) may
1664 vary from the color format of the displayed MPEG stream. If the hardware is
1665 not able to display the requested format the call will return an error.</para>
1666</entry>
1667 </row></tbody></tgroup></informaltable>
1668<para>SYNOPSIS
1669</para>
1670<informaltable><tgroup cols="1"><tbody><row><entry
1671 align="char">
1672<para> int ioctl(fd, int request = VIDEO_SET_SYSTEM ,
1673 video_system_t system);</para>
1674</entry>
1675 </row></tbody></tgroup></informaltable>
1676<para>PARAMETERS
1677</para>
1678<informaltable><tgroup cols="2"><tbody><row><entry
1679 align="char">
1680<para>int fd</para>
1681</entry><entry
1682 align="char">
1683<para>File descriptor returned by a previous call to open().</para>
1684</entry>
1685 </row><row><entry
1686 align="char">
1687<para>int request</para>
1688</entry><entry
1689 align="char">
1690<para>Equals VIDEO_SET_FORMAT for this command.</para>
1691</entry>
1692 </row><row><entry
1693 align="char">
1694<para>video_system_t
1695 system</para>
1696</entry><entry
1697 align="char">
1698<para>video system of TV output.</para>
1699</entry>
1700 </row></tbody></tgroup></informaltable>
1701&return-value-dvb;
1702<informaltable><tgroup cols="2"><tbody><row><entry
1703 align="char">
1704<para>EINVAL</para>
1705</entry><entry
1706 align="char">
1707<para>system is not a valid or supported video system.</para>
1708</entry>
1709 </row></tbody></tgroup></informaltable>
1710
1711</section><section id="VIDEO_SET_HIGHLIGHT"
1712role="subsection"><title>VIDEO_SET_HIGHLIGHT</title>
1713<para>DESCRIPTION
1714</para>
1715<informaltable><tgroup cols="1"><tbody><row><entry
1716 align="char">
1717<para>This ioctl sets the SPU highlight information for the menu access of a DVD.</para>
1718</entry>
1719 </row></tbody></tgroup></informaltable>
1720<para>SYNOPSIS
1721</para>
1722<informaltable><tgroup cols="1"><tbody><row><entry
1723 align="char">
1724<para> int ioctl(fd, int request = VIDEO_SET_HIGHLIGHT
1725 ,video_highlight_t &#x22C6;vhilite)</para>
1726</entry>
1727 </row></tbody></tgroup></informaltable>
1728<para>PARAMETERS
1729</para>
1730<informaltable><tgroup cols="2"><tbody><row><entry
1731 align="char">
1732<para>int fd</para>
1733</entry><entry
1734 align="char">
1735<para>File descriptor returned by a previous call to open().</para>
1736</entry>
1737 </row><row><entry
1738 align="char">
1739<para>int request</para>
1740</entry><entry
1741 align="char">
1742<para>Equals VIDEO_SET_HIGHLIGHT for this command.</para>
1743</entry>
1744 </row><row><entry
1745 align="char">
1746<para>video_highlight_t
1747 *vhilite</para>
1748</entry><entry
1749 align="char">
1750<para>SPU Highlight information according to section ??.</para>
1751</entry>
1752 </row></tbody></tgroup></informaltable>
1753&return-value-dvb;
1754
1755</section><section id="VIDEO_SET_SPU"
1756role="subsection"><title>VIDEO_SET_SPU</title>
1757<para>DESCRIPTION
1758</para>
1759<informaltable><tgroup cols="1"><tbody><row><entry
1760 align="char">
1761<para>This ioctl activates or deactivates SPU decoding in a DVD input stream. It can
1762 only be used, if the driver is able to handle a DVD stream.</para>
1763</entry>
1764 </row></tbody></tgroup></informaltable>
1765<para>SYNOPSIS
1766</para>
1767<informaltable><tgroup cols="1"><tbody><row><entry
1768 align="char">
1769<para> int ioctl(fd, int request = VIDEO_SET_SPU ,
1770 video_spu_t &#x22C6;spu)</para>
1771</entry>
1772 </row></tbody></tgroup></informaltable>
1773<para>PARAMETERS
1774</para>
1775<informaltable><tgroup cols="2"><tbody><row><entry
1776 align="char">
1777<para>int fd</para>
1778</entry><entry
1779 align="char">
1780<para>File descriptor returned by a previous call to open().</para>
1781</entry>
1782 </row><row><entry
1783 align="char">
1784<para>int request</para>
1785</entry><entry
1786 align="char">
1787<para>Equals VIDEO_SET_SPU for this command.</para>
1788</entry>
1789 </row><row><entry
1790 align="char">
1791<para>video_spu_t *spu</para>
1792</entry><entry
1793 align="char">
1794<para>SPU decoding (de)activation and subid setting according
1795 to section ??.</para>
1796</entry>
1797 </row></tbody></tgroup></informaltable>
1798&return-value-dvb;
1799<informaltable><tgroup cols="2"><tbody><row><entry
1800 align="char">
1801<para>EINVAL</para>
1802</entry><entry
1803 align="char">
1804<para>input is not a valid spu setting or driver cannot handle
1805 SPU.</para>
1806</entry>
1807 </row></tbody></tgroup></informaltable>
1808
1809</section><section id="VIDEO_SET_SPU_PALETTE"
1810role="subsection"><title>VIDEO_SET_SPU_PALETTE</title>
1811<para>DESCRIPTION
1812</para>
1813<informaltable><tgroup cols="1"><tbody><row><entry
1814 align="char">
1815<para>This ioctl sets the SPU color palette.</para>
1816</entry>
1817 </row></tbody></tgroup></informaltable>
1818<para>SYNOPSIS
1819</para>
1820<informaltable><tgroup cols="1"><tbody><row><entry
1821 align="char">
1822<para> int ioctl(fd, int request = VIDEO_SET_SPU_PALETTE
1823 ,video_spu_palette_t &#x22C6;palette )</para>
1824</entry>
1825 </row></tbody></tgroup></informaltable>
1826<para>PARAMETERS
1827</para>
1828<informaltable><tgroup cols="2"><tbody><row><entry
1829 align="char">
1830<para>int fd</para>
1831</entry><entry
1832 align="char">
1833<para>File descriptor returned by a previous call to open().</para>
1834</entry>
1835 </row><row><entry
1836 align="char">
1837<para>int request</para>
1838</entry><entry
1839 align="char">
1840<para>Equals VIDEO_SET_SPU_PALETTE for this command.</para>
1841</entry>
1842 </row><row><entry
1843 align="char">
1844<para>video_spu_palette_t
1845 *palette</para>
1846</entry><entry
1847 align="char">
1848<para>SPU palette according to section ??.</para>
1849</entry>
1850 </row></tbody></tgroup></informaltable>
1851&return-value-dvb;
1852<informaltable><tgroup cols="2"><tbody><row><entry
1853 align="char">
1854<para>EINVAL</para>
1855</entry><entry
1856 align="char">
1857<para>input is not a valid palette or driver doesn&#8217;t handle SPU.</para>
1858</entry>
1859 </row></tbody></tgroup></informaltable>
1860
1861</section><section id="VIDEO_GET_NAVI"
1862role="subsection"><title>VIDEO_GET_NAVI</title>
1863<para>DESCRIPTION
1864</para>
1865<informaltable><tgroup cols="1"><tbody><row><entry
1866 align="char">
1867<para>This ioctl returns navigational information from the DVD stream. This is
1868 especially needed if an encoded stream has to be decoded by the hardware.</para>
1869</entry>
1870 </row></tbody></tgroup></informaltable>
1871<para>SYNOPSIS
1872</para>
1873<informaltable><tgroup cols="1"><tbody><row><entry
1874 align="char">
1875<para> int ioctl(fd, int request = VIDEO_GET_NAVI ,
1876 video_navi_pack_t &#x22C6;navipack)</para>
1877</entry>
1878 </row></tbody></tgroup></informaltable>
1879<para>PARAMETERS
1880</para>
1881<informaltable><tgroup cols="2"><tbody><row><entry
1882 align="char">
1883<para>int fd</para>
1884</entry><entry
1885 align="char">
1886<para>File descriptor returned by a previous call to open().</para>
1887</entry>
1888 </row><row><entry
1889 align="char">
1890<para>int request</para>
1891</entry><entry
1892 align="char">
1893<para>Equals VIDEO_GET_NAVI for this command.</para>
1894</entry>
1895 </row><row><entry
1896 align="char">
1897<para>video_navi_pack_t
1898 *navipack</para>
1899</entry><entry
1900 align="char">
1901<para>PCI or DSI pack (private stream 2) according to section
1902 ??.</para>
1903</entry>
1904 </row></tbody></tgroup></informaltable>
1905&return-value-dvb;
1906<informaltable><tgroup cols="2"><tbody><row><entry
1907 align="char">
1908<para>EFAULT</para>
1909</entry><entry
1910 align="char">
1911<para>driver is not able to return navigational information</para>
1912</entry>
1913 </row></tbody></tgroup></informaltable>
1914
1915</section><section id="VIDEO_SET_ATTRIBUTES"
1916role="subsection"><title>VIDEO_SET_ATTRIBUTES</title>
1917<para>DESCRIPTION
1918</para>
1919<informaltable><tgroup cols="1"><tbody><row><entry
1920 align="char">
1921<para>This ioctl is intended for DVD playback and allows you to set certain
1922 information about the stream. Some hardware may not need this information,
1923 but the call also tells the hardware to prepare for DVD playback.</para>
1924</entry>
1925 </row></tbody></tgroup></informaltable>
1926<para>SYNOPSIS
1927</para>
1928<informaltable><tgroup cols="1"><tbody><row><entry
1929 align="char">
1930<para> int ioctl(fd, int request = VIDEO_SET_ATTRIBUTE
1931 ,video_attributes_t vattr)</para>
1932</entry>
1933 </row></tbody></tgroup></informaltable>
1934<para>PARAMETERS
1935</para>
1936<informaltable><tgroup cols="2"><tbody><row><entry
1937 align="char">
1938<para>int fd</para>
1939</entry><entry
1940 align="char">
1941<para>File descriptor returned by a previous call to open().</para>
1942</entry>
1943 </row><row><entry
1944 align="char">
1945<para>int request</para>
1946</entry><entry
1947 align="char">
1948<para>Equals VIDEO_SET_ATTRIBUTE for this command.</para>
1949</entry>
1950 </row><row><entry
1951 align="char">
1952<para>video_attributes_t
1953 vattr</para>
1954</entry><entry
1955 align="char">
1956<para>video attributes according to section ??.</para>
1957</entry>
1958 </row></tbody></tgroup></informaltable>
1959&return-value-dvb;
1960<informaltable><tgroup cols="2"><tbody><row><entry
1961 align="char">
1962<para>EINVAL</para>
1963</entry><entry
1964 align="char">
1965<para>input is not a valid attribute setting.</para>
1966</entry>
1967 </row></tbody></tgroup></informaltable>
1968 </section></section>
1969