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