1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>Video Function Calls</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="dvb_video.html" title="Chapter&#160;11.&#160;DVB Video Device"><link rel="prev" href="dvb_video.html" title="Chapter&#160;11.&#160;DVB Video Device"><link rel="next" href="dvb_audio.html" title="Chapter&#160;12.&#160;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">Video Function Calls</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="dvb_video.html">Prev</a>&#160;</td><th width="60%" align="center">Chapter&#160;11.&#160;DVB Video Device</th><td width="20%" align="right">&#160;<a accesskey="n" href="dvb_audio.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="video_function_calls"></a>Video Function Calls</h2></div></div></div><div class="toc"><dl class="toc"><dt><span class="section"><a href="video_function_calls.html#video_fopen">open()</a></span></dt><dt><span class="section"><a href="video_function_calls.html#video_fclose">close()</a></span></dt><dt><span class="section"><a href="video_function_calls.html#video_fwrite">write()</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_STOP">VIDEO_STOP</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_PLAY">VIDEO_PLAY</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_FREEZE">VIDEO_FREEZE</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_CONTINUE">VIDEO_CONTINUE</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_SELECT_SOURCE">VIDEO_SELECT_SOURCE</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_SET_BLANK">VIDEO_SET_BLANK</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_GET_STATUS">VIDEO_GET_STATUS</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_GET_FRAME_COUNT">VIDEO_GET_FRAME_COUNT</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_GET_PTS">VIDEO_GET_PTS</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_GET_FRAME_RATE">VIDEO_GET_FRAME_RATE</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_GET_EVENT">VIDEO_GET_EVENT</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_COMMAND">VIDEO_COMMAND</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_TRY_COMMAND">VIDEO_TRY_COMMAND</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_GET_SIZE">VIDEO_GET_SIZE</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_SET_DISPLAY_FORMAT">VIDEO_SET_DISPLAY_FORMAT</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_STILLPICTURE">VIDEO_STILLPICTURE</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_FAST_FORWARD">VIDEO_FAST_FORWARD</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_SLOWMOTION">VIDEO_SLOWMOTION</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_GET_CAPABILITIES">VIDEO_GET_CAPABILITIES</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_SET_ID">VIDEO_SET_ID</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_CLEAR_BUFFER">VIDEO_CLEAR_BUFFER</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_SET_STREAMTYPE">VIDEO_SET_STREAMTYPE</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_SET_FORMAT">VIDEO_SET_FORMAT</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_SET_SYSTEM">VIDEO_SET_SYSTEM</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_SET_HIGHLIGHT">VIDEO_SET_HIGHLIGHT</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_SET_SPU">VIDEO_SET_SPU</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_SET_SPU_PALETTE">VIDEO_SET_SPU_PALETTE</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_GET_NAVI">VIDEO_GET_NAVI</a></span></dt><dt><span class="section"><a href="video_function_calls.html#VIDEO_SET_ATTRIBUTES">VIDEO_SET_ATTRIBUTES</a></span></dt></dl></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="video_fopen"></a>open()</h3></div></div></div><p>DESCRIPTION
2</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
3<p>This system call opens a named video device (e.g. /dev/dvb/adapter0/video0)
4 for subsequent use.</p>
5<p>When an open() call has succeeded, the device will be ready for use.
6 The significance of blocking or non-blocking mode is described in the
7 documentation for functions where there is a difference. It does not affect the
8 semantics of the open() call itself. A device opened in blocking mode can later
9 be put into non-blocking mode (and vice versa) using the F_SETFL command
10 of the fcntl system call. This is a standard system call, documented in the Linux
11 manual page for fcntl. Only one user can open the Video Device in O_RDWR
12 mode. All other attempts to open the device in this mode will fail, and an
13 error-code will be returned. If the Video Device is opened in O_RDONLY
14 mode, the only ioctl call that can be used is VIDEO_GET_STATUS. All other
15 call will return an error code.</p>
16</td></tr></tbody></table></div><p>SYNOPSIS
17</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
18<p>int open(const char &#8902;deviceName, int flags);</p>
19</td></tr></tbody></table></div><p>PARAMETERS
20</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
21<p>const char
22 *deviceName</p>
23</td><td align="char">
24<p>Name of specific video device.</p>
25</td></tr><tr><td align="char">
26<p>int flags</p>
27</td><td align="char">
28<p>A bit-wise OR of the following flags:</p>
29</td></tr><tr><td align="char">
30</td><td align="char">
31<p>O_RDONLY read-only access</p>
32</td></tr><tr><td align="char">
33</td><td align="char">
34<p>O_RDWR read/write access</p>
35</td></tr><tr><td align="char">
36</td><td align="char">
37<p>O_NONBLOCK open in non-blocking mode</p>
38</td></tr><tr><td align="char">
39</td><td align="char">
40<p>(blocking mode is the default)</p>
41</td></tr></tbody></table></div><p>RETURN VALUE</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
42<p>ENODEV</p>
43</td><td align="char">
44<p>Device driver not loaded/available.</p>
45</td></tr><tr><td align="char">
46<p>EINTERNAL</p>
47</td><td align="char">
48<p>Internal error.</p>
49</td></tr><tr><td align="char">
50<p>EBUSY</p>
51</td><td align="char">
52<p>Device or resource busy.</p>
53</td></tr><tr><td align="char">
54<p>EINVAL</p>
55</td><td align="char">
56<p>Invalid argument.</p>
57</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="video_fclose"></a>close()</h3></div></div></div><p>DESCRIPTION
58</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
59<p>This system call closes a previously opened video device.</p>
60</td></tr></tbody></table></div><p>SYNOPSIS
61</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
62<p>int close(int fd);</p>
63</td></tr></tbody></table></div><p>PARAMETERS
64</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
65<p>int fd</p>
66</td><td align="char">
67<p>File descriptor returned by a previous call to open().</p>
68</td></tr></tbody></table></div><p>RETURN VALUE</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
69<p>EBADF</p>
70</td><td align="char">
71<p>fd is not a valid open file descriptor.</p>
72</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="video_fwrite"></a>write()</h3></div></div></div><p>DESCRIPTION
73</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
74<p>This system call can only be used if VIDEO_SOURCE_MEMORY is selected
75 in the ioctl call VIDEO_SELECT_SOURCE. The data provided shall be in
76 PES format, unless the capability allows other formats. If O_NONBLOCK is
77 not specified the function will block until buffer space is available. The amount
78 of data to be transferred is implied by count.</p>
79</td></tr></tbody></table></div><p>SYNOPSIS
80</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
81<p>size_t write(int fd, const void &#8902;buf, size_t count);</p>
82</td></tr></tbody></table></div><p>PARAMETERS
83</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
84<p>int fd</p>
85</td><td align="char">
86<p>File descriptor returned by a previous call to open().</p>
87</td></tr><tr><td align="char">
88<p>void *buf</p>
89</td><td align="char">
90<p>Pointer to the buffer containing the PES data.</p>
91</td></tr><tr><td align="char">
92<p>size_t count</p>
93</td><td align="char">
94<p>Size of buf.</p>
95</td></tr></tbody></table></div><p>RETURN VALUE</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
96<p>EPERM</p>
97</td><td align="char">
98<p>Mode VIDEO_SOURCE_MEMORY not selected.</p>
99</td></tr><tr><td align="char">
100<p>ENOMEM</p>
101</td><td align="char">
102<p>Attempted to write more data than the internal buffer can
103 hold.</p>
104</td></tr><tr><td align="char">
105<p>EBADF</p>
106</td><td align="char">
107<p>fd is not a valid open file descriptor.</p>
108</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_STOP"></a>VIDEO_STOP</h3></div></div></div><p>DESCRIPTION
109</p><p>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
110<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">
111<p>This ioctl call asks the Video Device to stop playing the current stream.
112 Depending on the input parameter, the screen can be blanked out or displaying
113 the last decoded frame.</p>
114</td></tr></tbody></table></div><p>SYNOPSIS
115</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
116<p>int ioctl(fd, int request = VIDEO_STOP, boolean
117 mode);</p>
118</td></tr></tbody></table></div><p>PARAMETERS
119</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
120<p>int fd</p>
121</td><td align="char">
122<p>File descriptor returned by a previous call to open().</p>
123</td></tr><tr><td align="char">
124<p>int request</p>
125</td><td align="char">
126<p>Equals VIDEO_STOP for this command.</p>
127</td></tr><tr><td align="char">
128<p>Boolean mode</p>
129</td><td align="char">
130<p>Indicates how the screen shall be handled.</p>
131</td></tr><tr><td align="char">
132</td><td align="char">
133<p>TRUE: Blank screen when stop.</p>
134</td></tr><tr><td align="char">
135</td><td align="char">
136<p>FALSE: Show last decoded frame.</p>
137</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_PLAY"></a>VIDEO_PLAY</h3></div></div></div><p>DESCRIPTION
138</p><p>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
139<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">
140<p>This ioctl call asks the Video Device to start playing a video stream from the
141 selected source.</p>
142</td></tr></tbody></table></div><p>SYNOPSIS
143</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
144<p>int ioctl(fd, int request = VIDEO_PLAY);</p>
145</td></tr></tbody></table></div><p>PARAMETERS
146</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
147<p>int fd</p>
148</td><td align="char">
149<p>File descriptor returned by a previous call to open().</p>
150</td></tr><tr><td align="char">
151<p>int request</p>
152</td><td align="char">
153<p>Equals VIDEO_PLAY for this command.</p>
154</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_FREEZE"></a>VIDEO_FREEZE</h3></div></div></div><p>DESCRIPTION
155</p><p>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
156<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">
157<p>This ioctl call suspends the live video stream being played. Decoding
158 and playing are frozen. It is then possible to restart the decoding
159 and playing process of the video stream using the VIDEO_CONTINUE
160 command. If VIDEO_SOURCE_MEMORY is selected in the ioctl call
161 VIDEO_SELECT_SOURCE, the DVB subsystem will not decode any more
162 data until the ioctl call VIDEO_CONTINUE or VIDEO_PLAY is performed.</p>
163</td></tr></tbody></table></div><p>SYNOPSIS
164</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
165<p>int ioctl(fd, int request = VIDEO_FREEZE);</p>
166</td></tr></tbody></table></div><p>PARAMETERS
167</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
168<p>int fd</p>
169</td><td align="char">
170<p>File descriptor returned by a previous call to open().</p>
171</td></tr><tr><td align="char">
172<p>int request</p>
173</td><td align="char">
174<p>Equals VIDEO_FREEZE for this command.</p>
175</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_CONTINUE"></a>VIDEO_CONTINUE</h3></div></div></div><p>DESCRIPTION
176</p><p>This ioctl is for DVB devices only. To control a V4L2 decoder use the V4L2
177<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">
178<p>This ioctl call restarts decoding and playing processes of the video stream
179 which was played before a call to VIDEO_FREEZE was made.</p>
180</td></tr></tbody></table></div><p>SYNOPSIS
181</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
182<p>int ioctl(fd, int request = VIDEO_CONTINUE);</p>
183</td></tr></tbody></table></div><p>PARAMETERS
184</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
185<p>int fd</p>
186</td><td align="char">
187<p>File descriptor returned by a previous call to open().</p>
188</td></tr><tr><td align="char">
189<p>int request</p>
190</td><td align="char">
191<p>Equals VIDEO_CONTINUE for this command.</p>
192</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_SELECT_SOURCE"></a>VIDEO_SELECT_SOURCE</h3></div></div></div><p>DESCRIPTION
193</p><p>This ioctl is for DVB devices only. This ioctl was also supported by the
194V4L2 ivtv driver, but that has been replaced by the ivtv-specific
195<code class="constant">IVTV_IOC_PASSTHROUGH_MODE</code> ioctl.</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
196<p>This ioctl call informs the video device which source shall be used for the input
197 data. The possible sources are demux or memory. If memory is selected, the
198 data is fed to the video device through the write command.</p>
199</td></tr></tbody></table></div><p>SYNOPSIS
200</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
201<p>int ioctl(fd, int request = VIDEO_SELECT_SOURCE,
202 video_stream_source_t source);</p>
203</td></tr></tbody></table></div><p>PARAMETERS
204</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
205<p>int fd</p>
206</td><td align="char">
207<p>File descriptor returned by a previous call to open().</p>
208</td></tr><tr><td align="char">
209<p>int request</p>
210</td><td align="char">
211<p>Equals VIDEO_SELECT_SOURCE for this command.</p>
212</td></tr><tr><td align="char">
213<p>video_stream_source_t
214 source</p>
215</td><td align="char">
216<p>Indicates which source shall be used for the Video stream.</p>
217</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_SET_BLANK"></a>VIDEO_SET_BLANK</h3></div></div></div><p>DESCRIPTION
218</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
219<p>This ioctl call asks the Video Device to blank out the picture.</p>
220</td></tr></tbody></table></div><p>SYNOPSIS
221</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
222<p>int ioctl(fd, int request = VIDEO_SET_BLANK, boolean
223 mode);</p>
224</td></tr></tbody></table></div><p>PARAMETERS
225</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
226<p>int fd</p>
227</td><td align="char">
228<p>File descriptor returned by a previous call to open().</p>
229</td></tr><tr><td align="char">
230<p>int request</p>
231</td><td align="char">
232<p>Equals VIDEO_SET_BLANK for this command.</p>
233</td></tr><tr><td align="char">
234<p>boolean mode</p>
235</td><td align="char">
236<p>TRUE: Blank screen when stop.</p>
237</td></tr><tr><td align="char">
238</td><td align="char">
239<p>FALSE: Show last decoded frame.</p>
240</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_GET_STATUS"></a>VIDEO_GET_STATUS</h3></div></div></div><p>DESCRIPTION
241</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
242<p>This ioctl call asks the Video Device to return the current status of the device.</p>
243</td></tr></tbody></table></div><p>SYNOPSIS
244</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
245<p> int ioctl(fd, int request = VIDEO_GET_STATUS, struct
246 video_status &#8902;status);</p>
247</td></tr></tbody></table></div><p>PARAMETERS
248</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
249<p>int fd</p>
250</td><td align="char">
251<p>File descriptor returned by a previous call to open().</p>
252</td></tr><tr><td align="char">
253<p>int request</p>
254</td><td align="char">
255<p>Equals VIDEO_GET_STATUS for this command.</p>
256</td></tr><tr><td align="char">
257<p>struct video_status
258 *status</p>
259</td><td align="char">
260<p>Returns the current status of the Video Device.</p>
261</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_GET_FRAME_COUNT"></a>VIDEO_GET_FRAME_COUNT</h3></div></div></div><p>DESCRIPTION
262</p><p>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this
263ioctl 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">
264<p>This ioctl call asks the Video Device to return the number of displayed frames
265since the decoder was started.</p>
266</td></tr></tbody></table></div><p>SYNOPSIS
267</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
268<p>int ioctl(int fd, int request =
269 VIDEO_GET_FRAME_COUNT, __u64 *pts);</p>
270</td></tr></tbody></table></div><p>PARAMETERS
271</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
272<p>int fd</p>
273</td><td align="char">
274<p>File descriptor returned by a previous call to open().</p>
275</td></tr><tr><td align="char">
276<p>int request</p>
277</td><td align="char">
278<p>Equals VIDEO_GET_FRAME_COUNT for this
279 command.</p>
280</td></tr><tr><td align="char">
281<p>__u64 *pts
282</p>
283</td><td align="char">
284<p>Returns the number of frames displayed since the decoder was started.
285</p>
286</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_GET_PTS"></a>VIDEO_GET_PTS</h3></div></div></div><p>DESCRIPTION
287</p><p>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this
288ioctl 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">
289<p>This ioctl call asks the Video Device to return the current PTS timestamp.</p>
290</td></tr></tbody></table></div><p>SYNOPSIS
291</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
292<p>int ioctl(int fd, int request =
293 VIDEO_GET_PTS, __u64 *pts);</p>
294</td></tr></tbody></table></div><p>PARAMETERS
295</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
296<p>int fd</p>
297</td><td align="char">
298<p>File descriptor returned by a previous call to open().</p>
299</td></tr><tr><td align="char">
300<p>int request</p>
301</td><td align="char">
302<p>Equals VIDEO_GET_PTS for this
303 command.</p>
304</td></tr><tr><td align="char">
305<p>__u64 *pts
306</p>
307</td><td align="char">
308<p>Returns the 33-bit timestamp as defined in ITU T-REC-H.222.0 / ISO/IEC 13818-1.
309</p>
310<p>
311The PTS should belong to the currently played
312frame if possible, but may also be a value close to it
313like the PTS of the last decoded frame or the last PTS
314extracted by the PES parser.</p>
315</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_GET_FRAME_RATE"></a>VIDEO_GET_FRAME_RATE</h3></div></div></div><p>DESCRIPTION
316</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
317<p>This ioctl call asks the Video Device to return the current framerate.</p>
318</td></tr></tbody></table></div><p>SYNOPSIS
319</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
320<p>int ioctl(int fd, int request =
321 VIDEO_GET_FRAME_RATE, unsigned int *rate);</p>
322</td></tr></tbody></table></div><p>PARAMETERS
323</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
324<p>int fd</p>
325</td><td align="char">
326<p>File descriptor returned by a previous call to open().</p>
327</td></tr><tr><td align="char">
328<p>int request</p>
329</td><td align="char">
330<p>Equals VIDEO_GET_FRAME_RATE for this
331 command.</p>
332</td></tr><tr><td align="char">
333<p>unsigned int *rate
334</p>
335</td><td align="char">
336<p>Returns the framerate in number of frames per 1000 seconds.
337</p>
338</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_GET_EVENT"></a>VIDEO_GET_EVENT</h3></div></div></div><p>DESCRIPTION
339</p><p>This ioctl is for DVB devices only. To get events from a V4L2 decoder use the V4L2
340<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">
341<p>This ioctl call returns an event of type video_event if available. If an event is
342 not available, the behavior depends on whether the device is in blocking or
343 non-blocking mode. In the latter case, the call fails immediately with errno
344 set to EWOULDBLOCK. In the former case, the call blocks until an event
345 becomes available. The standard Linux poll() and/or select() system calls can
346 be used with the device file descriptor to watch for new events. For select(),
347 the file descriptor should be included in the exceptfds argument, and for
348 poll(), POLLPRI should be specified as the wake-up condition. Read-only
349 permissions are sufficient for this ioctl call.</p>
350</td></tr></tbody></table></div><p>SYNOPSIS
351</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
352<p> int ioctl(fd, int request = VIDEO_GET_EVENT, struct
353 video_event &#8902;ev);</p>
354</td></tr></tbody></table></div><p>PARAMETERS
355</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
356<p>int fd</p>
357</td><td align="char">
358<p>File descriptor returned by a previous call to open().</p>
359</td></tr><tr><td align="char">
360<p>int request</p>
361</td><td align="char">
362<p>Equals VIDEO_GET_EVENT for this command.</p>
363</td></tr><tr><td align="char">
364<p>struct video_event
365 *ev</p>
366</td><td align="char">
367<p>Points to the location where the event, if any, is to be
368 stored.</p>
369</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
370<p>EWOULDBLOCK</p>
371</td><td align="char">
372<p>There is no event pending, and the device is in
373 non-blocking mode.</p>
374</td></tr><tr><td align="char">
375<p>EOVERFLOW</p>
376</td><td align="char">
377<p>Overflow in event queue - one or more events were lost.</p>
378</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_COMMAND"></a>VIDEO_COMMAND</h3></div></div></div><p>DESCRIPTION
379</p><p>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this
380ioctl 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">
381<p>This ioctl commands the decoder. The <code class="constant">video_command</code> struct
382is a subset of the <code class="constant">v4l2_decoder_cmd</code> struct, so refer to the
383<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>
384</td></tr></tbody></table></div><p>SYNOPSIS
385</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
386<p>int ioctl(int fd, int request =
387 VIDEO_COMMAND, struct video_command *cmd);</p>
388</td></tr></tbody></table></div><p>PARAMETERS
389</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
390<p>int fd</p>
391</td><td align="char">
392<p>File descriptor returned by a previous call to open().</p>
393</td></tr><tr><td align="char">
394<p>int request</p>
395</td><td align="char">
396<p>Equals VIDEO_COMMAND for this
397 command.</p>
398</td></tr><tr><td align="char">
399<p>struct video_command *cmd
400</p>
401</td><td align="char">
402<p>Commands the decoder.
403</p>
404</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_TRY_COMMAND"></a>VIDEO_TRY_COMMAND</h3></div></div></div><p>DESCRIPTION
405</p><p>This ioctl is obsolete. Do not use in new drivers. For V4L2 decoders this
406ioctl 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">
407<p>This ioctl tries a decoder command. The <code class="constant">video_command</code> struct
408is a subset of the <code class="constant">v4l2_decoder_cmd</code> struct, so refer to the
409<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>
410</td></tr></tbody></table></div><p>SYNOPSIS
411</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
412<p>int ioctl(int fd, int request =
413 VIDEO_TRY_COMMAND, struct video_command *cmd);</p>
414</td></tr></tbody></table></div><p>PARAMETERS
415</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
416<p>int fd</p>
417</td><td align="char">
418<p>File descriptor returned by a previous call to open().</p>
419</td></tr><tr><td align="char">
420<p>int request</p>
421</td><td align="char">
422<p>Equals VIDEO_TRY_COMMAND for this
423 command.</p>
424</td></tr><tr><td align="char">
425<p>struct video_command *cmd
426</p>
427</td><td align="char">
428<p>Try a decoder command.
429</p>
430</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_GET_SIZE"></a>VIDEO_GET_SIZE</h3></div></div></div><p>DESCRIPTION
431</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
432<p>This ioctl returns the size and aspect ratio.</p>
433</td></tr></tbody></table></div><p>SYNOPSIS
434</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
435<p>int ioctl(int fd, int request =
436 VIDEO_GET_SIZE, video_size_t *size);</p>
437</td></tr></tbody></table></div><p>PARAMETERS
438</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
439<p>int fd</p>
440</td><td align="char">
441<p>File descriptor returned by a previous call to open().</p>
442</td></tr><tr><td align="char">
443<p>int request</p>
444</td><td align="char">
445<p>Equals VIDEO_GET_SIZE for this
446 command.</p>
447</td></tr><tr><td align="char">
448<p>video_size_t *size
449</p>
450</td><td align="char">
451<p>Returns the size and aspect ratio.
452</p>
453</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_SET_DISPLAY_FORMAT"></a>VIDEO_SET_DISPLAY_FORMAT</h3></div></div></div><p>DESCRIPTION
454</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
455<p>This ioctl call asks the Video Device to select the video format to be applied
456 by the MPEG chip on the video.</p>
457</td></tr></tbody></table></div><p>SYNOPSIS
458</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
459<p> int ioctl(fd, int request =
460 VIDEO_SET_DISPLAY_FORMAT, video_display_format_t
461 format);</p>
462</td></tr></tbody></table></div><p>PARAMETERS
463</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
464<p>int fd</p>
465</td><td align="char">
466<p>File descriptor returned by a previous call to open().</p>
467</td></tr><tr><td align="char">
468<p>int request</p>
469</td><td align="char">
470<p>Equals VIDEO_SET_DISPLAY_FORMAT for this
471 command.</p>
472</td></tr><tr><td align="char">
473<p>video_display_format_t
474 format</p>
475</td><td align="char">
476<p>Selects the video format to be used.</p>
477</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_STILLPICTURE"></a>VIDEO_STILLPICTURE</h3></div></div></div><p>DESCRIPTION
478</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
479<p>This ioctl call asks the Video Device to display a still picture (I-frame). The
480 input data shall contain an I-frame. If the pointer is NULL, then the current
481 displayed still picture is blanked.</p>
482</td></tr></tbody></table></div><p>SYNOPSIS
483</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
484<p>int ioctl(fd, int request = VIDEO_STILLPICTURE,
485 struct video_still_picture &#8902;sp);</p>
486</td></tr></tbody></table></div><p>PARAMETERS
487</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
488<p>int fd</p>
489</td><td align="char">
490<p>File descriptor returned by a previous call to open().</p>
491</td></tr><tr><td align="char">
492<p>int request</p>
493</td><td align="char">
494<p>Equals VIDEO_STILLPICTURE for this command.</p>
495</td></tr><tr><td align="char">
496<p>struct
497 video_still_picture
498 *sp</p>
499</td><td align="char">
500<p>Pointer to a location where an I-frame and size is stored.</p>
501</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_FAST_FORWARD"></a>VIDEO_FAST_FORWARD</h3></div></div></div><p>DESCRIPTION
502</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
503<p>This ioctl call asks the Video Device to skip decoding of N number of I-frames.
504 This call can only be used if VIDEO_SOURCE_MEMORY is selected.</p>
505</td></tr></tbody></table></div><p>SYNOPSIS
506</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
507<p>int ioctl(fd, int request = VIDEO_FAST_FORWARD, int
508 nFrames);</p>
509</td></tr></tbody></table></div><p>PARAMETERS
510</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
511<p>int fd</p>
512</td><td align="char">
513<p>File descriptor returned by a previous call to open().</p>
514</td></tr><tr><td align="char">
515<p>int request</p>
516</td><td align="char">
517<p>Equals VIDEO_FAST_FORWARD for this command.</p>
518</td></tr><tr><td align="char">
519<p>int nFrames</p>
520</td><td align="char">
521<p>The number of frames to skip.</p>
522</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
523<p>EPERM</p>
524</td><td align="char">
525<p>Mode VIDEO_SOURCE_MEMORY not selected.</p>
526</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_SLOWMOTION"></a>VIDEO_SLOWMOTION</h3></div></div></div><p>DESCRIPTION
527</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
528<p>This ioctl call asks the video device to repeat decoding frames N number of
529 times. This call can only be used if VIDEO_SOURCE_MEMORY is selected.</p>
530</td></tr></tbody></table></div><p>SYNOPSIS
531</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
532<p>int ioctl(fd, int request = VIDEO_SLOWMOTION, int
533 nFrames);</p>
534</td></tr></tbody></table></div><p>PARAMETERS
535</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
536<p>int fd</p>
537</td><td align="char">
538<p>File descriptor returned by a previous call to open().</p>
539</td></tr><tr><td align="char">
540<p>int request</p>
541</td><td align="char">
542<p>Equals VIDEO_SLOWMOTION for this command.</p>
543</td></tr><tr><td align="char">
544<p>int nFrames</p>
545</td><td align="char">
546<p>The number of times to repeat each frame.</p>
547</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
548<p>EPERM</p>
549</td><td align="char">
550<p>Mode VIDEO_SOURCE_MEMORY not selected.</p>
551</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_GET_CAPABILITIES"></a>VIDEO_GET_CAPABILITIES</h3></div></div></div><p>DESCRIPTION
552</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
553<p>This ioctl call asks the video device about its decoding capabilities. On success
554 it returns and integer which has bits set according to the defines in section ??.</p>
555</td></tr></tbody></table></div><p>SYNOPSIS
556</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
557<p>int ioctl(fd, int request = VIDEO_GET_CAPABILITIES,
558 unsigned int &#8902;cap);</p>
559</td></tr></tbody></table></div><p>PARAMETERS
560</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
561<p>int fd</p>
562</td><td align="char">
563<p>File descriptor returned by a previous call to open().</p>
564</td></tr><tr><td align="char">
565<p>int request</p>
566</td><td align="char">
567<p>Equals VIDEO_GET_CAPABILITIES for this
568 command.</p>
569</td></tr><tr><td align="char">
570<p>unsigned int *cap</p>
571</td><td align="char">
572<p>Pointer to a location where to store the capability
573 information.</p>
574</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_SET_ID"></a>VIDEO_SET_ID</h3></div></div></div><p>DESCRIPTION
575</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
576<p>This ioctl selects which sub-stream is to be decoded if a program or system
577 stream is sent to the video device.</p>
578</td></tr></tbody></table></div><p>SYNOPSIS
579</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
580<p>int ioctl(int fd, int request = VIDEO_SET_ID, int
581 id);</p>
582</td></tr></tbody></table></div><p>PARAMETERS
583</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
584<p>int fd</p>
585</td><td align="char">
586<p>File descriptor returned by a previous call to open().</p>
587</td></tr><tr><td align="char">
588<p>int request</p>
589</td><td align="char">
590<p>Equals VIDEO_SET_ID for this command.</p>
591</td></tr><tr><td align="char">
592<p>int id</p>
593</td><td align="char">
594<p>video sub-stream id</p>
595</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
596<p>EINVAL</p>
597</td><td align="char">
598<p>Invalid sub-stream id.</p>
599</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_CLEAR_BUFFER"></a>VIDEO_CLEAR_BUFFER</h3></div></div></div><p>DESCRIPTION
600</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
601<p>This ioctl call clears all video buffers in the driver and in the decoder hardware.</p>
602</td></tr></tbody></table></div><p>SYNOPSIS
603</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
604<p>int ioctl(fd, int request = VIDEO_CLEAR_BUFFER);</p>
605</td></tr></tbody></table></div><p>PARAMETERS
606</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
607<p>int fd</p>
608</td><td align="char">
609<p>File descriptor returned by a previous call to open().</p>
610</td></tr><tr><td align="char">
611<p>int request</p>
612</td><td align="char">
613<p>Equals VIDEO_CLEAR_BUFFER for this command.</p>
614</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_SET_STREAMTYPE"></a>VIDEO_SET_STREAMTYPE</h3></div></div></div><p>DESCRIPTION
615</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
616<p>This ioctl tells the driver which kind of stream to expect being written to it. If
617 this call is not used the default of video PES is used. Some drivers might not
618 support this call and always expect PES.</p>
619</td></tr></tbody></table></div><p>SYNOPSIS
620</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
621<p>int ioctl(fd, int request = VIDEO_SET_STREAMTYPE,
622 int type);</p>
623</td></tr></tbody></table></div><p>PARAMETERS
624</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
625<p>int fd</p>
626</td><td align="char">
627<p>File descriptor returned by a previous call to open().</p>
628</td></tr><tr><td align="char">
629<p>int request</p>
630</td><td align="char">
631<p>Equals VIDEO_SET_STREAMTYPE for this command.</p>
632</td></tr><tr><td align="char">
633<p>int type</p>
634</td><td align="char">
635<p>stream type</p>
636</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_SET_FORMAT"></a>VIDEO_SET_FORMAT</h3></div></div></div><p>DESCRIPTION
637</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
638<p>This ioctl sets the screen format (aspect ratio) of the connected output device
639 (TV) so that the output of the decoder can be adjusted accordingly.</p>
640</td></tr></tbody></table></div><p>SYNOPSIS
641</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
642<p> int ioctl(fd, int request = VIDEO_SET_FORMAT,
643 video_format_t format);</p>
644</td></tr></tbody></table></div><p>PARAMETERS
645</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
646<p>int fd</p>
647</td><td align="char">
648<p>File descriptor returned by a previous call to open().</p>
649</td></tr><tr><td align="char">
650<p>int request</p>
651</td><td align="char">
652<p>Equals VIDEO_SET_FORMAT for this command.</p>
653</td></tr><tr><td align="char">
654<p>video_format_t
655 format</p>
656</td><td align="char">
657<p>video format of TV as defined in section ??.</p>
658</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
659<p>EINVAL</p>
660</td><td align="char">
661<p>format is not a valid video format.</p>
662</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_SET_SYSTEM"></a>VIDEO_SET_SYSTEM</h3></div></div></div><p>DESCRIPTION
663</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
664<p>This ioctl sets the television output format. The format (see section ??) may
665 vary from the color format of the displayed MPEG stream. If the hardware is
666 not able to display the requested format the call will return an error.</p>
667</td></tr></tbody></table></div><p>SYNOPSIS
668</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
669<p> int ioctl(fd, int request = VIDEO_SET_SYSTEM ,
670 video_system_t system);</p>
671</td></tr></tbody></table></div><p>PARAMETERS
672</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
673<p>int fd</p>
674</td><td align="char">
675<p>File descriptor returned by a previous call to open().</p>
676</td></tr><tr><td align="char">
677<p>int request</p>
678</td><td align="char">
679<p>Equals VIDEO_SET_FORMAT for this command.</p>
680</td></tr><tr><td align="char">
681<p>video_system_t
682 system</p>
683</td><td align="char">
684<p>video system of TV output.</p>
685</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
686<p>EINVAL</p>
687</td><td align="char">
688<p>system is not a valid or supported video system.</p>
689</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_SET_HIGHLIGHT"></a>VIDEO_SET_HIGHLIGHT</h3></div></div></div><p>DESCRIPTION
690</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
691<p>This ioctl sets the SPU highlight information for the menu access of a DVD.</p>
692</td></tr></tbody></table></div><p>SYNOPSIS
693</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
694<p> int ioctl(fd, int request = VIDEO_SET_HIGHLIGHT
695 ,video_highlight_t &#8902;vhilite)</p>
696</td></tr></tbody></table></div><p>PARAMETERS
697</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
698<p>int fd</p>
699</td><td align="char">
700<p>File descriptor returned by a previous call to open().</p>
701</td></tr><tr><td align="char">
702<p>int request</p>
703</td><td align="char">
704<p>Equals VIDEO_SET_HIGHLIGHT for this command.</p>
705</td></tr><tr><td align="char">
706<p>video_highlight_t
707 *vhilite</p>
708</td><td align="char">
709<p>SPU Highlight information according to section ??.</p>
710</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_SET_SPU"></a>VIDEO_SET_SPU</h3></div></div></div><p>DESCRIPTION
711</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
712<p>This ioctl activates or deactivates SPU decoding in a DVD input stream. It can
713 only be used, if the driver is able to handle a DVD stream.</p>
714</td></tr></tbody></table></div><p>SYNOPSIS
715</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
716<p> int ioctl(fd, int request = VIDEO_SET_SPU ,
717 video_spu_t &#8902;spu)</p>
718</td></tr></tbody></table></div><p>PARAMETERS
719</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
720<p>int fd</p>
721</td><td align="char">
722<p>File descriptor returned by a previous call to open().</p>
723</td></tr><tr><td align="char">
724<p>int request</p>
725</td><td align="char">
726<p>Equals VIDEO_SET_SPU for this command.</p>
727</td></tr><tr><td align="char">
728<p>video_spu_t *spu</p>
729</td><td align="char">
730<p>SPU decoding (de)activation and subid setting according
731 to section ??.</p>
732</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
733<p>EINVAL</p>
734</td><td align="char">
735<p>input is not a valid spu setting or driver cannot handle
736 SPU.</p>
737</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_SET_SPU_PALETTE"></a>VIDEO_SET_SPU_PALETTE</h3></div></div></div><p>DESCRIPTION
738</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
739<p>This ioctl sets the SPU color palette.</p>
740</td></tr></tbody></table></div><p>SYNOPSIS
741</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
742<p> int ioctl(fd, int request = VIDEO_SET_SPU_PALETTE
743 ,video_spu_palette_t &#8902;palette )</p>
744</td></tr></tbody></table></div><p>PARAMETERS
745</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
746<p>int fd</p>
747</td><td align="char">
748<p>File descriptor returned by a previous call to open().</p>
749</td></tr><tr><td align="char">
750<p>int request</p>
751</td><td align="char">
752<p>Equals VIDEO_SET_SPU_PALETTE for this command.</p>
753</td></tr><tr><td align="char">
754<p>video_spu_palette_t
755 *palette</p>
756</td><td align="char">
757<p>SPU palette according to section ??.</p>
758</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
759<p>EINVAL</p>
760</td><td align="char">
761<p>input is not a valid palette or driver doesn&#8217;t handle SPU.</p>
762</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_GET_NAVI"></a>VIDEO_GET_NAVI</h3></div></div></div><p>DESCRIPTION
763</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
764<p>This ioctl returns navigational information from the DVD stream. This is
765 especially needed if an encoded stream has to be decoded by the hardware.</p>
766</td></tr></tbody></table></div><p>SYNOPSIS
767</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
768<p> int ioctl(fd, int request = VIDEO_GET_NAVI ,
769 video_navi_pack_t &#8902;navipack)</p>
770</td></tr></tbody></table></div><p>PARAMETERS
771</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
772<p>int fd</p>
773</td><td align="char">
774<p>File descriptor returned by a previous call to open().</p>
775</td></tr><tr><td align="char">
776<p>int request</p>
777</td><td align="char">
778<p>Equals VIDEO_GET_NAVI for this command.</p>
779</td></tr><tr><td align="char">
780<p>video_navi_pack_t
781 *navipack</p>
782</td><td align="char">
783<p>PCI or DSI pack (private stream 2) according to section
784 ??.</p>
785</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
786<p>EFAULT</p>
787</td><td align="char">
788<p>driver is not able to return navigational information</p>
789</td></tr></tbody></table></div></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a name="VIDEO_SET_ATTRIBUTES"></a>VIDEO_SET_ATTRIBUTES</h3></div></div></div><p>DESCRIPTION
790</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
791<p>This ioctl is intended for DVD playback and allows you to set certain
792 information about the stream. Some hardware may not need this information,
793 but the call also tells the hardware to prepare for DVD playback.</p>
794</td></tr></tbody></table></div><p>SYNOPSIS
795</p><div class="informaltable"><table border="1"><colgroup><col></colgroup><tbody><tr><td align="char">
796<p> int ioctl(fd, int request = VIDEO_SET_ATTRIBUTE
797 ,video_attributes_t vattr)</p>
798</td></tr></tbody></table></div><p>PARAMETERS
799</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
800<p>int fd</p>
801</td><td align="char">
802<p>File descriptor returned by a previous call to open().</p>
803</td></tr><tr><td align="char">
804<p>int request</p>
805</td><td align="char">
806<p>Equals VIDEO_SET_ATTRIBUTE for this command.</p>
807</td></tr><tr><td align="char">
808<p>video_attributes_t
809 vattr</p>
810</td><td align="char">
811<p>video attributes according to section ??.</p>
812</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&#160;19.1.&#160;Generic error codes">Generic Error Codes</a> chapter.</p><div class="informaltable"><table border="1"><colgroup><col><col></colgroup><tbody><tr><td align="char">
813<p>EINVAL</p>
814</td><td align="char">
815<p>input is not a valid attribute setting.</p>
816</td></tr></tbody></table></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="dvb_video.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="dvb_video.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="dvb_audio.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter&#160;11.&#160;DVB Video Device&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;Chapter&#160;12.&#160;DVB Audio Device</td></tr></table></div></body></html>
817