[Mplayer-cvslog] CVS: main/Gui events.c,1.6,1.7 events.h,1.9,1.10 interface.c,1.16,1.17 interface.h,1.10,1.11

Zoltan Ponekker pontscho at mplayerhq.hu
Mon Jun 3 17:06:34 CEST 2002


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

Modified Files:
	events.c events.h interface.c interface.h 
Log Message:
add VCD support for GUI

Index: events.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/events.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- events.c	18 Nov 2001 18:18:20 -0000	1.6
+++ events.c	3 Jun 2002 15:06:31 -0000	1.7
@@ -43,7 +43,8 @@
   { evSetBalance,        "evSetBalance"        },
   { evHelp,		 "evHelp"	       },	
   { evLoadSubtitle,      "evLoadSubtitle"      },
-  { evPlayDVD,		 "evPlayDVD"	       }
+  { evPlayDVD,		 "evPlayDVD"	       },
+  { evPlayVCD,		 "evPlayVCD"	       }
  };
 
 int evBoxs = sizeof( evNames ) / sizeof( evName );

Index: events.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/events.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- events.h	23 Feb 2002 15:12:50 -0000	1.9
+++ events.h	3 Jun 2002 15:06:31 -0000	1.10
@@ -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

Index: interface.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- interface.c	28 May 2002 11:55:15 -0000	1.16
+++ interface.c	3 Jun 2002 15:06:31 -0000	1.17
@@ -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;
   }
 }
 

Index: interface.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/interface.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- interface.h	28 May 2002 11:55:15 -0000	1.10
+++ interface.h	3 Jun 2002 15:06:31 -0000	1.11
@@ -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,10 +109,16 @@
 #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); 
 




More information about the MPlayer-cvslog mailing list