[Mplayer-cvslog] CVS: main/Gui/mplayer mw.h,1.38,1.39 play.h,1.16,1.17

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


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

Modified Files:
	mw.h play.h 
Log Message:
better dvd support

Index: mw.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/mw.h,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- mw.h	18 Dec 2001 23:19:53 -0000	1.38
+++ mw.h	19 Dec 2001 16:55:31 -0000	1.39
@@ -197,6 +197,8 @@
 #define IZE(x) printf("@@@ " x " @@@\n");
 
 extern void exit_player(char* how);
+extern int audio_id;
+extern int dvdsub_id;
 
 void mplMsgHandle( int msg,float param )
 {
@@ -212,16 +214,19 @@
 
 #ifdef USE_DVDREAD
    case evPlayDVD:
+        dvd_title=1;
+        dvd_chapter=1;
+        dvd_angle=1;
+play_dvd_2:
         mplShMem->StreamType=STREAMTYPE_DVD;
 #endif
-	
    case evPlay:
    case evPlaySwitchToPause:
         btnModify( evPlaySwitchToPause,btnDisabled );
         btnModify( evPauseSwitchToPlay,btnReleased );
         if ( ( msg == evPlaySwitchToPause )&( mplShMem->Playing == 1 ) ) goto NoPause;
         mplMainRender=1;
-	
+
         switch ( mplShMem->StreamType )
          {
           case STREAMTYPE_STREAM: 
@@ -231,9 +236,6 @@
 	       break;
 #ifdef USE_DVDREAD
           case STREAMTYPE_DVD:    
-	       dvd_title=1; 
-	       dvd_chapter=1; 
-	       dvd_angle=1; 
 	       strcpy( mplShMem->Filename,"/dev/dvd" );
 	       break;
 #endif
@@ -241,30 +243,48 @@
         mplPlay();
         break;
    case evSetDVDSubtitle:
+#ifdef USE_DVDREAD
+        dvdsub_id=(int)param;
+	dvd_title=mplShMem->DVD.current_title;
+	dvd_angle=mplShMem->DVD.current_angle;
+        dvd_chapter=mplShMem->DVD.current_chapter;
+        mplShMem->DVDChanged=1;
+	goto play_dvd_2;
+#endif
         break;
    case evSetDVDAudio:
+#ifdef USE_DVDREAD
+        audio_id=(int)param;
+	dvd_title=mplShMem->DVD.current_title;
+	dvd_angle=mplShMem->DVD.current_angle;
+        dvd_chapter=mplShMem->DVD.current_chapter;
+        mplShMem->DVDChanged=1;
+	goto play_dvd_2;
+#endif
         break;
    case evSetDVDChapter:
-	mplStop();
-	dvd_title=mplShMem->DVD.current_title - 1;
-	dvd_angle=mplShMem->DVD.current_angle - 1;
+#ifdef USE_DVDREAD
+	dvd_title=mplShMem->DVD.current_title;
+	dvd_angle=mplShMem->DVD.current_angle;
         dvd_chapter=(int)param;
-        strcpy( mplShMem->Filename,"/dev/dvd" );
-	mplPlay();
+        mplShMem->DVDChanged=1;
+	goto play_dvd_2;
+#endif
         break;
    case evSetDVDTitle:
-	mplStop();
+#ifdef USE_DVDREAD
         dvd_title=(int)param;
 	dvd_chapter=1;
 	dvd_angle=1;
-        strcpy( mplShMem->Filename,"/dev/dvd" );
-	mplPlay();
+        mplShMem->DVDChanged=1;
+	goto play_dvd_2;
+#endif
         break;
 
    case evPause:
    case evPauseSwitchToPlay:
-        btnModify( evPlaySwitchToPause,btnReleased );
-        btnModify( evPauseSwitchToPlay,btnDisabled );
+//        btnModify( evPlaySwitchToPause,btnReleased );
+//        btnModify( evPauseSwitchToPlay,btnDisabled );
 NoPause:
         mplMainRender=1;
         mplPause();

Index: play.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/play.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- play.h	18 Dec 2001 23:19:53 -0000	1.16
+++ play.h	19 Dec 2001 16:55:31 -0000	1.17
@@ -58,6 +58,7 @@
    mplUnknowErrorStruct error;
 #ifdef USE_DVDREAD
    mplDVDStruct         DVD;
+   int                  DVDChanged;
 #endif
 
    int    Playing;




More information about the MPlayer-cvslog mailing list