[vlc-devel] [PATCH 1/7] Add mDNS Services Advertisement submodule (stub)

Roland Bewick roland.bewick at gmail.com
Sat Jul 27 13:28:59 CEST 2019


On Sat, 27 Jul 2019 at 5:53 PM, Marvin Scholz <epirat07 at gmail.com> wrote:

>
>
> On 27 Jul 2019, at 9:44, Roland Bewick wrote:
>
> > Hi Marvin, thanks for the reply.
> >
> > On 26/07/2019 6:54 PM, Marvin Scholz wrote:
> >> Hi, thanks for your patch!
> >>
> >> Some remarks:
> >>
> >> I think in general what you want is to allow individual plugins to
> >> use
> >> the service advertisement module(s) to advertise themselves or add
> >> advertisements.
> >>
> >> The service advertisement module can not know what to advertise and
> >> hardcoding
> >> a specific advertisement seems wrong.
> >
> >>
> >> For example what you likely want to advertise instead or in addition
> >> to
> >> _vlc._tcp.local is _http._tcp.local for the VLC web interface.
> >
> > I think _vlc._tcp.local could be used to advertise any sort of VLC
> > interface (Whatever is being used at the time)? That way it wouldn't
> > conflict if you were using _http._tcp.local for some other purpose
> > outside of hosting VLC.
> >
>
> This is not how these identifiers work. They are used to announce
> protocols, and if you want to
> announce the HTTP interface, that would be _http._tcp.local. You do not
> need to worry about any
> conflict here. This will even make some Browser like Safari show the
> discovered entries in the
> Browser bookmarks Bonjour section.
>
> Of course if advertising the remote control API, that could use its own
> protocol identifier.
>
> For a list of all registered identifiers see
>
> https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml


Ok, thanks :-)

<https://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml>
>
> >>
> >> And for the address, only the module actually listening to the socket
> >> and
> >> providing whatever service you want to announce can know which
> >> address to
> >> announce, unless I misunderstand something here.
> >>
> >> For example if the VLC http module only listens on v4 only, you do
> >> not want
> >> to announce the v6 address too.
> >>
> >> On 24 Jul 2019, at 17:43, Roland Bewick wrote:
> >>
> >>> ---
> >>>  modules/services_discovery/microdns.c | 23 +++++++++++++++++++++++
> >>>  1 file changed, 23 insertions(+)
> >>>
> >>> diff --git a/modules/services_discovery/microdns.c
> >>> b/modules/services_discovery/microdns.c
> >>> index ad0d2691f7..e9ff0c6380 100644
> >>> --- a/modules/services_discovery/microdns.c
> >>> +++ b/modules/services_discovery/microdns.c
> >>> @@ -40,6 +40,8 @@ static int OpenSD( vlc_object_t * );
> >>>  static void CloseSD( vlc_object_t * );
> >>>  static int OpenRD( vlc_object_t * );
> >>>  static void CloseRD( vlc_object_t * );
> >>> +static int OpenSA( vlc_object_t * );
> >>> +static void CloseSA( vlc_object_t * );
> >>>
> >>>  VLC_SD_PROBE_HELPER( "microdns", N_("mDNS Network Discovery"),
> >>> SD_CAT_LAN )
> >>>  VLC_RD_PROBE_HELPER( "microdns_renderer", "mDNS renderer
> >>> Discovery" )
> >>> @@ -69,6 +71,14 @@ vlc_module_begin()
> >>>          set_callbacks( OpenRD, CloseRD )
> >>>          add_shortcut( "mdns_renderer", "microdns_renderer"
> >>> )
> >>>          VLC_RD_PROBE_SUBMODULE
> >>> +    add_submodule() \
> >>> +        set_description( N_( "mDNS Services Advertisement" )
> >>> )
> >>> +        set_category( CAT_ADVANCED )
> >>> +        set_subcategory( SUBCAT_ADVANCED_NETWORK )
> >>> +        set_capability( "services_advertisement", 0 )
> >>> +        set_callbacks( OpenSA, CloseSA )
> >>> +        add_shortcut( "mdns", "microdns" )
> >>> +        VLC_RD_PROBE_SUBMODULE
> >>>  vlc_module_end ()
> >>>
> >>>  static const struct
> >>> @@ -673,3 +683,16 @@ CloseRD( vlc_object_t *p_this )
> >>>
> >>>      CleanCommon( p_sys );
> >>>  }
> >>> +
> >>> +static int
> >>> +OpenSA( vlc_object_t *p_obj )
> >>> +{
> >>> +    msg_Dbg(p_obj, "TODO: Open service advertisement module");
> >>> +    return VLC_SUCCESS;
> >>> +}
> >>> +
> >>> +static void
> >>> +CloseSA( vlc_object_t *p_this )
> >>> +{
> >>> +    msg_Dbg(p_this, "TODO: Close service advertisement module");
> >>> +}
> >>> \ No newline at end of file
> >>> --
> >>> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190727/0c0049b2/attachment.html>


More information about the vlc-devel mailing list