diff options
author | attila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-01-08 18:02:31 +0000 |
---|---|---|
committer | attila <attila@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2004-01-08 18:02:31 +0000 |
commit | fab8cc090f72e42d8a451a2fffa0ed1935782d1e (patch) | |
tree | 0e8a22b6bc493b523c94bcf45905487dc302d8bf | |
parent | 1afd8710b474de134d6707386cd73125d504b883 (diff) | |
download | mpv-fab8cc090f72e42d8a451a2fffa0ed1935782d1e.tar.bz2 mpv-fab8cc090f72e42d8a451a2fffa0ed1935782d1e.tar.xz |
add -codecs-file for selecting a specific codecs.conf on the comand line
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@11760 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | DOCS/man/en/mplayer.1 | 4 | ||||
-rw-r--r-- | cfg-common.h | 4 | ||||
-rw-r--r-- | codec-cfg.c | 2 | ||||
-rw-r--r-- | mencoder.c | 14 | ||||
-rw-r--r-- | mplayer.c | 14 |
5 files changed, 26 insertions, 12 deletions
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index ea0bcefe24..f92c5ba59c 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -2067,6 +2067,10 @@ It's autodetected on MPEG files, but can't be autodetected on most AVI files. .PD 1 . .TP +.B \-codecs-file <filename> +Use the specified file instead of system wide installed or build in codecs.conf. +See also \-afm, \-ac, \-vfm and \-vc. +.TP .B \-flip \ Flip image upside-down. .TP diff --git a/cfg-common.h b/cfg-common.h index f33b3e650a..1e85e282cc 100644 --- a/cfg-common.h +++ b/cfg-common.h @@ -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 flip; 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; diff --git a/codec-cfg.c b/codec-cfg.c index 13071675d7..52b7b7c7b4 100644 --- a/codec-cfg.c +++ b/codec-cfg.c @@ -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) { diff --git a/mencoder.c b/mencoder.c index b15d475994..2f9e3e87c2 100644 --- a/mencoder.c +++ b/mencoder.c @@ -406,13 +406,15 @@ unsigned int timer_start; 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); } } @@ -893,13 +893,15 @@ int gui_no_filename=0; } // 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); } } |