[Mplayer-cvslog] CVS: main/Gui interface.c,1.9,1.10 interface.h,1.8,1.9

Zoltan Ponekker pontscho at mplayerhq.hu
Mon Apr 22 23:36:15 CEST 2002


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

Modified Files:
	interface.c interface.h 
Log Message:
fix audio only files play

Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- interface.c	18 Apr 2002 14:03:50 -0000	1.9
+++ interface.c	22 Apr 2002 21:36:12 -0000	1.10
@@ -13,8 +13,11 @@
 #include "mplayer/mplayer.h"
 #include "app.h"
 #include "../libvo/x11_common.h"
+#include "../libvo/video_out.h"
 #include "../input/input.h"
+
 #include "../libmpdemux/stream.h"
+#include "../libmpdemux/demuxer.h"
 
 guiInterface_t guiIntfStruct;
 
@@ -45,6 +48,20 @@
   evSkinBrowser
  };
 
+typedef struct 
+{
+ demux_stream_t *ds;
+ unsigned int format;
+ struct codecs_st *codec;
+ int inited;
+ // output format:                                                                                
+ float timer;
+ float fps;
+ float frametime;
+ int i_bps;
+ int disp_w,disp_h;
+} tmp_sh_video_t;
+
 void guiGetEvent( int type,char * arg )
 {
 #ifdef USE_DVDREAD
@@ -70,6 +87,23 @@
    case guiSetFileName:
         if ( arg ) guiSetFilename( guiIntfStruct.Filename,arg );
         break;
+   case guiSetAudioOnly:
+	guiIntfStruct.AudioOnly=(int)arg;
+	if ( (int)arg ) wsVisibleWindow( &appMPlayer.subWindow,wsHideWindow );
+	  else wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
+	break;
+   case guiReDrawSubWindow:
+	wsPostRedisplay( &appMPlayer.subWindow );
+	break;
+   case guiSetShVideo:
+        if ( arg )
+	 {
+	  tmp_sh_video_t * sh_video = (tmp_sh_video_t *)arg;
+	  mplResizeToMovieSize( sh_video->disp_w,sh_video->disp_h );
+	  guiIntfStruct.MovieWidth=sh_video->disp_w;
+	  guiIntfStruct.MovieHeight=sh_video->disp_h;
+         }
+	break;
 #ifdef USE_DVDREAD
    case guiSetDVD:
         guiIntfStruct.DVD.titles=dvdp->vmg_file->tt_srpt->nr_of_srpts;
@@ -106,7 +140,7 @@
 
 void guiEventHandling( void )
 {
- if ( use_gui && !guiIntfStruct.Playing ) wsHandleEvents();
+ if ( ( use_gui && !guiIntfStruct.Playing )||( guiIntfStruct.AudioOnly ) ) wsHandleEvents();
  gtkEventHandling();
  mplTimerHandler(); // handle GUI timer events
 }

Index: interface.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- interface.h	17 Apr 2002 21:12:11 -0000	1.8
+++ interface.h	22 Apr 2002 21:36:12 -0000	1.9
@@ -75,6 +75,7 @@
    int    Track;
    int    AudioType;
    int    StreamType;
+   int	  AudioOnly;
    int    TimeSec;
    int    LengthInSec;
    int    FrameDrop;
@@ -93,12 +94,15 @@
 
 extern guiInterface_t guiIntfStruct;
 
-#define guiXEvent      0
-#define guiCEvent      1
-#define guiIEvent      2
-#define guiSetDVD      3
-#define guiSetFileName 4
-#define guiSetState    5
+#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
 
 #define guiSetStop  0
 #define guiSetPlay  1




More information about the MPlayer-cvslog mailing list