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

Rémi Denis-Courmont rem at videolan.org
Sun Dec 28 19:57:35 CET 2008


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.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list