Mercurial > mplayer.hg
annotate stream/tv.h @ 26963:8825552ee585
Fix the linking of TOOLS/netstream and TOOLS/vivodump.
author | diego |
---|---|
date | Fri, 06 Jun 2008 13:28:25 +0000 |
parents | 4129c8cfa742 |
children | e598c9756181 |
rev | line source |
---|---|
26029 | 1 #ifndef MPLAYER_TV_H |
2 #define MPLAYER_TV_H | |
2790 | 3 |
17012 | 4 //#include "libao2/afmt.h" |
19431
ac69ba536915
Explicitly include libmpcodecs/img_format.h and libvo/fastmemcpy.h.
diego
parents:
19271
diff
changeset
|
5 //#include "libmpcodecs/img_format.h" |
2830 | 6 //#include "mp_msg.h" |
2802 | 7 |
23882 | 8 typedef struct tv_param_s { |
9 char *freq; | |
10 char *channel; | |
11 char *chanlist; | |
12 char *norm; | |
13 int automute; | |
14 int normid; | |
15 char *device; | |
16 char *driver; | |
17 int width; | |
18 int height; | |
19 int input; | |
20 int outfmt; | |
21 float fps; | |
22 char **channels; | |
23 int noaudio; | |
24 int immediate; | |
25 int audiorate; | |
26 int audio_id; | |
27 int amode; | |
28 int volume; | |
29 int bass; | |
30 int treble; | |
31 int balance; | |
32 int forcechan; | |
33 int force_audio; | |
34 int buffer_size; | |
35 int mjpeg; | |
36 int decimation; | |
37 int quality; | |
38 int alsa; | |
39 char* adevice; | |
40 int brightness; | |
41 int contrast; | |
42 int hue; | |
43 int saturation; | |
24553
d6bba2781d01
Implement setting gain control for video devices (usually webcams)
voroshil
parents:
24344
diff
changeset
|
44 int gain; |
23900 | 45 char *tdevice; ///< teletext device |
46 int tformat; ///< teletext display format | |
47 int tpage; ///< start teletext page | |
24290 | 48 int tlang; ///< primary language code |
24105
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
49 |
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
50 int scan; |
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
51 int scan_threshold; |
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
52 float scan_period; |
24744 | 53 /** |
54 Terminate stream with video renderer instead of Null renderer | |
55 Will help if video freezes but audio does not. | |
56 May not work with -vo directx and -vf crop combination. | |
57 */ | |
58 int hidden_video_renderer; | |
59 /** | |
60 For VIVO cards VP pin have to be rendered too. | |
61 This tweak will cause VidePort pin stream to be terminated with video renderer | |
62 instead of removing it from graph. | |
63 Use if your card have vp pin and video is still choppy. | |
64 May not work with -vo directx and -vf crop combination. | |
65 */ | |
66 int hidden_vp_renderer; | |
67 /** | |
68 Use system clock as sync source instead of default graph clock (usually the clock | |
69 from one of live sources in graph. | |
70 */ | |
71 int system_clock; | |
72 /** | |
73 Some audio cards creates audio chunks with about 0.5 sec size. | |
74 This can cause choppy video when using mplayer with immediatemode=0 | |
75 Use followingtweak to decrease audio chunk sizes. | |
76 It will create audio chunks with time length equal to one video frame time. | |
77 */ | |
78 int normalize_audio_chunks; | |
23882 | 79 } tv_param_t; |
80 | |
81 extern tv_param_t stream_tv_defaults; | |
82 | |
2790 | 83 typedef struct tvi_info_s |
84 { | |
23883 | 85 struct tvi_handle_s * (*tvi_init)(tv_param_t* tv_param); |
2790 | 86 const char *name; |
87 const char *short_name; | |
88 const char *author; | |
89 const char *comment; | |
90 } tvi_info_t; | |
91 | |
92 typedef struct tvi_functions_s | |
93 { | |
94 int (*init)(); | |
2802 | 95 int (*uninit)(); |
2790 | 96 int (*control)(); |
2802 | 97 int (*start)(); |
5572
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
98 double (*grab_video_frame)(); |
2790 | 99 int (*get_video_framesize)(); |
5572
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
100 double (*grab_audio_frame)(); |
2790 | 101 int (*get_audio_framesize)(); |
102 } tvi_functions_t; | |
103 | |
104 typedef struct tvi_handle_s { | |
25684 | 105 const tvi_functions_t *functions; |
2802 | 106 void *priv; |
107 int seq; | |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
108 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
109 /* specific */ |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
110 int norm; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
111 int chanlist; |
18032
de6740c3ab2a
10l: huge amount of constant crap in data segment
rfelker
parents:
17012
diff
changeset
|
112 const struct CHANLIST *chanlist_s; |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
113 int channel; |
23882 | 114 tv_param_t * tv_param; |
24105
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
115 void * scan; |
2790 | 116 } tvi_handle_t; |
117 | |
8627
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
118 typedef struct tv_channels_s { |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
119 int index; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
120 char number[5]; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
121 char name[20]; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
122 int freq; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
123 struct tv_channels_s *next; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
124 struct tv_channels_s *prev; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
125 } tv_channels_t; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
126 |
14607
7a80c6ac5058
several sets of headers declare global variables in them, which causes multiple definition errors with gcc 4.x
iive
parents:
13978
diff
changeset
|
127 extern tv_channels_t *tv_channel_list; |
7a80c6ac5058
several sets of headers declare global variables in them, which causes multiple definition errors with gcc 4.x
iive
parents:
13978
diff
changeset
|
128 extern tv_channels_t *tv_channel_current, *tv_channel_last; |
7a80c6ac5058
several sets of headers declare global variables in them, which causes multiple definition errors with gcc 4.x
iive
parents:
13978
diff
changeset
|
129 extern char *tv_channel_last_real; |
2802 | 130 |
24105
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
131 typedef struct { |
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
132 unsigned int scan_timer; |
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
133 int channel_num; |
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
134 int new_channels; |
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
135 } tv_scan_t; |
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
136 |
2790 | 137 #define TVI_CONTROL_FALSE 0 |
138 #define TVI_CONTROL_TRUE 1 | |
139 #define TVI_CONTROL_NA -1 | |
140 #define TVI_CONTROL_UNKNOWN -2 | |
141 | |
2802 | 142 /* ======================== CONTROLS =========================== */ |
2790 | 143 |
2802 | 144 /* GENERIC controls */ |
145 #define TVI_CONTROL_IS_AUDIO 0x1 | |
146 #define TVI_CONTROL_IS_VIDEO 0x2 | |
147 #define TVI_CONTROL_IS_TUNER 0x3 | |
7058
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
5572
diff
changeset
|
148 #define TVI_CONTROL_IMMEDIATE 0x4 |
2802 | 149 |
150 /* VIDEO controls */ | |
151 #define TVI_CONTROL_VID_GET_FPS 0x101 | |
152 #define TVI_CONTROL_VID_GET_PLANES 0x102 | |
153 #define TVI_CONTROL_VID_GET_BITS 0x103 | |
154 #define TVI_CONTROL_VID_CHK_BITS 0x104 | |
155 #define TVI_CONTROL_VID_SET_BITS 0x105 | |
156 #define TVI_CONTROL_VID_GET_FORMAT 0x106 | |
157 #define TVI_CONTROL_VID_CHK_FORMAT 0x107 | |
158 #define TVI_CONTROL_VID_SET_FORMAT 0x108 | |
159 #define TVI_CONTROL_VID_GET_WIDTH 0x109 | |
160 #define TVI_CONTROL_VID_CHK_WIDTH 0x110 | |
161 #define TVI_CONTROL_VID_SET_WIDTH 0x111 | |
162 #define TVI_CONTROL_VID_GET_HEIGHT 0x112 | |
163 #define TVI_CONTROL_VID_CHK_HEIGHT 0x113 | |
164 #define TVI_CONTROL_VID_SET_HEIGHT 0x114 | |
2937 | 165 #define TVI_CONTROL_VID_GET_BRIGHTNESS 0x115 |
166 #define TVI_CONTROL_VID_SET_BRIGHTNESS 0x116 | |
167 #define TVI_CONTROL_VID_GET_HUE 0x117 | |
168 #define TVI_CONTROL_VID_SET_HUE 0x118 | |
169 #define TVI_CONTROL_VID_GET_SATURATION 0x119 | |
170 #define TVI_CONTROL_VID_SET_SATURATION 0x11a | |
171 #define TVI_CONTROL_VID_GET_CONTRAST 0x11b | |
172 #define TVI_CONTROL_VID_SET_CONTRAST 0x11c | |
173 #define TVI_CONTROL_VID_GET_PICTURE 0x11d | |
174 #define TVI_CONTROL_VID_SET_PICTURE 0x11e | |
24553
d6bba2781d01
Implement setting gain control for video devices (usually webcams)
voroshil
parents:
24344
diff
changeset
|
175 #define TVI_CONTROL_VID_SET_GAIN 0x11f |
d6bba2781d01
Implement setting gain control for video devices (usually webcams)
voroshil
parents:
24344
diff
changeset
|
176 #define TVI_CONTROL_VID_GET_GAIN 0x120 |
2790 | 177 |
2802 | 178 /* TUNER controls */ |
179 #define TVI_CONTROL_TUN_GET_FREQ 0x201 | |
180 #define TVI_CONTROL_TUN_SET_FREQ 0x202 | |
181 #define TVI_CONTROL_TUN_GET_TUNER 0x203 /* update priv->tuner struct for used input */ | |
182 #define TVI_CONTROL_TUN_SET_TUNER 0x204 /* update priv->tuner struct for used input */ | |
183 #define TVI_CONTROL_TUN_GET_NORM 0x205 | |
184 #define TVI_CONTROL_TUN_SET_NORM 0x206 | |
24105
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
185 #define TVI_CONTROL_TUN_GET_SIGNAL 0x207 |
2802 | 186 |
187 /* AUDIO controls */ | |
188 #define TVI_CONTROL_AUD_GET_FORMAT 0x301 | |
189 #define TVI_CONTROL_AUD_GET_SAMPLERATE 0x302 | |
190 #define TVI_CONTROL_AUD_GET_SAMPLESIZE 0x303 | |
191 #define TVI_CONTROL_AUD_GET_CHANNELS 0x304 | |
5572
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
192 #define TVI_CONTROL_AUD_SET_SAMPLERATE 0x305 |
2802 | 193 |
194 /* SPECIFIC controls */ | |
195 #define TVI_CONTROL_SPC_GET_INPUT 0x401 /* set input channel (tv,s-video,composite..) */ | |
196 #define TVI_CONTROL_SPC_SET_INPUT 0x402 /* set input channel (tv,s-video,composite..) */ | |
13978 | 197 #define TVI_CONTROL_SPC_GET_NORMID 0x403 /* get normid from norm name */ |
2802 | 198 |
23900 | 199 //tvi_* ioctl (not tvi_vbi.c !!!) |
200 #define TVI_CONTROL_VBI_INIT 0x501 ///< vbi init | |
201 | |
202 /* | |
203 TELETEXT controls (through tv_teletext_control() ) | |
204 NOTE: | |
205 _SET_ should be _GET_ +1 | |
206 _STEP_ should be _GET_ +2 | |
207 */ | |
208 #define TV_VBI_CONTROL_GET_MODE 0x510 ///< get current mode teletext | |
209 #define TV_VBI_CONTROL_SET_MODE 0x511 ///< on/off grab teletext | |
210 | |
211 #define TV_VBI_CONTROL_GET_PAGE 0x513 ///< get grabbed teletext page | |
212 #define TV_VBI_CONTROL_SET_PAGE 0x514 ///< set grab teletext page number | |
213 #define TV_VBI_CONTROL_STEP_PAGE 0x515 ///< step grab teletext page number | |
214 | |
215 #define TV_VBI_CONTROL_GET_SUBPAGE 0x516 ///< get grabbed teletext page | |
216 #define TV_VBI_CONTROL_SET_SUBPAGE 0x517 ///< set grab teletext page number | |
217 | |
218 #define TV_VBI_CONTROL_GET_FORMAT 0x519 ///< get eletext format | |
219 #define TV_VBI_CONTROL_SET_FORMAT 0x51a ///< set teletext format | |
220 | |
221 #define TV_VBI_CONTROL_GET_HALF_PAGE 0x51c ///< get current half page | |
222 #define TV_VBI_CONTROL_SET_HALF_PAGE 0x51d ///< switch half page | |
223 | |
24342
8873c972c6aa
Decrease teletext page rendering frequency from 1/frame to about 4/sec.
voroshil
parents:
24292
diff
changeset
|
224 #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
|
225 #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
|
226 |
23900 | 227 #define TV_VBI_CONTROL_ADD_DEC 0x550 ///< add page number with dec |
228 #define TV_VBI_CONTROL_GO_LINK 0x551 ///< go link (1..6) NYI | |
229 #define TV_VBI_CONTROL_GET_VBIPAGE 0x552 ///< get vbi_image for grabbed teletext page | |
230 #define TV_VBI_CONTROL_RESET 0x553 ///< vbi reset | |
231 #define TV_VBI_CONTROL_START 0x554 ///< vbi start | |
232 #define TV_VBI_CONTROL_STOP 0x555 ///< vbi stop | |
233 #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
|
234 #define TV_VBI_CONTROL_GET_NETWORKNAME 0x557 ///< get current network name |
23900 | 235 |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
236 int tv_set_color_options(tvi_handle_t *tvh, int opt, int val); |
18172
90b62d7c0fca
Implement tv_get_color_options() and make tv_set_color_options() return
albeu
parents:
18032
diff
changeset
|
237 int tv_get_color_options(tvi_handle_t *tvh, int opt, int* val); |
2937 | 238 #define TV_COLOR_BRIGHTNESS 1 |
239 #define TV_COLOR_HUE 2 | |
240 #define TV_COLOR_SATURATION 3 | |
241 #define TV_COLOR_CONTRAST 4 | |
242 | |
8627
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
243 int tv_step_channel_real(tvi_handle_t *tvh, int direction); |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
244 int tv_step_channel(tvi_handle_t *tvh, int direction); |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
245 #define TV_CHANNEL_LOWER 1 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
246 #define TV_CHANNEL_HIGHER 2 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
247 |
8627
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
248 int tv_last_channel(tvi_handle_t *tvh); |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
249 |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
250 int tv_set_channel_real(tvi_handle_t *tvh, char *channel); |
8494 | 251 int tv_set_channel(tvi_handle_t *tvh, char *channel); |
252 | |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
253 int tv_step_norm(tvi_handle_t *tvh); |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
254 int tv_step_chanlist(tvi_handle_t *tvh); |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
255 |
10521
141141fdd250
I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents:
9663
diff
changeset
|
256 int tv_set_freq(tvi_handle_t *tvh, unsigned long freq); |
141141fdd250
I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents:
9663
diff
changeset
|
257 int tv_get_freq(tvi_handle_t *tvh, unsigned long *freq); |
24105
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
258 int tv_get_signal(tvi_handle_t *tvh); |
22667 | 259 int tv_step_freq(tvi_handle_t *tvh, float step_interval); |
10521
141141fdd250
I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents:
9663
diff
changeset
|
260 |
141141fdd250
I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents:
9663
diff
changeset
|
261 int tv_set_norm(tvi_handle_t *tvh, char* norm); |
141141fdd250
I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents:
9663
diff
changeset
|
262 |
24105
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
263 void tv_start_scan(tvi_handle_t *tvh, int start); |
9e71e0345c35
Automatic TV channels scanning ability for MPlayer.
voroshil
parents:
24034
diff
changeset
|
264 |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
265 #define TV_NORM_PAL 1 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
266 #define TV_NORM_NTSC 2 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
267 #define TV_NORM_SECAM 3 |
8477 | 268 #define TV_NORM_PALNC 4 |
269 #define TV_NORM_PALM 5 | |
270 #define TV_NORM_PALN 6 | |
271 #define TV_NORM_NTSCJP 7 | |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
272 |
23900 | 273 #define VBI_TFORMAT_TEXT 0 ///< text mode |
274 #define VBI_TFORMAT_BW 1 ///< back&white mode | |
275 #define VBI_TFORMAT_GRAY 2 ///< grayscale mode | |
276 #define VBI_TFORMAT_COLOR 3 ///< color mode (require color_spu patch!) | |
277 | |
278 #define VBI_MAX_PAGES 0x800 ///< max sub pages number | |
279 #define VBI_MAX_SUBPAGES 64 ///< max sub pages number | |
280 | |
24183
820df52200db
Enable decoding of packet X/24, it is usual teletext line
voroshil
parents:
24105
diff
changeset
|
281 #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
|
282 #define VBI_COLUMNS 40 ///< teletext page width in chars |
23900 | 283 #define VBI_TIME_LINEPOS 26 ///< time line pos in page header |
284 | |
285 typedef | |
286 enum{ | |
287 TT_FORMAT_OPAQUE=0, ///< opaque | |
288 TT_FORMAT_TRANSPARENT, ///< translarent | |
289 TT_FORMAT_OPAQUE_INV, ///< opaque with inverted colors | |
290 TT_FORMAT_TRANSPARENT_INV ///< translarent with inverted colors | |
291 } teletext_format; | |
292 | |
293 typedef | |
294 enum{ | |
295 TT_ZOOM_NORMAL=0, | |
296 TT_ZOOM_TOP_HALF, | |
297 TT_ZOOM_BOTTOM_HALF | |
298 } teletext_zoom; | |
299 | |
300 typedef struct tt_char_s{ | |
301 unsigned int unicode; ///< unicode (utf8) character | |
302 unsigned char fg; ///< foreground color | |
303 unsigned char bg; ///< background color | |
304 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
|
305 unsigned char flh; ///< 0-no flash, 1-flash |
24344 | 306 unsigned char hidden; ///< char is hidden (for subtitle pages) |
23900 | 307 unsigned char ctl; ///< control character |
24290 | 308 unsigned char lng; ///< lang: 0-secondary language,1-primary language |
23900 | 309 unsigned char raw; ///< raw character (as received from device) |
310 } tt_char; | |
311 | |
24244 | 312 typedef struct tt_link_s{ |
313 int pagenum; ///< page number | |
314 int subpagenum; ///< subpage number | |
315 } tt_link_t; | |
316 | |
23900 | 317 typedef struct tt_page_s{ |
318 int pagenum; ///< page number | |
319 int subpagenum; ///< subpage number | |
24290 | 320 unsigned char primary_lang; ///< primary language code |
321 unsigned char secondary_lang; ///< secondary language code | |
23900 | 322 unsigned char active; ///< page is complete and ready for rendering |
24344 | 323 unsigned char flags; ///< page flags |
23900 | 324 unsigned char raw[VBI_ROWS*VBI_COLUMNS]; ///< page data |
325 struct tt_page_s* next_subpage; | |
24244 | 326 struct tt_link_s links[6]; |
23900 | 327 } tt_page; |
328 | |
24344 | 329 #define TT_PGFL_SUPPRESS_HEADER 0x01 |
330 #define TT_PGFL_UPDATE_INDICATOR 0x02 | |
331 #define TT_PGFL_INTERRUPTED_SEQ 0x04 | |
332 #define TT_PGFL_INHIBIT_DISPLAY 0x08 | |
333 #define TT_PGFL_NEWFLASH 0x10 | |
334 #define TT_PGFL_SUBTITLE 0x20 | |
335 #define TT_PGFL_ERASE_PAGE 0x40 | |
336 #define TT_PGFL_MAGAZINE_SERIAL 0x80 | |
337 | |
23900 | 338 typedef struct tt_stream_props_s{ |
339 int sampling_rate; | |
340 int samples_per_line; | |
341 int offset; | |
342 int count[2]; ///< number of lines in first and second fields | |
343 int interlaced; ///< vbi data are interlaced | |
344 int bufsize; ///< required buffer size | |
345 } tt_stream_props; | |
346 | |
26029 | 347 #endif /* MPLAYER_TV_H */ |