[vlc-devel] [PATCH] GSoC: lua services discovery, first try

Fabio Ritrovato exsephiroth87 at gmail.com
Thu Jul 23 19:43:10 CEST 2009

> I don't understand what prevents the "interface" thread from obtaining the
> lock between two invocations of services_discovery_AddParameterValue() by the
> SD thread? or even before the first invocation of
> services_discovery_AddParameterValue(), right after the item would be
> inserted?

Ok, now I can see what you were saying...

>> > It does not make sense to use module_get_name() on your own self. When a
>> > module wants to know its own name for aliasing purpose, we add it in the
>> > object typedef (e.g. access_t.psz_access, demux_t.psz_demux...) and set
>> > it before calling module_need(). It's just that SD never needed it this
>> > far. Using event handlers seems backward.
>> I agree that it usually it does not make very sense, but in this case,
>> the module it's a generic one, that's copied for every script you put
>> in the folder (see lua/vlc.c code), and so, the module has no way to
>> know it's name until after it's been set by module_need...
> I got that.
>> Another way could be to save the module name in p_sd before the module
>> is started, if that's better...
> Yes, that was my point.
> And then you can simply return an error if vlc_clone() should fail.

Ok, I'll go that way...

Thanks for your time :)

More information about the vlc-devel mailing list