2008-04-22 09:33:39 +00:00
|
|
|
/*
|
|
|
|
* This file is part of MPlayer.
|
|
|
|
*
|
|
|
|
* MPlayer is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* MPlayer is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with MPlayer; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
|
|
*/
|
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#ifndef MPLAYER_GUI_INTERFACE_H
|
|
|
|
#define MPLAYER_GUI_INTERFACE_H
|
2002-02-21 22:48:47 +00:00
|
|
|
|
2008-04-12 16:03:07 +00:00
|
|
|
#include "config.h"
|
2002-02-21 22:48:47 +00:00
|
|
|
#include "mplayer/play.h"
|
2005-12-08 22:12:57 +00:00
|
|
|
#include "libvo/font_load.h"
|
2002-08-15 22:52:52 +00:00
|
|
|
#include "cfg.h"
|
2002-02-21 22:48:47 +00:00
|
|
|
|
2002-02-23 15:12:55 +00:00
|
|
|
#ifdef USE_DVDREAD
|
2006-07-31 19:59:06 +00:00
|
|
|
#include "stream/stream.h"
|
2002-02-23 15:12:55 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
} guiResizeStruct;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int signal;
|
|
|
|
char module[512];
|
2003-08-15 11:55:21 +00:00
|
|
|
} guiUnknownErrorStruct;
|
2002-02-23 15:12:55 +00:00
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int seek;
|
|
|
|
int format;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
char codecdll[128];
|
|
|
|
} guiVideoStruct;
|
|
|
|
|
|
|
|
#ifdef USE_DVDREAD
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int titles;
|
|
|
|
int chapters;
|
|
|
|
int angles;
|
|
|
|
int current_chapter;
|
|
|
|
int current_title;
|
|
|
|
int current_angle;
|
|
|
|
int nr_of_audio_channels;
|
|
|
|
stream_language_t audio_streams[32];
|
|
|
|
int nr_of_subtitles;
|
|
|
|
stream_language_t subtitles[32];
|
|
|
|
} guiDVDStruct;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int message;
|
2003-08-15 11:55:21 +00:00
|
|
|
guiResizeStruct resize;
|
|
|
|
guiVideoStruct videodata;
|
|
|
|
guiUnknownErrorStruct error;
|
2002-09-01 11:28:18 +00:00
|
|
|
|
2007-02-21 19:14:49 +00:00
|
|
|
struct MPContext * mpcontext;
|
2002-09-01 11:28:18 +00:00
|
|
|
void * sh_video;
|
2004-12-27 19:34:42 +00:00
|
|
|
void * afilter;
|
2002-11-29 00:58:25 +00:00
|
|
|
void * demuxer;
|
2002-11-28 00:44:24 +00:00
|
|
|
void * event_struct;
|
2002-06-03 15:06:32 +00:00
|
|
|
|
2002-09-01 11:28:18 +00:00
|
|
|
int DiskChanged;
|
2002-12-11 01:21:12 +00:00
|
|
|
int NewPlay;
|
2002-06-03 15:06:32 +00:00
|
|
|
|
2002-02-23 15:12:55 +00:00
|
|
|
#ifdef USE_DVDREAD
|
|
|
|
guiDVDStruct DVD;
|
2002-12-11 01:21:12 +00:00
|
|
|
int Title;
|
|
|
|
int Angle;
|
|
|
|
int Chapter;
|
2002-06-03 15:06:32 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_VCD
|
|
|
|
int VCDTracks;
|
2002-02-23 15:12:55 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
int Playing;
|
|
|
|
float Position;
|
|
|
|
|
|
|
|
int MovieWidth;
|
|
|
|
int MovieHeight;
|
2002-08-14 23:02:45 +00:00
|
|
|
int NoWindow;
|
2002-02-23 15:12:55 +00:00
|
|
|
|
|
|
|
float Volume;
|
|
|
|
float Balance;
|
|
|
|
|
|
|
|
int Track;
|
|
|
|
int AudioType;
|
|
|
|
int StreamType;
|
2002-04-22 21:36:12 +00:00
|
|
|
int AudioOnly;
|
2002-02-23 15:12:55 +00:00
|
|
|
int TimeSec;
|
|
|
|
int LengthInSec;
|
|
|
|
int FrameDrop;
|
2002-08-14 23:02:45 +00:00
|
|
|
int FileFormat;
|
2002-08-29 22:24:49 +00:00
|
|
|
float FPS;
|
2002-02-23 15:12:55 +00:00
|
|
|
|
|
|
|
char * Filename;
|
|
|
|
int FilenameChanged;
|
|
|
|
|
|
|
|
char * Subtitlename;
|
|
|
|
int SubtitleChanged;
|
2002-07-25 20:26:38 +00:00
|
|
|
|
2002-02-23 15:12:55 +00:00
|
|
|
char * Othername;
|
|
|
|
int OtherChanged;
|
2002-07-02 22:31:50 +00:00
|
|
|
|
|
|
|
char * AudioFile;
|
|
|
|
int AudioFileChanged;
|
2002-02-23 15:12:55 +00:00
|
|
|
|
|
|
|
int SkinChange;
|
|
|
|
} guiInterface_t;
|
|
|
|
|
|
|
|
extern guiInterface_t guiIntfStruct;
|
|
|
|
|
2002-04-22 21:36:12 +00:00
|
|
|
#define guiXEvent 0
|
|
|
|
#define guiCEvent 1
|
|
|
|
#define guiIEvent 2
|
|
|
|
#define guiSetDVD 3
|
|
|
|
#define guiSetFileName 4
|
|
|
|
#define guiSetState 5
|
|
|
|
#define guiSetAudioOnly 6
|
|
|
|
#define guiReDrawSubWindow 7
|
|
|
|
#define guiSetShVideo 8
|
2002-06-03 15:06:32 +00:00
|
|
|
#define guiSetStream 9
|
2002-07-25 20:26:38 +00:00
|
|
|
#define guiReDraw 10
|
|
|
|
#define guiSetVolume 11
|
|
|
|
#define guiSetDefaults 12
|
2002-08-04 19:23:58 +00:00
|
|
|
#define guiSetValues 13
|
2002-08-14 23:02:45 +00:00
|
|
|
#define guiSetFileFormat 14
|
2002-11-29 00:58:25 +00:00
|
|
|
#define guiSetDemuxer 15
|
2002-12-11 01:21:12 +00:00
|
|
|
#define guiSetParameters 16
|
2004-12-27 19:34:42 +00:00
|
|
|
#define guiSetAfilter 17
|
2007-02-21 19:14:49 +00:00
|
|
|
#define guiSetContext 18
|
2002-02-21 22:48:47 +00:00
|
|
|
|
2002-03-06 23:54:20 +00:00
|
|
|
#define guiSetStop 0
|
|
|
|
#define guiSetPlay 1
|
|
|
|
#define guiSetPause 2
|
|
|
|
|
2002-06-03 15:06:32 +00:00
|
|
|
#define guiDVD 1
|
|
|
|
#define guiVCD 2
|
2002-07-25 20:26:38 +00:00
|
|
|
#define guiFilenames 4
|
2002-06-03 15:06:32 +00:00
|
|
|
#define guiALL 0xffffffff
|
|
|
|
|
2006-11-29 14:08:24 +00:00
|
|
|
extern int use_gui;
|
|
|
|
|
2002-05-28 11:55:17 +00:00
|
|
|
extern void guiInit( void );
|
2002-03-07 11:57:33 +00:00
|
|
|
extern void guiDone( void );
|
2002-08-14 23:02:45 +00:00
|
|
|
extern int guiGetEvent( int type,char * arg );
|
2002-02-21 22:48:47 +00:00
|
|
|
extern void guiEventHandling( void );
|
2002-07-25 20:26:38 +00:00
|
|
|
extern void guiLoadFont( void );
|
2002-10-10 14:06:49 +00:00
|
|
|
extern void guiLoadSubtitle( char * name );
|
2005-09-03 15:19:52 +00:00
|
|
|
extern void guiMessageBox(int level, char * str);
|
2002-02-21 22:48:47 +00:00
|
|
|
|
2008-01-06 23:20:15 +00:00
|
|
|
typedef struct plItem
|
2002-07-12 00:53:26 +00:00
|
|
|
{
|
2008-01-06 23:20:15 +00:00
|
|
|
struct plItem * prev,* next;
|
2002-07-12 00:53:26 +00:00
|
|
|
int played;
|
|
|
|
char * path;
|
|
|
|
char * name;
|
|
|
|
} plItem;
|
|
|
|
|
2008-01-06 23:20:15 +00:00
|
|
|
typedef struct urlItem
|
2002-08-26 22:20:58 +00:00
|
|
|
{
|
2008-01-06 23:20:15 +00:00
|
|
|
struct urlItem *next;
|
2002-08-26 22:20:58 +00:00
|
|
|
char * url;
|
|
|
|
} URLItem;
|
|
|
|
|
2002-07-12 00:53:26 +00:00
|
|
|
extern plItem * plList;
|
|
|
|
extern plItem * plCurrent;
|
|
|
|
extern plItem * plLastPlayed;
|
|
|
|
|
2002-08-26 22:20:58 +00:00
|
|
|
extern URLItem * URLList;
|
|
|
|
|
2003-01-21 13:33:40 +00:00
|
|
|
#define fsPersistant_MaxPath 512
|
|
|
|
#define fsPersistant_MaxPos 5
|
|
|
|
extern char * fsHistory[fsPersistant_MaxPos];
|
|
|
|
|
2002-11-02 16:09:05 +00:00
|
|
|
#define gtkSetContrast 0
|
|
|
|
#define gtkSetBrightness 1
|
|
|
|
#define gtkSetHue 2
|
|
|
|
#define gtkSetSaturation 3
|
|
|
|
#define gtkSetEqualizer 4
|
|
|
|
#define gtkAddPlItem 5
|
|
|
|
#define gtkGetNextPlItem 6
|
|
|
|
#define gtkGetPrevPlItem 7
|
|
|
|
#define gtkGetCurrPlItem 8
|
|
|
|
#define gtkDelPl 9
|
|
|
|
#define gtkSetExtraStereo 10
|
|
|
|
#define gtkSetPanscan 11
|
|
|
|
#define gtkSetFontFactor 12
|
|
|
|
#define gtkSetAutoq 13
|
|
|
|
#define gtkClearStruct 14
|
|
|
|
#define gtkAddURLItem 15
|
|
|
|
#define gtkSetFontOutLine 16
|
|
|
|
#define gtkSetFontBlur 17
|
|
|
|
#define gtkSetFontTextScale 18
|
|
|
|
#define gtkSetFontOSDScale 19
|
|
|
|
#define gtkSetFontEncoding 20
|
|
|
|
#define gtkSetFontAutoScale 21
|
2003-01-21 19:12:46 +00:00
|
|
|
#define gtkSetSubEncoding 22
|
2003-02-05 23:02:35 +00:00
|
|
|
#define gtkDelCurrPlItem 23
|
|
|
|
#define gtkInsertPlItem 24
|
|
|
|
#define gtkSetCurrPlItem 25
|
2002-07-03 18:57:52 +00:00
|
|
|
|
|
|
|
extern float gtkEquChannels[6][10];
|
|
|
|
|
2002-07-12 00:53:26 +00:00
|
|
|
extern void * gtkSet( int cmd,float param, void * vparam );
|
2002-07-03 18:57:52 +00:00
|
|
|
|
2006-07-14 16:57:24 +00:00
|
|
|
extern char * gstrdup( const char * str );
|
|
|
|
extern int gstrcmp( const char * a,const char * b );
|
2002-07-25 20:26:38 +00:00
|
|
|
extern void gfree( void ** p );
|
2006-07-14 16:57:24 +00:00
|
|
|
extern void gaddlist( char *** list,const char * entry );
|
2002-11-25 18:18:45 +00:00
|
|
|
extern char * gstrchr( char * str,int c );
|
2002-02-24 19:34:52 +00:00
|
|
|
|
2002-07-25 20:26:38 +00:00
|
|
|
#define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); }
|
2002-02-23 15:12:55 +00:00
|
|
|
|
|
|
|
#define guiSetDF( s,d,n ) \
|
|
|
|
{ \
|
2002-07-25 20:26:38 +00:00
|
|
|
gfree( (void **)&s ); \
|
2002-02-23 15:12:55 +00:00
|
|
|
s=malloc( strlen( d ) + strlen( n ) + 5 ); \
|
|
|
|
sprintf( s,"%s/%s",d,n ); \
|
|
|
|
}
|
|
|
|
|
2008-02-22 09:09:46 +00:00
|
|
|
#endif /* MPLAYER_GUI_INTERFACE_H */
|