[vlc-devel] [PATCH 2/7] Add services-advertisement configuration option

Alexandre Janniaux ajanni at videolabs.io
Thu Jul 25 11:44:08 CEST 2019


Hi,

Actually I was a bit to fast in answering, it currently displays nothing in
vlc -H but could in the future (only add_module does that currently) and
could also be presented just like control interfaces in the Qt interfaces.

It also provides better insight when reading the code because you'll know
the capability supported for this variable.

You shouldn't have to introduce this kind of documentation yourself, as the
module system is dynamic and you never know when compiling which modules will
be available at runtime.

Thank you for your changes :)

Regards,

--
Alexandre Janniaux
VideoLabs

On Thu, Jul 25, 2019 at 01:32:54PM +0700, Roland Bewick wrote:
>
> On 24/07/2019 11:29 PM, Alexandre Janniaux wrote:
> > The default value should probably be NULL like "keystore", "clock-source",
> > pidfile,... btw, to stay consistent. :)
> Sounds good.
> >
> > --
> > Alexandre Janniaux
> > VideoLabs
> >
> > On Wed, Jul 24, 2019 at 06:11:16PM +0200, Alexandre Janniaux wrote:
> > > Hi,
> > >
> > > This would probably be a good idea to use add_module_list instead of
> > > add_string, as `vlc -H` will provide the available module that you can
> > > put there and you probably want to be capable of running multiple
> > > service advertisement like the variable name states.
> > > If so, you'll need to use config_ChainParse to extract the different
> > > module and their configurations.
>
> I've updated to use add_module_list and I just get the
> SERVICE_ADVERTISEMENT_TEXT and SERVICE_ADVERTISEMENT_LONGTEXT:
>
>       --services-advertisement=<string>
>                                  Services advertisement modules
>           Specifies the services advertisement modules to preload, separated
> by colons. Typical value is "mdns".
>
>
> Do you mean it should show something like the below?
>
> --services-advertisement={mdns}
>
> > >
> > > Besides, other defines aren't using abbreviations so maybe SA_TEXT could
> > > be a more explicit name ?
> Renamed SERVICE_ADVERTISEMENT_*
> > >
> > > Regards,
> > >
> > > --
> > > Alexandre Janniaux
> > > VideoLabs
> > >
> > > On Wed, Jul 24, 2019 at 10:43:45PM +0700, Roland Bewick wrote:
> > > > ---
> > > >   src/libvlc-module.c | 6 ++++++
> > > >   1 file changed, 6 insertions(+)
> > > >
> > > > diff --git a/src/libvlc-module.c b/src/libvlc-module.c
> > > > index f5de78bcae..97075cbab6 100644
> > > > --- a/src/libvlc-module.c
> > > > +++ b/src/libvlc-module.c
> > > > @@ -1232,6 +1232,11 @@ static const char *const psz_recursive_list_text[] = {
> > > >        "Specifies the services discovery modules to preload, separated by " \
> > > >        "colons. Typical value is \"sap\"." )
> > > >
> > > > +#define SA_TEXT N_( "Services advertisement modules")
> > > > +#define SA_LONGTEXT N_( \
> > > > +     "Specifies the services advertisement modules to preload, separated by " \
> > > > +     "colons. Typical value is \"mdns\"." )
> > > > +
> > > >   #define RANDOM_TEXT N_("Play files randomly forever")
> > > >   #define RANDOM_LONGTEXT N_( \
> > > >       "VLC will randomly play files in the playlist until interrupted.")
> > > > @@ -2125,6 +2130,7 @@ vlc_module_begin ()
> > > >       add_category_hint(N_("Miscellaneous"), MISC_CAT_LONGTEXT)
> > > >       add_module("vod-server", "vod server", NULL,
> > > >                  VOD_SERVER_TEXT, VOD_SERVER_LONGTEXT)
> > > > +    add_string( "services-advertisement", "", SA_TEXT, SA_LONGTEXT, true )
> > > >
> > > >       set_section( N_("Plugins" ), NULL )
> > > >   #ifdef HAVE_DYNAMIC_PLUGINS
> > > > --
> > > > 2.11.0
> > > >
> > > > _______________________________________________
> > > > vlc-devel mailing list
> > > > To unsubscribe or modify your subscription options:
> > > > https://mailman.videolan.org/listinfo/vlc-devel
> > > _______________________________________________
> > > vlc-devel mailing list
> > > To unsubscribe or modify your subscription options:
> > > https://mailman.videolan.org/listinfo/vlc-devel
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list