[Mplayer-cvslog] CVS: main mplayer.c,1.345,1.346

Zoltan Ponekker pontscho at mplayer.dev.hu
Wed Dec 19 17:55:33 CET 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv5232

Modified Files:
	mplayer.c 
Log Message:
better dvd support

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.345
retrieving revision 1.346
diff -u -r1.345 -r1.346
--- mplayer.c	18 Dec 2001 23:19:52 -0000	1.345
+++ mplayer.c	19 Dec 2001 16:55:31 -0000	1.346
@@ -188,7 +188,7 @@
 // streaming:
 int audio_id=-1;
 int video_id=-1;
-static int dvdsub_id=-1;
+int dvdsub_id=-1;
 static int vcd_track=0;
 
 // cache2:
@@ -628,7 +628,7 @@
 	printf("Using %s timing\n",softsleep?"software":"usleep()");
 
 #ifdef USE_TERMCAP
-  load_termcap(NULL); // load key-codes
+  if ( !use_gui ) load_termcap(NULL); // load key-codes
 #endif
 
 // ========== Init keyboard FIFO (connection to libvo) ============
@@ -657,6 +657,17 @@
 
 #ifdef HAVE_NEW_GUI
     if ( use_gui ) {
+
+#ifdef USE_DVDREAD 
+     if ( mplShMem->DVDChanged ) 
+      {
+       mplShMem->DVDChanged=0;
+       mplShMem->Playing=1;
+       filename="/dev/dvd";
+       goto play_dvd;
+      }
+#endif
+    
       if(filename && !mplShMem->FilenameChanged) strcpy( mplShMem->Filename,filename );
 //      mplShMem->Playing= (gui_no_filename) ? 0 : 1;
       while(mplShMem->Playing!=1){
@@ -664,6 +675,8 @@
 	EventHandling();
       }
 
+play_dvd:
+
 #ifdef USE_SUB
       if ( mplShMem->SubtitleChanged || !mplShMem->FilenameChanged )
        {
@@ -2095,6 +2108,7 @@
 	 } 
 	mplShMem->Volume=(float)mixer_getbothvolume();
 #ifdef USE_DVDREAD
+        if ( mplShMem->DVDChanged ) goto goto_next_file;
         if ( stream->type == STREAMTYPE_DVD )
 	 {
 	  dvd_priv_t * dvdp = stream->priv;
@@ -2164,6 +2178,7 @@
 
 }
 
+goto_next_file:  // don't jump here after ao/vo/getch initialization!
 
 if(curr_filename+1<num_filenames || use_gui){
     // partial uninit:
@@ -2172,16 +2187,21 @@
 
 }
 
-goto_next_file:  // don't jump here after ao/vo/getch initialization!
-
 #ifdef HAVE_NEW_GUI
       if(use_gui) 
        {
-        mplStop();
+#ifdef USE_DVDREAD
+        if ( !mplShMem->DVDChanged ) 
+#endif
+	mplStop();
        }	
 #endif
 
-if(use_gui || ++curr_filename<num_filenames){
+if(use_gui || ++curr_filename<num_filenames
+#if defined( HAVE_NEW_GUI ) && defined( USE_DVDREAD )
+ || mplShMem->DVDChanged 
+#endif 
+){
 
   current_module="uninit_vcodec";
   if(sh_video) uninit_video(sh_video);




More information about the MPlayer-cvslog mailing list