[Mplayer-cvslog] CVS: main/Gui/mplayer play.c,1.85,1.86 play.h,1.28,1.29

Arpi of Ize arpi at mplayerhq.hu
Thu Feb 6 00:01:06 CET 2003


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

Modified Files:
	play.c play.h 
Log Message:
- It adds an option enqueue/noenqueue, so users can choose if they want to
have playlist overwritten by files on commandline or just enqueue them at
the end ...
- Playtree is finally cleared, as such gui has total control!
- Autoplay if files are available on commandline and -enqueue is not set!
- Fallback on Playlists finally does work with Gui and even with streaming
Playlists! [ Before gui was broken as mplayer.c:playtree tried to have
control]
patch by Fabian Franz <FabianFranz at gmx.de>


Index: play.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/play.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- play.c	1 Feb 2003 16:42:00 -0000	1.85
+++ play.c	5 Feb 2003 23:01:02 -0000	1.86
@@ -69,7 +69,7 @@
 {
  plItem * next;
 
- if ( !mplGotoTheNext ) { mplGotoTheNext=1; return; }
+ if ( !mplGotoTheNext && guiIntfStruct.Playing) { mplGotoTheNext=1; return; }
 
  if ( guiIntfStruct.Playing && (next=gtkSet( gtkGetNextPlItem,0,NULL )) && plLastPlayed != next )
   {
@@ -267,6 +267,36 @@
  gfree( (void **)&guiIntfStruct.AudioFile );
  gfree( (void **)&guiIntfStruct.Subtitlename );
 }
+
+void mplCurr( void )
+{
+ plItem * curr;
+ int      stop = 0;
+ 
+ if ( guiIntfStruct.Playing == 2 ) return;
+ switch ( guiIntfStruct.StreamType )
+  {
+#ifdef USE_DVDREAD
+   case STREAMTYPE_DVD:
+	break;
+#endif
+#ifdef HAVE_VCD
+   case STREAMTYPE_VCD:
+	break;
+#endif
+   default: 
+	if ( (curr=gtkSet( gtkGetCurrPlItem,0,NULL)) )
+	 {
+	  mplSetFileName( curr->path,curr->name,STREAMTYPE_FILE );
+	  mplGotoTheNext=0;
+	  break;
+	 }
+	return;
+  }
+ if ( stop ) mplEventHandling( evStop,0 );
+ if ( guiIntfStruct.Playing == 1 ) mplEventHandling( evPlay,0 );
+}
+
 
 void mplPrev( void )
 {

Index: play.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/play.h,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- play.h	14 Aug 2002 23:02:43 -0000	1.28
+++ play.h	5 Feb 2003 23:01:02 -0000	1.29
@@ -13,6 +13,7 @@
 extern void mplState( void );
 extern void mplPrev( void );
 extern void mplNext( void );
+extern void mplCurr( void );
 
 extern void mplIncAudioBufDelay( void );
 extern void mplDecAudioBufDelay( void );



More information about the MPlayer-cvslog mailing list