[Mplayer-cvslog] CVS: main/Gui interface.c,1.43,1.44 interface.h,1.23,1.24

Zoltan Ponekker pontscho at mplayerhq.hu
Fri Aug 30 00:24:50 CEST 2002


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

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


- add play time subtitle change support
- better language support


Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- interface.c	29 Aug 2002 17:16:32 -0000	1.43
+++ interface.c	29 Aug 2002 22:24:47 -0000	1.44
@@ -238,6 +238,27 @@
 }
 #endif
 
+#ifdef USE_SUB
+void guiLoadSubtitle( char * name )
+{
+ if ( guiIntfStruct.Playing == 0 )
+  {
+   guiIntfStruct.SubtitleChanged=1;
+   return;
+  }
+ if ( subtitles )
+  {
+   sub_free( subtitles );
+   if ( sub_name ) free( sub_name );
+   sub_name=NULL;
+   vo_sub=NULL;
+   subtitles=NULL;
+  }
+ sub_name=gstrdup( name );
+ subtitles=sub_read_file( sub_name,guiIntfStruct.FPS );
+}
+#endif
+
 static void add_vop( char * str )
 {
  mp_msg( MSGT_GPLAYER,MSGL_STATUS,"[gui] add video filter: %s\n",str );
@@ -337,9 +358,11 @@
 	guiIntfStruct.StreamType=stream->type;
 	switch( stream->type )
 	 {
+#ifdef USE_DVDREAD
 	  case STREAMTYPE_DVD: 
 	       guiGetEvent( guiSetDVD,(char *)stream->priv );
 	       break;
+#endif
 #ifdef HAVE_VCD
 	  case STREAMTYPE_VCD: 
 	       {
@@ -353,6 +376,7 @@
 	        break;
 	       }
 #endif
+	  default: break;
 	 }
 	break;
    case guiIEvent:
@@ -391,6 +415,8 @@
 // -- video
 	if ( arg )
 	 {
+	  tmp_sh_video_t * sh = (tmp_sh_video_t *)arg;
+	  guiIntfStruct.FPS=sh->fps;
 	  if ( vo_gamma_brightness == 1000 )
 	   { vo_gamma_brightness=0; get_video_colors( (void *)arg,"brightness",&vo_gamma_brightness ); }
 	  if ( vo_gamma_contrast == 1000 )

Index: interface.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- interface.h	29 Aug 2002 17:16:32 -0000	1.23
+++ interface.h	29 Aug 2002 22:24:47 -0000	1.24
@@ -86,6 +86,7 @@
    int    LengthInSec;
    int    FrameDrop;
    int    FileFormat;
+   float  FPS;
 
    char * Filename;
    int    FilenameChanged;




More information about the MPlayer-cvslog mailing list