[Mplayer-cvslog] CVS: main cfg-common.h,1.59,1.60 mencoder.c,1.167,1.168 mplayer.c,1.577,1.578

Arpi of Ize arpi at mplayerhq.hu
Sat Sep 28 04:23:51 CEST 2002


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

Modified Files:
	cfg-common.h mencoder.c mplayer.c 
Log Message:
-ac/-afm rewrite, now works the same way as -vc/-vfm
including audio codec fallbacks if init failed


Index: cfg-common.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-common.h,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- cfg-common.h	26 Sep 2002 01:31:17 -0000	1.59
+++ cfg-common.h	28 Sep 2002 02:23:17 -0000	1.60
@@ -106,9 +106,11 @@
 	// select audio/video codec (by name) or codec family (by number):
 //	{"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},
+//	{"afm", &audio_fm, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"afm", &audio_fm_list, CONF_TYPE_STRING_LIST, 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},
+//	{"ac", &audio_codec, CONF_TYPE_STRING, 0, 0, 0, NULL},
+	{"ac", &audio_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
 	{"vc", &video_codec_list, CONF_TYPE_STRING_LIST, 0, 0, 0, NULL},
 
 	// postprocessing:

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.167
retrieving revision 1.168
diff -u -r1.167 -r1.168
--- mencoder.c	26 Sep 2002 01:31:17 -0000	1.167
+++ mencoder.c	28 Sep 2002 02:23:17 -0000	1.168
@@ -94,9 +94,11 @@
 static int has_audio=1;
 char *audio_codec=NULL; // override audio codec
 char *video_codec=NULL; // override video codec
+char **audio_codec_list=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** audio_fm_list=NULL;     // override video codec family 
 char** video_fm_list=NULL;     // override video codec family 
 
 int out_audio_codec=-1;
@@ -488,7 +490,7 @@
 if(sh_audio && (out_audio_codec || seek_to_sec || !sh_audio->wf)){
   // Go through the codec.conf and find the best codec...
   mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
-  if(!init_best_audio_codec(sh_audio,audio_codec,audio_fm)){
+  if(!init_best_audio_codec(sh_audio,audio_codec_list,audio_fm_list)){
     sh_audio=d_audio->sh=NULL; // failed to init :(
   }
   mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.577
retrieving revision 1.578
diff -u -r1.577 -r1.578
--- mplayer.c	27 Sep 2002 21:06:51 -0000	1.577
+++ mplayer.c	28 Sep 2002 02:23:17 -0000	1.578
@@ -178,9 +178,11 @@
 int has_video=1;
 char *audio_codec=NULL; // override audio codec
 char *video_codec=NULL; // override video codec
+char **audio_codec_list=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 **audio_fm_list=NULL;    // override video codec family 
 char **video_fm_list=NULL;    // override video codec family 
 
 // streaming:
@@ -631,7 +633,7 @@
 	    printf("vc#%d: '%s'\n",i,video_codec_list[i]);
     }
 #endif
-    if(audio_codec && strcmp(audio_codec,"help")==0){
+    if(audio_codec_list && strcmp(audio_codec_list[0],"help")==0){
       mp_msg(MSGT_CPLAYER, MSGL_INFO, MSGTR_AvailableAudioCodecs);
       list_codecs(1);
       printf("\n");
@@ -648,7 +650,7 @@
       printf("\n");
       exit(0);
     }
-    if(audio_fm && strcmp(audio_fm,"help")==0){
+    if(audio_fm_list && strcmp(audio_fm_list[0],"help")==0){
       afm_help();
       printf("\n");
       exit(0);
@@ -1216,7 +1218,7 @@
   // Go through the codec.conf and find the best codec...
   current_module="init_audio_codec";
   mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");
-  if(!init_best_audio_codec(sh_audio,audio_codec,audio_fm)){
+  if(!init_best_audio_codec(sh_audio,audio_codec_list,audio_fm_list)){
     sh_audio=d_audio->sh=NULL; // failed to init :(
   }
   mp_msg(MSGT_CPLAYER,MSGL_INFO,"==========================================================================\n");




More information about the MPlayer-cvslog mailing list