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