changeset 6280:cf2c2b92d1a7

add VCD support for GUI
author pontscho
date Mon, 03 Jun 2002 15:06:32 +0000
parents bf33e2a04dfa
children cd1cde2f3cc0
files Gui/events.c Gui/events.h Gui/interface.c Gui/interface.h Gui/mplayer/gtk/menu.c Gui/mplayer/mplayer.c Gui/mplayer/mw.h Gui/mplayer/play.c help_mp-cs.h help_mp-de.h help_mp-dk.h help_mp-en.h help_mp-es.h help_mp-fr.h help_mp-hu.h help_mp-it.h help_mp-ko.h help_mp-nl.h help_mp-no.h help_mp-pl.h help_mp-pt_BR.h help_mp-ru.h help_mp-sk.h mplayer.c mplayer.h
diffstat 25 files changed, 177 insertions(+), 29 deletions(-) [+]
line wrap: on
line diff
--- a/Gui/events.c	Mon Jun 03 14:18:13 2002 +0000
+++ b/Gui/events.c	Mon Jun 03 15:06:32 2002 +0000
@@ -43,7 +43,8 @@
   { evSetBalance,        "evSetBalance"        },
   { evHelp,		 "evHelp"	       },	
   { evLoadSubtitle,      "evLoadSubtitle"      },
-  { evPlayDVD,		 "evPlayDVD"	       }
+  { evPlayDVD,		 "evPlayDVD"	       },
+  { evPlayVCD,		 "evPlayVCD"	       }
  };
 
 int evBoxs = sizeof( evNames ) / sizeof( evName );
--- a/Gui/events.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/Gui/events.h	Mon Jun 03 15:06:32 2002 +0000
@@ -48,6 +48,7 @@
 
 #define evLoadSubtitle      38
 #define evPlayDVD           39
+#define evPlayVCD	    40
 
 #define evExit              1000
 
@@ -65,6 +66,7 @@
 #define evSetDVDTitle     5009
 #define evSetDVDChapter   5010
 #define evSubtitleLoaded  5011
+#define evSetVCDTrack     5012
 
 #define evFName           7000
 #define evMovieTime       7001
--- a/Gui/interface.c	Mon Jun 03 14:18:13 2002 +0000
+++ b/Gui/interface.c	Mon Jun 03 15:06:32 2002 +0000
@@ -1,4 +1,4 @@
-
+ 
 #include <inttypes.h>
 #include <stdlib.h>
 #include <stdio.h>
@@ -16,6 +16,9 @@
 #include "../libvo/video_out.h"
 #include "../input/input.h"
 
+#include <inttypes.h>
+#include <sys/types.h>
+
 #include "../libmpdemux/stream.h"
 #include "../libmpdemux/demuxer.h"
 
@@ -64,6 +67,7 @@
 
 void guiGetEvent( int type,char * arg )
 {
+ stream_t * stream = (stream_t *) arg;
 #ifdef USE_DVDREAD
  dvd_priv_t * dvdp = (dvd_priv_t *) arg;
 #endif 
@@ -122,6 +126,28 @@
         guiIntfStruct.Track=dvd_title + 1;
         break;
 #endif
+   case guiSetStream:
+	guiIntfStruct.StreamType=stream->type;
+	switch( stream->type )
+	 {
+	  case STREAMTYPE_DVD: 
+	       guiGetEvent( guiSetDVD,(char *)stream->priv );
+	       break;
+#ifdef HAVE_VCD
+	  case STREAMTYPE_VCD: 
+	       {
+	        int i;
+		for ( i=1;i < 100;i++ )
+		  if ( vcd_seek_to_track( stream->fd,i ) < 0 ) break;
+		vcd_seek_to_track( stream->fd,vcd_track );
+		guiIntfStruct.VCDTracks=--i;
+		mp_msg( MSGT_GPLAYER,MSGL_INFO,"[interface] vcd tracks: %d\n",guiIntfStruct.VCDTracks );
+		guiIntfStruct.Track=vcd_track;
+	        break;
+	       }
+#endif
+	 }
+	break;
 #ifdef HAVE_NEW_INPUT
    case guiIEvent:
         printf( "cmd: %d\n",(int)arg );
@@ -138,6 +164,14 @@
 	 }
 	break;
 #endif
+   case guiClearStruct:
+#ifdef USE_DVDREAD
+	if ( (unsigned int)arg & guiDVD ) memset( &guiIntfStruct.DVD,0,sizeof( guiDVDStruct ) );
+#endif
+#ifdef HAVE_VCD
+	if ( (unsigned int)arg & guiVCD ) guiIntfStruct.VCDTracks=0;
+#endif
+	break;
   }
 }
 
--- a/Gui/interface.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/Gui/interface.h	Mon Jun 03 15:06:32 2002 +0000
@@ -56,9 +56,15 @@
    guiResizeStruct      resize;
    guiVideoStruct       videodata;
    guiUnknowErrorStruct error;
+
+   int                  DiskChanged;
+
 #ifdef USE_DVDREAD
    guiDVDStruct         DVD;
-   int                  DVDChanged;
+#endif
+
+#ifdef HAVE_VCD
+   int    VCDTracks;
 #endif
 
    int    Playing;
@@ -103,11 +109,17 @@
 #define guiSetAudioOnly     6
 #define guiReDrawSubWindow  7
 #define guiSetShVideo       8
+#define guiSetStream        9
+#define guiClearStruct      10
 
 #define guiSetStop  0
 #define guiSetPlay  1
 #define guiSetPause 2
 
+#define guiDVD      	1
+#define guiVCD		2
+#define guiALL		0xffffffff
+
 extern char *get_path(char *filename); 
 
 extern void guiInit( void );
--- a/Gui/mplayer/gtk/menu.c	Mon Jun 03 14:18:13 2002 +0000
+++ b/Gui/mplayer/gtk/menu.c	Mon Jun 03 15:06:32 2002 +0000
@@ -254,6 +254,9 @@
 GtkWidget * DVDAudioLanguageMenu;
 GtkWidget * DVDSubtitleLanguageMenu;
 
+GtkWidget * VCDSubMenu;
+GtkWidget * VCDTitleMenu;
+
 GtkWidget * create_PopUpMenu( void )
 {
  GtkWidget * Menu = NULL;
@@ -266,7 +269,9 @@
   AddSeparator( Menu );
    SubMenu=AddSubMenu( Menu,MSGTR_MENU_Open );
     AddMenuItem( SubMenu,MSGTR_MENU_PlayFile"    ", evLoadPlay );
-    AddMenuItem( SubMenu,MSGTR_MENU_PlayVCD, evNone );
+#ifdef HAVE_VCD
+    AddMenuItem( SubMenu,MSGTR_MENU_PlayVCD, evPlayVCD );
+#endif
 #ifdef USE_DVDREAD
     AddMenuItem( SubMenu,MSGTR_MENU_PlayDVD, evPlayDVD );
 #endif
@@ -287,6 +292,26 @@
     AddMenuItem( SubMenu,MSGTR_MENU_NormalSize"      ", evNormalSize );
     AddMenuItem( SubMenu,MSGTR_MENU_DoubleSize, evDoubleSize );
     AddMenuItem( SubMenu,MSGTR_MENU_FullScreen, evFullScreen );
+#ifdef HAVE_VCD
+   VCDSubMenu=AddSubMenu( Menu,MSGTR_MENU_VCD );
+    AddMenuItem( VCDSubMenu,MSGTR_MENU_PlayDisc,evPlayVCD );
+    AddSeparator( VCDSubMenu );
+    VCDTitleMenu=AddSubMenu( VCDSubMenu,MSGTR_MENU_Titles );
+    if ( guiIntfStruct.VCDTracks ) 
+     {
+      char tmp[32]; int i;
+      for ( i=0;i < guiIntfStruct.VCDTracks;i++ )
+       {
+        sprintf( tmp,MSGTR_MENU_Title,i+1 );
+	AddMenuItem( VCDTitleMenu,tmp,( (i+1) << 16 ) + evSetVCDTrack );
+       }
+     }
+     else
+      {
+       MenuItem=AddMenuItem( VCDTitleMenu,MSGTR_MENU_None,evNone );
+       gtk_widget_set_sensitive( MenuItem,FALSE );
+      }
+#endif
 #ifdef USE_DVDREAD
    DVDSubMenu=AddSubMenu( Menu,MSGTR_MENU_DVD );
     AddMenuItem( DVDSubMenu,MSGTR_MENU_PlayDisc"    ", evPlayDVD );
--- a/Gui/mplayer/mplayer.c	Mon Jun 03 14:18:13 2002 +0000
+++ b/Gui/mplayer/mplayer.c	Mon Jun 03 15:06:32 2002 +0000
@@ -71,8 +71,9 @@
 
  vo_setwindow( appMPlayer.subWindow.WindowID, appMPlayer.subWindow.wGC );
 
- i=wsHideFrame|wsMaxSize|wsHideWindow;
- if ( appMPlayer.mainDecoration ) i=wsShowFrame|wsMaxSize|wsHideWindow;
+// i=wsHideFrame|wsMaxSize|wsHideWindow;
+// if ( appMPlayer.mainDecoration ) i=wsShowFrame|wsMaxSize|wsHideWindow;
+ i=wsShowFrame|wsMaxSize|wsHideWindow;
  wsCreateWindow( &appMPlayer.mainWindow,
   appMPlayer.main.x,appMPlayer.main.y,appMPlayer.main.width,appMPlayer.main.height,
   wsNoBorder,wsShowMouseCursor|wsHandleMouseButton|wsHandleMouseMove,i,"MPlayer" ); //wsMinSize|
@@ -114,6 +115,8 @@
 
  guiIntfStruct.Playing=0;
 
+ if ( !appMPlayer.mainDecoration ) wsWindowDecoration( &appMPlayer.mainWindow,0 );
+ 
  wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow );
  wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
 }
--- a/Gui/mplayer/mw.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/Gui/mplayer/mw.h	Mon Jun 03 15:06:32 2002 +0000
@@ -35,6 +35,11 @@
             else strcat( tmp,"no chapter" );
           break;
 #endif
+#ifdef HAVE_VCD
+   case STREAMTYPE_VCD:
+        sprintf( tmp,"VCD track %d",guiIntfStruct.Track );
+	break;
+#endif
    default: strcpy( tmp,"no media opened" );
   }
  if ( c )
@@ -102,7 +107,9 @@
            switch ( guiIntfStruct.StreamType )
             {
              case STREAMTYPE_FILE:   strcat( trbuf,"f" ); break;
+#ifdef HAVE_VCD
              case STREAMTYPE_VCD:    strcat( trbuf,"v" ); break;
+#endif
              case STREAMTYPE_STREAM: strcat( trbuf,"u" ); break;
 #ifdef USE_DVDREAD
              case STREAMTYPE_DVD:    strcat( trbuf,"d" ); break;
@@ -200,6 +207,8 @@
 extern int audio_id;
 extern int dvdsub_id;
 extern char * dvd_device;
+extern int vcd_track;
+extern char * cdrom_device;
 
 void mplEventHandling( int msg,float param )
 {
@@ -212,6 +221,13 @@
         exit_player( "Exit" );
         break;
 
+#ifdef HAVE_VCD
+   case evSetVCDTrack:
+        guiIntfStruct.Track=(int)param;
+   case evPlayVCD:
+	guiIntfStruct.StreamType=STREAMTYPE_VCD;
+	goto play;
+#endif
 #ifdef USE_DVDREAD
    case evPlayDVD:
         guiIntfStruct.DVD.current_title=1;
@@ -222,18 +238,41 @@
 #endif
    case evPlay:
    case evPlaySwitchToPause:
+play:
         mplMainAutoPlay=0;
         if ( ( msg == evPlaySwitchToPause )&&( guiIntfStruct.Playing == 1 ) ) goto NoPause;
 
+	vcd_track=0;
+	dvd_title=0;
+
         switch ( guiIntfStruct.StreamType )
          {
-          case STREAMTYPE_STREAM:
+	  case STREAMTYPE_FILE:
+	       guiGetEvent( guiClearStruct,guiALL );
+	       break;
+#ifdef HAVE_VCD
           case STREAMTYPE_VCD:
-          case STREAMTYPE_FILE:
-               dvd_title=0;
-               break;
+	       guiGetEvent( guiClearStruct,guiALL - guiVCD );
+	       if ( !cdrom_device )
+	        {
+		 cdrom_device=DEFAULT_CDROM_DEVICE;
+		 guiSetFilename( guiIntfStruct.Filename,cdrom_device );
+		}
+	       if ( guiIntfStruct.Playing != 2 )
+	        {
+		 if ( !guiIntfStruct.Track )
+		  {
+		   if ( guiIntfStruct.VCDTracks == 1 ) guiIntfStruct.Track=1;
+		    else guiIntfStruct.Track=2;
+		  }
+		 vcd_track=guiIntfStruct.Track;
+                 guiIntfStruct.DiskChanged=1;
+		}
+	       break;
+#endif
 #ifdef USE_DVDREAD
           case STREAMTYPE_DVD:
+	       guiGetEvent( guiClearStruct,guiALL - guiDVD );
 	       if ( !dvd_device ) 
 	        {
 	         dvd_device=DEFAULT_DVD_DEVICE;
@@ -244,7 +283,7 @@
 	         dvd_title=guiIntfStruct.DVD.current_title;
 	         dvd_angle=guiIntfStruct.DVD.current_angle;
                  dvd_chapter=guiIntfStruct.DVD.current_chapter;
-                 guiIntfStruct.DVDChanged=1;
+                 guiIntfStruct.DiskChanged=1;
 		} 
                break;
 #endif
@@ -287,6 +326,7 @@
 
    case evLoadPlay:
         mplMainAutoPlay=1;
+//	guiIntfStruct.StreamType=STREAMTYPE_FILE;
    case evLoad:
         mplMainRender=1;
         gtkShow( evLoad,NULL );
--- a/Gui/mplayer/play.c	Mon Jun 03 14:18:13 2002 +0000
+++ b/Gui/mplayer/play.c	Mon Jun 03 15:06:32 2002 +0000
@@ -230,31 +230,38 @@
 void mplPrev( void )
 {
  int stop = 0;
+ 
+ if ( guiIntfStruct.Playing == 2 ) return;
  switch ( guiIntfStruct.StreamType )
   {
-//   case STREAMTYPE_FILE:
 #ifdef USE_DVDREAD
    case STREAMTYPE_DVD:
-	if ( guiIntfStruct.Playing == 2 ) break;
 	if ( --guiIntfStruct.DVD.current_chapter == 0 )
 	 {
 	  guiIntfStruct.DVD.current_chapter=1;
 	  if ( --guiIntfStruct.DVD.current_title <= 0 ) { guiIntfStruct.DVD.current_title=1; stop=1; }
 	 }
 	guiIntfStruct.Track=guiIntfStruct.DVD.current_title;
-	if ( stop ) mplEventHandling( evStop,0 );
-	if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evPlay,0 );
 	break;
 #endif
+#ifdef HAVE_VCD
+   case STREAMTYPE_VCD:
+	if ( --guiIntfStruct.Track == 0 ) { guiIntfStruct.Track=1; stop=1; }
+	break;
+#endif
+   default: return;
   }
+ if ( stop ) mplEventHandling( evStop,0 );
+ if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evPlay,0 );
 }
 
 void mplNext( void )
 {
  int stop = 0;
+
+ if ( guiIntfStruct.Playing == 2 ) return;
  switch ( guiIntfStruct.StreamType )
   {
-//   case STREAMTYPE_FILE:
 #ifdef USE_DVDREAD
    case STREAMTYPE_DVD:
 	if ( guiIntfStruct.DVD.current_chapter++ == guiIntfStruct.DVD.chapters )
@@ -263,9 +270,15 @@
 	  if ( ++guiIntfStruct.DVD.current_title > guiIntfStruct.DVD.titles ) { guiIntfStruct.DVD.current_title=guiIntfStruct.DVD.titles; stop=1; }
 	 }
 	guiIntfStruct.Track=guiIntfStruct.DVD.current_title;
-	if ( stop ) mplEventHandling( evStop,0 );
-	if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evPlay,0 );
 	break;
 #endif
+#ifdef HAVE_VCD
+   case STREAMTYPE_VCD:
+	if ( ++guiIntfStruct.Track > guiIntfStruct.VCDTracks ) { guiIntfStruct.Track=guiIntfStruct.VCDTracks; stop=1; }
+	break;
+#endif
+   default: return;
   }
+ if ( stop ) mplEventHandling( evStop,0 );
+ if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evPlay,0 );
 }
--- a/help_mp-cs.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-cs.h	Mon Jun 03 15:06:32 2002 +0000
@@ -292,6 +292,7 @@
 #define MSGTR_MENU_DoubleSize "Dvojnásobná velikost"
 #define MSGTR_MENU_FullScreen "Celá obrazovka"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Pøehrát disk ..."
 #define MSGTR_MENU_ShowDVDMenu "Zobrazit DVD menu"
 #define MSGTR_MENU_Titles "Tituly"
--- a/help_mp-de.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-de.h	Mon Jun 03 15:06:32 2002 +0000
@@ -293,6 +293,7 @@
 #define MSGTR_MENU_DoubleSize "Doppelte Größe"
 #define MSGTR_MENU_FullScreen "Vollbild"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Spiele Disk ..."
 #define MSGTR_MENU_ShowDVDMenu "Zeige DVD Menü"
 #define MSGTR_MENU_Titles "Titel"
--- a/help_mp-dk.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-dk.h	Mon Jun 03 15:06:32 2002 +0000
@@ -290,6 +290,7 @@
 #define MSGTR_MENU_DoubleSize "Double størrelse"
 #define MSGTR_MENU_FullScreen "Fuld skærm"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Afspiller disk ..."
 #define MSGTR_MENU_ShowDVDMenu "Vis DVD menu"
 #define MSGTR_MENU_Titles "Titler"
--- a/help_mp-en.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-en.h	Mon Jun 03 15:06:32 2002 +0000
@@ -294,6 +294,7 @@
 #define MSGTR_MENU_DoubleSize "Double size"
 #define MSGTR_MENU_FullScreen "Fullscreen"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Play disc ..."
 #define MSGTR_MENU_ShowDVDMenu "Show DVD menu"
 #define MSGTR_MENU_Titles "Titles"
--- a/help_mp-es.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-es.h	Mon Jun 03 15:06:32 2002 +0000
@@ -293,6 +293,7 @@
 #define MSGTR_MENU_DoubleSize "Tamaño doble"
 #define MSGTR_MENU_FullScreen "Fullscreen"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Reproducir disco ..."
 #define MSGTR_MENU_ShowDVDMenu "Mostrar menú DVD"
 #define MSGTR_MENU_Titles "Títulos"
--- a/help_mp-fr.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-fr.h	Mon Jun 03 15:06:32 2002 +0000
@@ -292,6 +292,7 @@
 #define MSGTR_MENU_DoubleSize "Taille double"
 #define MSGTR_MENU_FullScreen "Plein écran"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Lire un disque..."
 #define MSGTR_MENU_ShowDVDMenu "Afficher le menu DVD"
 #define MSGTR_MENU_Titles "Titres"
--- a/help_mp-hu.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-hu.h	Mon Jun 03 15:06:32 2002 +0000
@@ -288,6 +288,7 @@
 #define MSGTR_MENU_DoubleSize "Dupla méret"
 #define MSGTR_MENU_FullScreen "Teljesképernyõ" 
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Lemez lejátszása ..."
 #define MSGTR_MENU_ShowDVDMenu "DVD menû"
 #define MSGTR_MENU_Titles "Sávok"
--- a/help_mp-it.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-it.h	Mon Jun 03 15:06:32 2002 +0000
@@ -293,6 +293,7 @@
 #define MSGTR_MENU_DoubleSize "Dimensione doppia"
 #define MSGTR_MENU_FullScreen "Schermo intero"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Disco in riproduzione..."
 #define MSGTR_MENU_ShowDVDMenu "Mostra il menu del DVD"
 #define MSGTR_MENU_Titles "Titoli"
--- a/help_mp-ko.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-ko.h	Mon Jun 03 15:06:32 2002 +0000
@@ -293,6 +293,7 @@
 #define MSGTR_MENU_DoubleSize "µÎ¹è Å©±â"
 #define MSGTR_MENU_FullScreen "Àüü È­¸é"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "µð½ºÅ© Àç»ý ..."
 #define MSGTR_MENU_ShowDVDMenu "DVD ¸Þ´ºº¸±â"
 #define MSGTR_MENU_Titles "ŸÀÌƲ"
--- a/help_mp-nl.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-nl.h	Mon Jun 03 15:06:32 2002 +0000
@@ -290,6 +290,7 @@
 #define MSGTR_MENU_DoubleSize "Dubbele grootte"
 #define MSGTR_MENU_FullScreen "Volledig scherm"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Speel disc ..."
 #define MSGTR_MENU_ShowDVDMenu "Toon DVD menu"
 #define MSGTR_MENU_Titles "Titels"
--- a/help_mp-no.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-no.h	Mon Jun 03 15:06:32 2002 +0000
@@ -293,6 +293,7 @@
 #define MSGTR_MENU_DoubleSize "Dobbel størrelse"
 #define MSGTR_MENU_FullScreen "Fullskjerm"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Spill Plate ..."
 #define MSGTR_MENU_ShowDVDMenu "Vis DVD meny"
 #define MSGTR_MENU_Titles "Titler"
--- a/help_mp-pl.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-pl.h	Mon Jun 03 15:06:32 2002 +0000
@@ -292,6 +292,7 @@
 #define MSGTR_MENU_DoubleSize "Podwójna wielko¶æ"
 #define MSGTR_MENU_FullScreen "Pe³en Ekran"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Odtwarzaj dysk ..."
 #define MSGTR_MENU_ShowDVDMenu "Poka¿ menu DVD"
 #define MSGTR_MENU_Titles "Tytu³y"
--- a/help_mp-pt_BR.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-pt_BR.h	Mon Jun 03 15:06:32 2002 +0000
@@ -298,6 +298,7 @@
 #define MSGTR_MENU_DoubleSize "Tamanho dobrado"
 #define MSGTR_MENU_FullScreen "Tela cheia"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Reproduzir disco ..."
 #define MSGTR_MENU_ShowDVDMenu "Mostrar menu do DVD"
 #define MSGTR_MENU_Titles "Títulos"
--- a/help_mp-ru.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-ru.h	Mon Jun 03 15:06:32 2002 +0000
@@ -290,6 +290,7 @@
 #define MSGTR_MENU_DoubleSize "ä×ÏÊÎÏÊ ÒÁÚÍÅÒ"
 #define MSGTR_MENU_FullScreen "ðÏÌÎÙÊ ÜËÒÁÎ"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "éÇÒÁÔØ ÄÉÓË ..."
 #define MSGTR_MENU_ShowDVDMenu "ðÏËÁÚÁÔØ DVD ÍÅÎÀ"
 #define MSGTR_MENU_Titles "ôÉÔÒÙ"
--- a/help_mp-sk.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/help_mp-sk.h	Mon Jun 03 15:06:32 2002 +0000
@@ -290,6 +290,7 @@
 #define MSGTR_MENU_DoubleSize "Dvojnásobná veµkos»"
 #define MSGTR_MENU_FullScreen "Celá obrazovka"
 #define MSGTR_MENU_DVD "DVD"
+#define MSGTR_MENU_VCD "VCD"
 #define MSGTR_MENU_PlayDisc "Prehra» disk ..."
 #define MSGTR_MENU_ShowDVDMenu "Zobrazi» DVD menu"
 #define MSGTR_MENU_Titles "Tituly"
--- a/mplayer.c	Mon Jun 03 14:18:13 2002 +0000
+++ b/mplayer.c	Mon Jun 03 15:06:32 2002 +0000
@@ -206,7 +206,7 @@
 char* audio_lang=NULL;
 char* dvdsub_lang=NULL;
 static char* spudec_ifo=NULL;
-static int vcd_track=0;
+int vcd_track=0;
 
 // cache2:
 static int stream_cache_size=0;
@@ -813,12 +813,17 @@
 #endif
        } 
 
-#ifdef USE_DVDREAD 
-     if ( guiIntfStruct.DVDChanged )
+#if defined( HAVE_VCD ) && defined( USE_DVDREAD )
+     if ( guiIntfStruct.DiskChanged )
       {
-       guiIntfStruct.DVDChanged=0;
+#ifdef USE_DVDREAD 
+       switch ( guiIntfStruct.StreamType )
+        {
+         case STREAMTYPE_DVD: filename=DEFAULT_DVD_DEVICE; break;
+	}
+#endif
+       guiIntfStruct.DiskChanged=0;
        guiGetEvent( guiCEvent,(char *)guiSetPlay );
-       filename=DEFAULT_DVD_DEVICE;
       }
 #endif
 
@@ -1383,12 +1388,9 @@
    if ( use_gui )
     {
      guiGetEvent( guiSetFileName,filename );
-     guiIntfStruct.StreamType=stream->type;
+     guiGetEvent( guiSetStream,(char *)stream );
      if ( sh_audio ) guiIntfStruct.AudioType=sh_audio->channels; else guiIntfStruct.AudioType=0;
      if ( !sh_video && sh_audio ) guiGetEvent( guiSetAudioOnly,1 ); else guiGetEvent( guiSetAudioOnly,0 );
-#ifdef USE_DVDREAD
-     if ( stream->type == STREAMTYPE_DVD ) guiGetEvent( guiSetDVD,(char *)stream->priv );
-#endif
     }
 #endif
 
@@ -2881,8 +2883,8 @@
 #endif
 	 } 
 	guiIntfStruct.Volume=(float)mixer_getbothvolume();
+        if ( guiIntfStruct.DiskChanged ) goto goto_next_file;
 #ifdef USE_DVDREAD
-        if ( guiIntfStruct.DVDChanged ) goto goto_next_file;
         if ( stream->type == STREAMTYPE_DVD )
 	 {
 	  dvd_priv_t * dvdp = stream->priv;
@@ -3061,7 +3063,7 @@
  if( use_gui && !playtree_iter ) 
   {
 #ifdef USE_DVDREAD
-   if ( !guiIntfStruct.DVDChanged ) 
+   if ( !guiIntfStruct.DiskChanged ) 
 #endif
    mplStop();
   }	
--- a/mplayer.h	Mon Jun 03 14:18:13 2002 +0000
+++ b/mplayer.h	Mon Jun 03 15:06:32 2002 +0000
@@ -5,6 +5,7 @@
 extern int use_gui;
 extern char* current_module;
 extern int fullscreen;
+extern int vcd_track;
 
 extern void exit_player(char* how);