Mercurial > mplayer.hg
annotate gui/interface.h @ 33485:2f8dc5fbec77
Partially revert r33242: it was broken, instead of continuing to
play at normal speed playback started at maximum possible speed.
author | reimar |
---|---|
date | Wed, 08 Jun 2011 18:25:17 +0000 |
parents | d45052aa8b74 |
children | c5a19bbeac2b |
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" |
32 #include "mplayer/play.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 |
40 #define guiCEvent 1 | |
41 #define guiIEvent 2 | |
42 #define guiSetDVD 3 | |
43 #define guiSetFileName 4 | |
44 #define guiSetState 5 | |
45 #define guiSetAudioOnly 6 | |
46 #define guiReDrawSubWindow 7 | |
47 #define guiSetShVideo 8 | |
48 #define guiSetStream 9 | |
49 #define guiReDraw 10 | |
50 #define guiSetVolume 11 | |
51 #define guiSetDefaults 12 | |
52 #define guiSetValues 13 | |
53 #define guiSetFileFormat 14 | |
54 #define guiSetDemuxer 15 | |
55 #define guiSetParameters 16 | |
56 #define guiSetAfilter 17 | |
57 #define guiSetContext 18 | |
23077 | 58 |
59 #define guiSetStop 0 | |
60 #define guiSetPlay 1 | |
61 #define guiSetPause 2 | |
62 | |
32984 | 63 #define guiDVD 1 |
64 #define guiVCD 2 | |
65 #define guiFilenames 4 | |
66 #define guiALL 0xffffffff | |
23077 | 67 |
32984 | 68 #define gtkSetContrast 0 |
69 #define gtkSetBrightness 1 | |
70 #define gtkSetHue 2 | |
71 #define gtkSetSaturation 3 | |
72 #define gtkSetEqualizer 4 | |
73 #define gtkAddPlItem 5 | |
74 #define gtkGetNextPlItem 6 | |
75 #define gtkGetPrevPlItem 7 | |
76 #define gtkGetCurrPlItem 8 | |
77 #define gtkDelPl 9 | |
23077 | 78 #define gtkSetExtraStereo 10 |
79 #define gtkSetPanscan 11 | |
80 #define gtkSetFontFactor 12 | |
81 #define gtkSetAutoq 13 | |
82 #define gtkClearStruct 14 | |
83 #define gtkAddURLItem 15 | |
84 #define gtkSetFontOutLine 16 | |
85 #define gtkSetFontBlur 17 | |
86 #define gtkSetFontTextScale 18 | |
87 #define gtkSetFontOSDScale 19 | |
88 #define gtkSetFontEncoding 20 | |
89 #define gtkSetFontAutoScale 21 | |
90 #define gtkSetSubEncoding 22 | |
91 #define gtkDelCurrPlItem 23 | |
92 #define gtkInsertPlItem 24 | |
93 #define gtkSetCurrPlItem 25 | |
94 | |
32984 | 95 #define fsPersistant_MaxPos 5 |
96 | |
97 #define guiSetFilename(s, n) \ | |
98 { \ | |
33282
3ce656827dd7
Use free() instead of gfree() in guiSetFilename and guiSetDF macros.
ib
parents:
33263
diff
changeset
|
99 free(s); \ |
32984 | 100 s = gstrdup(n); \ |
101 } | |
102 | |
103 #define guiSetDF(s, d, n) \ | |
104 { \ | |
33282
3ce656827dd7
Use free() instead of gfree() in guiSetFilename and guiSetDF macros.
ib
parents:
33263
diff
changeset
|
105 free(s); \ |
32984 | 106 s = malloc(strlen(d) + strlen(n) + 5); \ |
107 sprintf(s, "%s/%s", d, n); \ | |
108 } | |
109 | |
110 typedef struct { | |
111 int x; | |
112 int y; | |
113 int width; | |
114 int height; | |
115 } guiResizeStruct; | |
116 | |
117 typedef struct { | |
118 int signal; | |
119 char module[512]; | |
120 } guiUnknownErrorStruct; | |
121 | |
122 typedef struct { | |
123 int seek; | |
124 int format; | |
125 int width; | |
126 int height; | |
127 char codecdll[128]; | |
128 } guiVideoStruct; | |
129 | |
130 #ifdef CONFIG_DVDREAD | |
131 typedef struct { | |
132 int titles; | |
133 int chapters; | |
134 int angles; | |
135 int current_chapter; | |
136 int current_title; | |
137 int current_angle; | |
138 int nr_of_audio_channels; | |
139 stream_language_t audio_streams[32]; | |
140 int nr_of_subtitles; | |
141 stream_language_t subtitles[32]; | |
142 } guiDVDStruct; | |
143 #endif | |
144 | |
145 typedef struct { | |
146 int message; | |
147 guiResizeStruct resize; | |
148 guiVideoStruct videodata; | |
149 guiUnknownErrorStruct error; | |
150 | |
151 struct MPContext *mpcontext; | |
152 void *sh_video; | |
153 void *afilter; | |
154 void *demuxer; | |
155 void *event_struct; | |
156 | |
157 int DiskChanged; | |
158 int NewPlay; | |
159 | |
160 #ifdef CONFIG_DVDREAD | |
161 guiDVDStruct DVD; | |
162 int Title; | |
163 int Angle; | |
164 int Chapter; | |
165 #endif | |
166 | |
167 #ifdef CONFIG_VCD | |
168 int VCDTracks; | |
169 #endif | |
170 | |
171 int Playing; | |
172 float Position; | |
173 | |
174 int MovieWidth; | |
175 int MovieHeight; | |
176 int NoWindow; | |
177 | |
178 float Volume; | |
179 float Balance; | |
180 | |
181 int Track; | |
182 int AudioType; | |
183 int StreamType; | |
184 int AudioOnly; | |
185 int TimeSec; | |
186 int LengthInSec; | |
187 int FrameDrop; | |
188 int FileFormat; | |
189 float FPS; | |
190 | |
191 char *Filename; | |
192 int FilenameChanged; | |
193 | |
194 char *Subtitlename; | |
195 int SubtitleChanged; | |
196 | |
197 char *Othername; | |
198 int OtherChanged; | |
199 | |
200 char *AudioFile; | |
201 int AudioFileChanged; | |
202 | |
203 int SkinChange; | |
204 } guiInterface_t; | |
205 | |
206 typedef struct plItem { | |
207 struct plItem *prev, *next; | |
208 char *path; | |
209 char *name; | |
210 } plItem; | |
211 | |
212 typedef struct urlItem { | |
213 struct urlItem *next; | |
214 char *url; | |
215 } URLItem; | |
216 | |
217 extern guiInterface_t guiIntfStruct; | |
218 | |
219 extern int guiWinID; | |
220 | |
221 extern char *skinName; | |
222 extern char *skinDirInHome; | |
223 extern char *skinMPlayerDir; | |
224 | |
225 extern plItem *plList; | |
226 extern plItem *plCurrent; | |
227 extern plItem *plLastPlayed; | |
228 | |
229 extern URLItem *URLList; | |
230 | |
231 extern char *fsHistory[fsPersistant_MaxPos]; | |
232 | |
23077 | 233 extern float gtkEquChannels[6][10]; |
234 | |
32984 | 235 void gaddlist(char ***list, const char *entry); |
236 void gfree(void **p); | |
33023 | 237 void gmp_msg(int mod, int lev, const char *format, ...); |
32984 | 238 char *gstrchr(char *str, int c); |
239 int gstrcmp(const char *a, const char *b); | |
240 char *gstrdup(const char *str); | |
241 void *gtkSet(int cmd, float fparam, void *vparam); | |
242 void guiDone(void); | |
243 void guiEventHandling(void); | |
33309 | 244 void guiExit(enum exit_reason how); |
32984 | 245 int guiGetEvent(int type, void *arg); |
246 void guiInit(void); | |
247 void guiLoadFont(void); | |
248 void guiLoadSubtitle(char *name); | |
249 int import_initial_playtree_into_gui(play_tree_t *my_playtree, m_config_t *config, int enqueue); | |
250 int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config); | |
23077 | 251 |
26029 | 252 #endif /* MPLAYER_GUI_INTERFACE_H */ |