Mercurial > mplayer.hg
annotate libmpdemux/tv.h @ 3343:58ab1490a0be
dunnowhat Q/A de biztos jo
author | gabucino |
---|---|
date | Wed, 05 Dec 2001 23:07:05 +0000 |
parents | bd7bff4cb453 |
children | 622a9ade4517 |
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; |
2790 | 23 |
24 typedef struct tvi_info_s | |
25 { | |
26 const char *name; | |
27 const char *short_name; | |
28 const char *author; | |
29 const char *comment; | |
30 } tvi_info_t; | |
31 | |
32 typedef struct tvi_functions_s | |
33 { | |
34 int (*init)(); | |
2802 | 35 int (*uninit)(); |
2790 | 36 int (*control)(); |
2802 | 37 int (*start)(); |
2790 | 38 int (*grab_video_frame)(); |
39 int (*get_video_framesize)(); | |
40 int (*grab_audio_frame)(); | |
41 int (*get_audio_framesize)(); | |
42 } tvi_functions_t; | |
43 | |
2802 | 44 typedef struct tvi_param_s { |
45 const char *opt; | |
46 void *value; | |
47 } tvi_param_t; | |
48 | |
2790 | 49 typedef struct tvi_handle_s { |
2802 | 50 tvi_info_t *info; |
51 tvi_functions_t *functions; | |
52 void *priv; | |
53 tvi_param_t *params; | |
54 int seq; | |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
55 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
56 /* specific */ |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
57 int norm; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
58 int chanlist; |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
59 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
|
60 int channel; |
2790 | 61 } tvi_handle_t; |
62 | |
2802 | 63 |
2790 | 64 #define TVI_CONTROL_FALSE 0 |
65 #define TVI_CONTROL_TRUE 1 | |
66 #define TVI_CONTROL_NA -1 | |
67 #define TVI_CONTROL_UNKNOWN -2 | |
68 | |
2802 | 69 /* ======================== CONTROLS =========================== */ |
2790 | 70 |
2802 | 71 /* GENERIC controls */ |
72 #define TVI_CONTROL_IS_AUDIO 0x1 | |
73 #define TVI_CONTROL_IS_VIDEO 0x2 | |
74 #define TVI_CONTROL_IS_TUNER 0x3 | |
75 | |
76 /* VIDEO controls */ | |
77 #define TVI_CONTROL_VID_GET_FPS 0x101 | |
78 #define TVI_CONTROL_VID_GET_PLANES 0x102 | |
79 #define TVI_CONTROL_VID_GET_BITS 0x103 | |
80 #define TVI_CONTROL_VID_CHK_BITS 0x104 | |
81 #define TVI_CONTROL_VID_SET_BITS 0x105 | |
82 #define TVI_CONTROL_VID_GET_FORMAT 0x106 | |
83 #define TVI_CONTROL_VID_CHK_FORMAT 0x107 | |
84 #define TVI_CONTROL_VID_SET_FORMAT 0x108 | |
85 #define TVI_CONTROL_VID_GET_WIDTH 0x109 | |
86 #define TVI_CONTROL_VID_CHK_WIDTH 0x110 | |
87 #define TVI_CONTROL_VID_SET_WIDTH 0x111 | |
88 #define TVI_CONTROL_VID_GET_HEIGHT 0x112 | |
89 #define TVI_CONTROL_VID_CHK_HEIGHT 0x113 | |
90 #define TVI_CONTROL_VID_SET_HEIGHT 0x114 | |
2937 | 91 #define TVI_CONTROL_VID_GET_BRIGHTNESS 0x115 |
92 #define TVI_CONTROL_VID_SET_BRIGHTNESS 0x116 | |
93 #define TVI_CONTROL_VID_GET_HUE 0x117 | |
94 #define TVI_CONTROL_VID_SET_HUE 0x118 | |
95 #define TVI_CONTROL_VID_GET_SATURATION 0x119 | |
96 #define TVI_CONTROL_VID_SET_SATURATION 0x11a | |
97 #define TVI_CONTROL_VID_GET_CONTRAST 0x11b | |
98 #define TVI_CONTROL_VID_SET_CONTRAST 0x11c | |
99 #define TVI_CONTROL_VID_GET_PICTURE 0x11d | |
100 #define TVI_CONTROL_VID_SET_PICTURE 0x11e | |
2790 | 101 |
2802 | 102 /* TUNER controls */ |
103 #define TVI_CONTROL_TUN_GET_FREQ 0x201 | |
104 #define TVI_CONTROL_TUN_SET_FREQ 0x202 | |
105 #define TVI_CONTROL_TUN_GET_TUNER 0x203 /* update priv->tuner struct for used input */ | |
106 #define TVI_CONTROL_TUN_SET_TUNER 0x204 /* update priv->tuner struct for used input */ | |
107 #define TVI_CONTROL_TUN_GET_NORM 0x205 | |
108 #define TVI_CONTROL_TUN_SET_NORM 0x206 | |
109 | |
110 /* AUDIO controls */ | |
111 #define TVI_CONTROL_AUD_GET_FORMAT 0x301 | |
112 #define TVI_CONTROL_AUD_GET_SAMPLERATE 0x302 | |
113 #define TVI_CONTROL_AUD_GET_SAMPLESIZE 0x303 | |
114 #define TVI_CONTROL_AUD_GET_CHANNELS 0x304 | |
115 | |
116 /* SPECIFIC controls */ | |
117 #define TVI_CONTROL_SPC_GET_INPUT 0x401 /* set input channel (tv,s-video,composite..) */ | |
118 #define TVI_CONTROL_SPC_SET_INPUT 0x402 /* set input channel (tv,s-video,composite..) */ | |
119 | |
120 extern tvi_handle_t *tv_begin(void); | |
121 extern int tv_init(tvi_handle_t *tvh); | |
2931 | 122 extern int tv_uninit(tvi_handle_t *tvh); |
2790 | 123 |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
124 int tv_set_color_options(tvi_handle_t *tvh, int opt, int val); |
2937 | 125 #define TV_COLOR_BRIGHTNESS 1 |
126 #define TV_COLOR_HUE 2 | |
127 #define TV_COLOR_SATURATION 3 | |
128 #define TV_COLOR_CONTRAST 4 | |
129 | |
2941
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
130 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
|
131 #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
|
132 #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
|
133 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
134 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
|
135 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
|
136 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
137 #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
|
138 #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
|
139 #define TV_NORM_SECAM 3 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
140 |
2790 | 141 #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
|
142 |
60c1b7c0ea21
added support for norm=,chanlist=,channel= and also on-the-fly channel chaning with keys
alex
parents:
2937
diff
changeset
|
143 #endif /* TV_H */ |