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

Fabio Ritrovato exsephiroth87 at gmail.com
Thu Jul 23 17:35:20 CEST 2009

2009/7/22 Rémi Denis-Courmont <remi at remlab.net>:
>        Hello,
> Please split 0001. Adding non-cacheable modules has nothing to do with
> extending the service discovery API. Similarly, please split the new scripts
> from the C code in 0003.
> struct typedefs should not be added to vlc_common.h anymore these days. This
> is legacy from the times of vlc_symbol.


> There is no point in loading and saving the cacheable value in the module
> cache, since it will fundamentally always be false...

Yeah, that's seem pretty stupid, don't know why i put it, removed...

> Locking in services_discovery_AddParameterValue is weird and inconsistent. The
> va_list variant should take the lock instead. In fact, I couldn't figure out
> what the lock was protecting... ? Also why do you need new functions and new
> events to manage SD items?

Why is that? Take a look at input_item_AddInfo() since it's basically
the same code...
What's protected is the parameter list, one thing i probably forgot is
to actually use the lock in the interface...
Because you can't manage SD items right now; or, to be right, you can
only manage the actual playlist items, but you can't do anything with
With the new functions, you can dinamically add items to the SD, for
example in the youtube script, you can search for a string and the
videos are added to the playlist, or in the mtp SD you can transfer
song to the device, that's what the new functions and events are

> In 0003, the closing function will crash if vlc_clone() failed (which can
> happen).

Is checking if p_sys->p_thread != NULL enough?

> Also, registering to your own event manager seems rather silly. Unless I am
> missing something this is meant for libvlc applications to talk to plugins,
> not for plugins to talk to themselves.

Because I need to wait for vlc_sd_Start() to finish, if not the Run()
function will start too fast and crash while trying to use stuff not
already allocated...
If there are other ideas, I'm open to suggestions...
Btw, I forgot to detach the event, added it...

Also, forgot to incude edits to src/modules/modules.h, but it'll be
added in the revised patches...

More information about the vlc-devel mailing list