summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Gui/events.c3
-rw-r--r--Gui/events.h2
-rw-r--r--Gui/interface.c36
-rw-r--r--Gui/interface.h14
-rw-r--r--Gui/mplayer/gtk/menu.c27
-rw-r--r--Gui/mplayer/mplayer.c7
-rw-r--r--Gui/mplayer/mw.h50
-rw-r--r--Gui/mplayer/play.c27
-rw-r--r--help_mp-cs.h1
-rw-r--r--help_mp-de.h1
-rw-r--r--help_mp-dk.h1
-rw-r--r--help_mp-en.h1
-rw-r--r--help_mp-es.h1
-rw-r--r--help_mp-fr.h1
-rw-r--r--help_mp-hu.h1
-rw-r--r--help_mp-it.h1
-rw-r--r--help_mp-ko.h1
-rw-r--r--help_mp-nl.h1
-rw-r--r--help_mp-no.h1
-rw-r--r--help_mp-pl.h1
-rw-r--r--help_mp-pt_BR.h1
-rw-r--r--help_mp-ru.h1
-rw-r--r--help_mp-sk.h1
-rw-r--r--mplayer.c24
-rw-r--r--mplayer.h1
25 files changed, 177 insertions, 29 deletions
diff --git a/Gui/events.c b/Gui/events.c
index 0c25637d47..8c93a1322a 100644
--- a/Gui/events.c
+++ b/Gui/events.c
@@ -43,7 +43,8 @@ evName evNames[] =
{ evSetBalance, "evSetBalance" },
{ evHelp, "evHelp" },
{ evLoadSubtitle, "evLoadSubtitle" },
- { evPlayDVD, "evPlayDVD" }
+ { evPlayDVD, "evPlayDVD" },
+ { evPlayVCD, "evPlayVCD" }
};
int evBoxs = sizeof( evNames ) / sizeof( evName );
diff --git a/Gui/events.h b/Gui/events.h
index 4c21cdbb99..a5607932c4 100644
--- a/Gui/events.h
+++ b/Gui/events.h
@@ -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
diff --git a/Gui/interface.c b/Gui/interface.c
index f0233cb023..84f6967f38 100644
--- a/Gui/interface.c
+++ b/Gui/interface.c
@@ -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 @@ typedef struct
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 @@ void guiGetEvent( int type,char * arg )
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 @@ void guiGetEvent( int type,char * arg )
}
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;
}
}
diff --git a/Gui/interface.h b/Gui/interface.h
index 08e57024ca..4a1eb6d61c 100644
--- a/Gui/interface.h
+++ b/Gui/interface.h
@@ -56,9 +56,15 @@ typedef struct
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 @@ extern guiInterface_t guiIntfStruct;
#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 );
diff --git a/Gui/mplayer/gtk/menu.c b/Gui/mplayer/gtk/menu.c
index b5738934ba..641fc61746 100644
--- a/Gui/mplayer/gtk/menu.c
+++ b/Gui/mplayer/gtk/menu.c
@@ -254,6 +254,9 @@ GtkWidget * DVDChapterMenu;
GtkWidget * DVDAudioLanguageMenu;
GtkWidget * DVDSubtitleLanguageMenu;
+GtkWidget * VCDSubMenu;
+GtkWidget * VCDTitleMenu;
+
GtkWidget * create_PopUpMenu( void )
{
GtkWidget * Menu = NULL;
@@ -266,7 +269,9 @@ GtkWidget * create_PopUpMenu( void )
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 @@ GtkWidget * create_PopUpMenu( void )
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 );
diff --git a/Gui/mplayer/mplayer.c b/Gui/mplayer/mplayer.c
index bddcbec4ee..4286841780 100644
--- a/Gui/mplayer/mplayer.c
+++ b/Gui/mplayer/mplayer.c
@@ -71,8 +71,9 @@ void mplInit( void * disp )
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 @@ void mplInit( void * disp )
guiIntfStruct.Playing=0;
+ if ( !appMPlayer.mainDecoration ) wsWindowDecoration( &appMPlayer.mainWindow,0 );
+
wsVisibleWindow( &appMPlayer.mainWindow,wsShowWindow );
wsVisibleWindow( &appMPlayer.subWindow,wsShowWindow );
}
diff --git a/Gui/mplayer/mw.h b/Gui/mplayer/mw.h
index 4f0263e875..9d5da0a09a 100644
--- a/Gui/mplayer/mw.h
+++ b/Gui/mplayer/mw.h
@@ -35,6 +35,11 @@ inline void TranslateFilename( int c,char * tmp )
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 @@ calclengthmmmmss:
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 void exit_player(char* how);
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 @@ void mplEventHandling( int msg,float param )
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 @@ play_dvd_2:
#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 @@ play_dvd_2:
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 @@ NoPause:
case evLoadPlay:
mplMainAutoPlay=1;
+// guiIntfStruct.StreamType=STREAMTYPE_FILE;
case evLoad:
mplMainRender=1;
gtkShow( evLoad,NULL );
diff --git a/Gui/mplayer/play.c b/Gui/mplayer/play.c
index 436b102b7a..29490efbbf 100644
--- a/Gui/mplayer/play.c
+++ b/Gui/mplayer/play.c
@@ -230,31 +230,38 @@ void mplSetFileName( char * fname )
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 @@ void mplNext( void )
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 );
}
diff --git a/help_mp-cs.h b/help_mp-cs.h
index 4c439c065e..24fb47b37f 100644
--- a/help_mp-cs.h
+++ b/help_mp-cs.h
@@ -292,6 +292,7 @@ static char help_text[]=
#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"
diff --git a/help_mp-de.h b/help_mp-de.h
index 41d2606888..a50164f2c5 100644
--- a/help_mp-de.h
+++ b/help_mp-de.h
@@ -293,6 +293,7 @@ static char help_text[]=
#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"
diff --git a/help_mp-dk.h b/help_mp-dk.h
index 5eeb54a363..519e16585a 100644
--- a/help_mp-dk.h
+++ b/help_mp-dk.h
@@ -290,6 +290,7 @@ static char help_text[]=
#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"
diff --git a/help_mp-en.h b/help_mp-en.h
index 8cb23bffcd..d277fd5aa6 100644
--- a/help_mp-en.h
+++ b/help_mp-en.h
@@ -294,6 +294,7 @@ static char help_text[]=
#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"
diff --git a/help_mp-es.h b/help_mp-es.h
index 7a11a6890d..c4a0a0717f 100644
--- a/help_mp-es.h
+++ b/help_mp-es.h
@@ -293,6 +293,7 @@ static char help_text[]=
#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"
diff --git a/help_mp-fr.h b/help_mp-fr.h
index 07883ba933..e748913cd9 100644
--- a/help_mp-fr.h
+++ b/help_mp-fr.h
@@ -292,6 +292,7 @@ static char help_text[]=
#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"
diff --git a/help_mp-hu.h b/help_mp-hu.h
index fa011c3f5b..4d12c5188e 100644
--- a/help_mp-hu.h
+++ b/help_mp-hu.h
@@ -288,6 +288,7 @@ static char help_text[]=
#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"
diff --git a/help_mp-it.h b/help_mp-it.h
index a5ad71523c..00590f1eaf 100644
--- a/help_mp-it.h
+++ b/help_mp-it.h
@@ -293,6 +293,7 @@ static char help_text[]=
#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"
diff --git a/help_mp-ko.h b/help_mp-ko.h
index 0a9b73af9d..2fcef621ef 100644
--- a/help_mp-ko.h
+++ b/help_mp-ko.h
@@ -293,6 +293,7 @@ static char help_text[]=
#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 "ŸÀÌƲ"
diff --git a/help_mp-nl.h b/help_mp-nl.h
index 26cb0fee4c..092f564db7 100644
--- a/help_mp-nl.h
+++ b/help_mp-nl.h
@@ -290,6 +290,7 @@ static char help_text[]=
#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"
diff --git a/help_mp-no.h b/help_mp-no.h
index e2e4961730..006e94a9aa 100644
--- a/help_mp-no.h
+++ b/help_mp-no.h
@@ -293,6 +293,7 @@ static char help_text[]=
#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"
diff --git a/help_mp-pl.h b/help_mp-pl.h
index ce0aeaf047..03406fbc75 100644
--- a/help_mp-pl.h
+++ b/help_mp-pl.h
@@ -292,6 +292,7 @@ static char help_text[]=
#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"
diff --git a/help_mp-pt_BR.h b/help_mp-pt_BR.h
index e705c8ef6e..66b99e4268 100644
--- a/help_mp-pt_BR.h
+++ b/help_mp-pt_BR.h
@@ -298,6 +298,7 @@ static char help_text[]=
#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"
diff --git a/help_mp-ru.h b/help_mp-ru.h
index 9e6c8ee3e5..86b638af9c 100644
--- a/help_mp-ru.h
+++ b/help_mp-ru.h
@@ -290,6 +290,7 @@ static char help_text[]=
#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 "ôÉÔÒÙ"
diff --git a/help_mp-sk.h b/help_mp-sk.h
index 4b282a091a..b2184d61b5 100644
--- a/help_mp-sk.h
+++ b/help_mp-sk.h
@@ -290,6 +290,7 @@ static char help_text[]=
#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"
diff --git a/mplayer.c b/mplayer.c
index f421ab7a84..414f0e36ed 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -206,7 +206,7 @@ int vobsub_id=-1;
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 @@ if(!use_stdin && !slave_mode){
#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 @@ fflush(stdout);
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 @@ if(rel_seek_secs || abs_seek_pos){
#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 @@ while(playtree_iter != NULL) {
if( use_gui && !playtree_iter )
{
#ifdef USE_DVDREAD
- if ( !guiIntfStruct.DVDChanged )
+ if ( !guiIntfStruct.DiskChanged )
#endif
mplStop();
}
diff --git a/mplayer.h b/mplayer.h
index 3b7c96c93f..82e0baab19 100644
--- a/mplayer.h
+++ b/mplayer.h
@@ -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);