[Mplayer-cvslog] CVS: main cfg-common.h, 1.124, 1.125 codec-cfg.c, 1.108, 1.109 mencoder.c, 1.228, 1.229 mplayer.c, 1.741, 1.742

Attila Kinali CVS attila at mplayerhq.hu
Thu Jan 8 19:02:33 CET 2004


Update of /cvsroot/mplayer/main
In directory mail:/scsi/2/tmp/cvs-serv23930

Modified Files:
	cfg-common.h codec-cfg.c mencoder.c mplayer.c 
Log Message:
add -codecs-file for selecting a specific codecs.conf on the comand line


Index: cfg-common.h
===================================================================
RCS file: /cvsroot/mplayer/main/cfg-common.h,v
retrieving revision 1.124
retrieving revision 1.125
diff -u -r1.124 -r1.125
--- cfg-common.h	8 Dec 2003 21:33:31 -0000	1.124
+++ cfg-common.h	8 Jan 2004 18:02:31 -0000	1.125
@@ -198,6 +198,7 @@
 #if defined(HAVE_XVID3) || defined(HAVE_XVID4)
 	{"xvidopts", xvid_dec_opts, CONF_TYPE_SUBCONFIG, 0, 0, 0, NULL},
 #endif
+	{"codecs-file", &codecs_file, CONF_TYPE_STRING, 0, 0, 0, NULL},
 // ------------------------- subtitles options --------------------
 
 #ifdef USE_SUB
@@ -273,6 +274,9 @@
 extern int vd_use_slices;
 extern int divx_quality;
 
+/* defined in codec-cfg.c */
+extern char * codecs_file;
+
 /* from dec_audio, currently used for ac3surround decoder only */
 extern int audio_output_channels;
 

Index: codec-cfg.c
===================================================================
RCS file: /cvsroot/mplayer/main/codec-cfg.c,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -r1.108 -r1.109
--- codec-cfg.c	4 Nov 2003 20:02:09 -0000	1.108
+++ codec-cfg.c	8 Jan 2004 18:02:31 -0000	1.109
@@ -48,6 +48,8 @@
 #define TYPE_VIDEO	0
 #define TYPE_AUDIO	1
 
+char * codecs_file = NULL;
+
 static int add_to_fourcc(char *s, char *alias, unsigned int *fourcc,
 		unsigned int *map)
 {

Index: mencoder.c
===================================================================
RCS file: /cvsroot/mplayer/main/mencoder.c,v
retrieving revision 1.228
retrieving revision 1.229
diff -u -r1.228 -r1.229
--- mencoder.c	8 Dec 2003 21:33:31 -0000	1.228
+++ mencoder.c	8 Jan 2004 18:02:31 -0000	1.229
@@ -406,13 +406,15 @@
   InitTimer();
 
 // check codec.conf
-if(!parse_codec_cfg(get_path("codecs.conf"))){
-  if(!parse_codec_cfg(MPLAYER_CONFDIR "/codecs.conf")){
-    if(!parse_codec_cfg(NULL)){
-      mp_msg(MSGT_MENCODER,MSGL_HINT,MSGTR_CopyCodecsConf);
-      mencoder_exit(1,NULL);
+if(!codecs_file || !parse_codec_cfg(codecs_file)){
+  if(!parse_codec_cfg(get_path("codecs.conf"))){
+    if(!parse_codec_cfg(MPLAYER_CONFDIR "/codecs.conf")){
+      if(!parse_codec_cfg(NULL)){
+	mp_msg(MSGT_MENCODER,MSGL_HINT,MSGTR_CopyCodecsConf);
+	mencoder_exit(1,NULL);
+      }
+      mp_msg(MSGT_MENCODER,MSGL_INFO,MSGTR_BuiltinCodecsConf);
     }
-    mp_msg(MSGT_MENCODER,MSGL_INFO,MSGTR_BuiltinCodecsConf);
   }
 }
 

Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.741
retrieving revision 1.742
diff -u -r1.741 -r1.742
--- mplayer.c	8 Dec 2003 21:33:31 -0000	1.741
+++ mplayer.c	8 Jan 2004 18:02:31 -0000	1.742
@@ -893,13 +893,15 @@
     }
 
 // check codec.conf
-if(!parse_codec_cfg(get_path("codecs.conf"))){
-  if(!parse_codec_cfg(MPLAYER_CONFDIR "/codecs.conf")){
-    if(!parse_codec_cfg(NULL)){
-      mp_msg(MSGT_CPLAYER,MSGL_HINT,MSGTR_CopyCodecsConf);
-      exit(0);
+if(!codecs_file || !parse_codec_cfg(codecs_file)){
+  if(!parse_codec_cfg(get_path("codecs.conf"))){
+    if(!parse_codec_cfg(MPLAYER_CONFDIR "/codecs.conf")){
+      if(!parse_codec_cfg(NULL)){
+	mp_msg(MSGT_CPLAYER,MSGL_HINT,MSGTR_CopyCodecsConf);
+	exit(0);
+      }
+      mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_BuiltinCodecsConf);
     }
-    mp_msg(MSGT_CPLAYER,MSGL_INFO,MSGTR_BuiltinCodecsConf);
   }
 }
 




More information about the MPlayer-cvslog mailing list