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
This commit is contained in:
attila
2004-01-08 18:02:31 +00:00
parent 1afd8710b4
commit fab8cc090f
5 changed files with 26 additions and 12 deletions
+4
View File
@@ -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
+4
View File
@@ -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;
+2
View File
@@ -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)
{
+8 -6
View File
@@ -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);
}
}
+8 -6
View File
@@ -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);
}
}