[vlc-devel] [PATCH 2/2] LUA: AirPlay target support

Rémi Denis-Courmont remi at remlab.net
Sun Mar 18 08:57:48 CET 2012


Le dimanche 18 mars 2012 05:50:07 Brendon Justin, vous avez écrit :
> Hi,
> 
> > > > Advertising the service using Bonjour is necessary for devices to
> > > > see it, and I did not find any other way to start advertising when
> > > > the interface is started. As I said in my last message, I hope to
> > > > change the current method to a general interface for Bonjour and
> > > > an interface for Avahi. I will hold off on doing so if there are
> > > > concerns about the approach.
> > > 
> > > I think it would be very useful to have some generic functionality to
> > > advertise stuff over bonjour (avahai,zeroconf,whatever). for example,
> > > I'd really like to be able to advertise the http interface over
> > > bonjour to facilitate discovery/pairing.
> > 
> > Like the service discovery modules we have, there is this idea here
> > about "service advertisement", although it's not as simple to define and
> > abstract. For now we have SAP functionality in the core; I think that
> > bonjour is welcome too, and belongs as a service in VLC, not as
> > something specific in lua. Maybe it could be put in the core. Also,
> > rather than adding yet another module in the lua API, I think the setup
> > of bonjour could be integrated with httpd calls: that's where it would be
> > useful.
> 
> Does anyone else have an opinion on this?

From my perspective, there are only two acceptable ways to get this in:

1) Make a proper C API around it. SAP works that way, although it is not a 
module (because its code is small and does not depend on any external 
library).
That implies more than one module use the functionality and the backend is not 
limited to MacOS.

2) Come up with a generic solution for the Lua module problem. We definitely 
don't want to turn VLC into a generic fully featured Lua interpreter. The 
official Lua interpreter is already there for that purpose.
Only VLC specific functionality should be exposed specifically by VLC. 
Exposing a library that VLC does not use is out of scope.

> Where should the actual bonjour
> code go so it can be used by other parts of VLC, possibly as a module?  It
> is the opposite of service discovery, and there is no corresponding module
> type in VLC that I see.

There has been SAP for many years. It is not a module because it is a single 
backend without dependencies. A plugin would have been overkill until now.


That is not to say that it is impossible, but I don't see how a generic API 
can work here.

-- 
Rémi Denis-Courmont
http://www.remlab.net/
http://fi.linkedin.com/in/remidenis



More information about the vlc-devel mailing list