23077
|
1
|
|
2 #ifndef _INTERFACE_H
|
|
3 #define _INTERFACE_H
|
|
4
|
|
5 #include "../config.h"
|
|
6 #include "mplayer/play.h"
|
|
7 #include "libvo/font_load.h"
|
|
8 #include "cfg.h"
|
|
9
|
|
10 #ifdef USE_DVDREAD
|
|
11 #include "stream/stream.h"
|
|
12 #endif
|
|
13
|
|
14 typedef struct
|
|
15 {
|
|
16 int x;
|
|
17 int y;
|
|
18 int width;
|
|
19 int height;
|
|
20 } guiResizeStruct;
|
|
21
|
|
22 typedef struct
|
|
23 {
|
|
24 int signal;
|
|
25 char module[512];
|
|
26 } guiUnknownErrorStruct;
|
|
27
|
|
28 typedef struct
|
|
29 {
|
|
30 int seek;
|
|
31 int format;
|
|
32 int width;
|
|
33 int height;
|
|
34 char codecdll[128];
|
|
35 } guiVideoStruct;
|
|
36
|
|
37 #ifdef USE_DVDREAD
|
|
38 typedef struct
|
|
39 {
|
|
40 int titles;
|
|
41 int chapters;
|
|
42 int angles;
|
|
43 int current_chapter;
|
|
44 int current_title;
|
|
45 int current_angle;
|
|
46 int nr_of_audio_channels;
|
|
47 stream_language_t audio_streams[32];
|
|
48 int nr_of_subtitles;
|
|
49 stream_language_t subtitles[32];
|
|
50 } guiDVDStruct;
|
|
51 #endif
|
|
52
|
|
53 typedef struct
|
|
54 {
|
|
55 int message;
|
|
56 guiResizeStruct resize;
|
|
57 guiVideoStruct videodata;
|
|
58 guiUnknownErrorStruct error;
|
|
59
|
|
60 struct MPContext * mpcontext;
|
|
61 void * sh_video;
|
|
62 void * afilter;
|
|
63 void * demuxer;
|
|
64 void * event_struct;
|
|
65
|
|
66 int DiskChanged;
|
|
67 int NewPlay;
|
|
68
|
|
69 #ifdef USE_DVDREAD
|
|
70 guiDVDStruct DVD;
|
|
71 int Title;
|
|
72 int Angle;
|
|
73 int Chapter;
|
|
74 #endif
|
|
75
|
|
76 #ifdef HAVE_VCD
|
|
77 int VCDTracks;
|
|
78 #endif
|
|
79
|
|
80 int Playing;
|
|
81 float Position;
|
|
82
|
|
83 int MovieWidth;
|
|
84 int MovieHeight;
|
|
85 int NoWindow;
|
|
86
|
|
87 float Volume;
|
|
88 float Balance;
|
|
89
|
|
90 int Track;
|
|
91 int AudioType;
|
|
92 int StreamType;
|
|
93 int AudioOnly;
|
|
94 int TimeSec;
|
|
95 int LengthInSec;
|
|
96 int FrameDrop;
|
|
97 int FileFormat;
|
|
98 float FPS;
|
|
99
|
|
100 char * Filename;
|
|
101 int FilenameChanged;
|
|
102
|
|
103 char * Subtitlename;
|
|
104 int SubtitleChanged;
|
|
105
|
|
106 char * Othername;
|
|
107 int OtherChanged;
|
|
108
|
|
109 char * AudioFile;
|
|
110 int AudioFileChanged;
|
|
111
|
|
112 int SkinChange;
|
|
113 } guiInterface_t;
|
|
114
|
|
115 extern guiInterface_t guiIntfStruct;
|
|
116
|
|
117 #define guiXEvent 0
|
|
118 #define guiCEvent 1
|
|
119 #define guiIEvent 2
|
|
120 #define guiSetDVD 3
|
|
121 #define guiSetFileName 4
|
|
122 #define guiSetState 5
|
|
123 #define guiSetAudioOnly 6
|
|
124 #define guiReDrawSubWindow 7
|
|
125 #define guiSetShVideo 8
|
|
126 #define guiSetStream 9
|
|
127 #define guiReDraw 10
|
|
128 #define guiSetVolume 11
|
|
129 #define guiSetDefaults 12
|
|
130 #define guiSetValues 13
|
|
131 #define guiSetFileFormat 14
|
|
132 #define guiSetDemuxer 15
|
|
133 #define guiSetParameters 16
|
|
134 #define guiSetAfilter 17
|
|
135 #define guiSetContext 18
|
|
136
|
|
137 #define guiSetStop 0
|
|
138 #define guiSetPlay 1
|
|
139 #define guiSetPause 2
|
|
140
|
|
141 #define guiDVD 1
|
|
142 #define guiVCD 2
|
|
143 #define guiFilenames 4
|
|
144 #define guiALL 0xffffffff
|
|
145
|
|
146 extern int use_gui;
|
|
147
|
|
148 extern char *get_path(const char *filename);
|
|
149
|
|
150 extern void guiInit( void );
|
|
151 extern void guiDone( void );
|
|
152 extern int guiGetEvent( int type,char * arg );
|
|
153 extern void guiEventHandling( void );
|
|
154 extern void guiLoadFont( void );
|
|
155 extern void guiLoadSubtitle( char * name );
|
|
156 extern void guiMessageBox(int level, char * str);
|
|
157
|
|
158 typedef struct _plItem
|
|
159 {
|
|
160 struct _plItem * prev,* next;
|
|
161 int played;
|
|
162 char * path;
|
|
163 char * name;
|
|
164 } plItem;
|
|
165
|
|
166 typedef struct _urlItem
|
|
167 {
|
|
168 struct _urlItem *next;
|
|
169 char * url;
|
|
170 } URLItem;
|
|
171
|
|
172 extern plItem * plList;
|
|
173 extern plItem * plCurrent;
|
|
174 extern plItem * plLastPlayed;
|
|
175
|
|
176 extern URLItem * URLList;
|
|
177
|
|
178 #define fsPersistant_MaxPath 512
|
|
179 #define fsPersistant_MaxPos 5
|
|
180 extern char * fsHistory[fsPersistant_MaxPos];
|
|
181
|
|
182 #define gtkSetContrast 0
|
|
183 #define gtkSetBrightness 1
|
|
184 #define gtkSetHue 2
|
|
185 #define gtkSetSaturation 3
|
|
186 #define gtkSetEqualizer 4
|
|
187 #define gtkAddPlItem 5
|
|
188 #define gtkGetNextPlItem 6
|
|
189 #define gtkGetPrevPlItem 7
|
|
190 #define gtkGetCurrPlItem 8
|
|
191 #define gtkDelPl 9
|
|
192 #define gtkSetExtraStereo 10
|
|
193 #define gtkSetPanscan 11
|
|
194 #define gtkSetFontFactor 12
|
|
195 #define gtkSetAutoq 13
|
|
196 #define gtkClearStruct 14
|
|
197 #define gtkAddURLItem 15
|
|
198 #define gtkSetFontOutLine 16
|
|
199 #define gtkSetFontBlur 17
|
|
200 #define gtkSetFontTextScale 18
|
|
201 #define gtkSetFontOSDScale 19
|
|
202 #define gtkSetFontEncoding 20
|
|
203 #define gtkSetFontAutoScale 21
|
|
204 #define gtkSetSubEncoding 22
|
|
205 #define gtkDelCurrPlItem 23
|
|
206 #define gtkInsertPlItem 24
|
|
207 #define gtkSetCurrPlItem 25
|
|
208
|
|
209 extern float gtkEquChannels[6][10];
|
|
210
|
|
211 extern void * gtkSet( int cmd,float param, void * vparam );
|
|
212
|
|
213 extern char * gconvert_uri_to_filename( char * str );
|
|
214 extern char * gstrdup( const char * str );
|
|
215 extern int gstrcmp( const char * a,const char * b );
|
|
216 extern void gfree( void ** p );
|
|
217 extern void gaddlist( char *** list,const char * entry );
|
|
218 extern char * gstrchr( char * str,int c );
|
|
219
|
|
220 #define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); }
|
|
221
|
|
222 #define guiSetDF( s,d,n ) \
|
|
223 { \
|
|
224 gfree( (void **)&s ); \
|
|
225 s=malloc( strlen( d ) + strlen( n ) + 5 ); \
|
|
226 sprintf( s,"%s/%s",d,n ); \
|
|
227 }
|
|
228
|
|
229 #endif
|