Mercurial > mplayer.hg
annotate libmpdemux/tv.h @ 9160:2a67f587c792
Here is updated manual (24.01.2003).
- by imoteph
author | gabucino |
---|---|
date | Wed, 29 Jan 2003 17:23:23 +0000 |
parents | 14ab71b47a58 |
children | ce4cd85498f3 |
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; |
16 extern char *tv_param_device; | |
17 extern char *tv_param_driver; | |
18 extern int tv_param_width; | |
19 extern int tv_param_height; | |
2802 | 20 extern int tv_param_input; |
2817 | 21 extern char *tv_param_outfmt; |
3285 | 22 extern float tv_param_fps; |
8627
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
23 extern char **tv_param_channels; |
5098 | 24 extern int tv_param_noaudio; |
5572
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
25 extern int tv_param_immediate; |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
26 extern int tv_param_audiorate; |
7058
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
5572
diff
changeset
|
27 #ifdef HAVE_TV_V4L |
7163
a193df8b275b
v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents:
7058
diff
changeset
|
28 extern int tv_param_amode; |
7058
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
5572
diff
changeset
|
29 extern int tv_param_audio_id; |
7163
a193df8b275b
v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents:
7058
diff
changeset
|
30 extern int tv_param_volume; |
a193df8b275b
v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents:
7058
diff
changeset
|
31 extern int tv_param_bass; |
a193df8b275b
v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents:
7058
diff
changeset
|
32 extern int tv_param_treble; |
a193df8b275b
v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents:
7058
diff
changeset
|
33 extern int tv_param_balance; |
a193df8b275b
v4l audio fixes by Jindrich Makovicka <makovick@KMLinux.fjfi.cvut.cz>
alex
parents:
7058
diff
changeset
|
34 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
|
35 extern int tv_param_force_audio; |
7905
b062996d9794
added an option for specifying the size of capture buffer
henry
parents:
7835
diff
changeset
|
36 extern int tv_param_buffer_size; |
7058
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
5572
diff
changeset
|
37 #ifdef HAVE_ALSA9 |
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
5572
diff
changeset
|
38 extern int tv_param_alsa; |
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
5572
diff
changeset
|
39 #endif |
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
5572
diff
changeset
|
40 extern char* tv_param_adevice; |
2e5c07262861
new v4l capture patch by Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz>:
arpi
parents:
5572
diff
changeset
|
41 #endif |
2790 | 42 |
43 typedef struct tvi_info_s | |
44 { | |
45 const char *name; | |
46 const char *short_name; | |
47 const char *author; | |
48 const char *comment; | |
49 } tvi_info_t; | |
50 | |
51 typedef struct tvi_functions_s | |
52 { | |
53 int (*init)(); | |
2802 | 54 int (*uninit)(); |
2790 | 55 int (*control)(); |
2802 | 56 int (*start)(); |
5572
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
57 double (*grab_video_frame)(); |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
58 #ifdef HAVE_TV_BSDBT848 |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
59 double (*grabimmediate_video_frame)(); |
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
60 #endif |
2790 | 61 int (*get_video_framesize)(); |
5572
8cd761968f35
BSD-BT848 TV update patch by Charles Henrich <henrich@sigbus.com>
arpi
parents:
5098
diff
changeset
|
62 double (*grab_audio_frame)(); |
2790 | 63 int (*get_audio_framesize)(); |
64 } tvi_functions_t; | |
65 | |
66 typedef struct tvi_handle_s { | |
2802 | 67 tvi_info_t *info; |
68 tvi_functions_t *functions; | |
69 void *priv; | |
70 int seq; | |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
71 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
72 /* specific */ |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
73 int norm; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
74 int chanlist; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
75 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
|
76 int channel; |
2790 | 77 } tvi_handle_t; |
78 | |
8627
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
79 typedef struct tv_channels_s { |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
80 int index; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
81 char number[5]; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
82 char name[20]; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
83 int freq; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
84 struct tv_channels_s *next; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
85 struct tv_channels_s *prev; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
86 } tv_channels_t; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
87 |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
88 tv_channels_t *tv_channel_list; |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
89 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
|
90 char *tv_channel_last_real; |
2802 | 91 |
2790 | 92 #define TVI_CONTROL_FALSE 0 |
93 #define TVI_CONTROL_TRUE 1 | |
94 #define TVI_CONTROL_NA -1 | |
95 #define TVI_CONTROL_UNKNOWN -2 | |
96 | |
2802 | 97 /* ======================== CONTROLS =========================== */ |
2790 | 98 |
2802 | 99 /* GENERIC controls */ |
100 #define TVI_CONTROL_IS_AUDIO 0x1 | |
101 #define TVI_CONTROL_IS_VIDEO 0x2 | |
102 #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
|
103 #define TVI_CONTROL_IMMEDIATE 0x4 |
2802 | 104 |
105 /* VIDEO controls */ | |
106 #define TVI_CONTROL_VID_GET_FPS 0x101 | |
107 #define TVI_CONTROL_VID_GET_PLANES 0x102 | |
108 #define TVI_CONTROL_VID_GET_BITS 0x103 | |
109 #define TVI_CONTROL_VID_CHK_BITS 0x104 | |
110 #define TVI_CONTROL_VID_SET_BITS 0x105 | |
111 #define TVI_CONTROL_VID_GET_FORMAT 0x106 | |
112 #define TVI_CONTROL_VID_CHK_FORMAT 0x107 | |
113 #define TVI_CONTROL_VID_SET_FORMAT 0x108 | |
114 #define TVI_CONTROL_VID_GET_WIDTH 0x109 | |
115 #define TVI_CONTROL_VID_CHK_WIDTH 0x110 | |
116 #define TVI_CONTROL_VID_SET_WIDTH 0x111 | |
117 #define TVI_CONTROL_VID_GET_HEIGHT 0x112 | |
118 #define TVI_CONTROL_VID_CHK_HEIGHT 0x113 | |
119 #define TVI_CONTROL_VID_SET_HEIGHT 0x114 | |
2937 | 120 #define TVI_CONTROL_VID_GET_BRIGHTNESS 0x115 |
121 #define TVI_CONTROL_VID_SET_BRIGHTNESS 0x116 | |
122 #define TVI_CONTROL_VID_GET_HUE 0x117 | |
123 #define TVI_CONTROL_VID_SET_HUE 0x118 | |
124 #define TVI_CONTROL_VID_GET_SATURATION 0x119 | |
125 #define TVI_CONTROL_VID_SET_SATURATION 0x11a | |
126 #define TVI_CONTROL_VID_GET_CONTRAST 0x11b | |
127 #define TVI_CONTROL_VID_SET_CONTRAST 0x11c | |
128 #define TVI_CONTROL_VID_GET_PICTURE 0x11d | |
129 #define TVI_CONTROL_VID_SET_PICTURE 0x11e | |
2790 | 130 |
2802 | 131 /* TUNER controls */ |
132 #define TVI_CONTROL_TUN_GET_FREQ 0x201 | |
133 #define TVI_CONTROL_TUN_SET_FREQ 0x202 | |
134 #define TVI_CONTROL_TUN_GET_TUNER 0x203 /* update priv->tuner struct for used input */ | |
135 #define TVI_CONTROL_TUN_SET_TUNER 0x204 /* update priv->tuner struct for used input */ | |
136 #define TVI_CONTROL_TUN_GET_NORM 0x205 | |
137 #define TVI_CONTROL_TUN_SET_NORM 0x206 | |
138 | |
139 /* AUDIO controls */ | |
140 #define TVI_CONTROL_AUD_GET_FORMAT 0x301 | |
141 #define TVI_CONTROL_AUD_GET_SAMPLERATE 0x302 | |
142 #define TVI_CONTROL_AUD_GET_SAMPLESIZE 0x303 | |
143 #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
|
144 #define TVI_CONTROL_AUD_SET_SAMPLERATE 0x305 |
2802 | 145 |
146 /* SPECIFIC controls */ | |
147 #define TVI_CONTROL_SPC_GET_INPUT 0x401 /* set input channel (tv,s-video,composite..) */ | |
148 #define TVI_CONTROL_SPC_SET_INPUT 0x402 /* set input channel (tv,s-video,composite..) */ | |
149 | |
150 extern tvi_handle_t *tv_begin(void); | |
151 extern int tv_init(tvi_handle_t *tvh); | |
2931 | 152 extern int tv_uninit(tvi_handle_t *tvh); |
2790 | 153 |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
154 int tv_set_color_options(tvi_handle_t *tvh, int opt, int val); |
2937 | 155 #define TV_COLOR_BRIGHTNESS 1 |
156 #define TV_COLOR_HUE 2 | |
157 #define TV_COLOR_SATURATION 3 | |
158 #define TV_COLOR_CONTRAST 4 | |
159 | |
8627
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
160 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
|
161 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
|
162 #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
|
163 #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
|
164 |
8627
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
165 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
|
166 |
14ab71b47a58
user friendly channel tuning + 10L fix in tvi_v4l (by Stephane Jourdois)
henry
parents:
8494
diff
changeset
|
167 int tv_set_channel_real(tvi_handle_t *tvh, char *channel); |
8494 | 168 int tv_set_channel(tvi_handle_t *tvh, char *channel); |
169 | |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
170 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
|
171 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
|
172 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
173 #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
|
174 #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
|
175 #define TV_NORM_SECAM 3 |
8477 | 176 #define TV_NORM_PALNC 4 |
177 #define TV_NORM_PALM 5 | |
178 #define TV_NORM_PALN 6 | |
179 #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
|
180 |
2790 | 181 #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
|
182 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
183 #endif /* TV_H */ |