[MPlayer-dev-eng] [PATCH] Override binary codec path

Diego Biurrun diego at biurrun.de
Wed Mar 10 20:59:36 CET 2010


On Wed, Mar 10, 2010 at 09:39:48PM +0900, KO Myung-Hun wrote:
> compn wrote:
> > On Wed, 10 Mar 2010 20:38:07 +0900, KO Myung-Hun wrote:
> >> +#ifdef WIN32_LOADER
> >> +  if (bin_codec_path)
> >> +    SetCodecPath(bin_codec_path);
> >> +#endif
> > 
> > i think it would be better to just have -codecpath , get rid of the
> > ifdef, and have it work for all binary (linux/mac/win32) codecs...
> 
> Ok. But I don't think SetCodecPath() is always linked.
> 
> So use CONFIG_WIN32DLL instead of WIN32_LOADER.

Hmmm, I'm not sure this is the right #ifdef.

> --- mplayer.c	(revision 30880)
> +++ mplayer.c	(working copy)
> @@ -103,6 +103,12 @@
> 
>  #include "osdep/priority.h"
> 
> +#ifdef CONFIG_WIN32DLL
> +extern void SetCodecPath(const char *);   // in loader/drv.c
> +
> +char *codec_path=NULL;
> +#endif
> +
> --- mencoder.c	(revision 30880)
> +++ mencoder.c	(working copy)
> @@ -155,6 +155,12 @@
> 
>  #include "osdep/priority.h"
> 
> +#ifdef CONFIG_WIN32DLL
> +extern void SetCodecPath(const char *);   // in loader/drv.c
> +
> +char *codec_path=NULL;
> +#endif

This looks like a candidate for the common code.

> --- cfg-common-opts.h	(revision 30880)
> +++ cfg-common-opts.h	(working copy)
> @@ -40,6 +40,9 @@
>  #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},

Documentation is missing.

Diego



More information about the MPlayer-dev-eng mailing list