[vlc-devel] [PATCH 03/14] lib: add libvlc_media_discoverer_browse

Rémi Denis-Courmont remi at remlab.net
Mon Dec 8 11:48:14 CET 2014


Le 2014-12-08 13:21, Thomas Guillem a écrit :
> On Sun, Dec 7, 2014, at 17:31, Rémi Denis-Courmont wrote:
>> Le vendredi 05 décembre 2014, 14:42:54 Thomas Guillem a écrit :
>> > Discover media on a specified uri.
>> > ---
>> >  include/vlc/libvlc_media_discoverer.h | 10 ++++++++++
>> >  lib/libvlc.sym                        |  1 +
>> >  lib/media_discoverer.c                | 28 
>> ++++++++++++++++++++++++++++
>> >  3 files changed, 39 insertions(+)
>> >
>> > diff --git a/include/vlc/libvlc_media_discoverer.h
>> > b/include/vlc/libvlc_media_discoverer.h index 0f3b379..bc0d9e9 
>> 100644
>> > --- a/include/vlc/libvlc_media_discoverer.h
>> > +++ b/include/vlc/libvlc_media_discoverer.h
>> > @@ -126,6 +126,16 @@ LIBVLC_API libvlc_event_manager_t *
>> >  LIBVLC_API int
>> >          libvlc_media_discoverer_is_running( 
>> libvlc_media_discoverer_t *
>> > p_mdis );
>> >
>> > +/**
>> > + * Discover media on a specified uri.
>> > + *
>> > + * \param p_mdis media service discover object
>> > + * \param psz_uri uri
>> > + * \return -1 in case of error, 0 otherwise
>> > + */
>> > +LIBVLC_API int
>> > +        libvlc_media_discoverer_browse( libvlc_media_discoverer_t 
>> * p_mdis,
>> > const char * psz_uri ); +
>>
>> That is a bad idea. The URI parameter is completely undocumented. 
>> The
>> threading ruels are completely undocumented, and well, the meaning 
>> of the
>> function is somewhere between obscure and undocumented.
>
> Ok, I'll pass a input_item_t * at SD_CMD_BROWSE, and a libvlc_media_t 
> *
> at libvlc_media_discoverer_browse().

I don't think that helps much, if there is no way for the SD plugin to 
get back to item-specific private data.

> Do you have a better name for libvlc_media_discoverer_browse ?

I still don't understand what the function is even supposed to do. You 
guys already introduced the directory/tree support in access and stream 
to browse stuff. I would rather not have two ways to do the same thing, 
and definitely not have to implement two different backends for every 
browsable foo bar.

-- 
Rémi Denis-Courmont



More information about the vlc-devel mailing list