···1515<para>The ioctls that deal with SPUs (sub picture units) and navigation packets are only1616supported on some MPEG decoders made for DVD playback.1717</para>1818+<para>1919+These ioctls were also used by V4L2 to control MPEG decoders implemented in V4L2. The use2020+of these ioctls for that purpose has been made obsolete and proper V4L2 ioctls or controls2121+have been created to replace that functionality.</para>1822<section id="video_types">1923<title>Video Data Types</title>2024···5955</section>60566157<section id="video-stream-source-t">6262-<title>video stream source</title>5858+<title>video_stream_source_t</title>6359<para>The video stream source is set through the VIDEO_SELECT_SOURCE call and can take6460the following values, depending on whether we are replaying from an internal (demuxer) or6561external (user write) source.···8076</section>81778278<section id="video-play-state-t">8383-<title>video play state</title>7979+<title>video_play_state_t</title>8480<para>The following values can be returned by the VIDEO_GET_STATUS call representing the8581state of video playback.8682</para>···9490</section>95919692<section id="video-command">9393+<title>struct video_command</title>9794<para>The structure must be zeroed before use by the application9895This ensures it can be extended safely in the future.</para>9999-<title>struct video-command</title>10096<programlisting>10197struct video_command {10298 __u32 cmd;···125121</section>126122127123<section id="video-size-t">128128-<title>struct video_size-t</title>124124+<title>video_size_t</title>129125<programlisting>130126typedef struct {131127 int w;···221217</section>222218223219<section id="video-system">224224-<title>video system</title>220220+<title>video_system_t</title>225221<para>A call to VIDEO_SET_SYSTEM sets the desired video system for TV output. The226222following system types can be set:227223</para>···267263268264</section>269265<section id="video-spu">270270-<title>video SPU</title>266266+<title>struct video_spu</title>271267<para>Calling VIDEO_SET_SPU deactivates or activates SPU decoding, according to the272268following format:273269</para>···281277282278</section>283279<section id="video-spu-palette">284284-<title>video SPU palette</title>280280+<title>struct video_spu_palette</title>285281<para>The following structure is used to set the SPU palette by calling VIDEO_SPU_PALETTE:286282</para>287283<programlisting>288284 typedef289289- struct video_spu_palette{285285+ struct video_spu_palette {290286 int length;291287 uint8_t ⋆palette;292288 } video_spu_palette_t;···294290295291</section>296292<section id="video-navi-pack">297297-<title>video NAVI pack</title>293293+<title>struct video_navi_pack</title>298294<para>In order to get the navigational data the following structure has to be passed to the ioctl299295VIDEO_GET_NAVI:300296</para>301297<programlisting>302298 typedef303303- struct video_navi_pack{299299+ struct video_navi_pack {304300 int length; /⋆ 0 ... 1024 ⋆/305301 uint8_t data[1024];306302 } video_navi_pack_t;···309305310306311307<section id="video-attributes-t">312312-<title>video attributes</title>308308+<title>video_attributes_t</title>313309<para>The following attributes can be set by a call to VIDEO_SET_ATTRIBUTES:314310</para>315311<programlisting>···545541role="subsection"><title>VIDEO_STOP</title>546542<para>DESCRIPTION547543</para>544544+<para>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2545545+&VIDIOC-DECODER-CMD; instead.</para>548546<informaltable><tgroup cols="1"><tbody><row><entry549547 align="char">550548<para>This ioctl call asks the Video Device to stop playing the current stream.···604598role="subsection"><title>VIDEO_PLAY</title>605599<para>DESCRIPTION606600</para>601601+<para>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2602602+&VIDIOC-DECODER-CMD; instead.</para>607603<informaltable><tgroup cols="1"><tbody><row><entry608604 align="char">609605<para>This ioctl call asks the Video Device to start playing a video stream from the···642634role="subsection"><title>VIDEO_FREEZE</title>643635<para>DESCRIPTION644636</para>637637+<para>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2638638+&VIDIOC-DECODER-CMD; instead.</para>645639<informaltable><tgroup cols="1"><tbody><row><entry646640 align="char">647641<para>This ioctl call suspends the live video stream being played. Decoding···684674role="subsection"><title>VIDEO_CONTINUE</title>685675<para>DESCRIPTION686676</para>677677+<para>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2678678+&VIDIOC-DECODER-CMD; instead.</para>687679<informaltable><tgroup cols="1"><tbody><row><entry688680 align="char">689681<para>This ioctl call restarts decoding and playing processes of the video stream···722710role="subsection"><title>VIDEO_SELECT_SOURCE</title>723711<para>DESCRIPTION724712</para>713713+<para>This ioctl is for DVB devices only. This ioctl was also supported by the714714+V4L2 ivtv driver, but that has been replaced by the ivtv-specific715715+<constant>IVTV_IOC_PASSTHROUGH_MODE</constant> ioctl.</para>725716<informaltable><tgroup cols="1"><tbody><row><entry726717 align="char">727718<para>This ioctl call informs the video device which source shall be used for the input···860845 </row></tbody></tgroup></informaltable>861846&return-value-dvb;862847848848+</section><section id="VIDEO_GET_FRAME_COUNT"849849+role="subsection"><title>VIDEO_GET_FRAME_COUNT</title>850850+<para>DESCRIPTION851851+</para>852852+<para>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this853853+ioctl has been replaced by the <constant>V4L2_CID_MPEG_VIDEO_DEC_FRAME</constant> control.</para>854854+<informaltable><tgroup cols="1"><tbody><row><entry855855+ align="char">856856+<para>This ioctl call asks the Video Device to return the number of displayed frames857857+since the decoder was started.</para>858858+</entry>859859+ </row></tbody></tgroup></informaltable>860860+<para>SYNOPSIS861861+</para>862862+<informaltable><tgroup cols="1"><tbody><row><entry863863+ align="char">864864+<para>int ioctl(int fd, int request =865865+ VIDEO_GET_FRAME_COUNT, __u64 *pts);</para>866866+</entry>867867+ </row></tbody></tgroup></informaltable>868868+<para>PARAMETERS869869+</para>870870+<informaltable><tgroup cols="2"><tbody><row><entry871871+ align="char">872872+<para>int fd</para>873873+</entry><entry874874+ align="char">875875+<para>File descriptor returned by a previous call to open().</para>876876+</entry>877877+ </row><row><entry878878+ align="char">879879+<para>int request</para>880880+</entry><entry881881+ align="char">882882+<para>Equals VIDEO_GET_FRAME_COUNT for this883883+ command.</para>884884+</entry>885885+ </row><row><entry886886+ align="char">887887+<para>__u64 *pts888888+</para>889889+</entry><entry890890+ align="char">891891+<para>Returns the number of frames displayed since the decoder was started.892892+</para>893893+</entry>894894+ </row></tbody></tgroup></informaltable>895895+&return-value-dvb;896896+897897+</section><section id="VIDEO_GET_PTS"898898+role="subsection"><title>VIDEO_GET_PTS</title>899899+<para>DESCRIPTION900900+</para>901901+<para>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this902902+ioctl has been replaced by the <constant>V4L2_CID_MPEG_VIDEO_DEC_PTS</constant> control.</para>903903+<informaltable><tgroup cols="1"><tbody><row><entry904904+ align="char">905905+<para>This ioctl call asks the Video Device to return the current PTS timestamp.</para>906906+</entry>907907+ </row></tbody></tgroup></informaltable>908908+<para>SYNOPSIS909909+</para>910910+<informaltable><tgroup cols="1"><tbody><row><entry911911+ align="char">912912+<para>int ioctl(int fd, int request =913913+ VIDEO_GET_PTS, __u64 *pts);</para>914914+</entry>915915+ </row></tbody></tgroup></informaltable>916916+<para>PARAMETERS917917+</para>918918+<informaltable><tgroup cols="2"><tbody><row><entry919919+ align="char">920920+<para>int fd</para>921921+</entry><entry922922+ align="char">923923+<para>File descriptor returned by a previous call to open().</para>924924+</entry>925925+ </row><row><entry926926+ align="char">927927+<para>int request</para>928928+</entry><entry929929+ align="char">930930+<para>Equals VIDEO_GET_PTS for this931931+ command.</para>932932+</entry>933933+ </row><row><entry934934+ align="char">935935+<para>__u64 *pts936936+</para>937937+</entry><entry938938+ align="char">939939+<para>Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 / ISO/IEC 13818-1.940940+</para>941941+<para>942942+The PTS should belong to the currently played943943+frame if possible, but may also be a value close to it944944+like the PTS of the last decoded frame or the last PTS945945+extracted by the PES parser.</para>946946+</entry>947947+ </row></tbody></tgroup></informaltable>948948+&return-value-dvb;949949+950950+</section><section id="VIDEO_GET_FRAME_RATE"951951+role="subsection"><title>VIDEO_GET_FRAME_RATE</title>952952+<para>DESCRIPTION953953+</para>954954+<informaltable><tgroup cols="1"><tbody><row><entry955955+ align="char">956956+<para>This ioctl call asks the Video Device to return the current framerate.</para>957957+</entry>958958+ </row></tbody></tgroup></informaltable>959959+<para>SYNOPSIS960960+</para>961961+<informaltable><tgroup cols="1"><tbody><row><entry962962+ align="char">963963+<para>int ioctl(int fd, int request =964964+ VIDEO_GET_FRAME_RATE, unsigned int *rate);</para>965965+</entry>966966+ </row></tbody></tgroup></informaltable>967967+<para>PARAMETERS968968+</para>969969+<informaltable><tgroup cols="2"><tbody><row><entry970970+ align="char">971971+<para>int fd</para>972972+</entry><entry973973+ align="char">974974+<para>File descriptor returned by a previous call to open().</para>975975+</entry>976976+ </row><row><entry977977+ align="char">978978+<para>int request</para>979979+</entry><entry980980+ align="char">981981+<para>Equals VIDEO_GET_FRAME_RATE for this982982+ command.</para>983983+</entry>984984+ </row><row><entry985985+ align="char">986986+<para>unsigned int *rate987987+</para>988988+</entry><entry989989+ align="char">990990+<para>Returns the framerate in number of frames per 1000 seconds.991991+</para>992992+</entry>993993+ </row></tbody></tgroup></informaltable>994994+&return-value-dvb;995995+863996</section><section id="VIDEO_GET_EVENT"864997role="subsection"><title>VIDEO_GET_EVENT</title>865998<para>DESCRIPTION866999</para>10001000+<para>This ioctl is for DVB devices only. To get events from a V4L2 decoder use the V4L210011001+&VIDIOC-DQEVENT; ioctl instead.</para>8671002<informaltable><tgroup cols="1"><tbody><row><entry8681003 align="char">8691004<para>This ioctl call returns an event of type video_event if available. If an event is···1078913<para>Overflow in event queue - one or more events were lost.</para>1079914</entry>1080915 </row></tbody></tgroup></informaltable>916916+917917+</section><section id="VIDEO_COMMAND"918918+role="subsection"><title>VIDEO_COMMAND</title>919919+<para>DESCRIPTION920920+</para>921921+<para>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this922922+ioctl has been replaced by the &VIDIOC-DECODER-CMD; ioctl.</para>923923+<informaltable><tgroup cols="1"><tbody><row><entry924924+ align="char">925925+<para>This ioctl commands the decoder. The <constant>video_command</constant> struct926926+is a subset of the <constant>v4l2_decoder_cmd</constant> struct, so refer to the927927+&VIDIOC-DECODER-CMD; documentation for more information.</para>928928+</entry>929929+ </row></tbody></tgroup></informaltable>930930+<para>SYNOPSIS931931+</para>932932+<informaltable><tgroup cols="1"><tbody><row><entry933933+ align="char">934934+<para>int ioctl(int fd, int request =935935+ VIDEO_COMMAND, struct video_command *cmd);</para>936936+</entry>937937+ </row></tbody></tgroup></informaltable>938938+<para>PARAMETERS939939+</para>940940+<informaltable><tgroup cols="2"><tbody><row><entry941941+ align="char">942942+<para>int fd</para>943943+</entry><entry944944+ align="char">945945+<para>File descriptor returned by a previous call to open().</para>946946+</entry>947947+ </row><row><entry948948+ align="char">949949+<para>int request</para>950950+</entry><entry951951+ align="char">952952+<para>Equals VIDEO_COMMAND for this953953+ command.</para>954954+</entry>955955+ </row><row><entry956956+ align="char">957957+<para>struct video_command *cmd958958+</para>959959+</entry><entry960960+ align="char">961961+<para>Commands the decoder.962962+</para>963963+</entry>964964+ </row></tbody></tgroup></informaltable>965965+&return-value-dvb;966966+967967+</section><section id="VIDEO_TRY_COMMAND"968968+role="subsection"><title>VIDEO_TRY_COMMAND</title>969969+<para>DESCRIPTION970970+</para>971971+<para>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this972972+ioctl has been replaced by the &VIDIOC-TRY-DECODER-CMD; ioctl.</para>973973+<informaltable><tgroup cols="1"><tbody><row><entry974974+ align="char">975975+<para>This ioctl tries a decoder command. The <constant>video_command</constant> struct976976+is a subset of the <constant>v4l2_decoder_cmd</constant> struct, so refer to the977977+&VIDIOC-TRY-DECODER-CMD; documentation for more information.</para>978978+</entry>979979+ </row></tbody></tgroup></informaltable>980980+<para>SYNOPSIS981981+</para>982982+<informaltable><tgroup cols="1"><tbody><row><entry983983+ align="char">984984+<para>int ioctl(int fd, int request =985985+ VIDEO_TRY_COMMAND, struct video_command *cmd);</para>986986+</entry>987987+ </row></tbody></tgroup></informaltable>988988+<para>PARAMETERS989989+</para>990990+<informaltable><tgroup cols="2"><tbody><row><entry991991+ align="char">992992+<para>int fd</para>993993+</entry><entry994994+ align="char">995995+<para>File descriptor returned by a previous call to open().</para>996996+</entry>997997+ </row><row><entry998998+ align="char">999999+<para>int request</para>10001000+</entry><entry10011001+ align="char">10021002+<para>Equals VIDEO_TRY_COMMAND for this10031003+ command.</para>10041004+</entry>10051005+ </row><row><entry10061006+ align="char">10071007+<para>struct video_command *cmd10081008+</para>10091009+</entry><entry10101010+ align="char">10111011+<para>Try a decoder command.10121012+</para>10131013+</entry>10141014+ </row></tbody></tgroup></informaltable>10151015+&return-value-dvb;10161016+10171017+</section><section id="VIDEO_GET_SIZE"10181018+role="subsection"><title>VIDEO_GET_SIZE</title>10191019+<para>DESCRIPTION10201020+</para>10211021+<informaltable><tgroup cols="1"><tbody><row><entry10221022+ align="char">10231023+<para>This ioctl returns the size and aspect ratio.</para>10241024+</entry>10251025+ </row></tbody></tgroup></informaltable>10261026+<para>SYNOPSIS10271027+</para>10281028+<informaltable><tgroup cols="1"><tbody><row><entry10291029+ align="char">10301030+<para>int ioctl(int fd, int request =10311031+ VIDEO_GET_SIZE, video_size_t *size);</para>10321032+</entry>10331033+ </row></tbody></tgroup></informaltable>10341034+<para>PARAMETERS10351035+</para>10361036+<informaltable><tgroup cols="2"><tbody><row><entry10371037+ align="char">10381038+<para>int fd</para>10391039+</entry><entry10401040+ align="char">10411041+<para>File descriptor returned by a previous call to open().</para>10421042+</entry>10431043+ </row><row><entry10441044+ align="char">10451045+<para>int request</para>10461046+</entry><entry10471047+ align="char">10481048+<para>Equals VIDEO_GET_SIZE for this10491049+ command.</para>10501050+</entry>10511051+ </row><row><entry10521052+ align="char">10531053+<para>video_size_t *size10541054+</para>10551055+</entry><entry10561056+ align="char">10571057+<para>Returns the size and aspect ratio.10581058+</para>10591059+</entry>10601060+ </row></tbody></tgroup></informaltable>10611061+&return-value-dvb;1081106210821063</section><section id="VIDEO_SET_DISPLAY_FORMAT"10831064role="subsection"><title>VIDEO_SET_DISPLAY_FORMAT</title>