Mercurial > mplayer.hg
annotate libmpdemux/tv.h @ 13254:8b74fdeec4ae
sync to latest updates in vo_jpeg.c section
author | kraymer |
---|---|
date | Sun, 05 Sep 2004 21:56:39 +0000 |
parents | 66e491c35dc8 |
children | 2a9afbfc79d7 |
rev | line source |
---|---|
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
1 #ifndef TV_H |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
2 #define TV_H |
2790 | 3 |
2819
2e58962dc9fe
cleaned up some warnings, and tv_param_on moved out from #ifdef USE_TV
alex
parents:
2818
diff
changeset
|
4 extern int tv_param_on; |
2e58962dc9fe
cleaned up some warnings, and tv_param_on moved out from #ifdef USE_TV
alex
parents:
2818
diff
changeset
|
5 |
2790 | 6 #ifdef USE_TV |
2830 | 7 //#include "../libao2/afmt.h" |
8 //#include "../libvo/img_format.h" | |
9 //#include "../libvo/fastmemcpy.h" | |
10 //#include "mp_msg.h" | |
2802 | 11 |
2837 | 12 extern char *tv_param_freq; |
2790 | 13 extern char *tv_param_channel; |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
14 extern char *tv_param_chanlist; |
2790 | 15 extern char *tv_param_norm; |
10537 | 16 #ifdef HAVE_TV_V4L2 |
17 extern int tv_param_normid; | |
18 #endif | |
2790 | 19 extern char *tv_param_device; |
20 extern char *tv_param_driver; | |
21 extern int tv_param_width; | |
22 extern int tv_param_height; | |
2802 | 23 extern int tv_param_input; |
10598
2b88c28a3cfe
Settled to CONF_TYPE_IMGFMT which simplified lot of things. Now there's no need to add new img formats to the source, instead you can try it out by providing it in hexa format, and if it isn't supported by the card, you get a nice error message. That's all.
alex
parents:
10537
diff
changeset
|
24 extern int tv_param_outfmt; |
3285 | 25 extern float tv_param_fps; |
8627
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
26 extern char **tv_param_channels; |
5098 | 27 extern int tv_param_noaudio; |
5572
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
28 extern int tv_param_immediate; |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
29 extern int tv_param_audiorate; |
10822
6377c7d0459e
audio id setting support for bsdbt848 by Nikolay Nikolaev <nicknickolaev@yahoo.com>
alex
parents:
10598
diff
changeset
|
30 extern int tv_param_audio_id; |
10537 | 31 #if defined(HAVE_TV_V4L) || defined(HAVE_TV_V4L2) |
7163
a193df8b275b
v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents:
7058
diff
changeset
|
32 extern int tv_param_amode; |
a193df8b275b
v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents:
7058
diff
changeset
|
33 extern int tv_param_volume; |
a193df8b275b
v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents:
7058
diff
changeset
|
34 extern int tv_param_bass; |
a193df8b275b
v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents:
7058
diff
changeset
|
35 extern int tv_param_treble; |
a193df8b275b
v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents:
7058
diff
changeset
|
36 extern int tv_param_balance; |
a193df8b275b
v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents:
7058
diff
changeset
|
37 extern int tv_param_forcechan; |
7835
d489890c59d3
add an option to force audio recording when a tv card reports no audio sources
henry
parents:
7163
diff
changeset
|
38 extern int tv_param_force_audio; |
7905
b062996d9794
added an option for specifying the size of capture buffer
henry
parents:
7835
diff
changeset
|
39 extern int tv_param_buffer_size; |
9620
ce4cd85498f3
hardware mjpeg encoding using v4l by Iv«”n Sz«”nt«Ń <szivan@freemail.hu>
henry
parents:
8627
diff
changeset
|
40 extern int tv_param_mjpeg; |
ce4cd85498f3
hardware mjpeg encoding using v4l by Iv«”n Sz«”nt«Ń <szivan@freemail.hu>
henry
parents:
8627
diff
changeset
|
41 extern int tv_param_decimation; |
ce4cd85498f3
hardware mjpeg encoding using v4l by Iv«”n Sz«”nt«Ń <szivan@freemail.hu>
henry
parents:
8627
diff
changeset
|
42 extern int tv_param_quality; |
11775 | 43 #if defined(HAVE_ALSA9) || defined(HAVE_ALSA1X) |
7058
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
5572
diff
changeset
|
44 extern int tv_param_alsa; |
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
5572
diff
changeset
|
45 #endif |
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
5572
diff
changeset
|
46 extern char* tv_param_adevice; |
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
5572
diff
changeset
|
47 #endif |
9663 | 48 extern int tv_param_brightness; |
49 extern int tv_param_contrast; | |
50 extern int tv_param_hue; | |
51 extern int tv_param_saturation; | |
2790 | 52 |
53 typedef struct tvi_info_s | |
54 { | |
55 const char *name; | |
56 const char *short_name; | |
57 const char *author; | |
58 const char *comment; | |
59 } tvi_info_t; | |
60 | |
61 typedef struct tvi_functions_s | |
62 { | |
63 int (*init)(); | |
2802 | 64 int (*uninit)(); |
2790 | 65 int (*control)(); |
2802 | 66 int (*start)(); |
5572
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
67 double (*grab_video_frame)(); |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
68 #ifdef HAVE_TV_BSDBT848 |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
69 double (*grabimmediate_video_frame)(); |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
70 #endif |
2790 | 71 int (*get_video_framesize)(); |
5572
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
72 double (*grab_audio_frame)(); |
2790 | 73 int (*get_audio_framesize)(); |
74 } tvi_functions_t; | |
75 | |
76 typedef struct tvi_handle_s { | |
2802 | 77 tvi_info_t *info; |
78 tvi_functions_t *functions; | |
79 void *priv; | |
80 int seq; | |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
81 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
82 /* specific */ |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
83 int norm; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
84 int chanlist; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
85 struct CHANLIST *chanlist_s; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
86 int channel; |
2790 | 87 } tvi_handle_t; |
88 | |
8627
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
89 typedef struct tv_channels_s { |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
90 int index; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
91 char number[5]; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
92 char name[20]; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
93 int freq; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
94 struct tv_channels_s *next; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
95 struct tv_channels_s *prev; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
96 } tv_channels_t; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
97 |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
98 tv_channels_t *tv_channel_list; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
99 tv_channels_t *tv_channel_current, *tv_channel_last; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
100 char *tv_channel_last_real; |
2802 | 101 |
2790 | 102 #define TVI_CONTROL_FALSE 0 |
103 #define TVI_CONTROL_TRUE 1 | |
104 #define TVI_CONTROL_NA -1 | |
105 #define TVI_CONTROL_UNKNOWN -2 | |
106 | |
2802 | 107 /* ======================== CONTROLS =========================== */ |
2790 | 108 |
2802 | 109 /* GENERIC controls */ |
110 #define TVI_CONTROL_IS_AUDIO 0x1 | |
111 #define TVI_CONTROL_IS_VIDEO 0x2 | |
112 #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
|
113 #define TVI_CONTROL_IMMEDIATE 0x4 |
2802 | 114 |
115 /* VIDEO controls */ | |
116 #define TVI_CONTROL_VID_GET_FPS 0x101 | |
117 #define TVI_CONTROL_VID_GET_PLANES 0x102 | |
118 #define TVI_CONTROL_VID_GET_BITS 0x103 | |
119 #define TVI_CONTROL_VID_CHK_BITS 0x104 | |
120 #define TVI_CONTROL_VID_SET_BITS 0x105 | |
121 #define TVI_CONTROL_VID_GET_FORMAT 0x106 | |
122 #define TVI_CONTROL_VID_CHK_FORMAT 0x107 | |
123 #define TVI_CONTROL_VID_SET_FORMAT 0x108 | |
124 #define TVI_CONTROL_VID_GET_WIDTH 0x109 | |
125 #define TVI_CONTROL_VID_CHK_WIDTH 0x110 | |
126 #define TVI_CONTROL_VID_SET_WIDTH 0x111 | |
127 #define TVI_CONTROL_VID_GET_HEIGHT 0x112 | |
128 #define TVI_CONTROL_VID_CHK_HEIGHT 0x113 | |
129 #define TVI_CONTROL_VID_SET_HEIGHT 0x114 | |
2937 | 130 #define TVI_CONTROL_VID_GET_BRIGHTNESS 0x115 |
131 #define TVI_CONTROL_VID_SET_BRIGHTNESS 0x116 | |
132 #define TVI_CONTROL_VID_GET_HUE 0x117 | |
133 #define TVI_CONTROL_VID_SET_HUE 0x118 | |
134 #define TVI_CONTROL_VID_GET_SATURATION 0x119 | |
135 #define TVI_CONTROL_VID_SET_SATURATION 0x11a | |
136 #define TVI_CONTROL_VID_GET_CONTRAST 0x11b | |
137 #define TVI_CONTROL_VID_SET_CONTRAST 0x11c | |
138 #define TVI_CONTROL_VID_GET_PICTURE 0x11d | |
139 #define TVI_CONTROL_VID_SET_PICTURE 0x11e | |
2790 | 140 |
2802 | 141 /* TUNER controls */ |
142 #define TVI_CONTROL_TUN_GET_FREQ 0x201 | |
143 #define TVI_CONTROL_TUN_SET_FREQ 0x202 | |
144 #define TVI_CONTROL_TUN_GET_TUNER 0x203 /* update priv->tuner struct for used input */ | |
145 #define TVI_CONTROL_TUN_SET_TUNER 0x204 /* update priv->tuner struct for used input */ | |
146 #define TVI_CONTROL_TUN_GET_NORM 0x205 | |
147 #define TVI_CONTROL_TUN_SET_NORM 0x206 | |
148 | |
149 /* AUDIO controls */ | |
150 #define TVI_CONTROL_AUD_GET_FORMAT 0x301 | |
151 #define TVI_CONTROL_AUD_GET_SAMPLERATE 0x302 | |
152 #define TVI_CONTROL_AUD_GET_SAMPLESIZE 0x303 | |
153 #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
|
154 #define TVI_CONTROL_AUD_SET_SAMPLERATE 0x305 |
2802 | 155 |
156 /* SPECIFIC controls */ | |
157 #define TVI_CONTROL_SPC_GET_INPUT 0x401 /* set input channel (tv,s-video,composite..) */ | |
158 #define TVI_CONTROL_SPC_SET_INPUT 0x402 /* set input channel (tv,s-video,composite..) */ | |
159 | |
160 extern tvi_handle_t *tv_begin(void); | |
161 extern int tv_init(tvi_handle_t *tvh); | |
2931 | 162 extern int tv_uninit(tvi_handle_t *tvh); |
2790 | 163 |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
164 int tv_set_color_options(tvi_handle_t *tvh, int opt, int val); |
2937 | 165 #define TV_COLOR_BRIGHTNESS 1 |
166 #define TV_COLOR_HUE 2 | |
167 #define TV_COLOR_SATURATION 3 | |
168 #define TV_COLOR_CONTRAST 4 | |
169 | |
8627
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
170 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
|
171 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
|
172 #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
|
173 #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
|
174 |
8627
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
175 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
|
176 |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
177 int tv_set_channel_real(tvi_handle_t *tvh, char *channel); |
8494 | 178 int tv_set_channel(tvi_handle_t *tvh, char *channel); |
179 | |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
180 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
|
181 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
|
182 |
10521
141141fdd250
I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents:
9663
diff
changeset
|
183 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
|
184 int tv_get_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
|
185 |
141141fdd250
I'd like to change tv tuner frequency in the slave mode. So this patch
gabucino
parents:
9663
diff
changeset
|
186 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
|
187 |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
188 #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
|
189 #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
|
190 #define TV_NORM_SECAM 3 |
8477 | 191 #define TV_NORM_PALNC 4 |
192 #define TV_NORM_PALM 5 | |
193 #define TV_NORM_PALN 6 | |
194 #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
|
195 |
2790 | 196 #endif /* USE_TV */ |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
197 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
198 #endif /* TV_H */ |