[Mplayer-cvslog] CVS: main cfg-mplayer.h,1.99,1.100 help_mp-nl.h,1.2,1.3 help_mp-en.h,1.10,1.11 mplayer.c,1.310,1.311

Arpi of Ize arpi at mplayer.dev.hu
Sat Nov 3 03:55:09 CET 2001


Update of /cvsroot/mplayer/main
In directory mplayer:/var/tmp.root/cvs-serv11098

Modified Files:
	cfg-mplayer.h help_mp-nl.h help_mp-en.h mplayer.c 
Log Message:
-playlist option patch by Panagiotis Issaris <takis at lumumba.luc.ac.be>

Index: cfg-mplayer.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-mplayer.h,v
retrieving revision 1.99
retrieving revision 1.100
diff -u -r1.99 -r1.100
--- cfg-mplayer.h	3 Nov 2001 00:44:02 -0000	1.99
+++ cfg-mplayer.h	3 Nov 2001 02:55:03 -0000	1.100
@@ -2,6 +2,7 @@
  * config for cfgparser
  */
 
+extern char *playlist_file;
 
 #ifdef HAVE_FBDEV
 extern char *fb_dev_name;
@@ -221,5 +222,6 @@
 	{"-help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
 	{"help", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
 	{"h", help_text, CONF_TYPE_PRINT, CONF_NOCFG, 0, 0},
+	{"playlist", &playlist_file, CONF_TYPE_STRING, 0, 0, 0},
 	{NULL, NULL, 0, 0, 0, 0}
 };

Index: help_mp-nl.h
===================================================================
RCS file: /cvsroot/mplayer/main/help_mp-nl.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- help_mp-nl.h	1 Oct 2001 09:54:13 -0000	1.2
+++ help_mp-nl.h	3 Nov 2001 02:55:03 -0000	1.3
@@ -31,7 +31,8 @@
 " -fs -vm -zoom    volledig scherm afspeel opties (fullscr,vidmode chg,softw.scale)\n"
 " -x <x> -y <y>    herschaal beeld naar <x> * <y> resolutie [als -vo driver het ondersteunt!]\n"
 " -sub <bestand>   specificeer het te gebruiken ondertitel bestand (zie ook -subfps, -subdelay)\n"
-" -vid x -aid y    opties om te spelen video (x) en audio stream te selecteren\n"
+" -playlist <file> specificeer het te gebruiken playlist bestand\n"
+" -vid x -aid y    opties om te spelen video (x) en audio (y) stream te selecteren\n"
 " -fps x -srate y  opties om video (x fps) en audio (y Hz) tempo te veranderen\n"
 " -pp <kwaliteit>  activeer postprocessing filter (0-4 voor DivX, 0-63 voor mpegs)\n"
 " -nobps           gebruik alternatieve A-V sync methode voor AVI bestand (kan helpen!)\n"
@@ -41,6 +42,7 @@
 " <-  of  ->       ga 10 seconden achterwaards/voorwaards\n"
 " omhoog of omlaag ga 1 minuut achterwaards/voorwaards\n"
 " PGUP of PGDOWN   ga 10 minuten achterwaards/voorwaards\n"
+" < or >           ga naar vorige/volgende item in playlist\n"
 " p of SPACE       pauzeer film (druk eender welke toets om verder te gaan)\n"
 " q of ESC         stop afspelen en sluit programma af\n"
 " + of -           pas audio vertraging aan met +/- 0.1 second\n"
@@ -56,7 +58,7 @@
 
 // mplayer.c: 
 
-#define MSGTR_Exiting "\nExiting... (%s)\n"
+#define MSGTR_Exiting "\nBezig met afsluiten... (%s)\n"
 #define MSGTR_Exit_frames "Gevraagde aantal frames afgespeeld"
 #define MSGTR_Exit_quit "Stop"
 #define MSGTR_Exit_eof "Einde van bestand"
@@ -124,8 +126,8 @@
 #define MSGTR_DVDopenOk "DVD openen geslaagd!\n"
 
 // demuxer.c, demux_*.c:
-#define MSGTR_AudioStreamRedefined "Waarschuwing! Audio stream header %d hergedefinieerd!\n"
-#define MSGTR_VideoStreamRedefined "Waarschuwing! Video stream header %d hergedefinieerd!\n"
+#define MSGTR_AudioStreamRedefined "Waarschuwing! Audio stream header %d geherdefinieerd!\n"
+#define MSGTR_VideoStreamRedefined "Waarschuwing! Video stream header %d geherdefinieerd!\n"
 #define MSGTR_TooManyAudioInBuffer "\nDEMUXER: Te veel (%d in %d bytes) audio packets in de buffer!\n"
 #define MSGTR_TooManyVideoInBuffer "\nDEMUXER: Te veel (%d in %d bytes) video packets in de buffer!\n"
 #define MSGTR_MaybeNI "(misschien speel je een non-interleaved stream/bestand of werkte de codec niet)\n"
@@ -139,10 +141,6 @@
 #define MSGTR_InvalidMPEGES "Invalid MPEG-ES stream??? Contacteer de auteur, het zou een bug kunnen zijn :(\n"
 #define MSGTR_FormatNotRecognized "============= Sorry, dit bestandsformaat niet herkend/ondersteund ===============\n"\
 				  "=== Als dit een AVI bestand, ASF bestand of MPEG stream is, contacteer dan aub de auteur! ===\n"
-/*#define MSGTR_MissingASFvideo "ASF: Geen Video stream gevonden!\n"
-#define MSGTR_MissingASFaudio "ASF: Geen Audio stream gevonden...  ->nosound\n"
-#define MSGTR_MissingMPEGaudio "MPEG: Geen Audio stream gevonden...  ->nosound\n"
-*/
 #define MSGTR_MissingVideoStream "Geen video stream gevonden!\n"
 #define MSGTR_MissingAudioStream "Geen audio stream gevonden...  ->nosound\n"
 #define MSGTR_MissingVideoStreamBug "Ontbrekende video stream!? Contacteer de auteur, het zou een bug kunnen zijn :(\n"
@@ -171,7 +169,7 @@
 #define MSGTR_CantCloseCodec "kon codec niet sluiten\n"
 
 #define MSGTR_MissingDLLcodec "FOUT: Kon de nodige DirectShow codec niet openen: %s\n"
-#define MSGTR_ACMiniterror "Kon jWin32/ACM AUDIO codec niet laden/initialiseren (ontbrekend DLL bestand?)\n"
+#define MSGTR_ACMiniterror "Kon Win32/ACM AUDIO codec niet laden/initialiseren (ontbrekend DLL bestand?)\n"
 #define MSGTR_MissingLAVCcodec "Kan codec codec '%s' niet vinden in libavcodec...\n"
 
 #define MSGTR_NoDShowSupport "MPlayer werd gecompileerd ZONDER directshow ondersteuning!\n"

Index: help_mp-en.h
===================================================================
RCS file: /cvsroot/mplayer/main/help_mp-en.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- help_mp-en.h	11 Oct 2001 12:22:18 -0000	1.10
+++ help_mp-en.h	3 Nov 2001 02:55:03 -0000	1.11
@@ -36,6 +36,7 @@
 " -fs -vm -zoom   fullscreen playing options (fullscr,vidmode chg,softw.scale)\n"
 " -x <x> -y <y>   scale image to <x> * <y> resolution [if -vo driver supports!]\n"
 " -sub <file>     specify subtitle file to use (see also -subfps, -subdelay)\n"
+" -playlist <file> specify playlist file\n"
 " -vid x -aid y   options to select video (x) and audio (y) stream to play\n"
 " -fps x -srate y options to change video (x fps) and audio (y Hz) rate\n"
 " -pp <quality>   enable postprocessing filter (0-4 for DivX, 0-63 for mpegs)\n"
@@ -45,6 +46,7 @@
 "Keys:\n"
 " <-  or  ->      seek backward/forward 10 seconds\n"
 " up or down      seek backward/forward  1 minute\n"
+" < or >          seek backward/forward in playlist\n"
 " p or SPACE      pause movie (press any key to continue)\n"
 " q or ESC        stop playing and quit program\n"
 " + or -          adjust audio delay by +/- 0.1 second\n"

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.310
retrieving revision 1.311
diff -u -r1.310 -r1.311
--- mplayer.c	30 Oct 2001 20:35:26 -0000	1.310
+++ mplayer.c	3 Nov 2001 02:55:03 -0000	1.311
@@ -209,6 +209,8 @@
 static int screen_size_xy=0;
 static float movie_aspect=0.0;
 
+char* playlist_file;
+
 // sub:
 char *font_name=NULL;
 float font_factor=0.75;
@@ -423,6 +425,39 @@
 
     parse_cfgfiles();
     num_filenames=parse_command_line(conf, argc, argv, envp, &filenames);
+
+   if(playlist_file!=NULL)
+   {
+    FILE *playlist_f;
+    char *playlist_linebuffer = (char*)malloc(256);
+    char *playlist_line;    
+    if(!strcmp(playlist_file,"-"))
+    {
+      playlist_f = fopen("/dev/stdin","r");
+    }
+    else
+      playlist_f = fopen(playlist_file,"r");
+    if(playlist_f != NULL)
+    {
+      while(!feof(playlist_f))
+      {
+        memset(playlist_linebuffer,0,255);
+        fgets(playlist_linebuffer,255,playlist_f);
+        if(strlen(playlist_linebuffer)==0)
+          break;
+        playlist_linebuffer[strlen(playlist_linebuffer)-1] = 0;
+        playlist_line = (char*)malloc(strlen(playlist_linebuffer)+1);
+        memset(playlist_line,0,strlen(playlist_linebuffer)+1);
+        strcpy(playlist_line,playlist_linebuffer);
+        if (!(filenames = (char **) realloc(filenames, sizeof(*filenames) * (num_filenames + 2))))
+          exit(3);
+        filenames[num_filenames++] = playlist_line;
+      }
+      fclose(playlist_f);
+    }
+}
+
+
     if(num_filenames<0) exit(1); // error parsing cmdline
 
 #ifndef HAVE_NEW_GUI
@@ -1513,8 +1548,17 @@
     // quit
     case KEY_ESC: // ESC
     case 'q': exit_player(MSGTR_Exit_quit);
+    case '>':
+	if(curr_filename>=num_filenames-1)
+		break;
     case KEY_ENTER: // ESC
       eof=1;  // jump to next file
+      break;
+    case '<':
+	if(curr_filename < 1)
+		break;
+        curr_filename-=2;
+	eof=1;
       break;
     case 'g': grab_frames=2;break;
     // pause




More information about the MPlayer-cvslog mailing list