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
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
12 <para>Some DVB cards don’t have their own MPEG decoder, which results in the omission of
13 the audio and video device as well as the video4linux device.
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.
18 <section id="video_types">
19 <title>Video Data Types</title>
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
27 VIDEO_FORMAT_4_3, /⋆ Select 4:3 format ⋆/
28 VIDEO_FORMAT_16_9, /⋆ Select 16:9 format. ⋆/
29 VIDEO_FORMAT_221_1 /⋆ 2.21:1 ⋆/
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
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
48 VIDEO_PAN_SCAN, /⋆ use pan and scan format ⋆/
49 VIDEO_LETTER_BOX, /⋆ use letterbox format ⋆/
50 VIDEO_CENTER_CUT_OUT /⋆ use center cut out format ⋆/
51 } video_displayformat_t;
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.
65 VIDEO_SOURCE_DEMUX, /⋆ Select the demux as the main source ⋆/
66 VIDEO_SOURCE_MEMORY /⋆ If this source is selected, the stream
67 comes from the user through the write
69 } video_stream_source_t;
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
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.
85 VIDEO_STOPPED, /⋆ Video is stopped ⋆/
86 VIDEO_PLAYING, /⋆ Video is currently playing ⋆/
87 VIDEO_FREEZED /⋆ Video is freezed ⋆/
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>
97 struct video_command {
106 /⋆ 0 or 1000 specifies normal speed,
107 1 specifies forward single stepping,
108 -1 specifies backward single stepping,
109 >>1: playback at speed/1000 of the normal speed,
110 <-1: reverse playback at (-speed/1000) of the normal speed. ⋆/
123 <section id="video-size-t">
124 <title>struct video_size-t</title>
129 video_format_t aspect_ratio;
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
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;
150 unsigned int frame_rate; /⋆ in frames per 1000sec ⋆/
151 unsigned char vsync_field; /⋆ unknown/odd/even/progressive ⋆/
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.
163 struct video_status {
164 int video_blank; /⋆ blank video on freeze? ⋆/
165 video_play_state_t play_state; /⋆ current state of playback ⋆/
166 video_stream_source_t stream_source; /⋆ current source (demux/memory) ⋆/
167 video_format_t video_format; /⋆ current aspect ratio of stream ⋆/
168 video_displayformat_t display_format;/⋆ selected cropping mode ⋆/
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
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
188 /⋆ pointer to and size of a single iframe in memory ⋆/
189 struct video_still_picture {
190 char ⋆iFrame; /⋆ pointer to a single iframe in memory ⋆/
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.
202 /⋆ bit definitions for capabilities: ⋆/
203 /⋆ can the hardware decode MPEG1 and/or MPEG2? ⋆/
204 #define VIDEO_CAP_MPEG1 1
205 #define VIDEO_CAP_MPEG2 2
206 /⋆ 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) ⋆/
209 #define VIDEO_CAP_SYS 4
210 #define VIDEO_CAP_PROG 8
211 /⋆ can the driver also handle SPU, NAVI and CSS encoded data?
212 (CSS API is not present yet) ⋆/
213 #define VIDEO_CAP_SPU 16
214 #define VIDEO_CAP_NAVI 32
215 #define VIDEO_CAP_CSS 64
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:
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:
245 struct video_highlight {
246 boolean active; /⋆ 1=show highlight, 0=hide highlight ⋆/
247 uint8_t contrast1; /⋆ 7- 4 Pattern pixel contrast ⋆/
248 /⋆ 3- 0 Background pixel contrast ⋆/
249 uint8_t contrast2; /⋆ 7- 4 Emphasis pixel-2 contrast ⋆/
250 /⋆ 3- 0 Emphasis pixel-1 contrast ⋆/
251 uint8_t color1; /⋆ 7- 4 Pattern pixel color ⋆/
252 /⋆ 3- 0 Background pixel color ⋆/
253 uint8_t color2; /⋆ 7- 4 Emphasis pixel-2 color ⋆/
254 /⋆ 3- 0 Emphasis pixel-1 color ⋆/
255 uint32_t ypos; /⋆ 23-22 auto action mode ⋆/
256 /⋆ 21-12 start y ⋆/
257 /⋆ 9- 0 end y ⋆/
258 uint32_t xpos; /⋆ 23-22 button color number ⋆/
259 /⋆ 21-12 start x ⋆/
260 /⋆ 9- 0 end x ⋆/
265 <section id="video-spu">
266 <title>video SPU</title>
267 <para>Calling VIDEO_SET_SPU deactivates or activates SPU decoding, according to the
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:
285 struct video_spu_palette{
287 uint8_t ⋆palette;
288 } video_spu_palette_t;
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
299 struct video_navi_pack{
300 int length; /⋆ 0 ... 1024 ⋆/
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:
312 typedef uint16_t video_attributes_t;
313 /⋆ bits: descr. ⋆/
314 /⋆ 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) ⋆/
315 /⋆ 13-12 TV system (0=525/60, 1=625/50) ⋆/
316 /⋆ 11-10 Aspect ratio (0=4:3, 3=16:9) ⋆/
317 /⋆ 9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca ⋆/
318 /⋆ 7 line 21-1 data present in GOP (1=yes, 0=no) ⋆/
319 /⋆ 6 line 21-2 data present in GOP (1=yes, 0=no) ⋆/
320 /⋆ 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 ⋆/
321 /⋆ 2 source letterboxed (1=yes, 0=no) ⋆/
322 /⋆ 0 film/camera mode (0=camera, 1=film (625/50 only)) ⋆/
327 <section id="video_function_calls">
328 <title>Video Function Calls</title>
331 <section id="video_fopen">
332 <title>open()</title>
335 <informaltable><tgroup cols="1"><tbody><row><entry
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>
351 </row></tbody></tgroup></informaltable>
355 <informaltable><tgroup cols="1"><tbody><row><entry
357 <para>int open(const char ⋆deviceName, int flags);</para>
359 </row></tbody></tgroup></informaltable>
362 <informaltable><tgroup cols="2"><tbody><row><entry
368 <para>Name of specific video device.</para>
372 <para>int flags</para>
375 <para>A bit-wise OR of the following flags:</para>
381 <para>O_RDONLY read-only access</para>
387 <para>O_RDWR read/write access</para>
393 <para>O_NONBLOCK open in non-blocking mode</para>
399 <para>(blocking mode is the default)</para>
401 </row></tbody></tgroup></informaltable>
402 <para>RETURN VALUE</para>
403 <informaltable><tgroup cols="2"><tbody><row><entry
408 <para>Device driver not loaded/available.</para>
412 <para>EINTERNAL</para>
415 <para>Internal error.</para>
422 <para>Device or resource busy.</para>
429 <para>Invalid argument.</para>
431 </row></tbody></tgroup></informaltable>
434 <section id="video_fclose">
435 <title>close()</title>
438 <informaltable><tgroup cols="1"><tbody><row><entry
440 <para>This system call closes a previously opened video device.</para>
442 </row></tbody></tgroup></informaltable>
445 <informaltable><tgroup cols="1"><tbody><row><entry
447 <para>int close(int fd);</para>
449 </row></tbody></tgroup></informaltable>
452 <informaltable><tgroup cols="2"><tbody><row><entry
457 <para>File descriptor returned by a previous call to open().</para>
459 </row></tbody></tgroup></informaltable>
460 <para>RETURN VALUE</para>
461 <informaltable><tgroup cols="2"><tbody><row><entry
466 <para>fd is not a valid open file descriptor.</para>
468 </row></tbody></tgroup></informaltable>
471 <section id="video_fwrite">
472 <title>write()</title>
475 <informaltable><tgroup cols="1"><tbody><row><entry
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>
483 </row></tbody></tgroup></informaltable>
486 <informaltable><tgroup cols="1"><tbody><row><entry
488 <para>size_t write(int fd, const void ⋆buf, size_t count);</para>
490 </row></tbody></tgroup></informaltable>
493 <informaltable><tgroup cols="2"><tbody><row><entry
498 <para>File descriptor returned by a previous call to open().</para>
502 <para>void *buf</para>
505 <para>Pointer to the buffer containing the PES data.</para>
509 <para>size_t count</para>
512 <para>Size of buf.</para>
514 </row></tbody></tgroup></informaltable>
515 <para>RETURN VALUE</para>
516 <informaltable><tgroup cols="2"><tbody><row><entry
521 <para>Mode VIDEO_SOURCE_MEMORY not selected.</para>
528 <para>Attempted to write more data than the internal buffer can
536 <para>fd is not a valid open file descriptor.</para>
538 </row></tbody></tgroup></informaltable>
540 </section><section id="VIDEO_STOP"
541 role="subsection"><title>VIDEO_STOP</title>
544 <informaltable><tgroup cols="1"><tbody><row><entry
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>
550 </row></tbody></tgroup></informaltable>
553 <informaltable><tgroup cols="1"><tbody><row><entry
555 <para>int ioctl(fd, int request = VIDEO_STOP, boolean
558 </row></tbody></tgroup></informaltable>
561 <informaltable><tgroup cols="2"><tbody><row><entry
566 <para>File descriptor returned by a previous call to open().</para>
570 <para>int request</para>
573 <para>Equals VIDEO_STOP for this command.</para>
577 <para>Boolean mode</para>
580 <para>Indicates how the screen shall be handled.</para>
586 <para>TRUE: Blank screen when stop.</para>
592 <para>FALSE: Show last decoded frame.</para>
594 </row></tbody></tgroup></informaltable>
597 </section><section id="VIDEO_PLAY"
598 role="subsection"><title>VIDEO_PLAY</title>
601 <informaltable><tgroup cols="1"><tbody><row><entry
603 <para>This ioctl call asks the Video Device to start playing a video stream from the
604 selected source.</para>
606 </row></tbody></tgroup></informaltable>
609 <informaltable><tgroup cols="1"><tbody><row><entry
611 <para>int ioctl(fd, int request = VIDEO_PLAY);</para>
613 </row></tbody></tgroup></informaltable>
616 <informaltable><tgroup cols="2"><tbody><row><entry
621 <para>File descriptor returned by a previous call to open().</para>
625 <para>int request</para>
628 <para>Equals VIDEO_PLAY for this command.</para>
630 </row></tbody></tgroup></informaltable>
633 </section><section id="VIDEO_FREEZE"
634 role="subsection"><title>VIDEO_FREEZE</title>
637 <informaltable><tgroup cols="1"><tbody><row><entry
639 <para>This ioctl call suspends the live video stream being played. Decoding
640 and playing are frozen. It is then possible to restart the decoding
641 and playing process of the video stream using the VIDEO_CONTINUE
642 command. If VIDEO_SOURCE_MEMORY is selected in the ioctl call
643 VIDEO_SELECT_SOURCE, the DVB subsystem will not decode any more
644 data until the ioctl call VIDEO_CONTINUE or VIDEO_PLAY is performed.</para>
646 </row></tbody></tgroup></informaltable>
649 <informaltable><tgroup cols="1"><tbody><row><entry
651 <para>int ioctl(fd, int request = VIDEO_FREEZE);</para>
653 </row></tbody></tgroup></informaltable>
656 <informaltable><tgroup cols="2"><tbody><row><entry
661 <para>File descriptor returned by a previous call to open().</para>
665 <para>int request</para>
668 <para>Equals VIDEO_FREEZE for this command.</para>
670 </row></tbody></tgroup></informaltable>
673 </section><section id="VIDEO_CONTINUE"
674 role="subsection"><title>VIDEO_CONTINUE</title>
677 <informaltable><tgroup cols="1"><tbody><row><entry
679 <para>This ioctl call restarts decoding and playing processes of the video stream
680 which was played before a call to VIDEO_FREEZE was made.</para>
682 </row></tbody></tgroup></informaltable>
685 <informaltable><tgroup cols="1"><tbody><row><entry
687 <para>int ioctl(fd, int request = VIDEO_CONTINUE);</para>
689 </row></tbody></tgroup></informaltable>
692 <informaltable><tgroup cols="2"><tbody><row><entry
697 <para>File descriptor returned by a previous call to open().</para>
701 <para>int request</para>
704 <para>Equals VIDEO_CONTINUE for this command.</para>
706 </row></tbody></tgroup></informaltable>
709 </section><section id="VIDEO_SELECT_SOURCE"
710 role="subsection"><title>VIDEO_SELECT_SOURCE</title>
713 <informaltable><tgroup cols="1"><tbody><row><entry
715 <para>This ioctl call informs the video device which source shall be used for the input
716 data. The possible sources are demux or memory. If memory is selected, the
717 data is fed to the video device through the write command.</para>
719 </row></tbody></tgroup></informaltable>
722 <informaltable><tgroup cols="1"><tbody><row><entry
724 <para>int ioctl(fd, int request = VIDEO_SELECT_SOURCE,
725 video_stream_source_t source);</para>
727 </row></tbody></tgroup></informaltable>
730 <informaltable><tgroup cols="2"><tbody><row><entry
735 <para>File descriptor returned by a previous call to open().</para>
739 <para>int request</para>
742 <para>Equals VIDEO_SELECT_SOURCE for this command.</para>
746 <para>video_stream_source_t
750 <para>Indicates which source shall be used for the Video stream.</para>
752 </row></tbody></tgroup></informaltable>
755 </section><section id="VIDEO_SET_BLANK"
756 role="subsection"><title>VIDEO_SET_BLANK</title>
759 <informaltable><tgroup cols="1"><tbody><row><entry
761 <para>This ioctl call asks the Video Device to blank out the picture.</para>
763 </row></tbody></tgroup></informaltable>
766 <informaltable><tgroup cols="1"><tbody><row><entry
768 <para>int ioctl(fd, int request = VIDEO_SET_BLANK, boolean
771 </row></tbody></tgroup></informaltable>
774 <informaltable><tgroup cols="2"><tbody><row><entry
779 <para>File descriptor returned by a previous call to open().</para>
783 <para>int request</para>
786 <para>Equals VIDEO_SET_BLANK for this command.</para>
790 <para>boolean mode</para>
793 <para>TRUE: Blank screen when stop.</para>
799 <para>FALSE: Show last decoded frame.</para>
801 </row></tbody></tgroup></informaltable>
804 </section><section id="VIDEO_GET_STATUS"
805 role="subsection"><title>VIDEO_GET_STATUS</title>
808 <informaltable><tgroup cols="1"><tbody><row><entry
810 <para>This ioctl call asks the Video Device to return the current status of the device.</para>
812 </row></tbody></tgroup></informaltable>
815 <informaltable><tgroup cols="1"><tbody><row><entry
817 <para> int ioctl(fd, int request = VIDEO_GET_STATUS, struct
818 video_status ⋆status);</para>
820 </row></tbody></tgroup></informaltable>
823 <informaltable><tgroup cols="2"><tbody><row><entry
828 <para>File descriptor returned by a previous call to open().</para>
832 <para>int request</para>
835 <para>Equals VIDEO_GET_STATUS for this command.</para>
839 <para>struct video_status
843 <para>Returns the current status of the Video Device.</para>
845 </row></tbody></tgroup></informaltable>
848 </section><section id="VIDEO_GET_EVENT"
849 role="subsection"><title>VIDEO_GET_EVENT</title>
852 <informaltable><tgroup cols="1"><tbody><row><entry
854 <para>This ioctl call returns an event of type video_event if available. If an event is
855 not available, the behavior depends on whether the device is in blocking or
856 non-blocking mode. In the latter case, the call fails immediately with errno
857 set to EWOULDBLOCK. In the former case, the call blocks until an event
858 becomes available. The standard Linux poll() and/or select() system calls can
859 be used with the device file descriptor to watch for new events. For select(),
860 the file descriptor should be included in the exceptfds argument, and for
861 poll(), POLLPRI should be specified as the wake-up condition. Read-only
862 permissions are sufficient for this ioctl call.</para>
864 </row></tbody></tgroup></informaltable>
867 <informaltable><tgroup cols="1"><tbody><row><entry
869 <para> int ioctl(fd, int request = VIDEO_GET_EVENT, struct
870 video_event ⋆ev);</para>
872 </row></tbody></tgroup></informaltable>
875 <informaltable><tgroup cols="2"><tbody><row><entry
880 <para>File descriptor returned by a previous call to open().</para>
884 <para>int request</para>
887 <para>Equals VIDEO_GET_EVENT for this command.</para>
891 <para>struct video_event
895 <para>Points to the location where the event, if any, is to be
898 </row></tbody></tgroup></informaltable>
900 <informaltable><tgroup cols="2"><tbody><row><entry
902 <para>EWOULDBLOCK</para>
905 <para>There is no event pending, and the device is in
906 non-blocking mode.</para>
910 <para>EOVERFLOW</para>
913 <para>Overflow in event queue - one or more events were lost.</para>
915 </row></tbody></tgroup></informaltable>
917 </section><section id="VIDEO_SET_DISPLAY_FORMAT"
918 role="subsection"><title>VIDEO_SET_DISPLAY_FORMAT</title>
921 <informaltable><tgroup cols="1"><tbody><row><entry
923 <para>This ioctl call asks the Video Device to select the video format to be applied
924 by the MPEG chip on the video.</para>
926 </row></tbody></tgroup></informaltable>
929 <informaltable><tgroup cols="1"><tbody><row><entry
931 <para> int ioctl(fd, int request =
932 VIDEO_SET_DISPLAY_FORMAT, video_display_format_t
935 </row></tbody></tgroup></informaltable>
938 <informaltable><tgroup cols="2"><tbody><row><entry
943 <para>File descriptor returned by a previous call to open().</para>
947 <para>int request</para>
950 <para>Equals VIDEO_SET_DISPLAY_FORMAT for this
955 <para>video_display_format_t
959 <para>Selects the video format to be used.</para>
961 </row></tbody></tgroup></informaltable>
964 </section><section id="VIDEO_STILLPICTURE"
965 role="subsection"><title>VIDEO_STILLPICTURE</title>
968 <informaltable><tgroup cols="1"><tbody><row><entry
970 <para>This ioctl call asks the Video Device to display a still picture (I-frame). The
971 input data shall contain an I-frame. If the pointer is NULL, then the current
972 displayed still picture is blanked.</para>
974 </row></tbody></tgroup></informaltable>
977 <informaltable><tgroup cols="1"><tbody><row><entry
979 <para>int ioctl(fd, int request = VIDEO_STILLPICTURE,
980 struct video_still_picture ⋆sp);</para>
982 </row></tbody></tgroup></informaltable>
985 <informaltable><tgroup cols="2"><tbody><row><entry
990 <para>File descriptor returned by a previous call to open().</para>
994 <para>int request</para>
997 <para>Equals VIDEO_STILLPICTURE for this command.</para>
1006 <para>Pointer to a location where an I-frame and size is stored.</para>
1008 </row></tbody></tgroup></informaltable>
1011 </section><section id="VIDEO_FAST_FORWARD"
1012 role="subsection"><title>VIDEO_FAST_FORWARD</title>
1015 <informaltable><tgroup cols="1"><tbody><row><entry
1017 <para>This ioctl call asks the Video Device to skip decoding of N number of I-frames.
1018 This call can only be used if VIDEO_SOURCE_MEMORY is selected.</para>
1020 </row></tbody></tgroup></informaltable>
1023 <informaltable><tgroup cols="1"><tbody><row><entry
1025 <para>int ioctl(fd, int request = VIDEO_FAST_FORWARD, int
1028 </row></tbody></tgroup></informaltable>
1031 <informaltable><tgroup cols="2"><tbody><row><entry
1036 <para>File descriptor returned by a previous call to open().</para>
1040 <para>int request</para>
1043 <para>Equals VIDEO_FAST_FORWARD for this command.</para>
1047 <para>int nFrames</para>
1050 <para>The number of frames to skip.</para>
1052 </row></tbody></tgroup></informaltable>
1054 <informaltable><tgroup cols="2"><tbody><row><entry
1059 <para>Mode VIDEO_SOURCE_MEMORY not selected.</para>
1061 </row></tbody></tgroup></informaltable>
1063 </section><section id="VIDEO_SLOWMOTION"
1064 role="subsection"><title>VIDEO_SLOWMOTION</title>
1067 <informaltable><tgroup cols="1"><tbody><row><entry
1069 <para>This ioctl call asks the video device to repeat decoding frames N number of
1070 times. This call can only be used if VIDEO_SOURCE_MEMORY is selected.</para>
1072 </row></tbody></tgroup></informaltable>
1075 <informaltable><tgroup cols="1"><tbody><row><entry
1077 <para>int ioctl(fd, int request = VIDEO_SLOWMOTION, int
1080 </row></tbody></tgroup></informaltable>
1083 <informaltable><tgroup cols="2"><tbody><row><entry
1088 <para>File descriptor returned by a previous call to open().</para>
1092 <para>int request</para>
1095 <para>Equals VIDEO_SLOWMOTION for this command.</para>
1099 <para>int nFrames</para>
1102 <para>The number of times to repeat each frame.</para>
1104 </row></tbody></tgroup></informaltable>
1106 <informaltable><tgroup cols="2"><tbody><row><entry
1111 <para>Mode VIDEO_SOURCE_MEMORY not selected.</para>
1113 </row></tbody></tgroup></informaltable>
1115 </section><section id="VIDEO_GET_CAPABILITIES"
1116 role="subsection"><title>VIDEO_GET_CAPABILITIES</title>
1119 <informaltable><tgroup cols="1"><tbody><row><entry
1121 <para>This ioctl call asks the video device about its decoding capabilities. On success
1122 it returns and integer which has bits set according to the defines in section ??.</para>
1124 </row></tbody></tgroup></informaltable>
1127 <informaltable><tgroup cols="1"><tbody><row><entry
1129 <para>int ioctl(fd, int request = VIDEO_GET_CAPABILITIES,
1130 unsigned int ⋆cap);</para>
1132 </row></tbody></tgroup></informaltable>
1135 <informaltable><tgroup cols="2"><tbody><row><entry
1140 <para>File descriptor returned by a previous call to open().</para>
1144 <para>int request</para>
1147 <para>Equals VIDEO_GET_CAPABILITIES for this
1152 <para>unsigned int *cap</para>
1155 <para>Pointer to a location where to store the capability
1158 </row></tbody></tgroup></informaltable>
1161 </section><section id="VIDEO_SET_ID"
1162 role="subsection"><title>VIDEO_SET_ID</title>
1165 <informaltable><tgroup cols="1"><tbody><row><entry
1167 <para>This ioctl selects which sub-stream is to be decoded if a program or system
1168 stream is sent to the video device.</para>
1170 </row></tbody></tgroup></informaltable>
1173 <informaltable><tgroup cols="1"><tbody><row><entry
1175 <para>int ioctl(int fd, int request = VIDEO_SET_ID, int
1178 </row></tbody></tgroup></informaltable>
1181 <informaltable><tgroup cols="2"><tbody><row><entry
1186 <para>File descriptor returned by a previous call to open().</para>
1190 <para>int request</para>
1193 <para>Equals VIDEO_SET_ID for this command.</para>
1200 <para>video sub-stream id</para>
1202 </row></tbody></tgroup></informaltable>
1204 <informaltable><tgroup cols="2"><tbody><row><entry
1209 <para>Invalid sub-stream id.</para>
1211 </row></tbody></tgroup></informaltable>
1213 </section><section id="VIDEO_CLEAR_BUFFER"
1214 role="subsection"><title>VIDEO_CLEAR_BUFFER</title>
1217 <informaltable><tgroup cols="1"><tbody><row><entry
1219 <para>This ioctl call clears all video buffers in the driver and in the decoder hardware.</para>
1221 </row></tbody></tgroup></informaltable>
1224 <informaltable><tgroup cols="1"><tbody><row><entry
1226 <para>int ioctl(fd, int request = VIDEO_CLEAR_BUFFER);</para>
1228 </row></tbody></tgroup></informaltable>
1231 <informaltable><tgroup cols="2"><tbody><row><entry
1236 <para>File descriptor returned by a previous call to open().</para>
1240 <para>int request</para>
1243 <para>Equals VIDEO_CLEAR_BUFFER for this command.</para>
1245 </row></tbody></tgroup></informaltable>
1248 </section><section id="VIDEO_SET_STREAMTYPE"
1249 role="subsection"><title>VIDEO_SET_STREAMTYPE</title>
1252 <informaltable><tgroup cols="1"><tbody><row><entry
1254 <para>This ioctl tells the driver which kind of stream to expect being written to it. If
1255 this call is not used the default of video PES is used. Some drivers might not
1256 support this call and always expect PES.</para>
1258 </row></tbody></tgroup></informaltable>
1261 <informaltable><tgroup cols="1"><tbody><row><entry
1263 <para>int ioctl(fd, int request = VIDEO_SET_STREAMTYPE,
1266 </row></tbody></tgroup></informaltable>
1269 <informaltable><tgroup cols="2"><tbody><row><entry
1274 <para>File descriptor returned by a previous call to open().</para>
1278 <para>int request</para>
1281 <para>Equals VIDEO_SET_STREAMTYPE for this command.</para>
1285 <para>int type</para>
1288 <para>stream type</para>
1290 </row></tbody></tgroup></informaltable>
1293 </section><section id="VIDEO_SET_FORMAT"
1294 role="subsection"><title>VIDEO_SET_FORMAT</title>
1297 <informaltable><tgroup cols="1"><tbody><row><entry
1299 <para>This ioctl sets the screen format (aspect ratio) of the connected output device
1300 (TV) so that the output of the decoder can be adjusted accordingly.</para>
1302 </row></tbody></tgroup></informaltable>
1305 <informaltable><tgroup cols="1"><tbody><row><entry
1307 <para> int ioctl(fd, int request = VIDEO_SET_FORMAT,
1308 video_format_t format);</para>
1310 </row></tbody></tgroup></informaltable>
1313 <informaltable><tgroup cols="2"><tbody><row><entry
1318 <para>File descriptor returned by a previous call to open().</para>
1322 <para>int request</para>
1325 <para>Equals VIDEO_SET_FORMAT for this command.</para>
1329 <para>video_format_t
1333 <para>video format of TV as defined in section ??.</para>
1335 </row></tbody></tgroup></informaltable>
1337 <informaltable><tgroup cols="2"><tbody><row><entry
1342 <para>format is not a valid video format.</para>
1344 </row></tbody></tgroup></informaltable>
1346 </section><section id="VIDEO_SET_SYSTEM"
1347 role="subsection"><title>VIDEO_SET_SYSTEM</title>
1350 <informaltable><tgroup cols="1"><tbody><row><entry
1352 <para>This ioctl sets the television output format. The format (see section ??) may
1353 vary from the color format of the displayed MPEG stream. If the hardware is
1354 not able to display the requested format the call will return an error.</para>
1356 </row></tbody></tgroup></informaltable>
1359 <informaltable><tgroup cols="1"><tbody><row><entry
1361 <para> int ioctl(fd, int request = VIDEO_SET_SYSTEM ,
1362 video_system_t system);</para>
1364 </row></tbody></tgroup></informaltable>
1367 <informaltable><tgroup cols="2"><tbody><row><entry
1372 <para>File descriptor returned by a previous call to open().</para>
1376 <para>int request</para>
1379 <para>Equals VIDEO_SET_FORMAT for this command.</para>
1383 <para>video_system_t
1387 <para>video system of TV output.</para>
1389 </row></tbody></tgroup></informaltable>
1391 <informaltable><tgroup cols="2"><tbody><row><entry
1396 <para>system is not a valid or supported video system.</para>
1398 </row></tbody></tgroup></informaltable>
1400 </section><section id="VIDEO_SET_HIGHLIGHT"
1401 role="subsection"><title>VIDEO_SET_HIGHLIGHT</title>
1404 <informaltable><tgroup cols="1"><tbody><row><entry
1406 <para>This ioctl sets the SPU highlight information for the menu access of a DVD.</para>
1408 </row></tbody></tgroup></informaltable>
1411 <informaltable><tgroup cols="1"><tbody><row><entry
1413 <para> int ioctl(fd, int request = VIDEO_SET_HIGHLIGHT
1414 ,video_highlight_t ⋆vhilite)</para>
1416 </row></tbody></tgroup></informaltable>
1419 <informaltable><tgroup cols="2"><tbody><row><entry
1424 <para>File descriptor returned by a previous call to open().</para>
1428 <para>int request</para>
1431 <para>Equals VIDEO_SET_HIGHLIGHT for this command.</para>
1435 <para>video_highlight_t
1439 <para>SPU Highlight information according to section ??.</para>
1441 </row></tbody></tgroup></informaltable>
1444 </section><section id="VIDEO_SET_SPU"
1445 role="subsection"><title>VIDEO_SET_SPU</title>
1448 <informaltable><tgroup cols="1"><tbody><row><entry
1450 <para>This ioctl activates or deactivates SPU decoding in a DVD input stream. It can
1451 only be used, if the driver is able to handle a DVD stream.</para>
1453 </row></tbody></tgroup></informaltable>
1456 <informaltable><tgroup cols="1"><tbody><row><entry
1458 <para> int ioctl(fd, int request = VIDEO_SET_SPU ,
1459 video_spu_t ⋆spu)</para>
1461 </row></tbody></tgroup></informaltable>
1464 <informaltable><tgroup cols="2"><tbody><row><entry
1469 <para>File descriptor returned by a previous call to open().</para>
1473 <para>int request</para>
1476 <para>Equals VIDEO_SET_SPU for this command.</para>
1480 <para>video_spu_t *spu</para>
1483 <para>SPU decoding (de)activation and subid setting according
1484 to section ??.</para>
1486 </row></tbody></tgroup></informaltable>
1488 <informaltable><tgroup cols="2"><tbody><row><entry
1493 <para>input is not a valid spu setting or driver cannot handle
1496 </row></tbody></tgroup></informaltable>
1498 </section><section id="VIDEO_SET_SPU_PALETTE"
1499 role="subsection"><title>VIDEO_SET_SPU_PALETTE</title>
1502 <informaltable><tgroup cols="1"><tbody><row><entry
1504 <para>This ioctl sets the SPU color palette.</para>
1506 </row></tbody></tgroup></informaltable>
1509 <informaltable><tgroup cols="1"><tbody><row><entry
1511 <para> int ioctl(fd, int request = VIDEO_SET_SPU_PALETTE
1512 ,video_spu_palette_t ⋆palette )</para>
1514 </row></tbody></tgroup></informaltable>
1517 <informaltable><tgroup cols="2"><tbody><row><entry
1522 <para>File descriptor returned by a previous call to open().</para>
1526 <para>int request</para>
1529 <para>Equals VIDEO_SET_SPU_PALETTE for this command.</para>
1533 <para>video_spu_palette_t
1537 <para>SPU palette according to section ??.</para>
1539 </row></tbody></tgroup></informaltable>
1541 <informaltable><tgroup cols="2"><tbody><row><entry
1546 <para>input is not a valid palette or driver doesn’t handle SPU.</para>
1548 </row></tbody></tgroup></informaltable>
1550 </section><section id="VIDEO_GET_NAVI"
1551 role="subsection"><title>VIDEO_GET_NAVI</title>
1554 <informaltable><tgroup cols="1"><tbody><row><entry
1556 <para>This ioctl returns navigational information from the DVD stream. This is
1557 especially needed if an encoded stream has to be decoded by the hardware.</para>
1559 </row></tbody></tgroup></informaltable>
1562 <informaltable><tgroup cols="1"><tbody><row><entry
1564 <para> int ioctl(fd, int request = VIDEO_GET_NAVI ,
1565 video_navi_pack_t ⋆navipack)</para>
1567 </row></tbody></tgroup></informaltable>
1570 <informaltable><tgroup cols="2"><tbody><row><entry
1575 <para>File descriptor returned by a previous call to open().</para>
1579 <para>int request</para>
1582 <para>Equals VIDEO_GET_NAVI for this command.</para>
1586 <para>video_navi_pack_t
1590 <para>PCI or DSI pack (private stream 2) according to section
1593 </row></tbody></tgroup></informaltable>
1595 <informaltable><tgroup cols="2"><tbody><row><entry
1600 <para>driver is not able to return navigational information</para>
1602 </row></tbody></tgroup></informaltable>
1604 </section><section id="VIDEO_SET_ATTRIBUTES"
1605 role="subsection"><title>VIDEO_SET_ATTRIBUTES</title>
1608 <informaltable><tgroup cols="1"><tbody><row><entry
1610 <para>This ioctl is intended for DVD playback and allows you to set certain
1611 information about the stream. Some hardware may not need this information,
1612 but the call also tells the hardware to prepare for DVD playback.</para>
1614 </row></tbody></tgroup></informaltable>
1617 <informaltable><tgroup cols="1"><tbody><row><entry
1619 <para> int ioctl(fd, int request = VIDEO_SET_ATTRIBUTE
1620 ,video_attributes_t vattr)</para>
1622 </row></tbody></tgroup></informaltable>
1625 <informaltable><tgroup cols="2"><tbody><row><entry
1630 <para>File descriptor returned by a previous call to open().</para>
1634 <para>int request</para>
1637 <para>Equals VIDEO_SET_ATTRIBUTE for this command.</para>
1641 <para>video_attributes_t
1645 <para>video attributes according to section ??.</para>
1647 </row></tbody></tgroup></informaltable>
1649 <informaltable><tgroup cols="2"><tbody><row><entry
1654 <para>input is not a valid attribute setting.</para>
1656 </row></tbody></tgroup></informaltable>
1657 </section></section>