Mercurial > mplayer.hg
annotate libmpcodecs/dec_teletext.h @ 36868:6104326789e6
Remove unnecessary #includes.
The header file contains nothing but #defines.
This reverts r36953 and parts of r36954.
author | ib |
---|---|
date | Sun, 02 Mar 2014 18:44:33 +0000 |
parents | 99ac85950277 |
children |
rev | line source |
---|---|
29426
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
1 /* |
29759
d287e2785570
Move teletext specific code from stream into libmpcodecs.
cehoyos
parents:
29479
diff
changeset
|
2 * Teletext support |
29426
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
3 * |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
4 * Copyright (C) 2007 Vladimir Voroshilov <voroshil@gmail.com> |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
5 * |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
6 * This file is part of MPlayer. |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
7 * |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
8 * MPlayer is free software; you can redistribute it and/or modify |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
9 * it under the terms of the GNU General Public License as published by |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
10 * the Free Software Foundation; either version 2 of the License, or |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
11 * (at your option) any later version. |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
12 * |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
13 * MPlayer is distributed in the hope that it will be useful, |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
16 * GNU General Public License for more details. |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
17 * |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
18 * You should have received a copy of the GNU General Public License along |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
19 * with MPlayer; if not, write to the Free Software Foundation, Inc., |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
20 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
21 */ |
1cedde378788
Add standard GPL license header. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29425
diff
changeset
|
22 |
29759
d287e2785570
Move teletext specific code from stream into libmpcodecs.
cehoyos
parents:
29479
diff
changeset
|
23 #ifndef MPLAYER_DEC_TELETEXT_H |
d287e2785570
Move teletext specific code from stream into libmpcodecs.
cehoyos
parents:
29479
diff
changeset
|
24 #define MPLAYER_DEC_TELETEXT_H |
2790 | 25 |
29806 | 26 struct tt_param { |
27 char *device; ///< teletext device | |
28 int format; ///< teletext display format | |
29 int page; ///< start teletext page | |
30 int lang; ///< primary language code | |
31 }; | |
32 | |
29760
1cc8a20520e8
Add MSGT_TELETEXT, rename TVI_CONTROL as VBI_CONTROL and fix some paths
cehoyos
parents:
29759
diff
changeset
|
33 #define VBI_CONTROL_FALSE 0 |
1cc8a20520e8
Add MSGT_TELETEXT, rename TVI_CONTROL as VBI_CONTROL and fix some paths
cehoyos
parents:
29759
diff
changeset
|
34 #define VBI_CONTROL_TRUE 1 |
1cc8a20520e8
Add MSGT_TELETEXT, rename TVI_CONTROL as VBI_CONTROL and fix some paths
cehoyos
parents:
29759
diff
changeset
|
35 #define VBI_CONTROL_UNKNOWN -1 |
1cc8a20520e8
Add MSGT_TELETEXT, rename TVI_CONTROL as VBI_CONTROL and fix some paths
cehoyos
parents:
29759
diff
changeset
|
36 |
29759
d287e2785570
Move teletext specific code from stream into libmpcodecs.
cehoyos
parents:
29479
diff
changeset
|
37 int teletext_control(void* p, int cmd, void *arg); |
23900 | 38 |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28940
diff
changeset
|
39 /* |
29425
281ab18d64ca
Fix more typos. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29424
diff
changeset
|
40 TELETEXT controls (through teletext_control() ) |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28940
diff
changeset
|
41 NOTE: |
23900 | 42 _SET_ should be _GET_ +1 |
43 _STEP_ should be _GET_ +2 | |
44 */ | |
45 #define TV_VBI_CONTROL_GET_MODE 0x510 ///< get current mode teletext | |
46 #define TV_VBI_CONTROL_SET_MODE 0x511 ///< on/off grab teletext | |
47 | |
48 #define TV_VBI_CONTROL_GET_PAGE 0x513 ///< get grabbed teletext page | |
49 #define TV_VBI_CONTROL_SET_PAGE 0x514 ///< set grab teletext page number | |
50 #define TV_VBI_CONTROL_STEP_PAGE 0x515 ///< step grab teletext page number | |
51 | |
52 #define TV_VBI_CONTROL_GET_SUBPAGE 0x516 ///< get grabbed teletext page | |
53 #define TV_VBI_CONTROL_SET_SUBPAGE 0x517 ///< set grab teletext page number | |
54 | |
29425
281ab18d64ca
Fix more typos. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29424
diff
changeset
|
55 #define TV_VBI_CONTROL_GET_FORMAT 0x519 ///< get teletext format |
23900 | 56 #define TV_VBI_CONTROL_SET_FORMAT 0x51a ///< set teletext format |
57 | |
58 #define TV_VBI_CONTROL_GET_HALF_PAGE 0x51c ///< get current half page | |
59 #define TV_VBI_CONTROL_SET_HALF_PAGE 0x51d ///< switch half page | |
60 | |
24342
8873c972c6aa
Decrease teletext page rendering frequency from 1/frame to about 4/sec.
voroshil
parents:
24292
diff
changeset
|
61 #define TV_VBI_CONTROL_IS_CHANGED 0x540 ///< teletext page is changed |
8873c972c6aa
Decrease teletext page rendering frequency from 1/frame to about 4/sec.
voroshil
parents:
24292
diff
changeset
|
62 #define TV_VBI_CONTROL_MARK_UNCHANGED 0x541 ///< teletext page is changed |
8873c972c6aa
Decrease teletext page rendering frequency from 1/frame to about 4/sec.
voroshil
parents:
24292
diff
changeset
|
63 |
23900 | 64 #define TV_VBI_CONTROL_ADD_DEC 0x550 ///< add page number with dec |
65 #define TV_VBI_CONTROL_GO_LINK 0x551 ///< go link (1..6) NYI | |
66 #define TV_VBI_CONTROL_GET_VBIPAGE 0x552 ///< get vbi_image for grabbed teletext page | |
67 #define TV_VBI_CONTROL_RESET 0x553 ///< vbi reset | |
68 #define TV_VBI_CONTROL_START 0x554 ///< vbi start | |
69 #define TV_VBI_CONTROL_STOP 0x555 ///< vbi stop | |
70 #define TV_VBI_CONTROL_DECODE_PAGE 0x556 ///< decode vbi page | |
24232
d0290b80e612
Implement 8/30 format 1 teletext packet decoding
voroshil
parents:
24183
diff
changeset
|
71 #define TV_VBI_CONTROL_GET_NETWORKNAME 0x557 ///< get current network name |
29833 | 72 #define TV_VBI_CONTROL_DECODE_DVB 0x558 ///< decode DVB teletext |
35044
99ac85950277
Support decoding teletext in the format that WTV uses.
reimar
parents:
29833
diff
changeset
|
73 #define TV_VBI_CONTROL_DECODE_LINE 0x559 ///< decode a single teletext line (format used by WTV) |
23900 | 74 |
75 #define VBI_TFORMAT_TEXT 0 ///< text mode | |
29425
281ab18d64ca
Fix more typos. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29424
diff
changeset
|
76 #define VBI_TFORMAT_BW 1 ///< black&white mode |
23900 | 77 #define VBI_TFORMAT_GRAY 2 ///< grayscale mode |
78 #define VBI_TFORMAT_COLOR 3 ///< color mode (require color_spu patch!) | |
79 | |
80 #define VBI_MAX_PAGES 0x800 ///< max sub pages number | |
81 #define VBI_MAX_SUBPAGES 64 ///< max sub pages number | |
82 | |
24183
820df52200db
Enable decoding of packet X/24, it is usual teletext line
voroshil
parents:
24105
diff
changeset
|
83 #define VBI_ROWS 25 ///< teletext page height in rows |
820df52200db
Enable decoding of packet X/24, it is usual teletext line
voroshil
parents:
24105
diff
changeset
|
84 #define VBI_COLUMNS 40 ///< teletext page width in chars |
23900 | 85 #define VBI_TIME_LINEPOS 26 ///< time line pos in page header |
86 | |
87 typedef | |
88 enum{ | |
89 TT_FORMAT_OPAQUE=0, ///< opaque | |
29423
a4520dfd3e62
Fix typos. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29263
diff
changeset
|
90 TT_FORMAT_TRANSPARENT, ///< transparent |
23900 | 91 TT_FORMAT_OPAQUE_INV, ///< opaque with inverted colors |
29423
a4520dfd3e62
Fix typos. Patch by Francesco Lavra, francescolavra interfree it
cehoyos
parents:
29263
diff
changeset
|
92 TT_FORMAT_TRANSPARENT_INV ///< transparent with inverted colors |
23900 | 93 } teletext_format; |
94 | |
95 typedef | |
96 enum{ | |
97 TT_ZOOM_NORMAL=0, | |
98 TT_ZOOM_TOP_HALF, | |
99 TT_ZOOM_BOTTOM_HALF | |
100 } teletext_zoom; | |
101 | |
102 typedef struct tt_char_s{ | |
103 unsigned int unicode; ///< unicode (utf8) character | |
104 unsigned char fg; ///< foreground color | |
105 unsigned char bg; ///< background color | |
106 unsigned char gfx; ///< 0-no gfx, 1-solid gfx, 2-separated gfx | |
24292
ca146808e926
Proper support for flashing chars in teletext pages.
voroshil
parents:
24290
diff
changeset
|
107 unsigned char flh; ///< 0-no flash, 1-flash |
24344 | 108 unsigned char hidden; ///< char is hidden (for subtitle pages) |
23900 | 109 unsigned char ctl; ///< control character |
24290 | 110 unsigned char lng; ///< lang: 0-secondary language,1-primary language |
23900 | 111 unsigned char raw; ///< raw character (as received from device) |
112 } tt_char; | |
113 | |
24244 | 114 typedef struct tt_link_s{ |
115 int pagenum; ///< page number | |
116 int subpagenum; ///< subpage number | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28940
diff
changeset
|
117 } tt_link_t; |
24244 | 118 |
23900 | 119 typedef struct tt_page_s{ |
120 int pagenum; ///< page number | |
121 int subpagenum; ///< subpage number | |
24290 | 122 unsigned char primary_lang; ///< primary language code |
123 unsigned char secondary_lang; ///< secondary language code | |
23900 | 124 unsigned char active; ///< page is complete and ready for rendering |
24344 | 125 unsigned char flags; ///< page flags |
23900 | 126 unsigned char raw[VBI_ROWS*VBI_COLUMNS]; ///< page data |
127 struct tt_page_s* next_subpage; | |
24244 | 128 struct tt_link_s links[6]; |
23900 | 129 } tt_page; |
130 | |
24344 | 131 #define TT_PGFL_SUPPRESS_HEADER 0x01 |
132 #define TT_PGFL_UPDATE_INDICATOR 0x02 | |
133 #define TT_PGFL_INTERRUPTED_SEQ 0x04 | |
134 #define TT_PGFL_INHIBIT_DISPLAY 0x08 | |
135 #define TT_PGFL_NEWFLASH 0x10 | |
136 #define TT_PGFL_SUBTITLE 0x20 | |
137 #define TT_PGFL_ERASE_PAGE 0x40 | |
138 #define TT_PGFL_MAGAZINE_SERIAL 0x80 | |
139 | |
23900 | 140 typedef struct tt_stream_props_s{ |
141 int sampling_rate; | |
142 int samples_per_line; | |
143 int offset; | |
144 int count[2]; ///< number of lines in first and second fields | |
145 int interlaced; ///< vbi data are interlaced | |
146 int bufsize; ///< required buffer size | |
147 } tt_stream_props; | |
148 | |
29759
d287e2785570
Move teletext specific code from stream into libmpcodecs.
cehoyos
parents:
29479
diff
changeset
|
149 #endif /* MPLAYER_DEC_TELETEXT_H */ |