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

KO Myung-Hun komh at chollian.net
Thu Mar 11 13:31:07 CET 2010


Diego Biurrun wrote:
> 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.
> 

Please suggest the alternatives as well as the objections.

>> --- 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.
> 

Ok. I've put them into get_path.h.

>> --- 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.

Added.

-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.0.3
Under OS/2 Warp 4 for Korean with FixPak #15
On AMD ThunderBird 1GHz with 512 MB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: codecpath.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20100311/e0c7843a/attachment.asc>


More information about the MPlayer-dev-eng mailing list