[Mplayer-cvslog] CVS: main/Gui app.h,1.14,1.15 interface.c,1.63,1.64 interface.h,1.32,1.33

Zoltan Ponekker pontscho at mplayerhq.hu
Wed Dec 11 02:21:41 CET 2002


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

Modified Files:
	app.h interface.c interface.h 
Log Message:


- fix three submenu bug
	- audio/video track hiding
	- normal/double/fullscreen handling
	- dvd audio channel setting bug
- fix file/url/vcd/dvd playing
- fix variables initialization
- some small bug fix
- applied some patch from Rüdiger Kuhlmann


Index: app.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/app.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- app.h	5 Dec 2002 23:54:14 -0000	1.14
+++ app.h	11 Dec 2002 01:21:08 -0000	1.15
@@ -58,7 +58,7 @@
 #define evLoadAudioFile	    42
 #define evSetAspect         44
 #define evSetAudio	    45
-#define evSetVideo          46
+#define evSetVideo	    46
 // 47 ...
 
 #define evExit              1000

Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- interface.c	29 Nov 2002 00:58:22 -0000	1.63
+++ interface.c	11 Dec 2002 01:21:08 -0000	1.64
@@ -13,6 +13,7 @@
 #include "mplayer/gtk/eq.h"
 #include "mplayer/widgets.h"
 #include "mplayer/mplayer.h"
+#include "mplayer/play.h"
 
 #include "../mplayer.h"
 #include "app.h"
@@ -264,6 +265,7 @@
  mplSubRender=1;
 // ---
 
+ if ( filename ) mplSetFileName( NULL,filename,STREAMTYPE_FILE );
  if ( plCurrent && !filename ) mplSetFileName( plCurrent->path,plCurrent->name,STREAMTYPE_FILE );
  if ( sub_name ) guiSetFilename( guiIntfStruct.Subtitlename,sub_name );
 #if defined( USE_OSD ) || defined( USE_SUB )
@@ -435,10 +437,11 @@
    case guiCEvent:
         switch ( (int)arg )
 	 {
-          case guiSetPlay:  guiIntfStruct.Playing=1; mplState(); break;
-          case guiSetStop:  guiIntfStruct.Playing=0; mplState(); break;
-          case guiSetPause: guiIntfStruct.Playing=2; mplState(); break;
+          case guiSetPlay:  guiIntfStruct.Playing=1; break;
+          case guiSetStop:  guiIntfStruct.Playing=0; break;
+          case guiSetPause: guiIntfStruct.Playing=2; break;
 	 }
+	mplState();
         break;
    case guiSetState:
 	mplState();
@@ -451,9 +454,6 @@
 	if ( (int)arg ) { guiIntfStruct.NoWindow=True; wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow ); }
 	  else wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
 	break;
-   case guiReDrawSubWindow:
-	wsPostRedisplay( &appMPlayer.subWindow );
-	break;
    case guiSetDemuxer:
 	guiIntfStruct.demuxer=(void *)arg;
 	break;
@@ -500,8 +500,6 @@
 		  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,"[gui] vcd tracks: %d\n",guiIntfStruct.VCDTracks );
-		guiIntfStruct.Track=vcd_track;
 	        break;
 	       }
 #endif
@@ -554,12 +552,6 @@
 	if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM ) btnSet( evSetMoviePosition,btnDisabled );
 	 else btnSet( evSetMoviePosition,btnReleased );
 	 
-	if ( gtkCacheOn ) stream_cache_size=gtkCacheSize;
-	 else stream_cache_size=-1;
-
-	if ( gtkAutoSyncOn ) autosync=gtkAutoSync;
-	 else autosync=0;
-
 // -- audio
         if ( audio_out )
 	{
@@ -604,14 +596,42 @@
 #endif
 	break;
    case guiSetDefaults:
-	if ( filename && !guiIntfStruct.Filename )
-	 {
-	  gtkSet( gtkDelPl,0,NULL ); guiIntfStruct.StreamType=STREAMTYPE_FILE;
-	  guiSetFilename( guiIntfStruct.Filename,filename );
+        if ( guiIntfStruct.Playing == 1 && guiIntfStruct.FilenameChanged )
+         {
+          audio_id=-1;
+	  video_id=-1;
+	  dvdsub_id=-1;
+	  vobsub_id=-1;
+          stream_cache_size=-1;
+	  autosync=0;
+	  vcd_track=0;
+	  dvd_title=0;
+	 }				
+	wsPostRedisplay( &appMPlayer.subWindow );
+	break;
+   case guiSetParameters:
+        switch ( guiIntfStruct.StreamType ) 
+         {
+	  case STREAMTYPE_PLAYLIST:
+	       break;
+#ifdef HAVE_VCD
+	  case STREAMTYPE_VCD:
+	       vcd_track=guiIntfStruct.Track;
+	       break;
+#endif
+#ifdef USE_DVDREAD
+ 	  case STREAMTYPE_DVD:
+	       dvd_title=guiIntfStruct.Title;
+	       dvd_chapter=guiIntfStruct.Chapter;
+	       dvd_angle=guiIntfStruct.Angle;
+	       break;
+#endif
+	 }
+	if ( guiIntfStruct.StreamType != STREAMTYPE_PLAYLIST )
+	 {	
+	  if ( guiIntfStruct.Filename ) filename=gstrdup( guiIntfStruct.Filename );
+	   else if ( filename ) guiSetFilename( guiIntfStruct.Filename,filename );
 	 }
-
-       guiIntfStruct.DiskChanged=0;
-
 // --- video opts
        
        if ( !video_driver_list )
@@ -674,7 +694,7 @@
 	mixer_device=gtkAOOSSMixer;
 	if ( audio_driver_list && !gstrncmp( audio_driver_list[0],"oss",3 ) && gtkAOOSSDevice )
 	 {
-	  char * tmp = calloc( 1,strlen( gtkAOOSSDevice ) + 5 );
+	  char * tmp = calloc( 1,strlen( gtkAOOSSDevice ) + 7 );
 	  sprintf( tmp,"oss:%s",gtkAOOSSDevice );
 	  gaddlist( &audio_driver_list,tmp );
 	 }
@@ -692,9 +712,19 @@
 #endif
 
 // --- misc		    
+	if ( gtkCacheOn ) stream_cache_size=gtkCacheSize;
+	 else stream_cache_size=-1;
+
+	if ( gtkAutoSyncOn ) autosync=gtkAutoSync;
+	 else autosync=0;
+
         if ( guiIntfStruct.AudioFile ) audio_stream=guiIntfStruct.AudioFile;
 	  else if ( guiIntfStruct.FilenameChanged ) audio_stream=NULL;
 	
+        guiIntfStruct.DiskChanged=0;
+        guiIntfStruct.FilenameChanged=0;
+        guiIntfStruct.NewPlay=0;
+
 	break;
   }
  return False;

Index: interface.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.h,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- interface.h	29 Nov 2002 00:58:22 -0000	1.32
+++ interface.h	11 Dec 2002 01:21:08 -0000	1.33
@@ -63,9 +63,13 @@
    void * event_struct;
 
    int    DiskChanged;
+   int    NewPlay;
 
 #ifdef USE_DVDREAD
    guiDVDStruct         DVD;
+   int			Title;
+   int			Angle;
+   int			Chapter;
 #endif
 
 #ifdef HAVE_VCD
@@ -125,6 +129,7 @@
 #define guiSetValues	    13
 #define guiSetFileFormat    14
 #define guiSetDemuxer       15
+#define guiSetParameters    16
 
 #define guiSetStop  0
 #define guiSetPlay  1




More information about the MPlayer-cvslog mailing list