Add -codecpath option.

It allows to search binary codecs in non-standard directories.



git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@30897 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
komh 2010-03-15 08:30:06 +00:00
parent 2c2097601e
commit 8686b281f8
5 changed files with 23 additions and 0 deletions

View File

@ -754,6 +754,10 @@ Using realtime priority can cause system lockup.
.RE
.
.TP
.B \-codecpath <dir>
Specify a directory for binary codecs.
.
.TP
.B \-profile <profile1,profile2,...>
Use the given profile(s), \-profile help displays a list of the defined profiles.
.

View File

@ -39,6 +39,9 @@
{"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL},
#ifdef CONFIG_PRIORITY
{"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL},
#endif
#ifdef CONFIG_WIN32DLL
{"codecpath", &codec_path, CONF_TYPE_STRING, 0, 0, 0, NULL},
#endif
{"noconfig", noconfig_opts, CONF_TYPE_SUBCONFIG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 0, NULL},

View File

@ -24,4 +24,10 @@
char *get_path(const char *filename);
void set_path_env(void);
#ifdef CONFIG_WIN32DLL
extern void SetCodecPath(const char *); // in loader/drv.c
static char *codec_path=NULL;
#endif
#endif /* MPLAYER_GET_PATH_H */

View File

@ -534,6 +534,11 @@ if (frameno_filename) {
set_priority();
#endif
#ifdef CONFIG_WIN32DLL
if (codec_path)
SetCodecPath(codec_path);
#endif
// check font
#ifdef CONFIG_FREETYPE
init_freetype();

View File

@ -2701,6 +2701,11 @@ int gui_no_filename=0;
set_priority();
#endif
#ifdef CONFIG_WIN32DLL
if (codec_path)
SetCodecPath(codec_path);
#endif
#ifndef CONFIG_GUI
if(use_gui){
mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_NoGui);