xine-lib: xine-lib-1.2.13/include/xine/vdr.h Source File

xine-lib 1.2.13-20230125hg15249

vdr.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2000-2018 the xine project
3 *
4 * This file is part of xine, a free video player.
5 *
6 * xine is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * xine is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19 */
20
21#ifndef __VDR_H
22#define __VDR_H
23
24#define XINE_VDR_VERSION 901
25
26#include <xine/os_types.h>
27
28 enum funcs
29{
30 func_unknown = -1
31 , func_nop
32 , func_osd_new
33 , func_osd_free
34 , func_osd_show
35 , func_osd_hide
36 , func_osd_set_position
37 , func_osd_draw_bitmap
38 , func_set_color
39 , func_clear
40 , func_mute
41 , func_set_volume
42 , func_set_speed
43 , func_set_prebuffer
44 , func_metronom
45 , func_start
46 , func_wait
47 , func_setup
48 , func_grab_image
49 , func_get_pts
50 , func_flush
51 , func_first_frame
52 , func_still_frame
53 , func_video_size
54 , func_set_video_window
55 , func_osd_flush
56 , func_play_external
57 , func_key
58 , func_frame_size
59 , func_reset_audio
60 , func_select_audio
61 , func_trick_speed_mode
62 , func_get_version
63 , func_discontinuity
64 , func_query_capabilities
65};
66
67 enum keys
68{
69 key_none,
70 key_up,
71 key_down,
72 key_menu,
73 key_ok,
74 key_back,
75 key_left,
76 key_right,
77 key_red,
78 key_green,
79 key_yellow,
80 key_blue,
81 key_0,
82 key_1,
83 key_2,
84 key_3,
85 key_4,
86 key_5,
87 key_6,
88 key_7,
89 key_8,
90 key_9,
91 key_play,
92 key_pause,
93 key_stop,
94 key_record,
95 key_fast_fwd,
96 key_fast_rew,
97 key_power,
98 key_channel_plus,
99 key_channel_minus,
100 key_volume_plus,
101 key_volume_minus,
102 key_mute,
103 key_schedule,
104 key_channels,
105 key_timers,
106 key_recordings,
107 key_setup,
108 key_commands,
109 key_user1,
110 key_user2,
111 key_user3,
112 key_user4,
113 key_user5,
114 key_user6,
115 key_user7,
116 key_user8,
117 key_user9,
118 key_audio,
119 key_info,
120 key_channel_previous,
121 key_next,
122 key_previous,
123 key_subtitles,
124 key_user0,
125};
126
127
128
129typedef struct __attribute__((packed)) data_header_s
130{
131 uint32_t func:8;
132 uint32_t len:24;
133}
134data_header_t;
135
136
137
138 typedef data_header_t result_header_t;
139 typedef data_header_t event_header_t;
140
141
142
143typedef struct __attribute__((packed)) data_nop_s
144{
145 data_header_t header;
146}
147data_nop_t;
148
149
150
151typedef struct __attribute__((packed)) data_osd_new_s
152{
153 data_header_t header;
154
155 uint8_t window;
156 int16_t x;
157 int16_t y;
158 uint16_t width;
159 uint16_t height;
160 uint16_t w_ref;
161 uint16_t h_ref;
162}
163data_osd_new_t;
164
165
166
167typedef struct __attribute__((packed)) data_osd_free_s
168{
169 data_header_t header;
170
171 uint8_t window;
172}
173data_osd_free_t;
174
175
176
177typedef struct __attribute__((packed)) data_osd_show_s
178{
179 data_header_t header;
180
181 uint8_t window;
182}
183data_osd_show_t;
184
185
186
187typedef struct __attribute__((packed)) data_osd_hide_s
188{
189 data_header_t header;
190
191 uint8_t window;
192}
193data_osd_hide_t;
194
195
196
197typedef struct __attribute__((packed)) data_osd_flush_s
198{
199 data_header_t header;
200}
201data_osd_flush_t;
202
203
204
205typedef struct __attribute__((packed)) data_play_external_s
206{
207 data_header_t header;
208}
209data_play_external_t;
210
211
212
213typedef struct __attribute__((packed)) data_osd_set_position_s
214{
215 data_header_t header;
216
217 uint8_t window;
218 int16_t x;
219 int16_t y;
220}
221data_osd_set_position_t;
222
223
224
225typedef struct __attribute__((packed)) data_osd_draw_bitmap_s
226{
227 data_header_t header;
228
229 uint8_t window;
230 int16_t x;
231 int16_t y;
232 uint16_t width;
233 uint16_t height;
234 uint8_t argb;
235}
236data_osd_draw_bitmap_t;
237
238
239
240typedef struct __attribute__((packed)) data_set_color_s
241{
242 data_header_t header;
243
244 uint8_t window;
245 uint8_t index;
246 uint8_t num;
247}
248data_set_color_t;
249
250
251
252typedef struct __attribute__((packed)) data_flush_s
253{
254 data_header_t header;
255
256 int32_t ms_timeout;
257 uint8_t just_wait;
258}
259data_flush_t;
260
261
262
263typedef struct __attribute__((packed)) result_flush_s
264{
265 result_header_t header;
266
267 uint8_t timed_out;
268}
269result_flush_t;
270
271
272
273typedef struct __attribute__((packed)) data_clear_s
274{
275 data_header_t header;
276
277 int32_t n;
278 int8_t s;
279 uint8_t i;
280}
281data_clear_t;
282
283
284
285typedef struct __attribute__((packed)) data_mute_s
286{
287 data_header_t header;
288
289 uint8_t mute;
290}
291data_mute_t;
292
293
294
295typedef struct __attribute__((packed)) data_set_volume_s
296{
297 data_header_t header;
298
299 uint8_t volume;
300}
301data_set_volume_t;
302
303
304
305typedef struct __attribute__((packed)) data_set_speed_s
306{
307 data_header_t header;
308
309 int32_t speed;
310}
311data_set_speed_t;
312
313
314
315typedef struct __attribute__((packed)) data_set_prebuffer_s
316{
317 data_header_t header;
318
319 uint32_t prebuffer;
320}
321data_set_prebuffer_t;
322
323
324
325typedef struct __attribute__((packed)) data_metronom_s
326{
327 data_header_t header;
328
329 int64_t pts;
330 uint32_t flags;
331}
332data_metronom_t;
333
334
335
336typedef struct __attribute__((packed)) data_start_s
337{
338 data_header_t header;
339}
340data_start_t;
341
342
343
344typedef struct __attribute__((packed)) data_wait_s
345{
346 data_header_t header;
347 uint8_t id;
348}
349data_wait_t;
350
351
352
353typedef struct __attribute__((packed)) result_wait_s
354{
355 result_header_t header;
356}
357result_wait_t;
358
359
360
361#define XINE_VDR_VOLUME_IGNORE 0
362#define XINE_VDR_VOLUME_CHANGE_HW 1
363#define XINE_VDR_VOLUME_CHANGE_SW 2
364
365#define XINE_VDR_MUTE_IGNORE 0
366#define XINE_VDR_MUTE_EXECUTE 1
367#define XINE_VDR_MUTE_SIMULATE 2
368
369typedef struct __attribute__((packed)) data_setup_s
370{
371 data_header_t header;
372
373 uint8_t osd_unscaled_blending;
374 uint8_t volume_mode;
375 uint8_t mute_mode;
376 uint16_t image4_3_zoom_x;
377 uint16_t image4_3_zoom_y;
378 uint16_t image16_9_zoom_x;
379 uint16_t image16_9_zoom_y;
380}
381data_setup_t;
382
383
384
385typedef struct __attribute__((packed)) data_first_frame_s
386{
387 data_header_t header;
388}
389data_first_frame_t;
390
391
392
393typedef struct __attribute__((packed)) data_still_frame_s
394{
395 data_header_t header;
396}
397data_still_frame_t;
398
399
400
401typedef struct __attribute__((packed)) data_set_video_window_s
402{
403 data_header_t header;
404
405 uint32_t x;
406 uint32_t y;
407 uint32_t w;
408 uint32_t h;
409 uint32_t w_ref;
410 uint32_t h_ref;
411}
412data_set_video_window_t;
413
414
415
416typedef struct __attribute__((packed)) data_grab_image_s
417{
418 data_header_t header;
419}
420data_grab_image_t;
421
422
423
424typedef struct __attribute__((packed)) result_grab_image_s
425{
426 result_header_t header;
427
428 int32_t width;
429 int32_t height;
430 int32_t ratio;
431 int32_t format;
432 int32_t interlaced;
433 int32_t crop_left;
434 int32_t crop_right;
435 int32_t crop_top;
436 int32_t crop_bottom;
437}
438result_grab_image_t;
439
440
441
442typedef struct __attribute__((packed)) data_get_pts_s
443{
444 data_header_t header;
445 int32_t ms_timeout;
446}
447data_get_pts_t;
448
449
450
451typedef struct __attribute__((packed)) result_get_pts_s
452{
453 result_header_t header;
454
455 int64_t pts;
456 int8_t queued;
457}
458result_get_pts_t;
459
460
461
462typedef struct __attribute__((packed)) data_get_version_s
463{
464 data_header_t header;
465}
466data_get_version_t;
467
468
469
470typedef struct __attribute__((packed)) result_get_version_s
471{
472 result_header_t header;
473
474 int32_t version;
475}
476result_get_version_t;
477
478
479
480typedef struct __attribute__((packed)) data_video_size_s
481{
482 data_header_t header;
483}
484data_video_size_t;
485
486
487
488typedef struct __attribute__((packed)) result_video_size_s
489{
490 result_header_t header;
491
492 int32_t left;
493 int32_t top;
494 int32_t width;
495 int32_t height;
496 int32_t ratio;
497 int32_t zoom_x;
498 int32_t zoom_y;
499}
500result_video_size_t;
501
502
503
504typedef struct __attribute__((packed)) data_reset_audio_s
505{
506 data_header_t header;
507}
508data_reset_audio_t;
509
510
511
512typedef struct __attribute__((packed)) event_key_s
513{
514 event_header_t header;
515
516 uint32_t key;
517}
518event_key_t;
519
520
521
522typedef struct __attribute__((packed)) event_frame_size_s
523{
524 event_header_t header;
525
526 int32_t left;
527 int32_t top;
528 int32_t width;
529 int32_t height;
530 int32_t zoom_x;
531 int32_t zoom_y;
532}
533event_frame_size_t;
534
535
536
537typedef struct __attribute__((packed)) event_play_external_s
538{
539 event_header_t header;
540
541 uint32_t key;
542}
543event_play_external_t;
544
545
546
547typedef struct __attribute__((packed)) data_select_audio_s
548{
549 data_header_t header;
550
551 uint8_t channels;
552}
553data_select_audio_t;
554
555
556
557typedef struct __attribute__((packed)) data_trick_speed_mode_s
558{
559 data_header_t header;
560
561 uint8_t on;
562}
563data_trick_speed_mode_t;
564
565
566
567typedef struct __attribute__((packed)) event_discontinuity_s
568{
569 event_header_t header;
570
571 int32_t type;
572}
573event_discontinuity_t;
574
575
576
577typedef struct __attribute__((packed)) data_query_capabilities_s
578{
579 data_header_t header;
580}
581data_query_capabilities_t;
582
583
584
585typedef struct __attribute__((packed)) result_query_capabilities_s
586{
587 result_header_t header;
588
589 uint8_t osd_max_num_windows;
590 uint8_t osd_palette_max_depth;
591 uint8_t osd_palette_is_shared;
592 uint8_t osd_supports_argb_layer;
593 uint8_t osd_supports_custom_extent;
594}
595result_query_capabilities_t;
596
597
598
599typedef union __attribute__((packed)) data_union_u
600{
601 data_header_t header;
602 data_nop_t nop;
603 data_osd_new_t osd_new;
604 data_osd_free_t osd_free;
605 data_osd_show_t osd_show;
606 data_osd_hide_t osd_hide;
607 data_osd_set_position_t osd_set_position;
608 data_osd_draw_bitmap_t osd_draw_bitmap;
609 data_set_color_t set_color;
610 data_flush_t flush;
611 data_clear_t clear;
612 data_mute_t mute;
613 data_set_volume_t set_volume;
614 data_set_speed_t set_speed;
615 data_set_prebuffer_t set_prebuffer;
616 data_metronom_t metronom;
617 data_start_t start;
618 data_wait_t wait;
619 data_setup_t setup;
620 data_grab_image_t grab_image;
621 data_get_pts_t get_pts;
622 data_first_frame_t first_frame;
623 data_still_frame_t still_frame;
624 data_video_size_t video_size;
625 data_set_video_window_t set_video_window;
626 data_osd_flush_t osd_flush;
627 data_play_external_t play_external;
628 data_reset_audio_t reset_audio;
629 data_select_audio_t select_audio;
630 data_trick_speed_mode_t trick_speed_mode;
631 data_get_version_t get_version;
632 data_query_capabilities_t query_capabilities;
633}
634data_union_t;
635
636
637
638typedef union __attribute__((packed)) result_union_u
639{
640 result_header_t header;
641 result_grab_image_t grab_image;
642 result_get_pts_t get_pts;
643 result_flush_t flush;
644 result_video_size_t video_size;
645 result_get_version_t get_version;
646 result_wait_t wait;
647 result_query_capabilities_t query_capabilities;
648}
649result_union_t;
650
651
652
653typedef union __attribute__((packed)) event_union_u
654{
655 event_header_t header;
656 event_key_t key;
657 event_frame_size_t frame_size;
658 event_play_external_t play_external;
659 event_discontinuity_t discontinuity;
660}
661event_union_t;
662
663
664
665#endif /* __VDR_H */
666
height
unsigned int height
Definition gfontrle.c:5
width
unsigned int width
Definition gfontrle.c:4
os_types.h
osd_set_position
static void osd_set_position(osd_object_t *osd, int x, int y)
Definition osd.c:964
osd_draw_bitmap
static void osd_draw_bitmap(osd_object_t *osd, const uint8_t *bitmap, int x1, int y1, int width, int height, const uint8_t *palette_map)
Definition osd.c:2022
osd_hide
static int osd_hide(osd_object_t *osd, int64_t vpts)
Definition osd.c:567
data_start_t
data_start_t
Definition vdr.h:340
data_osd_flush_t
data_osd_flush_t
Definition vdr.h:201
result_video_size_t
result_video_size_t
Definition vdr.h:500
event_union_t
event_union_t
Definition vdr.h:661
data_grab_image_t
data_grab_image_t
Definition vdr.h:420
data_first_frame_t
data_first_frame_t
Definition vdr.h:389
keys
keys
Definition vdr.h:68
key_user0
@ key_user0
Definition vdr.h:124
key_user7
@ key_user7
Definition vdr.h:115
key_0
@ key_0
Definition vdr.h:81
key_commands
@ key_commands
Definition vdr.h:108
key_user3
@ key_user3
Definition vdr.h:111
key_record
@ key_record
Definition vdr.h:94
key_fast_fwd
@ key_fast_fwd
Definition vdr.h:95
key_recordings
@ key_recordings
Definition vdr.h:106
key_audio
@ key_audio
Definition vdr.h:118
key_red
@ key_red
Definition vdr.h:77
key_previous
@ key_previous
Definition vdr.h:122
key_user8
@ key_user8
Definition vdr.h:116
key_user6
@ key_user6
Definition vdr.h:114
key_menu
@ key_menu
Definition vdr.h:72
key_back
@ key_back
Definition vdr.h:74
key_volume_minus
@ key_volume_minus
Definition vdr.h:101
key_play
@ key_play
Definition vdr.h:91
key_blue
@ key_blue
Definition vdr.h:80
key_none
@ key_none
Definition vdr.h:69
key_mute
@ key_mute
Definition vdr.h:102
key_down
@ key_down
Definition vdr.h:71
key_up
@ key_up
Definition vdr.h:70
key_channels
@ key_channels
Definition vdr.h:104
key_pause
@ key_pause
Definition vdr.h:92
key_power
@ key_power
Definition vdr.h:97
key_user2
@ key_user2
Definition vdr.h:110
key_fast_rew
@ key_fast_rew
Definition vdr.h:96
key_schedule
@ key_schedule
Definition vdr.h:103
key_channel_previous
@ key_channel_previous
Definition vdr.h:120
key_yellow
@ key_yellow
Definition vdr.h:79
key_4
@ key_4
Definition vdr.h:85
key_next
@ key_next
Definition vdr.h:121
key_6
@ key_6
Definition vdr.h:87
key_9
@ key_9
Definition vdr.h:90
key_user1
@ key_user1
Definition vdr.h:109
key_7
@ key_7
Definition vdr.h:88
key_1
@ key_1
Definition vdr.h:82
key_info
@ key_info
Definition vdr.h:119
key_right
@ key_right
Definition vdr.h:76
key_2
@ key_2
Definition vdr.h:83
key_user5
@ key_user5
Definition vdr.h:113
key_channel_minus
@ key_channel_minus
Definition vdr.h:99
key_left
@ key_left
Definition vdr.h:75
key_channel_plus
@ key_channel_plus
Definition vdr.h:98
key_subtitles
@ key_subtitles
Definition vdr.h:123
key_timers
@ key_timers
Definition vdr.h:105
key_3
@ key_3
Definition vdr.h:84
key_green
@ key_green
Definition vdr.h:78
key_setup
@ key_setup
Definition vdr.h:107
key_stop
@ key_stop
Definition vdr.h:93
key_user9
@ key_user9
Definition vdr.h:117
key_ok
@ key_ok
Definition vdr.h:73
key_5
@ key_5
Definition vdr.h:86
key_8
@ key_8
Definition vdr.h:89
key_user4
@ key_user4
Definition vdr.h:112
key_volume_plus
@ key_volume_plus
Definition vdr.h:100
data_osd_show_t
data_osd_show_t
Definition vdr.h:183
funcs
funcs
Definition vdr.h:29
func_reset_audio
@ func_reset_audio
Definition vdr.h:59
func_key
@ func_key
Definition vdr.h:57
func_unknown
@ func_unknown
Definition vdr.h:30
func_clear
@ func_clear
Definition vdr.h:39
func_nop
@ func_nop
Definition vdr.h:31
func_select_audio
@ func_select_audio
Definition vdr.h:60
func_osd_new
@ func_osd_new
Definition vdr.h:32
func_set_speed
@ func_set_speed
Definition vdr.h:42
func_osd_set_position
@ func_osd_set_position
Definition vdr.h:36
func_still_frame
@ func_still_frame
Definition vdr.h:52
func_osd_hide
@ func_osd_hide
Definition vdr.h:35
func_set_volume
@ func_set_volume
Definition vdr.h:41
func_query_capabilities
@ func_query_capabilities
Definition vdr.h:64
func_grab_image
@ func_grab_image
Definition vdr.h:48
func_osd_flush
@ func_osd_flush
Definition vdr.h:55
func_video_size
@ func_video_size
Definition vdr.h:53
func_set_video_window
@ func_set_video_window
Definition vdr.h:54
func_wait
@ func_wait
Definition vdr.h:46
func_play_external
@ func_play_external
Definition vdr.h:56
func_set_color
@ func_set_color
Definition vdr.h:38
func_osd_free
@ func_osd_free
Definition vdr.h:33
func_get_version
@ func_get_version
Definition vdr.h:62
func_first_frame
@ func_first_frame
Definition vdr.h:51
func_osd_show
@ func_osd_show
Definition vdr.h:34
func_metronom
@ func_metronom
Definition vdr.h:44
func_frame_size
@ func_frame_size
Definition vdr.h:58
func_start
@ func_start
Definition vdr.h:45
func_setup
@ func_setup
Definition vdr.h:47
func_discontinuity
@ func_discontinuity
Definition vdr.h:63
func_osd_draw_bitmap
@ func_osd_draw_bitmap
Definition vdr.h:37
func_trick_speed_mode
@ func_trick_speed_mode
Definition vdr.h:61
func_set_prebuffer
@ func_set_prebuffer
Definition vdr.h:43
func_get_pts
@ func_get_pts
Definition vdr.h:49
func_mute
@ func_mute
Definition vdr.h:40
func_flush
@ func_flush
Definition vdr.h:50
data_get_pts_t
data_get_pts_t
Definition vdr.h:447
data_setup_t
data_setup_t
Definition vdr.h:381
data_set_color_t
data_set_color_t
Definition vdr.h:248
event_play_external_t
event_play_external_t
Definition vdr.h:543
data_osd_new_t
data_osd_new_t
Definition vdr.h:163
__attribute__
struct __attribute__((packed)) data_header_s
Definition vdr.h:129
result_union_t
result_union_t
Definition vdr.h:649
data_get_version_t
data_get_version_t
Definition vdr.h:466
data_osd_set_position_t
data_osd_set_position_t
Definition vdr.h:221
result_grab_image_t
result_grab_image_t
Definition vdr.h:438
data_metronom_t
data_metronom_t
Definition vdr.h:332
data_set_volume_t
data_set_volume_t
Definition vdr.h:301
data_union_t
data_union_t
Definition vdr.h:634
data_set_speed_t
data_set_speed_t
Definition vdr.h:311
data_flush_t
data_flush_t
Definition vdr.h:259
data_select_audio_t
data_select_audio_t
Definition vdr.h:553
data_osd_draw_bitmap_t
data_osd_draw_bitmap_t
Definition vdr.h:236
data_still_frame_t
data_still_frame_t
Definition vdr.h:397
data_set_video_window_t
data_set_video_window_t
Definition vdr.h:412
data_reset_audio_t
data_reset_audio_t
Definition vdr.h:508
result_flush_t
result_flush_t
Definition vdr.h:269
data_osd_hide_t
data_osd_hide_t
Definition vdr.h:193
data_mute_t
data_mute_t
Definition vdr.h:291
data_osd_free_t
data_osd_free_t
Definition vdr.h:173
data_clear_t
data_clear_t
Definition vdr.h:281
data_play_external_t
data_play_external_t
Definition vdr.h:209
data_wait_t
data_wait_t
Definition vdr.h:349
event_frame_size_t
event_frame_size_t
Definition vdr.h:533
data_header_t
data_header_t
Definition vdr.h:134
data_trick_speed_mode_t
data_trick_speed_mode_t
Definition vdr.h:563
result_header_t
data_header_t result_header_t
Definition vdr.h:138
event_discontinuity_t
event_discontinuity_t
Definition vdr.h:573
result_wait_t
result_wait_t
Definition vdr.h:357
event_key_t
event_key_t
Definition vdr.h:518
event_header_t
data_header_t event_header_t
Definition vdr.h:139
result_get_pts_t
result_get_pts_t
Definition vdr.h:458
data_set_prebuffer_t
data_set_prebuffer_t
Definition vdr.h:321
data_query_capabilities_t
data_query_capabilities_t
Definition vdr.h:581
data_nop_t
data_nop_t
Definition vdr.h:147
data_video_size_t
data_video_size_t
Definition vdr.h:484
result_get_version_t
result_get_version_t
Definition vdr.h:476
result_query_capabilities_t
result_query_capabilities_t
Definition vdr.h:595
type
_xine_arg_type_t type
Definition xine.c:1574
get_pts
static int64_t get_pts(demux_ogg_t *this, int stream_num, int64_t granulepos)
Definition xine_ogg_demuxer.c:213
key
char key[16]
Definition xine_speex_decoder.c:94