[Mplayer-cvslog] CVS: main mplayer.c,1.574,1.575 mencoder.c,1.166,1.167 cfg-common.h,1.58,1.59

Arpi of Ize arpi at mplayerhq.hu
Thu Sep 26 03:31:20 CEST 2002


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

Modified Files:
	mplayer.c mencoder.c cfg-common.h 
Log Message:
-vc/-vfm accepts codec/driver _list_ now. empty list element for -vc means
*, ie search all codecs. codec name starting with - disables the codec.


Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.574
retrieving revision 1.575
diff -u -r1.574 -r1.575
--- mplayer.c	25 Sep 2002 23:45:31 -0000	1.574
+++ mplayer.c	26 Sep 2002 01:31:17 -0000	1.575
@@ -177,8 +177,10 @@
 int has_video=1;
 char *audio_codec=NULL; // override audio codec
 char *video_codec=NULL; // override video codec
+char **video_codec_list=NULL; // override video codec
 char *audio_fm=NULL;    // override audio codec family 
 char *video_fm=NULL;    // override video codec family 
+char **video_fm_list=NULL;    // override video codec family 
 
 // streaming:
 int audio_id=-1;
@@ -619,19 +621,27 @@
   }
 }
 
+#if 0
+    if(video_codec_list){
+	int i;
+	video_codec=video_codec_list[0];
+	for(i=0;video_codec_list[i];i++)
+	    printf("vc#%d: '%s'\n",i,video_codec_list[i]);
+    }
+#endif
     if(audio_codec && strcmp(audio_codec,"help")==0){
       mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableAudioCodecs);
       list_codecs(1);
       printf("\n");
       exit(0);
     }
-    if(video_codec && strcmp(video_codec,"help")==0){
+    if(video_codec_list && strcmp(video_codec_list[0],"help")==0){
       mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableVideoCodecs);
       list_codecs(0);
       printf("\n");
       exit(0);
     }
-    if(video_fm && strcmp(video_fm,"help")==0){
+    if(video_fm_list && strcmp(video_fm_list[0],"help")==0){
       vfm_help();
       printf("\n");
       exit(0);
@@ -1234,7 +1244,7 @@
 current_module="init_video_codec";
 
 mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
-init_best_video_codec(sh_video,video_codec,video_fm);
+init_best_video_codec(sh_video,video_codec_list,video_fm_list);
 mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
 
 if(!sh_video->inited){

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.166
retrieving revision 1.167
diff -u -r1.166 -r1.167
--- mencoder.c	25 Sep 2002 23:45:31 -0000	1.166
+++ mencoder.c	26 Sep 2002 01:31:17 -0000	1.167
@@ -94,8 +94,10 @@
 static int has_audio=1;
 char *audio_codec=NULL; // override audio codec
 char *video_codec=NULL; // override video codec
+char **video_codec_list=NULL; // override video codec
 char* audio_fm=NULL;     // override audio codec family 
 char* video_fm=NULL;     // override video codec family 
+char** video_fm_list=NULL;     // override video codec family 
 
 int out_audio_codec=-1;
 int out_video_codec=-1;
@@ -633,7 +635,7 @@
     sh_video->vfilter=append_filters(sh_video->vfilter);
 
     mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
-    init_best_video_codec(sh_video,video_codec,video_fm);
+    init_best_video_codec(sh_video,video_codec_list,video_fm_list);
     mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
     if(!sh_video->inited) mencoder_exit(1,NULL);
 

Index: cfg-common.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-common.h,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -r1.58 -r1.59
--- cfg-common.h	20 Sep 2002 18:57:13 -0000	1.58
+++ cfg-common.h	26 Sep 2002 01:31:17 -0000	1.59
@@ -107,9 +107,9 @@
 //	{"afm", &audio_family, CONF_TYPE_INT, CONF_MIN, 0, 22, NULL}, // keep ranges in sync
 //	{"vfm", &video_family, CONF_TYPE_INT, CONF_MIN, 0, 29, NULL}, // with codec-cfg.c
 	{"afm", &audio_fm, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"vfm", &video_fm, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"vfm", &video_fm_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
 	{"ac", &audio_codec, CONF_TYPE_STRING, 0, 0, 0, NULL},
-	{"vc", &video_codec, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"vc", &video_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
 
 	// postprocessing:
 	{"divxq", "Option -divxq has been renamed to -pp (postprocessing), use -pp !\n",




More information about the MPlayer-cvslog mailing list