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