[Mplayer-cvslog] CVS: main/Gui app.c,1.9,1.10 events.h,1.8,1.9 gui.mak,1.7,1.8 interface.c,1.1,1.2 interface.h,1.1,1.2 error.c,1.2,NONE error.h,1.2,NONE language.c,1.2,NONE language.h,1.2,NONE timer.c,1.1,NONE timer.h,1.2,NONE

Zoltan Ponekker pontscho at mplayer.dev.hu
Sat Feb 23 16:13:23 CET 2002


Update of /cvsroot/mplayer/main/Gui
In directory mplayer:/var/tmp.root/cvs-serv25081/Gui

Modified Files:
	app.c events.h gui.mak interface.c interface.h 
Removed Files:
	error.c error.h language.c language.h timer.c timer.h 
Log Message:
new gui interface, and gtk moved into mplayer process. fork ... bleh :)

Index: app.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/app.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- app.c	18 Dec 2001 20:01:09 -0000	1.9
+++ app.c	23 Feb 2002 15:12:50 -0000	1.10
@@ -8,7 +8,6 @@
 #include "../help_mp.h"
 
 #include "app.h"
-#include "error.h"
 #include "wm/wskeys.h"
 #include "skin/skin.h"
 #include "mplayer/mplayer.h"
@@ -106,10 +105,9 @@
  printf("SKIN dir 2: '%s'\n",skinMPlayerDir);
  if ( !skinName )
   {
-   if ( ( skinName=(char *)calloc( 1,7 ) ) == NULL ) { dbprintf( 0,"[config] Not enough memory.\n" ); exit( 1 ); }
+   if ( ( skinName=(char *)calloc( 1,7 ) ) == NULL ) { mp_msg( MSGT_GPLAYER,MSGL_STATUS,"[config] Not enough memory.\n" ); exit( 1 ); }
    strcpy( skinName,"default" );
   }
- initDebug(NULL); // write messages to stderr
  switch ( skinRead( skinName ) )
   {
    case -1: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinNotFound,skinName ); exit( 0 );

Index: events.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/events.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- events.h	15 Dec 2001 15:36:05 -0000	1.8
+++ events.h	23 Feb 2002 15:12:50 -0000	1.9
@@ -47,7 +47,7 @@
 #define evHelp              37
 
 #define evLoadSubtitle      38
-#define evPlayDVD	    39
+#define evPlayDVD           39
 
 #define evExit              1000
 

Index: gui.mak
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/gui.mak,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- gui.mak	21 Feb 2002 22:48:46 -0000	1.7
+++ gui.mak	23 Feb 2002 15:12:50 -0000	1.8
@@ -7,9 +7,9 @@
 	     $(MPLAYERDIR)gtk/opts.c
 
 MPLAYERSRCS = $(MPLAYERDIR)mplayer.c $(MPLAYERDIR)widgets.c $(MPLAYERDIR)play.c \
-	     $(MPLAYERDIR)psignal.c $(GTKSRCS)
+	      $(GTKSRCS)
 MPLAYEROBJS = $(MPLAYERSRCS:.c=.o)
 
-SRCS = $(SKINSRC) $(BITMAPSRCS) wm/ws.c wm/wsconv.c app.c events.c timer.c error.c interface.c
+SRCS = $(SKINSRC) $(BITMAPSRCS) wm/ws.c wm/wsconv.c app.c events.c interface.c
 OBJS = $(SRCS:.c=.o)
 

Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- interface.c	21 Feb 2002 22:48:46 -0000	1.1
+++ interface.c	23 Feb 2002 15:12:50 -0000	1.2
@@ -1,9 +1,31 @@
 
+#include <string.h>
 
 #include "ws.h"
 #include "mplayer/play.h"
 #include "interface.h"
+
 #include "../mplayer.h"
+#include "mplayer/widgets.h"
+#include "mplayer/mplayer.h"
+#include "app.h"
+#include "../libvo/x11_common.h"
+
+guiInterface_t guiIntfStruct;
+
+void guiInit( int argc,char* argv[], char *envp[] )
+{
+ memset( &guiIntfStruct,0,sizeof( guiIntfStruct ) );
+ appInit( argc,argv,envp,(void*)mDisplay );
+}
+
+void guiDone( void )
+{
+ mp_msg( MSGT_GPLAYER,MSGL_V,"[mplayer] exit.\n" );
+ mplStop();
+ gtkDone();
+ wsXDone();
+}
 
 void guiGetEvent( int type,char * arg )
 {
@@ -11,15 +33,16 @@
   {
    case guiXEvent:
         wsEvents( wsDisplay,(XEvent *)arg,NULL );
-	break;
+        gtkEventHandling();
+        break;
    case guiCEvent:
-	break;
+        break;
   }
 }
 
 void guiEventHandling( void )
 {
- if ( use_gui && !mplShMem->Playing ) wsHandleEvents();
- mplTimerHandler(0); // handle GUI timer events
- if ( mplShMem->SkinChange ) { ChangeSkin(); mplShMem->SkinChange=0;  }
+ if ( use_gui && !guiIntfStruct.Playing ) wsHandleEvents();
+ gtkEventHandling();
+ mplTimerHandler(); // handle GUI timer events
 }

Index: interface.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- interface.h	21 Feb 2002 22:48:46 -0000	1.1
+++ interface.h	23 Feb 2002 15:12:50 -0000	1.2
@@ -2,13 +2,112 @@
 #ifndef _INTERFACE_H
 #define _INTERFACE_H
 
+#include "../config.h"
 #include "mplayer/play.h"
 #include "../mplayer.h"
 
+#ifdef USE_DVDREAD
+ #include "../libmpdemux/stream.h"
+#endif
+
+
+typedef struct
+{
+ int x;
+ int y;
+ int width;
+ int height;
+} guiResizeStruct;
+
+typedef struct
+{
+ int  signal;
+ char module[512];
+} guiUnknowErrorStruct;
+
+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;
+   guiResizeStruct      resize;
+   guiVideoStruct       videodata;
+   guiUnknowErrorStruct error;
+#ifdef USE_DVDREAD
+   guiDVDStruct         DVD;
+   int                  DVDChanged;
+#endif
+
+   int    Playing;
+   float  Position;
+
+   int    MovieWidth;
+   int    MovieHeight;
+
+   float  Volume;
+   int    VolumeChanged;
+   float  Balance;
+   int    Mute;
+
+   int    Track;
+   int    AudioType;
+   int    StreamType;
+   int    TimeSec;
+   int    LengthInSec;
+   int    FrameDrop;
+
+   char * Filename;
+   int    FilenameChanged;
+
+   char * Subtitlename;
+   int    SubtitleChanged;
+
+   char * Othername;
+   int    OtherChanged;
+
+   int    SkinChange;
+} guiInterface_t;
+
+extern guiInterface_t guiIntfStruct;
+
 #define guiXEvent 0
 #define guiCEvent 1
 
+extern void guiInit( int argc,char* argv[], char *envp[] );
 extern void guiGetEvent( int type,char * arg );
 extern void guiEventHandling( void );
+
+#define guiSetFilename( s,n ) \
+ { if ( s ) free( s ); s=NULL; s=strdup( n ); }
+
+#define guiSetDF( s,d,n )                       \
+ {                                              \
+  if ( s ) free( s ); s=NULL;                   \
+  s=malloc( strlen( d ) + strlen( n ) + 5 );    \
+  sprintf( s,"%s/%s",d,n );                     \
+ }
 
 #endif

--- error.c DELETED ---

--- error.h DELETED ---

--- language.c DELETED ---

--- language.h DELETED ---

--- timer.c DELETED ---

--- timer.h DELETED ---




More information about the MPlayer-cvslog mailing list