[MPlayer-dev-eng] [PATCH] [GUI] Aspect change without restarting playback

Wojtek Kaniewski wojtekka at bydg.pdi.net
Sun Jun 8 15:21:12 CEST 2003


instead of restarting playback, it calls mpcodecs_config_vo() which
takes care of setting up proper size of vo. unfortunately i have no
dvd player, so i can't test if it breaks anything with dvd playback.

regards,
wojtek
-------------- next part --------------
--- Gui/interface.c	26 May 2003 08:33:43 -0000	1.85
+++ Gui/interface.c	8 Jun 2003 13:15:16 -0000
@@ -629,8 +629,8 @@
 	 {
 	  sh_video_t * sh = (sh_video_t *)arg;
 	  guiIntfStruct.FPS=sh->fps;
+	  guiIntfStruct.Aspect=sh->aspect;
 	 }
-
 	if ( guiIntfStruct.NoWindow ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
 	
 	if ( guiIntfStruct.StreamType == STREAMTYPE_STREAM ) btnSet( evSetMoviePosition,btnDisabled );
--- Gui/interface.h	5 Feb 2003 23:00:44 -0000	1.36
+++ Gui/interface.h	8 Jun 2003 13:15:17 -0000
@@ -82,6 +82,7 @@
    int    MovieWidth;
    int    MovieHeight;
    int    NoWindow;
+   float  Aspect;
 
    float  Volume;
    float  Balance;
--- Gui/mplayer/mw.c	26 May 2003 08:45:42 -0000	1.110
+++ Gui/mplayer/mw.c	8 Jun 2003 13:15:18 -0000
@@ -315,14 +315,9 @@
 	  case 3:  movie_aspect=4.0f / 3.0f;  break;
 	  case 4:  movie_aspect=2.35;         break;
 	  case 1:
-	  default: movie_aspect=-1;
+	  default: movie_aspect=guiIntfStruct.Aspect;
 	 }
-	wsClearWindow( appMPlayer.subWindow );
-#ifdef USE_DVDREAD
-	if ( guiIntfStruct.StreamType == STREAMTYPE_DVD || guiIntfStruct.StreamType == STREAMTYPE_VCD ) goto play_dvd_2;
-	 else 
-#endif
-	 guiIntfStruct.NewPlay=1;
+	mpcodecs_config_vo(guiIntfStruct.sh_video, guiIntfStruct.MovieWidth, guiIntfStruct.MovieHeight, 0);
 	break;
 
 // --- timer events



More information about the MPlayer-dev-eng mailing list