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