1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Chapter 13. DVB Deprecated APIs</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="LINUX MEDIA INFRASTRUCTURE API"><link rel="up" href="dvbapi.html" title="Part II. LINUX DVB API"><link rel="prev" href="NET_GET_IF.html" title="ioctl NET_GET_IF"><link rel="next" href="dvb_audio.html" title="DVB Audio Device"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 13. DVB Deprecated APIs</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="NET_GET_IF.html">Prev</a> </td><th width="60%" align="center">Part II. LINUX DVB API</th><td width="20%" align="right"> <a accesskey="n" href="dvb_audio.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h2 class="title"><a name="legacy_dvb_apis"></a>Chapter 13. DVB Deprecated APIs</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl class="toc"><dt><span class="section"><a href="legacy_dvb_apis.html#dvb_video">DVB Video Device</a></span></dt><dd><dl><dt><span class="section"><a href="legacy_dvb_apis.html#video_types">Video Data Types</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video_function_calls">Video Function Calls</a></span></dt></dl></dd><dt><span class="section"><a href="dvb_audio.html">DVB Audio Device</a></span></dt><dd><dl><dt><span class="section"><a href="dvb_audio.html#audio_data_types">Audio Data Types</a></span></dt><dt><span class="section"><a href="dvb_audio.html#audio_function_calls">Audio Function Calls</a></span></dt></dl></dd></dl></div><p>The APIs described here are kept only for historical reasons. There's 2 just one driver for a very legacy hardware that uses this API. No 3 modern drivers should use it. Instead, audio and video should be using 4 the V4L2 and ALSA APIs, and the pipelines should be set using the 5 Media Controller API</p><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="dvb_video"></a>DVB Video Device</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="legacy_dvb_apis.html#video_types">Video Data Types</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video_function_calls">Video Function Calls</a></span></dt></dl></div><p>The DVB video device controls the MPEG2 video decoder of the DVB hardware. It 6can be accessed through <span class="bold"><strong>/dev/dvb/adapter0/video0</strong></span>. Data types and and 7ioctl definitions can be accessed by including <span class="bold"><strong>linux/dvb/video.h</strong></span> in your 8application. 9</p><p>Note that the DVB video device only controls decoding of the MPEG video stream, not 10its presentation on the TV or computer screen. On PCs this is typically handled by an 11associated video4linux device, e.g. <span class="bold"><strong>/dev/video</strong></span>, which allows scaling and defining output 12windows. 13</p><p>Some DVB cards don’t have their own MPEG decoder, which results in the omission of 14the audio and video device as well as the video4linux device. 15</p><p>The ioctls that deal with SPUs (sub picture units) and navigation packets are only 16supported on some MPEG decoders made for DVD playback. 17</p><p> 18These ioctls were also used by V4L2 to control MPEG decoders implemented in V4L2. The use 19of these ioctls for that purpose has been made obsolete and proper V4L2 ioctls or controls 20have been created to replace that functionality.</p><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="video_types"></a>Video Data Types</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="legacy_dvb_apis.html#video-format-t">video_format_t</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-displayformat-t">video_displayformat_t</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-stream-source-t">video_stream_source_t</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-play-state-t">video_play_state_t</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-command">struct video_command</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-size-t">video_size_t</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-event">struct video_event</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-status">struct video_status</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-still-picture">struct video_still_picture</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video_caps">video capabilities</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-system">video_system_t</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-highlight">struct video_highlight</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-spu">struct video_spu</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-spu-palette">struct video_spu_palette</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-navi-pack">struct video_navi_pack</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video-attributes-t">video_attributes_t</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-format-t"></a>video_format_t</h4></div></div></div><p>The <code class="constant">video_format_t</code> data type defined by 21</p><pre class="programlisting"> 22typedef enum { 23 VIDEO_FORMAT_4_3, /⋆ Select 4:3 format ⋆/ 24 VIDEO_FORMAT_16_9, /⋆ Select 16:9 format. ⋆/ 25 VIDEO_FORMAT_221_1 /⋆ 2.21:1 ⋆/ 26} video_format_t; 27</pre><p>is used in the VIDEO_SET_FORMAT function (??) to tell the driver which aspect ratio 28the output hardware (e.g. TV) has. It is also used in the data structures video_status 29(??) returned by VIDEO_GET_STATUS (??) and video_event (??) returned by 30VIDEO_GET_EVENT (??) which report about the display format of the current video 31stream. 32</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-displayformat-t"></a>video_displayformat_t</h4></div></div></div><p>In case the display format of the video stream and of the display hardware differ the 33application has to specify how to handle the cropping of the picture. This can be done using 34the VIDEO_SET_DISPLAY_FORMAT call (??) which accepts 35</p><pre class="programlisting"> 36typedef enum { 37 VIDEO_PAN_SCAN, /⋆ use pan and scan format ⋆/ 38 VIDEO_LETTER_BOX, /⋆ use letterbox format ⋆/ 39 VIDEO_CENTER_CUT_OUT /⋆ use center cut out format ⋆/ 40} video_displayformat_t; 41</pre><p>as argument. 42</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-stream-source-t"></a>video_stream_source_t</h4></div></div></div><p>The video stream source is set through the VIDEO_SELECT_SOURCE call and can take 43the following values, depending on whether we are replaying from an internal (demuxer) or 44external (user write) source. 45</p><pre class="programlisting"> 46typedef enum { 47 VIDEO_SOURCE_DEMUX, /⋆ Select the demux as the main source ⋆/ 48 VIDEO_SOURCE_MEMORY /⋆ If this source is selected, the stream 49 comes from the user through the write 50 system call ⋆/ 51} video_stream_source_t; 52</pre><p>VIDEO_SOURCE_DEMUX selects the demultiplexer (fed either by the frontend or the 53DVR device) as the source of the video stream. If VIDEO_SOURCE_MEMORY 54is selected the stream comes from the application through the <span class="bold"><strong>write()</strong></span> system 55call. 56</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-play-state-t"></a>video_play_state_t</h4></div></div></div><p>The following values can be returned by the VIDEO_GET_STATUS call representing the 57state of video playback. 58</p><pre class="programlisting"> 59typedef enum { 60 VIDEO_STOPPED, /⋆ Video is stopped ⋆/ 61 VIDEO_PLAYING, /⋆ Video is currently playing ⋆/ 62 VIDEO_FREEZED /⋆ Video is freezed ⋆/ 63} video_play_state_t; 64</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-command"></a>struct video_command</h4></div></div></div><p>The structure must be zeroed before use by the application 65This ensures it can be extended safely in the future.</p><pre class="programlisting"> 66struct video_command { 67 __u32 cmd; 68 __u32 flags; 69 union { 70 struct { 71 __u64 pts; 72 } stop; 73 74 struct { 75 /⋆ 0 or 1000 specifies normal speed, 76 1 specifies forward single stepping, 77 -1 specifies backward single stepping, 78 >>1: playback at speed/1000 of the normal speed, 79 <-1: reverse playback at (-speed/1000) of the normal speed. ⋆/ 80 __s32 speed; 81 __u32 format; 82 } play; 83 84 struct { 85 __u32 data[16]; 86 } raw; 87 }; 88}; 89</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-size-t"></a>video_size_t</h4></div></div></div><pre class="programlisting"> 90typedef struct { 91 int w; 92 int h; 93 video_format_t aspect_ratio; 94} video_size_t; 95</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-event"></a>struct video_event</h4></div></div></div><p>The following is the structure of a video event as it is returned by the VIDEO_GET_EVENT 96call. 97</p><pre class="programlisting"> 98struct video_event { 99 __s32 type; 100#define VIDEO_EVENT_SIZE_CHANGED 1 101#define VIDEO_EVENT_FRAME_RATE_CHANGED 2 102#define VIDEO_EVENT_DECODER_STOPPED 3 103#define VIDEO_EVENT_VSYNC 4 104 __kernel_time_t timestamp; 105 union { 106 video_size_t size; 107 unsigned int frame_rate; /⋆ in frames per 1000sec ⋆/ 108 unsigned char vsync_field; /⋆ unknown/odd/even/progressive ⋆/ 109 } u; 110}; 111</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-status"></a>struct video_status</h4></div></div></div><p>The VIDEO_GET_STATUS call returns the following structure informing about various 112states of the playback operation. 113</p><pre class="programlisting"> 114struct video_status { 115 int video_blank; /⋆ blank video on freeze? ⋆/ 116 video_play_state_t play_state; /⋆ current state of playback ⋆/ 117 video_stream_source_t stream_source; /⋆ current source (demux/memory) ⋆/ 118 video_format_t video_format; /⋆ current aspect ratio of stream ⋆/ 119 video_displayformat_t display_format;/⋆ selected cropping mode ⋆/ 120}; 121</pre><p>If video_blank is set video will be blanked out if the channel is changed or if playback is 122stopped. Otherwise, the last picture will be displayed. play_state indicates if the video is 123currently frozen, stopped, or being played back. The stream_source corresponds to the seleted 124source for the video stream. It can come either from the demultiplexer or from memory. 125The video_format indicates the aspect ratio (one of 4:3 or 16:9) of the currently 126played video stream. Finally, display_format corresponds to the selected cropping 127mode in case the source video format is not the same as the format of the output 128device. 129</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-still-picture"></a>struct video_still_picture</h4></div></div></div><p>An I-frame displayed via the VIDEO_STILLPICTURE call is passed on within the 130following structure. 131</p><pre class="programlisting"> 132/⋆ pointer to and size of a single iframe in memory ⋆/ 133struct video_still_picture { 134 char ⋆iFrame; /⋆ pointer to a single iframe in memory ⋆/ 135 int32_t size; 136}; 137</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video_caps"></a>video capabilities</h4></div></div></div><p>A call to VIDEO_GET_CAPABILITIES returns an unsigned integer with the following 138bits set according to the hardwares capabilities. 139</p><pre class="programlisting"> 140 /⋆ bit definitions for capabilities: ⋆/ 141 /⋆ can the hardware decode MPEG1 and/or MPEG2? ⋆/ 142 #define VIDEO_CAP_MPEG1 1 143 #define VIDEO_CAP_MPEG2 2 144 /⋆ can you send a system and/or program stream to video device? 145 (you still have to open the video and the audio device but only 146 send the stream to the video device) ⋆/ 147 #define VIDEO_CAP_SYS 4 148 #define VIDEO_CAP_PROG 8 149 /⋆ can the driver also handle SPU, NAVI and CSS encoded data? 150 (CSS API is not present yet) ⋆/ 151 #define VIDEO_CAP_SPU 16 152 #define VIDEO_CAP_NAVI 32 153 #define VIDEO_CAP_CSS 64 154</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-system"></a>video_system_t</h4></div></div></div><p>A call to VIDEO_SET_SYSTEM sets the desired video system for TV output. The 155following system types can be set: 156</p><pre class="programlisting"> 157typedef enum { 158 VIDEO_SYSTEM_PAL, 159 VIDEO_SYSTEM_NTSC, 160 VIDEO_SYSTEM_PALN, 161 VIDEO_SYSTEM_PALNc, 162 VIDEO_SYSTEM_PALM, 163 VIDEO_SYSTEM_NTSC60, 164 VIDEO_SYSTEM_PAL60, 165 VIDEO_SYSTEM_PALM60 166} video_system_t; 167</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-highlight"></a>struct video_highlight</h4></div></div></div><p>Calling the ioctl VIDEO_SET_HIGHLIGHTS posts the SPU highlight information. The 168call expects the following format for that information: 169</p><pre class="programlisting"> 170 typedef 171 struct video_highlight { 172 boolean active; /⋆ 1=show highlight, 0=hide highlight ⋆/ 173 uint8_t contrast1; /⋆ 7- 4 Pattern pixel contrast ⋆/ 174 /⋆ 3- 0 Background pixel contrast ⋆/ 175 uint8_t contrast2; /⋆ 7- 4 Emphasis pixel-2 contrast ⋆/ 176 /⋆ 3- 0 Emphasis pixel-1 contrast ⋆/ 177 uint8_t color1; /⋆ 7- 4 Pattern pixel color ⋆/ 178 /⋆ 3- 0 Background pixel color ⋆/ 179 uint8_t color2; /⋆ 7- 4 Emphasis pixel-2 color ⋆/ 180 /⋆ 3- 0 Emphasis pixel-1 color ⋆/ 181 uint32_t ypos; /⋆ 23-22 auto action mode ⋆/ 182 /⋆ 21-12 start y ⋆/ 183 /⋆ 9- 0 end y ⋆/ 184 uint32_t xpos; /⋆ 23-22 button color number ⋆/ 185 /⋆ 21-12 start x ⋆/ 186 /⋆ 9- 0 end x ⋆/ 187 } video_highlight_t; 188</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-spu"></a>struct video_spu</h4></div></div></div><p>Calling VIDEO_SET_SPU deactivates or activates SPU decoding, according to the 189following format: 190</p><pre class="programlisting"> 191 typedef 192 struct video_spu { 193 boolean active; 194 int stream_id; 195 } video_spu_t; 196</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-spu-palette"></a>struct video_spu_palette</h4></div></div></div><p>The following structure is used to set the SPU palette by calling VIDEO_SPU_PALETTE: 197</p><pre class="programlisting"> 198 typedef 199 struct video_spu_palette { 200 int length; 201 uint8_t ⋆palette; 202 } video_spu_palette_t; 203</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-navi-pack"></a>struct video_navi_pack</h4></div></div></div><p>In order to get the navigational data the following structure has to be passed to the ioctl 204VIDEO_GET_NAVI: 205</p><pre class="programlisting"> 206 typedef 207 struct video_navi_pack { 208 int length; /⋆ 0 ... 1024 ⋆/ 209 uint8_t data[1024]; 210 } video_navi_pack_t; 211</pre></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video-attributes-t"></a>video_attributes_t</h4></div></div></div><p>The following attributes can be set by a call to VIDEO_SET_ATTRIBUTES: 212</p><pre class="programlisting"> 213 typedef uint16_t video_attributes_t; 214 /⋆ bits: descr. ⋆/ 215 /⋆ 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) ⋆/ 216 /⋆ 13-12 TV system (0=525/60, 1=625/50) ⋆/ 217 /⋆ 11-10 Aspect ratio (0=4:3, 3=16:9) ⋆/ 218 /⋆ 9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca ⋆/ 219 /⋆ 7 line 21-1 data present in GOP (1=yes, 0=no) ⋆/ 220 /⋆ 6 line 21-2 data present in GOP (1=yes, 0=no) ⋆/ 221 /⋆ 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 ⋆/ 222 /⋆ 2 source letterboxed (1=yes, 0=no) ⋆/ 223 /⋆ 0 film/camera mode (0=camera, 1=film (625/50 only)) ⋆/ 224</pre></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="video_function_calls"></a>Video Function Calls</h3></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="legacy_dvb_apis.html#video_fopen">open()</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video_fclose">close()</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#video_fwrite">write()</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_STOP">VIDEO_STOP</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_PLAY">VIDEO_PLAY</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_FREEZE">VIDEO_FREEZE</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_CONTINUE">VIDEO_CONTINUE</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_SELECT_SOURCE">VIDEO_SELECT_SOURCE</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_SET_BLANK">VIDEO_SET_BLANK</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_GET_STATUS">VIDEO_GET_STATUS</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_GET_FRAME_COUNT">VIDEO_GET_FRAME_COUNT</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_GET_PTS">VIDEO_GET_PTS</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_GET_FRAME_RATE">VIDEO_GET_FRAME_RATE</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_GET_EVENT">VIDEO_GET_EVENT</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_COMMAND">VIDEO_COMMAND</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_TRY_COMMAND">VIDEO_TRY_COMMAND</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_GET_SIZE">VIDEO_GET_SIZE</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_SET_DISPLAY_FORMAT">VIDEO_SET_DISPLAY_FORMAT</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_STILLPICTURE">VIDEO_STILLPICTURE</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_FAST_FORWARD">VIDEO_FAST_FORWARD</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_SLOWMOTION">VIDEO_SLOWMOTION</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_GET_CAPABILITIES">VIDEO_GET_CAPABILITIES</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_SET_ID">VIDEO_SET_ID</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_CLEAR_BUFFER">VIDEO_CLEAR_BUFFER</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_SET_STREAMTYPE">VIDEO_SET_STREAMTYPE</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_SET_FORMAT">VIDEO_SET_FORMAT</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_SET_SYSTEM">VIDEO_SET_SYSTEM</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_SET_HIGHLIGHT">VIDEO_SET_HIGHLIGHT</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_SET_SPU">VIDEO_SET_SPU</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_SET_SPU_PALETTE">VIDEO_SET_SPU_PALETTE</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_GET_NAVI">VIDEO_GET_NAVI</a></span></dt><dt><span class="section"><a href="legacy_dvb_apis.html#VIDEO_SET_ATTRIBUTES">VIDEO_SET_ATTRIBUTES</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video_fopen"></a>open()</h4></div></div></div><p>DESCRIPTION 225</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 226<p>This system call opens a named video device (e.g. /dev/dvb/adapter0/video0) 227 for subsequent use.</p> 228<p>When an open() call has succeeded, the device will be ready for use. 229 The significance of blocking or non-blocking mode is described in the 230 documentation for functions where there is a difference. It does not affect the 231 semantics of the open() call itself. A device opened in blocking mode can later 232 be put into non-blocking mode (and vice versa) using the F_SETFL command 233 of the fcntl system call. This is a standard system call, documented in the Linux 234 manual page for fcntl. Only one user can open the Video Device in O_RDWR 235 mode. All other attempts to open the device in this mode will fail, and an 236 error-code will be returned. If the Video Device is opened in O_RDONLY 237 mode, the only ioctl call that can be used is VIDEO_GET_STATUS. All other 238 call will return an error code.</p> 239</td></tr></tbody></table></div><p>SYNOPSIS 240</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 241<p>int open(const char ⋆deviceName, int flags);</p> 242</td></tr></tbody></table></div><p>PARAMETERS 243</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 244<p>const char 245 *deviceName</p> 246</td><td align="char"> 247<p>Name of specific video device.</p> 248</td></tr><tr><td align="char"> 249<p>int flags</p> 250</td><td align="char"> 251<p>A bit-wise OR of the following flags:</p> 252</td></tr><tr><td align="char"> 253</td><td align="char"> 254<p>O_RDONLY read-only access</p> 255</td></tr><tr><td align="char"> 256</td><td align="char"> 257<p>O_RDWR read/write access</p> 258</td></tr><tr><td align="char"> 259</td><td align="char"> 260<p>O_NONBLOCK open in non-blocking mode</p> 261</td></tr><tr><td align="char"> 262</td><td align="char"> 263<p>(blocking mode is the default)</p> 264</td></tr></tbody></table></div><p>RETURN VALUE</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 265<p>ENODEV</p> 266</td><td align="char"> 267<p>Device driver not loaded/available.</p> 268</td></tr><tr><td align="char"> 269<p>EINTERNAL</p> 270</td><td align="char"> 271<p>Internal error.</p> 272</td></tr><tr><td align="char"> 273<p>EBUSY</p> 274</td><td align="char"> 275<p>Device or resource busy.</p> 276</td></tr><tr><td align="char"> 277<p>EINVAL</p> 278</td><td align="char"> 279<p>Invalid argument.</p> 280</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video_fclose"></a>close()</h4></div></div></div><p>DESCRIPTION 281</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 282<p>This system call closes a previously opened video device.</p> 283</td></tr></tbody></table></div><p>SYNOPSIS 284</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 285<p>int close(int fd);</p> 286</td></tr></tbody></table></div><p>PARAMETERS 287</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 288<p>int fd</p> 289</td><td align="char"> 290<p>File descriptor returned by a previous call to open().</p> 291</td></tr></tbody></table></div><p>RETURN VALUE</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 292<p>EBADF</p> 293</td><td align="char"> 294<p>fd is not a valid open file descriptor.</p> 295</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="video_fwrite"></a>write()</h4></div></div></div><p>DESCRIPTION 296</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 297<p>This system call can only be used if VIDEO_SOURCE_MEMORY is selected 298 in the ioctl call VIDEO_SELECT_SOURCE. The data provided shall be in 299 PES format, unless the capability allows other formats. If O_NONBLOCK is 300 not specified the function will block until buffer space is available. The amount 301 of data to be transferred is implied by count.</p> 302</td></tr></tbody></table></div><p>SYNOPSIS 303</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 304<p>size_t write(int fd, const void ⋆buf, size_t count);</p> 305</td></tr></tbody></table></div><p>PARAMETERS 306</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 307<p>int fd</p> 308</td><td align="char"> 309<p>File descriptor returned by a previous call to open().</p> 310</td></tr><tr><td align="char"> 311<p>void *buf</p> 312</td><td align="char"> 313<p>Pointer to the buffer containing the PES data.</p> 314</td></tr><tr><td align="char"> 315<p>size_t count</p> 316</td><td align="char"> 317<p>Size of buf.</p> 318</td></tr></tbody></table></div><p>RETURN VALUE</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 319<p>EPERM</p> 320</td><td align="char"> 321<p>Mode VIDEO_SOURCE_MEMORY not selected.</p> 322</td></tr><tr><td align="char"> 323<p>ENOMEM</p> 324</td><td align="char"> 325<p>Attempted to write more data than the internal buffer can 326 hold.</p> 327</td></tr><tr><td align="char"> 328<p>EBADF</p> 329</td><td align="char"> 330<p>fd is not a valid open file descriptor.</p> 331</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_STOP"></a>VIDEO_STOP</h4></div></div></div><p>DESCRIPTION 332</p><p>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2 333<a class="link" href="vidioc-decoder-cmd.html" title="ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD"><code class="constant">VIDIOC_DECODER_CMD</code></a> instead.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 334<p>This ioctl call asks the Video Device to stop playing the current stream. 335 Depending on the input parameter, the screen can be blanked out or displaying 336 the last decoded frame.</p> 337</td></tr></tbody></table></div><p>SYNOPSIS 338</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 339<p>int ioctl(fd, int request = VIDEO_STOP, boolean 340 mode);</p> 341</td></tr></tbody></table></div><p>PARAMETERS 342</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 343<p>int fd</p> 344</td><td align="char"> 345<p>File descriptor returned by a previous call to open().</p> 346</td></tr><tr><td align="char"> 347<p>int request</p> 348</td><td align="char"> 349<p>Equals VIDEO_STOP for this command.</p> 350</td></tr><tr><td align="char"> 351<p>Boolean mode</p> 352</td><td align="char"> 353<p>Indicates how the screen shall be handled.</p> 354</td></tr><tr><td align="char"> 355</td><td align="char"> 356<p>TRUE: Blank screen when stop.</p> 357</td></tr><tr><td align="char"> 358</td><td align="char"> 359<p>FALSE: Show last decoded frame.</p> 360</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_PLAY"></a>VIDEO_PLAY</h4></div></div></div><p>DESCRIPTION 361</p><p>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2 362<a class="link" href="vidioc-decoder-cmd.html" title="ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD"><code class="constant">VIDIOC_DECODER_CMD</code></a> instead.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 363<p>This ioctl call asks the Video Device to start playing a video stream from the 364 selected source.</p> 365</td></tr></tbody></table></div><p>SYNOPSIS 366</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 367<p>int ioctl(fd, int request = VIDEO_PLAY);</p> 368</td></tr></tbody></table></div><p>PARAMETERS 369</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 370<p>int fd</p> 371</td><td align="char"> 372<p>File descriptor returned by a previous call to open().</p> 373</td></tr><tr><td align="char"> 374<p>int request</p> 375</td><td align="char"> 376<p>Equals VIDEO_PLAY for this command.</p> 377</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_FREEZE"></a>VIDEO_FREEZE</h4></div></div></div><p>DESCRIPTION 378</p><p>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2 379<a class="link" href="vidioc-decoder-cmd.html" title="ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD"><code class="constant">VIDIOC_DECODER_CMD</code></a> instead.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 380<p>This ioctl call suspends the live video stream being played. Decoding 381 and playing are frozen. It is then possible to restart the decoding 382 and playing process of the video stream using the VIDEO_CONTINUE 383 command. If VIDEO_SOURCE_MEMORY is selected in the ioctl call 384 VIDEO_SELECT_SOURCE, the DVB subsystem will not decode any more 385 data until the ioctl call VIDEO_CONTINUE or VIDEO_PLAY is performed.</p> 386</td></tr></tbody></table></div><p>SYNOPSIS 387</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 388<p>int ioctl(fd, int request = VIDEO_FREEZE);</p> 389</td></tr></tbody></table></div><p>PARAMETERS 390</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 391<p>int fd</p> 392</td><td align="char"> 393<p>File descriptor returned by a previous call to open().</p> 394</td></tr><tr><td align="char"> 395<p>int request</p> 396</td><td align="char"> 397<p>Equals VIDEO_FREEZE for this command.</p> 398</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_CONTINUE"></a>VIDEO_CONTINUE</h4></div></div></div><p>DESCRIPTION 399</p><p>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2 400<a class="link" href="vidioc-decoder-cmd.html" title="ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD"><code class="constant">VIDIOC_DECODER_CMD</code></a> instead.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 401<p>This ioctl call restarts decoding and playing processes of the video stream 402 which was played before a call to VIDEO_FREEZE was made.</p> 403</td></tr></tbody></table></div><p>SYNOPSIS 404</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 405<p>int ioctl(fd, int request = VIDEO_CONTINUE);</p> 406</td></tr></tbody></table></div><p>PARAMETERS 407</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 408<p>int fd</p> 409</td><td align="char"> 410<p>File descriptor returned by a previous call to open().</p> 411</td></tr><tr><td align="char"> 412<p>int request</p> 413</td><td align="char"> 414<p>Equals VIDEO_CONTINUE for this command.</p> 415</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_SELECT_SOURCE"></a>VIDEO_SELECT_SOURCE</h4></div></div></div><p>DESCRIPTION 416</p><p>This ioctl is for DVB devices only. This ioctl was also supported by the 417V4L2 ivtv driver, but that has been replaced by the ivtv-specific 418<code class="constant">IVTV_IOC_PASSTHROUGH_MODE</code> ioctl.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 419<p>This ioctl call informs the video device which source shall be used for the input 420 data. The possible sources are demux or memory. If memory is selected, the 421 data is fed to the video device through the write command.</p> 422</td></tr></tbody></table></div><p>SYNOPSIS 423</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 424<p>int ioctl(fd, int request = VIDEO_SELECT_SOURCE, 425 video_stream_source_t source);</p> 426</td></tr></tbody></table></div><p>PARAMETERS 427</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 428<p>int fd</p> 429</td><td align="char"> 430<p>File descriptor returned by a previous call to open().</p> 431</td></tr><tr><td align="char"> 432<p>int request</p> 433</td><td align="char"> 434<p>Equals VIDEO_SELECT_SOURCE for this command.</p> 435</td></tr><tr><td align="char"> 436<p>video_stream_source_t 437 source</p> 438</td><td align="char"> 439<p>Indicates which source shall be used for the Video stream.</p> 440</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_SET_BLANK"></a>VIDEO_SET_BLANK</h4></div></div></div><p>DESCRIPTION 441</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 442<p>This ioctl call asks the Video Device to blank out the picture.</p> 443</td></tr></tbody></table></div><p>SYNOPSIS 444</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 445<p>int ioctl(fd, int request = VIDEO_SET_BLANK, boolean 446 mode);</p> 447</td></tr></tbody></table></div><p>PARAMETERS 448</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 449<p>int fd</p> 450</td><td align="char"> 451<p>File descriptor returned by a previous call to open().</p> 452</td></tr><tr><td align="char"> 453<p>int request</p> 454</td><td align="char"> 455<p>Equals VIDEO_SET_BLANK for this command.</p> 456</td></tr><tr><td align="char"> 457<p>boolean mode</p> 458</td><td align="char"> 459<p>TRUE: Blank screen when stop.</p> 460</td></tr><tr><td align="char"> 461</td><td align="char"> 462<p>FALSE: Show last decoded frame.</p> 463</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_GET_STATUS"></a>VIDEO_GET_STATUS</h4></div></div></div><p>DESCRIPTION 464</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 465<p>This ioctl call asks the Video Device to return the current status of the device.</p> 466</td></tr></tbody></table></div><p>SYNOPSIS 467</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 468<p> int ioctl(fd, int request = VIDEO_GET_STATUS, struct 469 video_status ⋆status);</p> 470</td></tr></tbody></table></div><p>PARAMETERS 471</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 472<p>int fd</p> 473</td><td align="char"> 474<p>File descriptor returned by a previous call to open().</p> 475</td></tr><tr><td align="char"> 476<p>int request</p> 477</td><td align="char"> 478<p>Equals VIDEO_GET_STATUS for this command.</p> 479</td></tr><tr><td align="char"> 480<p>struct video_status 481 *status</p> 482</td><td align="char"> 483<p>Returns the current status of the Video Device.</p> 484</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_GET_FRAME_COUNT"></a>VIDEO_GET_FRAME_COUNT</h4></div></div></div><p>DESCRIPTION 485</p><p>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this 486ioctl has been replaced by the <code class="constant">V4L2_CID_MPEG_VIDEO_DEC_FRAME</code> control.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 487<p>This ioctl call asks the Video Device to return the number of displayed frames 488since the decoder was started.</p> 489</td></tr></tbody></table></div><p>SYNOPSIS 490</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 491<p>int ioctl(int fd, int request = 492 VIDEO_GET_FRAME_COUNT, __u64 *pts);</p> 493</td></tr></tbody></table></div><p>PARAMETERS 494</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 495<p>int fd</p> 496</td><td align="char"> 497<p>File descriptor returned by a previous call to open().</p> 498</td></tr><tr><td align="char"> 499<p>int request</p> 500</td><td align="char"> 501<p>Equals VIDEO_GET_FRAME_COUNT for this 502 command.</p> 503</td></tr><tr><td align="char"> 504<p>__u64 *pts 505</p> 506</td><td align="char"> 507<p>Returns the number of frames displayed since the decoder was started. 508</p> 509</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_GET_PTS"></a>VIDEO_GET_PTS</h4></div></div></div><p>DESCRIPTION 510</p><p>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this 511ioctl has been replaced by the <code class="constant">V4L2_CID_MPEG_VIDEO_DEC_PTS</code> control.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 512<p>This ioctl call asks the Video Device to return the current PTS timestamp.</p> 513</td></tr></tbody></table></div><p>SYNOPSIS 514</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 515<p>int ioctl(int fd, int request = 516 VIDEO_GET_PTS, __u64 *pts);</p> 517</td></tr></tbody></table></div><p>PARAMETERS 518</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 519<p>int fd</p> 520</td><td align="char"> 521<p>File descriptor returned by a previous call to open().</p> 522</td></tr><tr><td align="char"> 523<p>int request</p> 524</td><td align="char"> 525<p>Equals VIDEO_GET_PTS for this 526 command.</p> 527</td></tr><tr><td align="char"> 528<p>__u64 *pts 529</p> 530</td><td align="char"> 531<p>Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 / ISO/IEC 13818-1. 532</p> 533<p> 534The PTS should belong to the currently played 535frame if possible, but may also be a value close to it 536like the PTS of the last decoded frame or the last PTS 537extracted by the PES parser.</p> 538</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_GET_FRAME_RATE"></a>VIDEO_GET_FRAME_RATE</h4></div></div></div><p>DESCRIPTION 539</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 540<p>This ioctl call asks the Video Device to return the current framerate.</p> 541</td></tr></tbody></table></div><p>SYNOPSIS 542</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 543<p>int ioctl(int fd, int request = 544 VIDEO_GET_FRAME_RATE, unsigned int *rate);</p> 545</td></tr></tbody></table></div><p>PARAMETERS 546</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 547<p>int fd</p> 548</td><td align="char"> 549<p>File descriptor returned by a previous call to open().</p> 550</td></tr><tr><td align="char"> 551<p>int request</p> 552</td><td align="char"> 553<p>Equals VIDEO_GET_FRAME_RATE for this 554 command.</p> 555</td></tr><tr><td align="char"> 556<p>unsigned int *rate 557</p> 558</td><td align="char"> 559<p>Returns the framerate in number of frames per 1000 seconds. 560</p> 561</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_GET_EVENT"></a>VIDEO_GET_EVENT</h4></div></div></div><p>DESCRIPTION 562</p><p>This ioctl is for DVB devices only. To get events from a V4L2 decoder use the V4L2 563<a class="link" href="vidioc-dqevent.html" title="ioctl VIDIOC_DQEVENT"><code class="constant">VIDIOC_DQEVENT</code></a> ioctl instead.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 564<p>This ioctl call returns an event of type video_event if available. If an event is 565 not available, the behavior depends on whether the device is in blocking or 566 non-blocking mode. In the latter case, the call fails immediately with errno 567 set to EWOULDBLOCK. In the former case, the call blocks until an event 568 becomes available. The standard Linux poll() and/or select() system calls can 569 be used with the device file descriptor to watch for new events. For select(), 570 the file descriptor should be included in the exceptfds argument, and for 571 poll(), POLLPRI should be specified as the wake-up condition. Read-only 572 permissions are sufficient for this ioctl call.</p> 573</td></tr></tbody></table></div><p>SYNOPSIS 574</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 575<p> int ioctl(fd, int request = VIDEO_GET_EVENT, struct 576 video_event ⋆ev);</p> 577</td></tr></tbody></table></div><p>PARAMETERS 578</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 579<p>int fd</p> 580</td><td align="char"> 581<p>File descriptor returned by a previous call to open().</p> 582</td></tr><tr><td align="char"> 583<p>int request</p> 584</td><td align="char"> 585<p>Equals VIDEO_GET_EVENT for this command.</p> 586</td></tr><tr><td align="char"> 587<p>struct video_event 588 *ev</p> 589</td><td align="char"> 590<p>Points to the location where the event, if any, is to be 591 stored.</p> 592</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 593<p>EWOULDBLOCK</p> 594</td><td align="char"> 595<p>There is no event pending, and the device is in 596 non-blocking mode.</p> 597</td></tr><tr><td align="char"> 598<p>EOVERFLOW</p> 599</td><td align="char"> 600<p>Overflow in event queue - one or more events were lost.</p> 601</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_COMMAND"></a>VIDEO_COMMAND</h4></div></div></div><p>DESCRIPTION 602</p><p>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this 603ioctl has been replaced by the <a class="link" href="vidioc-decoder-cmd.html" title="ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD"><code class="constant">VIDIOC_DECODER_CMD</code></a> ioctl.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 604<p>This ioctl commands the decoder. The <code class="constant">video_command</code> struct 605is a subset of the <code class="constant">v4l2_decoder_cmd</code> struct, so refer to the 606<a class="link" href="vidioc-decoder-cmd.html" title="ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD"><code class="constant">VIDIOC_DECODER_CMD</code></a> documentation for more information.</p> 607</td></tr></tbody></table></div><p>SYNOPSIS 608</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 609<p>int ioctl(int fd, int request = 610 VIDEO_COMMAND, struct video_command *cmd);</p> 611</td></tr></tbody></table></div><p>PARAMETERS 612</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 613<p>int fd</p> 614</td><td align="char"> 615<p>File descriptor returned by a previous call to open().</p> 616</td></tr><tr><td align="char"> 617<p>int request</p> 618</td><td align="char"> 619<p>Equals VIDEO_COMMAND for this 620 command.</p> 621</td></tr><tr><td align="char"> 622<p>struct video_command *cmd 623</p> 624</td><td align="char"> 625<p>Commands the decoder. 626</p> 627</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_TRY_COMMAND"></a>VIDEO_TRY_COMMAND</h4></div></div></div><p>DESCRIPTION 628</p><p>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this 629ioctl has been replaced by the <a class="link" href="vidioc-decoder-cmd.html" title="ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD"><code class="constant">VIDIOC_TRY_DECODER_CMD</code></a> ioctl.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 630<p>This ioctl tries a decoder command. The <code class="constant">video_command</code> struct 631is a subset of the <code class="constant">v4l2_decoder_cmd</code> struct, so refer to the 632<a class="link" href="vidioc-decoder-cmd.html" title="ioctl VIDIOC_DECODER_CMD, VIDIOC_TRY_DECODER_CMD"><code class="constant">VIDIOC_TRY_DECODER_CMD</code></a> documentation for more information.</p> 633</td></tr></tbody></table></div><p>SYNOPSIS 634</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 635<p>int ioctl(int fd, int request = 636 VIDEO_TRY_COMMAND, struct video_command *cmd);</p> 637</td></tr></tbody></table></div><p>PARAMETERS 638</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 639<p>int fd</p> 640</td><td align="char"> 641<p>File descriptor returned by a previous call to open().</p> 642</td></tr><tr><td align="char"> 643<p>int request</p> 644</td><td align="char"> 645<p>Equals VIDEO_TRY_COMMAND for this 646 command.</p> 647</td></tr><tr><td align="char"> 648<p>struct video_command *cmd 649</p> 650</td><td align="char"> 651<p>Try a decoder command. 652</p> 653</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_GET_SIZE"></a>VIDEO_GET_SIZE</h4></div></div></div><p>DESCRIPTION 654</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 655<p>This ioctl returns the size and aspect ratio.</p> 656</td></tr></tbody></table></div><p>SYNOPSIS 657</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 658<p>int ioctl(int fd, int request = 659 VIDEO_GET_SIZE, video_size_t *size);</p> 660</td></tr></tbody></table></div><p>PARAMETERS 661</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 662<p>int fd</p> 663</td><td align="char"> 664<p>File descriptor returned by a previous call to open().</p> 665</td></tr><tr><td align="char"> 666<p>int request</p> 667</td><td align="char"> 668<p>Equals VIDEO_GET_SIZE for this 669 command.</p> 670</td></tr><tr><td align="char"> 671<p>video_size_t *size 672</p> 673</td><td align="char"> 674<p>Returns the size and aspect ratio. 675</p> 676</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_SET_DISPLAY_FORMAT"></a>VIDEO_SET_DISPLAY_FORMAT</h4></div></div></div><p>DESCRIPTION 677</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 678<p>This ioctl call asks the Video Device to select the video format to be applied 679 by the MPEG chip on the video.</p> 680</td></tr></tbody></table></div><p>SYNOPSIS 681</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 682<p> int ioctl(fd, int request = 683 VIDEO_SET_DISPLAY_FORMAT, video_display_format_t 684 format);</p> 685</td></tr></tbody></table></div><p>PARAMETERS 686</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 687<p>int fd</p> 688</td><td align="char"> 689<p>File descriptor returned by a previous call to open().</p> 690</td></tr><tr><td align="char"> 691<p>int request</p> 692</td><td align="char"> 693<p>Equals VIDEO_SET_DISPLAY_FORMAT for this 694 command.</p> 695</td></tr><tr><td align="char"> 696<p>video_display_format_t 697 format</p> 698</td><td align="char"> 699<p>Selects the video format to be used.</p> 700</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_STILLPICTURE"></a>VIDEO_STILLPICTURE</h4></div></div></div><p>DESCRIPTION 701</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 702<p>This ioctl call asks the Video Device to display a still picture (I-frame). The 703 input data shall contain an I-frame. If the pointer is NULL, then the current 704 displayed still picture is blanked.</p> 705</td></tr></tbody></table></div><p>SYNOPSIS 706</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 707<p>int ioctl(fd, int request = VIDEO_STILLPICTURE, 708 struct video_still_picture ⋆sp);</p> 709</td></tr></tbody></table></div><p>PARAMETERS 710</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 711<p>int fd</p> 712</td><td align="char"> 713<p>File descriptor returned by a previous call to open().</p> 714</td></tr><tr><td align="char"> 715<p>int request</p> 716</td><td align="char"> 717<p>Equals VIDEO_STILLPICTURE for this command.</p> 718</td></tr><tr><td align="char"> 719<p>struct 720 video_still_picture 721 *sp</p> 722</td><td align="char"> 723<p>Pointer to a location where an I-frame and size is stored.</p> 724</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_FAST_FORWARD"></a>VIDEO_FAST_FORWARD</h4></div></div></div><p>DESCRIPTION 725</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 726<p>This ioctl call asks the Video Device to skip decoding of N number of I-frames. 727 This call can only be used if VIDEO_SOURCE_MEMORY is selected.</p> 728</td></tr></tbody></table></div><p>SYNOPSIS 729</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 730<p>int ioctl(fd, int request = VIDEO_FAST_FORWARD, int 731 nFrames);</p> 732</td></tr></tbody></table></div><p>PARAMETERS 733</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 734<p>int fd</p> 735</td><td align="char"> 736<p>File descriptor returned by a previous call to open().</p> 737</td></tr><tr><td align="char"> 738<p>int request</p> 739</td><td align="char"> 740<p>Equals VIDEO_FAST_FORWARD for this command.</p> 741</td></tr><tr><td align="char"> 742<p>int nFrames</p> 743</td><td align="char"> 744<p>The number of frames to skip.</p> 745</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 746<p>EPERM</p> 747</td><td align="char"> 748<p>Mode VIDEO_SOURCE_MEMORY not selected.</p> 749</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_SLOWMOTION"></a>VIDEO_SLOWMOTION</h4></div></div></div><p>DESCRIPTION 750</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 751<p>This ioctl call asks the video device to repeat decoding frames N number of 752 times. This call can only be used if VIDEO_SOURCE_MEMORY is selected.</p> 753</td></tr></tbody></table></div><p>SYNOPSIS 754</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 755<p>int ioctl(fd, int request = VIDEO_SLOWMOTION, int 756 nFrames);</p> 757</td></tr></tbody></table></div><p>PARAMETERS 758</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 759<p>int fd</p> 760</td><td align="char"> 761<p>File descriptor returned by a previous call to open().</p> 762</td></tr><tr><td align="char"> 763<p>int request</p> 764</td><td align="char"> 765<p>Equals VIDEO_SLOWMOTION for this command.</p> 766</td></tr><tr><td align="char"> 767<p>int nFrames</p> 768</td><td align="char"> 769<p>The number of times to repeat each frame.</p> 770</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 771<p>EPERM</p> 772</td><td align="char"> 773<p>Mode VIDEO_SOURCE_MEMORY not selected.</p> 774</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_GET_CAPABILITIES"></a>VIDEO_GET_CAPABILITIES</h4></div></div></div><p>DESCRIPTION 775</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 776<p>This ioctl call asks the video device about its decoding capabilities. On success 777 it returns and integer which has bits set according to the defines in section ??.</p> 778</td></tr></tbody></table></div><p>SYNOPSIS 779</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 780<p>int ioctl(fd, int request = VIDEO_GET_CAPABILITIES, 781 unsigned int ⋆cap);</p> 782</td></tr></tbody></table></div><p>PARAMETERS 783</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 784<p>int fd</p> 785</td><td align="char"> 786<p>File descriptor returned by a previous call to open().</p> 787</td></tr><tr><td align="char"> 788<p>int request</p> 789</td><td align="char"> 790<p>Equals VIDEO_GET_CAPABILITIES for this 791 command.</p> 792</td></tr><tr><td align="char"> 793<p>unsigned int *cap</p> 794</td><td align="char"> 795<p>Pointer to a location where to store the capability 796 information.</p> 797</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_SET_ID"></a>VIDEO_SET_ID</h4></div></div></div><p>DESCRIPTION 798</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 799<p>This ioctl selects which sub-stream is to be decoded if a program or system 800 stream is sent to the video device.</p> 801</td></tr></tbody></table></div><p>SYNOPSIS 802</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 803<p>int ioctl(int fd, int request = VIDEO_SET_ID, int 804 id);</p> 805</td></tr></tbody></table></div><p>PARAMETERS 806</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 807<p>int fd</p> 808</td><td align="char"> 809<p>File descriptor returned by a previous call to open().</p> 810</td></tr><tr><td align="char"> 811<p>int request</p> 812</td><td align="char"> 813<p>Equals VIDEO_SET_ID for this command.</p> 814</td></tr><tr><td align="char"> 815<p>int id</p> 816</td><td align="char"> 817<p>video sub-stream id</p> 818</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 819<p>EINVAL</p> 820</td><td align="char"> 821<p>Invalid sub-stream id.</p> 822</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_CLEAR_BUFFER"></a>VIDEO_CLEAR_BUFFER</h4></div></div></div><p>DESCRIPTION 823</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 824<p>This ioctl call clears all video buffers in the driver and in the decoder hardware.</p> 825</td></tr></tbody></table></div><p>SYNOPSIS 826</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 827<p>int ioctl(fd, int request = VIDEO_CLEAR_BUFFER);</p> 828</td></tr></tbody></table></div><p>PARAMETERS 829</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 830<p>int fd</p> 831</td><td align="char"> 832<p>File descriptor returned by a previous call to open().</p> 833</td></tr><tr><td align="char"> 834<p>int request</p> 835</td><td align="char"> 836<p>Equals VIDEO_CLEAR_BUFFER for this command.</p> 837</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_SET_STREAMTYPE"></a>VIDEO_SET_STREAMTYPE</h4></div></div></div><p>DESCRIPTION 838</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 839<p>This ioctl tells the driver which kind of stream to expect being written to it. If 840 this call is not used the default of video PES is used. Some drivers might not 841 support this call and always expect PES.</p> 842</td></tr></tbody></table></div><p>SYNOPSIS 843</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 844<p>int ioctl(fd, int request = VIDEO_SET_STREAMTYPE, 845 int type);</p> 846</td></tr></tbody></table></div><p>PARAMETERS 847</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 848<p>int fd</p> 849</td><td align="char"> 850<p>File descriptor returned by a previous call to open().</p> 851</td></tr><tr><td align="char"> 852<p>int request</p> 853</td><td align="char"> 854<p>Equals VIDEO_SET_STREAMTYPE for this command.</p> 855</td></tr><tr><td align="char"> 856<p>int type</p> 857</td><td align="char"> 858<p>stream type</p> 859</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_SET_FORMAT"></a>VIDEO_SET_FORMAT</h4></div></div></div><p>DESCRIPTION 860</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 861<p>This ioctl sets the screen format (aspect ratio) of the connected output device 862 (TV) so that the output of the decoder can be adjusted accordingly.</p> 863</td></tr></tbody></table></div><p>SYNOPSIS 864</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 865<p> int ioctl(fd, int request = VIDEO_SET_FORMAT, 866 video_format_t format);</p> 867</td></tr></tbody></table></div><p>PARAMETERS 868</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 869<p>int fd</p> 870</td><td align="char"> 871<p>File descriptor returned by a previous call to open().</p> 872</td></tr><tr><td align="char"> 873<p>int request</p> 874</td><td align="char"> 875<p>Equals VIDEO_SET_FORMAT for this command.</p> 876</td></tr><tr><td align="char"> 877<p>video_format_t 878 format</p> 879</td><td align="char"> 880<p>video format of TV as defined in section ??.</p> 881</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 882<p>EINVAL</p> 883</td><td align="char"> 884<p>format is not a valid video format.</p> 885</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_SET_SYSTEM"></a>VIDEO_SET_SYSTEM</h4></div></div></div><p>DESCRIPTION 886</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 887<p>This ioctl sets the television output format. The format (see section ??) may 888 vary from the color format of the displayed MPEG stream. If the hardware is 889 not able to display the requested format the call will return an error.</p> 890</td></tr></tbody></table></div><p>SYNOPSIS 891</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 892<p> int ioctl(fd, int request = VIDEO_SET_SYSTEM , 893 video_system_t system);</p> 894</td></tr></tbody></table></div><p>PARAMETERS 895</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 896<p>int fd</p> 897</td><td align="char"> 898<p>File descriptor returned by a previous call to open().</p> 899</td></tr><tr><td align="char"> 900<p>int request</p> 901</td><td align="char"> 902<p>Equals VIDEO_SET_FORMAT for this command.</p> 903</td></tr><tr><td align="char"> 904<p>video_system_t 905 system</p> 906</td><td align="char"> 907<p>video system of TV output.</p> 908</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 909<p>EINVAL</p> 910</td><td align="char"> 911<p>system is not a valid or supported video system.</p> 912</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_SET_HIGHLIGHT"></a>VIDEO_SET_HIGHLIGHT</h4></div></div></div><p>DESCRIPTION 913</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 914<p>This ioctl sets the SPU highlight information for the menu access of a DVD.</p> 915</td></tr></tbody></table></div><p>SYNOPSIS 916</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 917<p> int ioctl(fd, int request = VIDEO_SET_HIGHLIGHT 918 ,video_highlight_t ⋆vhilite)</p> 919</td></tr></tbody></table></div><p>PARAMETERS 920</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 921<p>int fd</p> 922</td><td align="char"> 923<p>File descriptor returned by a previous call to open().</p> 924</td></tr><tr><td align="char"> 925<p>int request</p> 926</td><td align="char"> 927<p>Equals VIDEO_SET_HIGHLIGHT for this command.</p> 928</td></tr><tr><td align="char"> 929<p>video_highlight_t 930 *vhilite</p> 931</td><td align="char"> 932<p>SPU Highlight information according to section ??.</p> 933</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_SET_SPU"></a>VIDEO_SET_SPU</h4></div></div></div><p>DESCRIPTION 934</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 935<p>This ioctl activates or deactivates SPU decoding in a DVD input stream. It can 936 only be used, if the driver is able to handle a DVD stream.</p> 937</td></tr></tbody></table></div><p>SYNOPSIS 938</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 939<p> int ioctl(fd, int request = VIDEO_SET_SPU , 940 video_spu_t ⋆spu)</p> 941</td></tr></tbody></table></div><p>PARAMETERS 942</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 943<p>int fd</p> 944</td><td align="char"> 945<p>File descriptor returned by a previous call to open().</p> 946</td></tr><tr><td align="char"> 947<p>int request</p> 948</td><td align="char"> 949<p>Equals VIDEO_SET_SPU for this command.</p> 950</td></tr><tr><td align="char"> 951<p>video_spu_t *spu</p> 952</td><td align="char"> 953<p>SPU decoding (de)activation and subid setting according 954 to section ??.</p> 955</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 956<p>EINVAL</p> 957</td><td align="char"> 958<p>input is not a valid spu setting or driver cannot handle 959 SPU.</p> 960</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_SET_SPU_PALETTE"></a>VIDEO_SET_SPU_PALETTE</h4></div></div></div><p>DESCRIPTION 961</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 962<p>This ioctl sets the SPU color palette.</p> 963</td></tr></tbody></table></div><p>SYNOPSIS 964</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 965<p> int ioctl(fd, int request = VIDEO_SET_SPU_PALETTE 966 ,video_spu_palette_t ⋆palette )</p> 967</td></tr></tbody></table></div><p>PARAMETERS 968</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 969<p>int fd</p> 970</td><td align="char"> 971<p>File descriptor returned by a previous call to open().</p> 972</td></tr><tr><td align="char"> 973<p>int request</p> 974</td><td align="char"> 975<p>Equals VIDEO_SET_SPU_PALETTE for this command.</p> 976</td></tr><tr><td align="char"> 977<p>video_spu_palette_t 978 *palette</p> 979</td><td align="char"> 980<p>SPU palette according to section ??.</p> 981</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 982<p>EINVAL</p> 983</td><td align="char"> 984<p>input is not a valid palette or driver doesn’t handle SPU.</p> 985</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_GET_NAVI"></a>VIDEO_GET_NAVI</h4></div></div></div><p>DESCRIPTION 986</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 987<p>This ioctl returns navigational information from the DVD stream. This is 988 especially needed if an encoded stream has to be decoded by the hardware.</p> 989</td></tr></tbody></table></div><p>SYNOPSIS 990</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 991<p> int ioctl(fd, int request = VIDEO_GET_NAVI , 992 video_navi_pack_t ⋆navipack)</p> 993</td></tr></tbody></table></div><p>PARAMETERS 994</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 995<p>int fd</p> 996</td><td align="char"> 997<p>File descriptor returned by a previous call to open().</p> 998</td></tr><tr><td align="char"> 999<p>int request</p> 1000</td><td align="char"> 1001<p>Equals VIDEO_GET_NAVI for this command.</p> 1002</td></tr><tr><td align="char"> 1003<p>video_navi_pack_t 1004 *navipack</p> 1005</td><td align="char"> 1006<p>PCI or DSI pack (private stream 2) according to section 1007 ??.</p> 1008</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 1009<p>EFAULT</p> 1010</td><td align="char"> 1011<p>driver is not able to return navigational information</p> 1012</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h4 class="title"><a name="VIDEO_SET_ATTRIBUTES"></a>VIDEO_SET_ATTRIBUTES</h4></div></div></div><p>DESCRIPTION 1013</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 1014<p>This ioctl is intended for DVD playback and allows you to set certain 1015 information about the stream. Some hardware may not need this information, 1016 but the call also tells the hardware to prepare for DVD playback.</p> 1017</td></tr></tbody></table></div><p>SYNOPSIS 1018</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char"> 1019<p> int ioctl(fd, int request = VIDEO_SET_ATTRIBUTE 1020 ,video_attributes_t vattr)</p> 1021</td></tr></tbody></table></div><p>PARAMETERS 1022</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 1023<p>int fd</p> 1024</td><td align="char"> 1025<p>File descriptor returned by a previous call to open().</p> 1026</td></tr><tr><td align="char"> 1027<p>int request</p> 1028</td><td align="char"> 1029<p>Equals VIDEO_SET_ATTRIBUTE for this command.</p> 1030</td></tr><tr><td align="char"> 1031<p>video_attributes_t 1032 vattr</p> 1033</td><td align="char"> 1034<p>video attributes according to section ??.</p> 1035</td></tr></tbody></table></div><p>RETURN VALUE</p><p>On success <span class="returnvalue">0</span> is returned, on error <span class="returnvalue">-1</span> and the <code class="varname">errno</code> variable is set appropriately. The generic error codes are described at the <a class="link" href="gen_errors.html#gen-errors" title="Table 17.1. Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char"> 1036<p>EINVAL</p> 1037</td><td align="char"> 1038<p>input is not a valid attribute setting.</p> 1039</td></tr></tbody></table></div></div></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="NET_GET_IF.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="dvbapi.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="dvb_audio.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">ioctl NET_GET_IF </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> DVB Audio Device</td></tr></table></div></body></html> 1040