[vlc-devel] [PATCH] Open Sound Control support using liblo

Nicholas J Humfrey njh at aelius.com
Mon Dec 29 22:13:24 CET 2008


On 28 Dec 2008, at 18:57, Rémi Denis-Courmont wrote:

> Le lundi 22 décembre 2008, Nicholas J Humfrey a écrit :
>>> 2/ "static vlc_object_t *osc_global_this;"
>>> I don't like the use of a static variable. If you can fix this ?
>>
>> I don't like it either! Meant to ask when I submitted the patch what
>> the best way round that is. The problem is that the ErrorHandler
>> callback doesn't doesn't have a user_data parameter, so there is no
>> way to pass a vlc_object to the msg_Err() function. Suggestions?
>
> static pointers won't solve this, unless you do ensure (and accept the
> restriction) that there is only one instance of the plugin per  
> process.
>
> Normally, this is solved using thread-local variables, but that only
> works if the library does _not_ call your callbacks from threads of  
> its
> own.

I see from doxygen that there used to be a vlc_threadobj() function.
Why was this removed? I guess there is a danger of getting lazy and  
abusing it but this is exactly what I am going to need to implement...


nick.






More information about the vlc-devel mailing list