1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
|
\devsec{DVB Video Device}
The DVB video device controls the MPEG2 video decoder of the DVB hardware.
It can be accessed through \texttt{/dev/ost/video}.
The include file \texttt{ost/video.h} defines the data types and lists
all I/O calls. Please note that some DVB cards don't have their own
MPEG decoder, which results in the omission of the audio and video
device as well as the video4linux device.
\devsubsec{Video Data Types}
\devsubsubsec{video_format\_t}
\label{videoformat}
The \texttt{video_format\_t} data type defined by
\begin{verbatim}
typedef enum {
VIDEO_FORMAT_4_3,
VIDEO_FORMAT_16_9
} video_format_t;
\end{verbatim}
is used in the VIDEO\_SET\_FORMAT function (\ref{videosetformat}) to
tell the driver which aspect ratio the output hardware (e.g. TV) has.
It is also used in the data structures video_status (\ref{videostatus})
returned by VIDEO\_GET\_STATUS (\ref{videogetstatus}) and
video_event (\ref{videoevent}) returned by VIDEO\_GET\_EVENT (\ref{videogetevent})
which report about the display format of the current video stream.
\devsubsubsec{videoDisplayFormat\_t}
\label{videodispformat}
In case the display format of the video stream and of the
display hardware differ the application has to specify how to handle
the cropping of the picture.
This can be done using the VIDEO\_SET\_DISPLAY\_FORMAT call
(\ref{videosetdisplayformat}) which accepts
\begin{verbatim}
typedef enum {
VIDEO_PAN_SCAN,
VIDEO_LETTER_BOX,
VIDEO_CENTER_CUT_OUT
} video_displayformat_t;
\end{verbatim}
as argument.
\devsubsubsec{video stream source}
\label{videostreamsource}
The video stream source is set through the VIDEO\_SELECT\_SOURCE
call and can take the following values, depending on whether we are
replaying from an internal (demuxer) or external (user write) source.
\begin{verbatim}
typedef enum {
VIDEO_SOURCE_DEMUX,
VIDEO_SOURCE_MEMORY
} video_stream_source_t;
\end{verbatim}
VIDEO\_SOURCE\_DEMUX selects the demultiplexer (fed
either by the frontend or the DVR device) as the source of
the video stream.
If VIDEO\_SOURCE\_MEMORY is selected the stream
comes from the application through the \texttt{write()}
system call.
\devsubsubsec{video play state}
\label{videoplaystate}
The following values can be returned by the VIDEO\_GET\_STATUS call
representing the state of video playback.
\begin{verbatim}
typedef enum {
VIDEO_STOPPED,
VIDEO_PLAYING,
VIDEO_FREEZED
} video_play_state_t;
\end{verbatim}
\devsubsubsec{video event}
\label{videoevent}
The following is the structure of a video event as it is returned by
the VIDEO\_GET\_EVENT call.
\begin{verbatim}
struct video_event {
int32_t type;
time_t timestamp;
union {
video_format_t video_format;
} u;
};
\end{verbatim}
\devsubsubsec{video status}
\label{videostatus}
The VIDEO\_GET\_STATUS call returns the following structure informing
about various states of the playback operation.
\begin{verbatim}
struct video_status {
boolean video_blank;
video_play_state_t play_state;
video_stream_source_t stream_source;
video_format_t video_format;
video_displayformat_t display_format;
};
\end{verbatim}
If video_blank is set video will be blanked out if the channel is changed or
if playback is stopped. Otherwise, the last picture will be displayed.
play_state indicates if the video is currently frozen, stopped, or
being played back. The stream_source corresponds to the seleted source
for the video stream. It can come either from the demultiplexer or from memory.
The video_format indicates the aspect ratio (one of 4:3 or 16:9)
of the currently played video stream.
Finally, display_format corresponds to the selected cropping mode in case the
source video format is not the same as the format of the output device.
\devsubsubsec{video display still picture}
\label{videostill}
An I-frame displayed via the VIDEO\_STILLPICTURE call is passed on
within the following structure.
\begin{verbatim}
/* pointer to and size of a single iframe in memory */
struct video_still_picture {
char *iFrame;
int32_t size;
};
\end{verbatim}
\devsubsubsec{video capabilities}
\label{videocaps}
A call to VIDEO\_GET\_CAPABILITIES returns an unsigned integer with
the following bits set according to the hardwares capabilities.
\begin{verbatim}
/* bit definitions for capabilities: */
/* can the hardware decode MPEG1 and/or MPEG2? */
#define VIDEO_CAP_MPEG1 1
#define VIDEO_CAP_MPEG2 2
/* can you send a system and/or program stream to video device?
(you still have to open the video and the audio device but only
send the stream to the video device) */
#define VIDEO_CAP_SYS 4
#define VIDEO_CAP_PROG 8
/* can the driver also handle SPU, NAVI and CSS encoded data?
(CSS API is not present yet) */
#define VIDEO_CAP_SPU 16
#define VIDEO_CAP_NAVI 32
#define VIDEO_CAP_CSS 64
\end{verbatim}
\devsubsubsec{video system}
\label{videosys}
A call to VIDEO\_SET\_SYSTEM sets the desired video system for TV
output. The following system types can be set:
\begin{verbatim}
typedef enum {
VIDEO_SYSTEM_PAL,
VIDEO_SYSTEM_NTSC,
VIDEO_SYSTEM_PALN,
VIDEO_SYSTEM_PALNc,
VIDEO_SYSTEM_PALM,
VIDEO_SYSTEM_NTSC60,
VIDEO_SYSTEM_PAL60,
VIDEO_SYSTEM_PALM60
} video_system_t;
\end{verbatim}
\devsubsubsec{video highlights}
\label{vhilite}
Calling the ioctl VIDEO\_SET\_HIGHLIGHTS posts the SPU highlight
information. The call expects the following format for that information:
\begin{verbatim}
typedef
struct video_highlight {
boolean active; /* 1=show highlight, 0=hide highlight */
uint8_t contrast1; /* 7- 4 Pattern pixel contrast */
/* 3- 0 Background pixel contrast */
uint8_t contrast2; /* 7- 4 Emphasis pixel-2 contrast */
/* 3- 0 Emphasis pixel-1 contrast */
uint8_t color1; /* 7- 4 Pattern pixel color */
/* 3- 0 Background pixel color */
uint8_t color2; /* 7- 4 Emphasis pixel-2 color */
/* 3- 0 Emphasis pixel-1 color */
uint32_t ypos; /* 23-22 auto action mode */
/* 21-12 start y */
/* 9- 0 end y */
uint32_t xpos; /* 23-22 button color number */
/* 21-12 start x */
/* 9- 0 end x */
} video_highlight_t;
\end{verbatim}
\devsubsubsec{video SPU}
\label{videospu}
Calling VIDEO\_SET\_SPU deactivates or activates SPU decoding,
according to the following format:
\begin{verbatim}
typedef
struct video_spu {
boolean active;
int stream_id;
} video_spu_t;
\end{verbatim}
\devsubsubsec{video SPU palette}
\label{vspupal}
The following structure is used to set the SPU palette by calling VIDEO\_SPU\_PALETTE:
\begin{verbatim}
typedef
struct video_spu_palette{ /* SPU Palette information */
int length;
uint8_t *palette;
} video_spu_palette_t;
\end{verbatim}
\devsubsubsec{video NAVI pack}
\label{videonavi}
In order to get the navigational data the following structure has to
be passed to the ioctl VIDEO\_GET\_NAVI:
\begin{verbatim}
typedef
struct video_navi_pack{
int length; /* 0 ... 1024 */
uint8_t data[1024];
} video_navi_pack_t;
\end{verbatim}
\devsubsubsec{video attributes}
\label{vattrib}
The following attributes can be set by a call to VIDEO\_SET\_ATTRIBUTES:
\begin{verbatim}
typedef uint16_t video_attributes_t;
/* bits: descr. */
/* 15-14 Video compression mode (0=MPEG-1, 1=MPEG-2) */
/* 13-12 TV system (0=525/60, 1=625/50) */
/* 11-10 Aspect ratio (0=4:3, 3=16:9) */
/* 9- 8 permitted display mode on 4:3 monitor (0=both, 1=only pan-sca */
/* 7 line 21-1 data present in GOP (1=yes, 0=no) */
/* 6 line 21-2 data present in GOP (1=yes, 0=no) */
/* 5- 3 source resolution (0=720x480/576, 1=704x480/576, 2=352x480/57 */
/* 2 source letterboxed (1=yes, 0=no) */
/* 0 film/camera mode (0=camera, 1=film (625/50 only)) */
\end{verbatim}
\clearpage
\devsubsec{Video Function Calls}
\function{open()}{
int open(const char *deviceName, int flags);}{
This system call opens a named video device (e.g. /dev/ost/video)
for subsequent use.
When an open() call has succeeded, the device will be ready for use.
The significance of blocking or non-blocking mode is described in
the documentation for functions where there is a difference.
It does not affect the semantics of the open() call itself.
A device opened in blocking mode can later be put into non-blocking mode
(and vice versa) using the F\_SETFL command of the fcntl system
call.
This is a standard system call, documented in the Linux manual
page for fcntl.
Only one user can open the Video Device in O\_RDWR mode. All other attempts to
open the device in this mode will fail, and an error-code will be returned.
If the Video Device is opened in O\_RDONLY mode, the only ioctl call that can
be used is VIDEO\_GET\_STATUS. All other call will return an error code.
}{
const char *deviceName & Name of specific video device.\\
int flags & A bit-wise OR of the following flags:\\
& \hspace{1em} O\_RDONLY read-only access\\
& \hspace{1em} O\_RDWR read/write access\\
& \hspace{1em} O\_NONBLOCK open in non-blocking mode \\
& \hspace{1em} (blocking mode is the default)\\
}{
ENODEV & Device driver not loaded/available.\\
EINTERNAL & Internal error.\\
EBUSY & Device or resource busy.\\
EINVAL & Invalid argument.\\
}
\function{close()}{
int close(int fd);}{
This system call closes a previously opened video device.
}{
int fd & File descriptor returned by a previous call to open().\\
}{
EBADF & fd is not a valid open file descriptor.\\
}
\function{write()}{
size\_t write(int fd, const void *buf, size\_t count);}{
This system call can only be used if VIDEO\_SOURCE\_MEMORY is selected in the
ioctl call VIDEO\_SELECT\_SOURCE. The data provided shall be in PES
format, unless the capability allows other formats.
If O\_NONBLOCK is not specified the function will block until buffer space is
available. The amount of data to be transferred is implied by count.
}{
int fd & File descriptor returned by a previous call to open().\\
void *buf & Pointer to the buffer containing the PES data.\\
size\_t count& Size of buf.\\
}{
EPERM& Mode VIDEO\_SOURCE\_MEMORY not selected.\\
ENOMEM& Attempted to write more data than the internal buffer can hold.\\
EBADF& fd is not a valid open file descriptor.\\
}
\ifunction{VIDEO\_STOP}{
int ioctl(fd, int request = VIDEO\_STOP, boolean mode);}{
This ioctl call asks the Video Device to stop playing the current stream.
Depending on the input parameter, the screen can be blanked out or
displaying the last decoded frame.
}{
int fd & File descriptor returned by a previous call to open(). \\
int request & Equals VIDEO\_STOP for this command. \\
Boolean mode & Indicates how the screen shall be handled. \\
& TRUE: Blank screen when stop. \\
& FALSE: Show last decoded frame.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINTERNAL & Internal error, possibly in the communication with
the DVB subsystem.\\
}
\ifunction{VIDEO\_PLAY}{
int ioctl(fd, int request = VIDEO\_PLAY);}{
This ioctl call asks the Video Device to start playing a video stream
from the selected source.
}{
int fd & File descriptor returned by a previous call to open(). \\
int request & Equals VIDEO\_PLAY for this command. \\
}{
EBADF& fd is not a valid open file descriptor \\
EINTERNAL & Internal error, possibly in the communication with
the DVB subsystem.\\
}
\ifunction{VIDEO\_FREEZE}{
int ioctl(fd, int request = VIDEO\_FREEZE);}{
This ioctl call suspends the live video stream being played.
Decoding and playing are frozen. It is then possible to restart
the decoding and playing process of the video stream using the
VIDEO\_CONTINUE command. If VIDEO\_SOURCE\_MEMORY is selected in the
ioctl call VIDEO\_SELECT\_SOURCE, the DVB subsystem will not decode
any more data until the ioctl call VIDEO\_CONTINUE or VIDEO\_PLAY is
performed.
}{
int fd & File descriptor returned by a previous call to open(). \\
int request & Equals VIDEO\_FREEZE for this command. \\
}{
EBADF& fd is not a valid open file descriptor \\
EINTERNAL & Internal error, possibly in the communication with
the DVB subsystem.\\
}
\ifunction{VIDEO\_CONTINUE}{
int ioctl(fd, int request = VIDEO\_CONTINUE);}{
This ioctl call restarts decoding and playing processes of the video
stream which was played before a call to VIDEO\_FREEZE was made.
}{
int fd & File descriptor returned by a previous call to open(). \\
int request & Equals VIDEO\_CONTINUE for this command. \\
}{
EBADF& fd is not a valid open file descriptor \\
EINTERNAL & Internal error, possibly in the communication with
the DVB subsystem.\\
}
\ifunction{VIDEO\_SELECT\_SOURCE}{
int ioctl(fd, int request = VIDEO\_SELECT\_SOURCE, videoStreamSource\_t source);}{
This ioctl call informs the video device which source shall be used
for the input data. The possible sources are demux or memory. If
memory is selected, the data is fed to the video device through
the write command.
}{
int fd & File descriptor returned by a previous call to open().\\
int request& Equals VIDEO\_SELECT\_SOURCE for this command. \\
videoStreamSource\_t source&Indicates which source shall be used for the Video stream.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINTERNAL & Internal error, possibly in the communication with the DVB subsystem.\\
}
\ifunction{VIDEO\_SET\_BLANK}{
int ioctl(fd, int request = VIDEO\_SET\_BLANK, boolean mode);}{
This ioctl call asks the Video Device to blank out the picture.
}{
int fd & File descriptor returned by a previous call to open().\\
int request& Equals VIDEO\_SET\_BLANK for this command. \\
boolean mode&TRUE: Blank screen when stop.\\
&FALSE: Show last decoded frame.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINTERNAL & Internal error, possibly in the communication with the DVB subsystem.\\
EINVAL & Illegal input parameter\\
}
\ifunction{VIDEO\_GET\_STATUS}{
\label{videogetstatus}
int ioctl(fd, int request = VIDEO\_GET\_STATUS, struct video_status *status);}{
This ioctl call asks the Video Device to return the current status of the device.
}{
int fd & File descriptor returned by a previous call to open().\\
int request& Equals VIDEO\_GET\_STATUS for this command.\\
struct video_status *status & Returns the current status of the Video Device.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINTERNAL & Internal error, possibly in the communication with the DVB subsystem.\\
EFAULT & status points to invalid address\\
}
\ifunction{VIDEO\_GET\_EVENT}{
\label{videogetevent}
int ioctl(fd, int request = VIDEO\_GET\_EVENT, struct video_event *ev);}{
This ioctl call returns an event of type video_event if available.
If an event is not available, the behavior depends on whether the device is in
blocking or non-blocking mode. In the latter case, the call fails immediately
with errno set to EWOULDBLOCK. In the former case, the call blocks until an
event becomes available.
The standard Linux poll() and/or select() system calls can be used with the
device file descriptor to watch for new events. For select(), the file
descriptor should be included in the exceptfds argument, and for poll(),
POLLPRI should be specified as the wake-up condition.
Read-only permissions are sufficient for this ioctl call.
}{
int fd & File descriptor returned by a previous call to open().\\
int request& Equals VIDEO\_GET\_EVENT for this command.\\
struct video_event *ev & Points to the location where the event, if any, is
to be stored.\\
}{
EBADF & fd is not a valid open file descriptor \\
EFAULT & ev points to invalid address \\
EWOULDBLOCK & There is no event pending, and the device is in non-blocking mode.\\
EBUFFEROVERFLOW & \\
&Overflow in event queue - one or more events were lost.\\
}
\ifunction{VIDEO\_SET\_DISPLAY\_FORMAT}{
\label{videosetdisplayformat}
int ioctl(fd, int request = VIDEO\_SET\_DISPLAY\_FORMAT, videoDisplayFormat\_t format);}{
This ioctl call asks the Video Device to select the video format to be applied
by the MPEG chip on the video.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_SET\_DISPLAY\_FORMAT for this command.\\
videoDisplayFormat\_t format & Selects the video format to be used.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINTERNAL & Internal error.\\
EINVAL & Illegal parameter format.\\
}
\ifunction{VIDEO\_STILLPICTURE}{
int ioctl(fd, int request = VIDEO\_STILLPICTURE, struct video_still_picture *sp);}{
This ioctl call asks the Video Device to display a still picture (I-frame).
The input data shall contain an I-frame. If the pointer is NULL, then the
current displayed still picture is blanked.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_STILLPICTURE for this command.\\
struct video_still_picture *sp&
Pointer to a location where an I-frame and size is stored.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINTERNAL & Internal error.\\
EFAULT & sp points to an invalid iframe.\\
}
\ifunction{VIDEO\_FAST\_FORWARD}{
int ioctl(fd, int request = VIDEO\_FAST\_FORWARD, int nFrames);}{
This ioctl call asks the Video Device to skip decoding of N number of I-frames.
This call can only be used if VIDEO\_SOURCE\_MEMORY is selected.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_FAST\_FORWARD for this command.\\
int nFrames & The number of frames to skip.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINTERNAL & Internal error.\\
EPERM & Mode VIDEO\_SOURCE\_MEMORY not selected.\\
EINVAL & Illegal parameter format.\\
}
\ifunction{VIDEO\_SLOWMOTION}{
int ioctl(fd, int request = VIDEO\_SLOWMOTION, int nFrames);}{
This ioctl call asks the video device to repeat decoding frames N
number of times.
This call can only be used if VIDEO\_SOURCE\_MEMORY is selected.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_SLOWMOTION for this command.\\
int nFrames & The number of times to repeat each frame.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINTERNAL & Internal error.\\
EPERM & Mode VIDEO\_SOURCE\_MEMORY not selected.\\
EINVAL & Illegal parameter format.\\
}
\ifunction{VIDEO\_GET\_CAPABILITIES}{
int ioctl(fd, int request = VIDEO\_GET\_CAPABILITIES, unsigned int *cap);}{
This ioctl call asks the video device about its decoding capabilities.
On success it returns and integer which has bits set according to the
defines in section \ref{videocaps}.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_GET\_CAPABILITIES for this command.\\
unsigned int *cap & Pointer to a location where to store the
capability information.\\
}{
EBADF& fd is not a valid open file descriptor \\
EFAULT & cap points to an invalid iframe.\\
}
\ifunction{VIDEO\_SET\_ID}{
int ioctl(int fd, int request = VIDEO\_SET\_ID, int id);}{
This ioctl selects which sub-stream is to be decoded if a program or
system stream is sent to the video device.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_SET\_ID for this command.\\
int id& video sub-stream id
}{
EBADF& fd is not a valid open file descriptor.\\
EINTERNAL & Internal error.\\
EINVAL & Invalid sub-stream id.
}
\ifunction{VIDEO\_CLEAR\_BUFFER}{
int ioctl(fd, int request = VIDEO\_CLEAR\_BUFFER);}{
This ioctl call clears all video buffers in the driver and
in the decoder hardware.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_CLEAR\_BUFFER for this command.\\
}{
EBADF& fd is not a valid open file descriptor \\
}
\ifunction{VIDEO\_SET\_STREAMTYPE}{
int ioctl(fd, int request = VIDEO\_SET\_STREAMTYPE, int type);}{
This ioctl tells the driver which kind of stream to expect
being written to it. If this call is not used the default of video PES
is used. Some drivers might not support this call and always expect PES.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_SET\_STREAMTYPE for this command.\\
int type & stream type\\
}{
EBADF& fd is not a valid open file descriptor \\
EINVAL& type is not a valid or supported stream type.\\
}
\ifunction{VIDEO\_SET\_FORMAT}{
\label{videosetformat}
int ioctl(fd, int request = VIDEO\_SET\_FORMAT, video_format\_t format);
}{
This ioctl sets the screen format (aspect ratio) of the connected
output device (TV) so that the output of the decoder can
be adjusted accordingly.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_SET\_FORMAT for this command.\\
video_format\_t format& video format of TV as defined in section \ref{videoformat}.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINVAL& format is not a valid video format.\\
}
\ifunction{VIDEO\_SET\_SYSTEM}{
\label{videosetsystem}
int ioctl(fd, int request = VIDEO\_SET\_SYSTEM , videoSystem\_t system);
}{
This ioctl sets the television output format. The format (see section
\ref{videosys}) may vary from the color format of the displayed MPEG
stream. If the hardware is not able to display the requested format
the call will return an error.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_SET\_FORMAT for this command.\\
videoSystem\_t system& video system of TV output.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINVAL& system is not a valid or supported video system.\\
}
\ifunction{VIDEO\_SET\_HIGHLIGHT}{
\label{videosethighlight}
int ioctl(fd, int request = VIDEO\_SET\_HIGHLIGHT ,video_highlight\_t *vhilite)
}{
This ioctl sets the SPU highlight information for the menu access of
a DVD.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_SET\_HIGHLIGHT for this command.\\
video_highlight\_t *vhilite& SPU Highlight information according to
section \ref{vhilite}.\\
}{
EBADF& fd is not a valid open file descriptor. \\
EINVAL& input is not a valid highlight setting.\\
}
\ifunction{VIDEO\_SET\_SPU}{
\label{videosetspu}
int ioctl(fd, int request = VIDEO\_SET\_SPU , video_spu\_t *spu)
}{
This ioctl activates or deactivates SPU decoding in a DVD input
stream. It can only be used, if the driver is able to handle a DVD
stream.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_SET\_SPU for this command.\\
video_spu\_t *spu& SPU decoding (de)activation and subid setting
according to section \ref{videospu}.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINVAL& input is not a valid spu setting or driver cannot handle SPU.\\
}
\ifunction{VIDEO\_SET\_SPU\_PALETTE}{
\label{videosetspupalette}
int ioctl(fd, int request = VIDEO\_SET\_SPU\_PALETTE ,video_spu_palette\_t *palette )
}{
This ioctl sets the SPU color palette.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_SET\_SPU\_PALETTE for this command.\\
video_spu_palette\_t *palette& SPU palette according to section \ref{vspupal}.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINVAL& input is not a valid palette or driver doesn't handle SPU.\\
}
\ifunction{VIDEO\_GET\_NAVI}{
\label{videosetnavi}
int ioctl(fd, int request = VIDEO\_GET\_NAVI , video_navi_pack\_t *navipack)
}{
This ioctl returns navigational information from the DVD stream. This is
especially needed if an encoded stream has to be decoded by the hardware.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_GET\_NAVI for this command.\\
video_navi_pack\_t *navipack& PCI or DSI pack (private stream 2)
according to section \ref{videonavi}.\\
}{
EBADF& fd is not a valid open file descriptor \\
EFAULT& driver is not able to return navigational information\\
}
\ifunction{VIDEO\_SET\_ATTRIBUTES}{
\label{videosetattributes}
int ioctl(fd, int request = VIDEO\_SET\_ATTRIBUTE ,videoAttributes\_t
vattr)
}{
This ioctl is intended for DVD playback and allows you to set
certain information about the stream. Some hardware may not need
this information, but the call also tells the hardware to prepare
for DVD playback.
}{
int fd & File descriptor returned by a previous call to open().\\
int request & Equals VIDEO\_SET\_ATTRIBUTE for this command.\\
videoAttributes\_t vattr& video attributes according to section \ref{vattrib}.\\
}{
EBADF& fd is not a valid open file descriptor \\
EINVAL& input is not a valid attribute setting.\\
}
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "dvbapi"
%%% End:
|