[Mplayer-cvslog] CVS: main/Gui Makefile,1.14,1.15 app.c,1.14,1.15 app.h,1.8,1.9 cfg.c,1.18,1.19 cfg.h,1.6,1.7 interface.c,1.54,1.55 interface.h,1.28,1.29 events.c,1.13,NONE events.h,1.15,NONE

Zoltan Ponekker pontscho at mplayerhq.hu
Sat Nov 2 17:09:06 CET 2002


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

Modified Files:
	Makefile app.c app.h cfg.c cfg.h interface.c interface.h 
Removed Files:
	events.c events.h 
Log Message:
cleanup

Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/Makefile,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- Makefile	4 Sep 2002 09:36:02 -0000	1.14
+++ Makefile	2 Nov 2002 16:09:03 -0000	1.15
@@ -14,7 +14,7 @@
 
 CFLAGS = $(OPTIMIZE) $(INCDIR) $(DEBUG) 
 
-SRCS = wm/ws.c wm/wsxdnd.c app.c events.c interface.c cfg.c \
+SRCS = wm/ws.c wm/wsxdnd.c app.c interface.c cfg.c \
 	bitmap/bitmap.c bitmap/png/png.c \
 	skin/skin.c skin/font.c skin/cut.c \
 	mplayer/mplayer.c mplayer/widgets.c mplayer/play.c \

Index: app.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/app.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- app.c	26 Aug 2002 22:20:43 -0000	1.14
+++ app.c	2 Nov 2002 16:09:03 -0000	1.15
@@ -1,4 +1,5 @@
 
+
 #include <stdlib.h>
 #include <stdio.h>
 #include <string.h>
@@ -13,6 +14,61 @@
 #include "mplayer/mplayer.h"
 #include "interface.h"
 
+evName evNames[] =
+ {
+  { evNone,              "evNone"              },
+  { evPlay,              "evPlay"              },
+  { evStop,              "evStop"              },
+  { evPause,             "evPause"             },
+  { evPrev,              "evPrev"              },
+  { evNext,              "evNext"              },
+  { evLoad,              "evLoad"              },
+  { evEqualizer,         "evEqualizer"         },
+  { evEqualizer,         "evEqualeaser"        },
+  { evPlayList,          "evPlaylist"          },
+  { evExit,              "evExit"              },
+  { evIconify,           "evIconify"           },
+  { evIncBalance,        "evIncBalance"        },
+  { evDecBalance,        "evDecBalance"        },
+  { evFullScreen,        "evFullScreen"        },
+  { evFName,             "evFName"             },
+  { evMovieTime,         "evMovieTime"         },
+  { evAbout,             "evAbout"             },
+  { evLoadPlay,          "evLoadPlay"          },
+  { evPreferences,       "evPreferences"       },
+  { evSkinBrowser,       "evSkinBrowser"       },
+  { evBackward10sec,     "evBackward10sec"     },
+  { evForward10sec,      "evForward10sec"      },
+  { evBackward1min,      "evBackward1min"      },
+  { evForward1min,       "evForward1min"       },
+  { evBackward10min,     "evBackward10min"     },
+  { evForward10min,      "evForward10min"      },
+  { evIncVolume,         "evIncVolume"         },
+  { evDecVolume,         "evDecVolume"         },
+  { evMute,              "evMute"              },
+  { evIncAudioBufDelay,  "evIncAudioBufDelay"  },
+  { evDecAudioBufDelay,  "evDecAudioBufDelay"  },
+  { evPlaySwitchToPause, "evPlaySwitchToPause" },
+  { evPauseSwitchToPlay, "evPauseSwitchToPlay" },
+  { evNormalSize,        "evNormalSize"        },
+  { evDoubleSize,        "evDoubleSize"        },
+  { evSetMoviePosition,  "evSetMoviePosition"  },
+  { evSetVolume,         "evSetVolume"         },
+  { evSetBalance,        "evSetBalance"        },
+  { evHelp,		 "evHelp"	       },	
+  { evLoadSubtitle,      "evLoadSubtitle"      },
+  { evPlayDVD,		 "evPlayDVD"	       },
+  { evPlayVCD,		 "evPlayVCD"	       },
+  { evSetURL,		 "evSetURL"	       },
+  { evLoadAudioFile,	 "evLoadAudioFile"     },
+  { evDropSubtitle,      "evDropSubtitle"      },
+  { evSetAspect,	 "evSetAspect"	       }
+ };
+
+int evBoxs = sizeof( evNames ) / sizeof( evName );
+
+// ---
+
 extern char *get_path(char *);
 
 listItems   appMPlayer;
@@ -97,19 +153,4 @@
  for ( i=0;i<evBoxs;i++ )
   if ( !strcmp( evNames[i].name,str ) ) return evNames[i].msg;
  return -1;
-}
-
-void appInit( void * disp )
-{
- skinDirInHome=get_path("Skin");
- skinMPlayerDir=DATADIR "/Skin";
- printf("SKIN dir 1: '%s'\n",skinDirInHome);
- printf("SKIN dir 2: '%s'\n",skinMPlayerDir);
- if ( !skinName ) skinName=strdup( "default" );
- switch ( skinRead( skinName ) )
-  {
-   case -1: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinNotFound,skinName ); exit( 0 );
-   case -2: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinCfgReadError,skinName ); exit( 0 );
-  }
- mplInit( disp ); // does gtk & ws initialization, create windows
 }

Index: app.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/app.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- app.h	28 May 2002 11:55:15 -0000	1.8
+++ app.h	2 Nov 2002 16:09:03 -0000	1.9
@@ -1,11 +1,100 @@
 
-#ifndef __MY_APPS
-#define __MY_APPS
+#ifndef __APPS_H
+#define __APPS_H
 
 #include "bitmap/bitmap.h"
 #include "wm/ws.h"
 #include "wm/wskeys.h"
-#include "events.h"
+
+// --- User events ------
+
+#define evNone              0
+#define evPlay              1
+#define evStop              2
+#define evPause             3
+#define evPrev              6
+#define evNext              7
+#define evLoad              8
+#define evEqualizer         9
+#define evPlayList          10
+#define evIconify           11
+#define evAbout             12
+#define evLoadPlay          13
+#define evPreferences       14
+#define evSkinBrowser       15
+#define evPlaySwitchToPause 16
+#define evPauseSwitchToPlay 17
+
+#define evBackward10sec     18
+#define evForward10sec      19
+#define evBackward1min      20
+#define evForward1min       21
+#define evBackward10min     22
+#define evForward10min      23
+
+#define evNormalSize        24
+#define evDoubleSize        25
+#define evFullScreen        26
+
+#define evSetMoviePosition  27
+#define evSetVolume         28
+#define evSetBalance        29
+#define evMute              30
+
+#define evIncVolume         31
+#define evDecVolume         32
+#define evIncAudioBufDelay  33
+#define evDecAudioBufDelay  34
+#define evIncBalance        35
+#define evDecBalance        36
+
+#define evHelp              37
+
+#define evLoadSubtitle      38
+#define evDropSubtitle      43
+#define evPlayDVD           39
+#define evPlayVCD	    40
+#define evPlayNetwork       41
+#define evLoadAudioFile	    42
+#define evSetAspect         44
+// 45 ...
+
+#define evExit              1000
+
+// --- General events ---
+
+#define evFileLoaded      5000
+#define evHideMouseCursor 5001
+#define evMessageBox      5002
+#define evGeneralTimer    5003
+#define evGtkIsOk         5004
+#define evShowPopUpMenu   5005
+#define evHidePopUpMenu   5006
+#define evSetDVDAudio     5007
+#define evSetDVDSubtitle  5008
+#define evSetDVDTitle     5009
+#define evSetDVDChapter   5010
+#define evSubtitleLoaded  5011
+#define evSetVCDTrack     5012
+#define evSetURL          5013
+
+#define evFName           7000
+#define evMovieTime       7001
+#define evRedraw          7002
+#define evHideWindow      7003
+#define evShowWindow      7004
+#define evFirstLoad       7005
+
+// ----------------------
+
+typedef struct
+{
+ int    msg;
+ char * name;
+} evName;
+
+extern int evBoxs;
+extern evName evNames[];
 
 #define itNULL      0
 #define itButton    101 // button
@@ -77,7 +166,6 @@
 extern char      * skinMPlayerDir;
 extern char      * skinName;
 
-extern void appInit( void * disp );
 extern void appInitStruct( listItems * item );
 extern void appClearItem( wItem * item );
 extern void appCopy( listItems * item1,listItems * item2 );

Index: cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/cfg.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- cfg.c	10 Oct 2002 14:06:35 -0000	1.18
+++ cfg.c	2 Nov 2002 16:09:03 -0000	1.19
@@ -24,11 +24,14 @@
 int    gtkEnableAudioEqualizer = 0;
 
 int    gtkVopPP = 0;
-int    gtkVopLAVC = 0;
-int    gtkVopFAME = 0;
+#ifdef USE_LIBAVCODEC
+ int    gtkVopLAVC = 0;
+#endif
+#ifdef USE_LIBFAME
+ int    gtkVopFAME = 0;
+#endif
 
 int    gtkAONoSound = 0;
-float  gtkAODelay = 0.0f;
 int    gtkAONorm = 0;
 int    gtkAOSurround = 0;
 int    gtkAOExtraStereo = 0;
@@ -73,8 +76,12 @@
 
  { "vf_pp",&gtkVopPP,CONF_TYPE_FLAG,0,0,1,NULL },
  { "vf_autoq",&auto_quality,CONF_TYPE_INT,CONF_RANGE,0,100,NULL },
+#ifdef USE_LIBAVCODEC
  { "vf_lavc",&gtkVopLAVC,CONF_TYPE_FLAG,0,0,1,NULL },
+#endif
+#ifdef USE_LIBFAME
  { "vf_fame",&gtkVopFAME,CONF_TYPE_FLAG,0,0,1,NULL },
+#endif
 
  { "ao_driver",&audio_driver_list,CONF_TYPE_STRING_LIST,0,0,0,NULL },
  { "ao_nosound",&gtkAONoSound,CONF_TYPE_FLAG,0,0,1,NULL },
@@ -82,7 +89,6 @@
  { "ao_surround",&gtkAOSurround,CONF_TYPE_FLAG,0,0,1,NULL },
  { "ao_extra_stereo",&gtkAOExtraStereo,CONF_TYPE_FLAG,0,0,1,NULL },
  { "ao_extra_stereo_coefficient",&gtkAOExtraStereoMul,CONF_TYPE_FLOAT,CONF_RANGE,-10,10,NULL },
- { "ao_delay",&gtkAODelay,CONF_TYPE_FLOAT,CONF_RANGE,-100,100,NULL },
  { "ao_oss_mixer",&gtkAOOSSMixer,CONF_TYPE_STRING,0,0,0,NULL },
  { "ao_oss_device",&gtkAOOSSDevice,CONF_TYPE_STRING,0,0,0,NULL },
  

Index: cfg.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/cfg.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- cfg.h	10 Oct 2002 14:06:35 -0000	1.6
+++ cfg.h	2 Nov 2002 16:09:03 -0000	1.7
@@ -9,7 +9,6 @@
 extern int    gtkVopFAME;
 
 extern int    gtkAONoSound;
-extern float  gtkAODelay;
 extern int    gtkAONorm;
 extern int    gtkAOFakeSurround;
 extern int    gtkAOExtraStereo;

Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- interface.c	23 Oct 2002 23:13:26 -0000	1.54
+++ interface.c	2 Nov 2002 16:09:03 -0000	1.55
@@ -163,8 +163,21 @@
  fullscreen=gtkLoadFullscreen;       
    
  gtkInit();
+// --- initialize X 
  wsXInit( (void *)mDisplay );
- appInit( (void*)mDisplay );
+// ---
+ skinDirInHome=get_path("Skin");
+ skinMPlayerDir=DATADIR "/Skin";
+ printf("SKIN dir 1: '%s'\n",skinDirInHome);
+ printf("SKIN dir 2: '%s'\n",skinMPlayerDir);
+ if ( !skinName ) skinName=strdup( "default" );
+ switch ( skinRead( skinName ) )
+  {
+   case -1: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinNotFound,skinName ); exit( 0 );
+   case -2: mp_msg( MSGT_GPLAYER,MSGL_ERR,MSGTR_SKIN_SKINCFG_SkinCfgReadError,skinName ); exit( 0 );
+  }
+ mplInit( (void *)mDisplay );
+// ---
 
  if ( plCurrent && !filename ) mplSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE );
  if ( sub_name ) guiSetFilename( guiIntfStruct.Subtitlename,sub_name );
@@ -175,9 +188,8 @@
 
 void guiDone( void )
 {
- mp_msg( MSGT_GPLAYER,MSGL_V,"[mplayer] exit.\n" );
+ mp_msg( MSGT_GPLAYER,MSGL_V,"[gui] done.\n" );
  cfg_write();
- gtkDone();
  wsXDone();
 }
 
@@ -399,7 +411,7 @@
 		  if ( vcd_seek_to_track( stream->fd,i ) < 0 ) break;
 		vcd_seek_to_track( stream->fd,vcd_track );
 		guiIntfStruct.VCDTracks=--i;
-		mp_msg( MSGT_GPLAYER,MSGL_INFO,"[interface] vcd tracks: %d\n",guiIntfStruct.VCDTracks );
+		mp_msg( MSGT_GPLAYER,MSGL_INFO,"[gui] vcd tracks: %d\n",guiIntfStruct.VCDTracks );
 		guiIntfStruct.Track=vcd_track;
 	        break;
 	       }
@@ -478,7 +490,14 @@
 	 }
 // -- subtitle
 #ifdef HAVE_DXR3
-	if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) && guiIntfStruct.FileFormat != DEMUXER_TYPE_MPEG_PS && !gtkVopLAVC && !gtkVopFAME )
+	if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) && guiIntfStruct.FileFormat != DEMUXER_TYPE_MPEG_PS
+#ifdef USE_LIBAVCODEC
+	 && !gtkVopLAVC
+#endif
+#ifdef USE_LIBFAME
+	 && !gtkVopFAME 
+#endif
+	 )
 	 {
 	  gtkMessageBox( GTK_MB_FATAL,MSGTR_NEEDLAVCFAME );
 	  guiIntfStruct.Playing=0;
@@ -524,14 +543,22 @@
 	}
 
 #ifdef HAVE_DXR3
+#ifdef USE_LIBAVCODEC
 	remove_vop( "lavc" );
+#endif
+#ifdef USE_LIBFAME
 	remove_vop( "fame" );
+#endif
 	if ( video_driver_list && !gstrcmp( video_driver_list[0],"dxr3" ) )
 	 {
 	  if ( ( guiIntfStruct.StreamType != STREAMTYPE_DVD)&&( guiIntfStruct.StreamType != STREAMTYPE_VCD ) )
 	   {
+#ifdef USE_LIBAVCODEC
 	    if ( gtkVopLAVC ) add_vop( "lavc" );
+#endif
+#ifdef USE_LIBFAME
 	    if ( gtkVopFAME ) add_vop( "fame" );
+#endif
 	   }
 	 }
 #endif
@@ -540,7 +567,6 @@
 	 else remove_vop( "pp" );
 		 
 // --- audio opts
-	audio_delay=gtkAODelay;
 //	if ( ao_plugin_cfg.plugin_list ) { free( ao_plugin_cfg.plugin_list ); ao_plugin_cfg.plugin_list=NULL; }
 	if ( gtkAONorm ) 	       gset( &ao_plugin_cfg.plugin_list,"volnorm" );
 	if ( gtkEnableAudioEqualizer ) gset( &ao_plugin_cfg.plugin_list,"eq" );
@@ -578,14 +604,10 @@
  return False;
 }
 
-extern unsigned int GetTimerMS( void );
-extern int mplTimer;
-
 void guiEventHandling( void )
 {
  if ( !guiIntfStruct.Playing || guiIntfStruct.NoWindow ) wsHandleEvents();
  gtkEventHandling();
- mplTimer=GetTimerMS() / 20;
 }
 
 // --- 
@@ -701,18 +723,6 @@
          } else { url_item->next=NULL; URLList=url_item; }
         return NULL;
 // --- subtitle
-   case gtkSetSubAuto:
-        sub_auto=(int)fparam;
-	return NULL;
-   case gtkSetSubDelay:
-        sub_delay=fparam;
-        return NULL;   
-   case gtkSetSubFPS:
-        sub_fps=(int)fparam;
-        return NULL;   
-   case gtkSetSubPos:
-        sub_pos=(int)fparam;
-        return NULL;   
 #if defined( USE_OSD ) || defined( USE_SUB )
 #ifndef HAVE_FREETYPE
    case gtkSetFontFactor:
@@ -763,16 +773,10 @@
 	if ( (unsigned int)vparam & guiVCD ) guiIntfStruct.VCDTracks=0;
 #endif
 	return NULL;
-   case gtkSetCacheSize:
-        stream_cache_size=(int)fparam;
-	return NULL;
    case gtkSetExtraStereo:
         gtkAOExtraStereoMul=fparam;
 	audio_plugin_extrastereo.control( AOCONTROL_PLUGIN_ES_SET,(int)&gtkAOExtraStereoMul );
         return NULL;
-   case gtkSetAudioDelay:
-        audio_delay=gtkAODelay=fparam;
-	return NULL;
    case gtkSetPanscan:
         {
 	 mp_cmd_t * mp_cmd;

Index: interface.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- interface.h	10 Oct 2002 14:06:35 -0000	1.28
+++ interface.h	2 Nov 2002 16:09:03 -0000	1.29
@@ -161,34 +161,28 @@
 
 extern URLItem * URLList;
 
-#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 gtkSetAudioDelay  11
-#define gtkSetPanscan     12
-#define gtkSetSubDelay    13
-#define gtkSetSubFPS      14
-#define gtkSetSubPos      15
-#define gtkSetSubAuto     16
-#define gtkSetFontFactor  17
-#define gtkSetAutoq       18
-#define gtkClearStruct    19
-#define gtkAddURLItem     20
-#define gtkSetFontOutLine 21
-#define gtkSetFontBlur    22
-#define gtkSetFontTextScale 23
-#define gtkSetFontOSDScale  24
-#define gtkSetFontEncoding  25
-#define gtkSetFontAutoScale 26
-#define gtkSetCacheSize     27
+#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
 
 extern float gtkEquChannels[6][10];
 

--- events.c DELETED ---

--- events.h DELETED ---




More information about the MPlayer-cvslog mailing list