changeset 2994:4e30e2c6dcb9

dvd playing bug fixed
author pontscho
date Mon, 19 Nov 2001 09:48:59 +0000
parents 734ad5d562ef
children f294650ae03b
files Gui/mplayer/mw.h
diffstat 1 files changed, 45 insertions(+), 38 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/mplayer/mw.h	Mon Nov 19 09:43:55 2001 +0000
+++ b/Gui/mplayer/mw.h	Mon Nov 19 09:48:59 2001 +0000
@@ -225,52 +225,43 @@
   {
 // --- user events
    case evExit:
-//        IZE("evExit");
         wsDoExit();  // sets wsTrue=False;
         exit_player( "Exit" );
         break;
-   case evIconify:
-        switch ( (int)param )
-         {
-          case 0: wsIconify( appMPlayer.mainWindow ); break;
-          case 1: wsIconify( appMPlayer.subWindow ); break;
-         }
-        break;
-   case evFullScreen:
-        IZE("evFullS");
-        for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+
+   case evPlayDVD:
+        mplShMem->StreamType=STREAMTYPE_DVD;
+	
+   case evPlay:
+   case evPlaySwitchToPause:
+        btnModify( evPlaySwitchToPause,btnDisabled );
+        btnModify( evPauseSwitchToPlay,btnReleased );
+        if ( ( msg == evPlaySwitchToPause )&( mplShMem->Playing == 1 ) ) goto NoPause;
+        mplMainRender=1;
+	
+        switch ( mplShMem->StreamType )
          {
-          if ( appMPlayer.Items[j].msg == evFullScreen )
-           {
-            appMPlayer.Items[j].tmp=!appMPlayer.Items[j].tmp;
-            appMPlayer.Items[j].pressed=appMPlayer.Items[j].tmp;
-           }
+//          case STREAMTYPE_FILE:   strcat( trbuf,"f" ); break;
+//          case STREAMTYPE_STREAM: strcat( trbuf,"u" ); break;
+//          case STREAMTYPE_VCD:    strcat( trbuf,"v" ); break;
+          case STREAMTYPE_DVD:    
+	       dvd_title=1; 
+	       dvd_chapter=1; 
+	       dvd_angle=1; 
+	       strcpy( mplShMem->Filename,"/dev/dvd" );
+	       break;
          }
-        mplMainRender=1;
-        mplFullScreen();
-        break;
-
-   case evPlaySwitchToPause:
-        IZE("evPlay->Pause");
-        if ( Filename )
-         {
-          btnModify( evPlaySwitchToPause,btnDisabled );
-          btnModify( evPauseSwitchToPlay,btnReleased );
-         }
-        if ( mplShMem->Playing == 1 ) goto NoPause;
-   case evPlay:
-        IZE("evPlay");
-        mplMainRender=1;
         mplPlay();
         break;
+	
+//        break;
 
+   case evPause:
    case evPauseSwitchToPlay:
-        IZE("evPause->Play");
+Pause:
         btnModify( evPlaySwitchToPause,btnReleased );
         btnModify( evPauseSwitchToPlay,btnDisabled );
-   case evPause:
 NoPause:
-        IZE("evPause");
         mplMainRender=1;
         mplPause();
         break;
@@ -284,10 +275,8 @@
         break;
 
    case evLoadPlay:
-        IZE("evLoadPlay");
         mplMainAutoPlay=1;
    case evLoad:
-        IZE("evLoad");
         mplMainRender=1;
         gtkSendMessage( evLoad );
         break;
@@ -341,6 +330,13 @@
    case evSetBalance: mplShMem->VolumeChanged=1; break;
 
 
+   case evIconify:
+        switch ( (int)param )
+         {
+          case 0: wsIconify( appMPlayer.mainWindow ); break;
+          case 1: wsIconify( appMPlayer.subWindow ); break;
+         }
+        break;
    case evNormalSize:
         if ( mplShMem->Playing )
          {
@@ -363,6 +359,19 @@
           mplResize( appMPlayer.subWindow.X,appMPlayer.subWindow.Y,moviewidth,movieheight );
          }
         break;
+   case evFullScreen:
+        IZE("evFullS");
+        for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ )
+         {
+          if ( appMPlayer.Items[j].msg == evFullScreen )
+           {
+            appMPlayer.Items[j].tmp=!appMPlayer.Items[j].tmp;
+            appMPlayer.Items[j].pressed=appMPlayer.Items[j].tmp;
+           }
+         }
+        mplMainRender=1;
+        mplFullScreen();
+        break;
 
 // --- timer events
    case evHideMouseCursor:
@@ -382,13 +391,11 @@
           mplMainRender=1;
           mplMainAutoPlay=0;
           mplPlay();
-	  break;
          }
 	if ( mplMiddleMenu )
 	 {
 	  mplMiddleMenu=0;
 	  mplMsgHandle( gtkShMem->popupmenu,0 );
-	  break;
 	 }
         break;
 // --- system events