Mercurial > mplayer.hg
annotate gui/interface.h @ 33646:f3300b0c38a9
Rename guiInterface_t member AudioType AudioChannels.
Additionally, simplify code in mplayer.c.
author | ib |
---|---|
date | Mon, 27 Jun 2011 10:02:04 +0000 |
parents | 79743a5cf4f0 |
children | ede9413501da |
rev | line source |
---|---|
26458 | 1 /* |
2 * This file is part of MPlayer. | |
3 * | |
4 * MPlayer is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; either version 2 of the License, or | |
7 * (at your option) any later version. | |
8 * | |
9 * MPlayer is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License along | |
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
17 */ | |
18 | |
26029 | 19 #ifndef MPLAYER_GUI_INTERFACE_H |
20 #define MPLAYER_GUI_INTERFACE_H | |
23077 | 21 |
26382
b2f4abcf20ed
Make include paths consistent; do not use ../ in them.
diego
parents:
26029
diff
changeset
|
22 #include "config.h" |
30533
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
23 #include "m_config.h" |
33309 | 24 #include "mp_core.h" |
30533
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
25 #include "playtree.h" |
29149 | 26 #include "stream/stream.h" |
23077 | 27 |
33021 | 28 // These are in support of the non-GUI files that interact with |
29 // the GUI and that only need to include interface.h for this. | |
30 // ------------------------------------------------------------ | |
32984 | 31 #include "cfg.h" |
33556 | 32 #include "ui/actions.h" |
23077 | 33 |
33021 | 34 extern int use_gui; // this is defined in mplayer.c |
35 // ------------------------------------------------------------ | |
36 | |
33466 | 37 #define GMPlayer "gmplayer" |
38 | |
32984 | 39 #define guiXEvent 0 |
33611 | 40 #define guiSetState 1 |
32984 | 41 #define guiIEvent 2 |
42 #define guiSetDVD 3 | |
43 #define guiSetFileName 4 | |
44 #define guiSetAudioOnly 6 | |
45 #define guiReDrawSubWindow 7 | |
46 #define guiSetShVideo 8 | |
47 #define guiSetStream 9 | |
48 #define guiReDraw 10 | |
49 #define guiSetVolume 11 | |
50 #define guiSetDefaults 12 | |
51 #define guiSetValues 13 | |
52 #define guiSetFileFormat 14 | |
53 #define guiSetDemuxer 15 | |
54 #define guiSetParameters 16 | |
55 #define guiSetAfilter 17 | |
56 #define guiSetContext 18 | |
23077 | 57 |
33614 | 58 #define GUI_STOP 0 |
59 #define GUI_PLAY 1 | |
60 #define GUI_PAUSE 2 | |
23077 | 61 |
32984 | 62 #define guiDVD 1 |
63 #define guiVCD 2 | |
64 #define guiFilenames 4 | |
65 #define guiALL 0xffffffff | |
23077 | 66 |
32984 | 67 #define gtkSetContrast 0 |
68 #define gtkSetBrightness 1 | |
69 #define gtkSetHue 2 | |
70 #define gtkSetSaturation 3 | |
71 #define gtkSetEqualizer 4 | |
72 #define gtkAddPlItem 5 | |
73 #define gtkGetNextPlItem 6 | |
74 #define gtkGetPrevPlItem 7 | |
75 #define gtkGetCurrPlItem 8 | |
76 #define gtkDelPl 9 | |
23077 | 77 #define gtkSetExtraStereo 10 |
78 #define gtkSetPanscan 11 | |
79 #define gtkSetFontFactor 12 | |
80 #define gtkSetAutoq 13 | |
81 #define gtkClearStruct 14 | |
82 #define gtkAddURLItem 15 | |
83 #define gtkSetFontOutLine 16 | |
84 #define gtkSetFontBlur 17 | |
85 #define gtkSetFontTextScale 18 | |
86 #define gtkSetFontOSDScale 19 | |
87 #define gtkSetFontEncoding 20 | |
88 #define gtkSetFontAutoScale 21 | |
89 #define gtkSetSubEncoding 22 | |
90 #define gtkDelCurrPlItem 23 | |
91 #define gtkInsertPlItem 24 | |
92 #define gtkSetCurrPlItem 25 | |
93 | |
32984 | 94 #define fsPersistant_MaxPos 5 |
95 | |
96 #define guiSetFilename(s, n) \ | |
97 { \ | |
33282
3ce656827dd7
Use free() instead of gfree() in guiSetFilename and guiSetDF macros.
ib
parents:
33263
diff
changeset
|
98 free(s); \ |
32984 | 99 s = gstrdup(n); \ |
100 } | |
101 | |
102 #define guiSetDF(s, d, n) \ | |
103 { \ | |
33282
3ce656827dd7
Use free() instead of gfree() in guiSetFilename and guiSetDF macros.
ib
parents:
33263
diff
changeset
|
104 free(s); \ |
32984 | 105 s = malloc(strlen(d) + strlen(n) + 5); \ |
106 sprintf(s, "%s/%s", d, n); \ | |
107 } | |
108 | |
109 typedef struct { | |
110 int x; | |
111 int y; | |
112 int width; | |
113 int height; | |
114 } guiResizeStruct; | |
115 | |
116 typedef struct { | |
117 int signal; | |
118 char module[512]; | |
119 } guiUnknownErrorStruct; | |
120 | |
121 typedef struct { | |
122 int seek; | |
123 int format; | |
124 int width; | |
125 int height; | |
126 char codecdll[128]; | |
127 } guiVideoStruct; | |
128 | |
129 #ifdef CONFIG_DVDREAD | |
130 typedef struct { | |
131 int titles; | |
132 int chapters; | |
133 int angles; | |
134 int current_chapter; | |
135 int current_title; | |
136 int current_angle; | |
137 int nr_of_audio_channels; | |
138 stream_language_t audio_streams[32]; | |
139 int nr_of_subtitles; | |
140 stream_language_t subtitles[32]; | |
141 } guiDVDStruct; | |
142 #endif | |
143 | |
144 typedef struct { | |
145 int message; | |
146 guiResizeStruct resize; | |
147 guiVideoStruct videodata; | |
148 guiUnknownErrorStruct error; | |
149 | |
150 struct MPContext *mpcontext; | |
151 void *sh_video; | |
152 void *afilter; | |
153 void *demuxer; | |
154 void *event_struct; | |
155 | |
156 int DiskChanged; | |
157 int NewPlay; | |
158 | |
159 #ifdef CONFIG_DVDREAD | |
160 guiDVDStruct DVD; | |
161 int Title; | |
162 int Angle; | |
163 int Chapter; | |
164 #endif | |
165 | |
166 #ifdef CONFIG_VCD | |
167 int VCDTracks; | |
168 #endif | |
169 | |
170 int Playing; | |
171 float Position; | |
172 | |
173 int MovieWidth; | |
174 int MovieHeight; | |
175 int NoWindow; | |
176 | |
177 float Volume; | |
178 float Balance; | |
179 | |
180 int Track; | |
33646 | 181 int AudioChannels; |
32984 | 182 int StreamType; |
183 int AudioOnly; | |
184 int TimeSec; | |
185 int LengthInSec; | |
186 int FrameDrop; | |
187 int FileFormat; | |
188 float FPS; | |
189 | |
190 char *Filename; | |
191 int FilenameChanged; | |
192 | |
193 char *Subtitlename; | |
194 int SubtitleChanged; | |
195 | |
196 char *Othername; | |
197 int OtherChanged; | |
198 | |
199 char *AudioFile; | |
200 int AudioFileChanged; | |
201 | |
202 int SkinChange; | |
203 } guiInterface_t; | |
204 | |
205 typedef struct plItem { | |
206 struct plItem *prev, *next; | |
207 char *path; | |
208 char *name; | |
209 } plItem; | |
210 | |
211 typedef struct urlItem { | |
212 struct urlItem *next; | |
213 char *url; | |
33555 | 214 } urlItem; |
32984 | 215 |
33555 | 216 extern guiInterface_t guiInfo; |
32984 | 217 |
218 extern int guiWinID; | |
219 | |
220 extern char *skinName; | |
221 extern char *skinDirInHome; | |
222 extern char *skinMPlayerDir; | |
223 | |
224 extern plItem *plList; | |
225 extern plItem *plCurrent; | |
226 extern plItem *plLastPlayed; | |
227 | |
33555 | 228 extern urlItem *URLList; |
32984 | 229 |
230 extern char *fsHistory[fsPersistant_MaxPos]; | |
231 | |
23077 | 232 extern float gtkEquChannels[6][10]; |
233 | |
32984 | 234 void gaddlist(char ***list, const char *entry); |
235 void gfree(void **p); | |
33023 | 236 void gmp_msg(int mod, int lev, const char *format, ...); |
32984 | 237 char *gstrchr(char *str, int c); |
238 int gstrcmp(const char *a, const char *b); | |
239 char *gstrdup(const char *str); | |
240 void *gtkSet(int cmd, float fparam, void *vparam); | |
241 void guiDone(void); | |
242 void guiEventHandling(void); | |
33309 | 243 void guiExit(enum exit_reason how); |
32984 | 244 int guiGetEvent(int type, void *arg); |
245 void guiInit(void); | |
246 void guiLoadFont(void); | |
247 void guiLoadSubtitle(char *name); | |
248 int import_initial_playtree_into_gui(play_tree_t *my_playtree, m_config_t *config, int enqueue); | |
249 int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config); | |
23077 | 250 |
26029 | 251 #endif /* MPLAYER_GUI_INTERFACE_H */ |