[vlc-devel] [PATCH] GSoC: lua services discovery, take two

Pierre d'Herbemont pdherbemont at free.fr
Sat Jul 25 19:54:59 CEST 2009

On Sat, Jul 25, 2009 at 4:51 AM, Fabio Ritrovato<exsephiroth87 at gmail.com> wrote:

> Lastly, playlist_ServiceDiscoveryGetById(); you told me not use id,
> but from the playlist window, where this function is used, it's the
> only way, as of now, to get the pointer of the sd... j-b told me that
> the playlist will be rewritten, so probably this function will not be
> needed in the future, it's a temporary solution.

Well, the hypothetical playlist rewrite seems to happen gradually.

It's important not to add any more dependency on id. So the idea is
just to use the minimal subset of function so that they will be easier
to replace. Either, don't implement that function as a playlist API
and move it inline where you need it, or translate the id before using
that function. This should be easy to do.

> services_discovery_AddParameterValue() to add a parameter and its
> values to an sd?

Value and parameter are terms that are too vague and certainly not
descriptive :)

I am going to be picky, but this parameter API is too obscure and too
vague. We don't want that level of flexibility in vlc, at least for
the sake of checking.

Instead of saying I don't like, here is the kind of API that we should
look to develop:

- search* search_new()
- void search_set_filter_string(search*, const char *)
- vlc_array_t search_get_input_item_results_list(search*)
- event_manager* search_get_event_manager()
-> emit search_result_item_added
-> emit search_result_item_removed

This could even be refined.

> ItemPut is used to pass a string to an sd, that parse it and use it in
> any way he wants...

ItemPut() name is also too vague, and seems to be unrelated to string
passing to the SD.

> The other 2, ItemGet and ItemDelete, are not used at the moment

Please don't implement them yet then.

Thanks for the answer and work, seems like a cool addition to VLC.


More information about the vlc-devel mailing list