[vlc-devel] [PATCH 2/2] LUA: AirPlay target support
Brendon Justin
brendonjustin at gmail.com
Wed Feb 29 04:02:46 CET 2012
Hi,
> Hello,
>> > @@ -123,6 +123,12 @@ static char *MakeConfig( intf_thread_t *p_intf, const char *name )
>> > free( psz_rc_host );
>> > }
>> > }
>> > +#ifdef __APPLE__
>> > + else if( !strcmp( name, "airplay" ) )
>> > + {
>> > + asprintf(&psz_config, "airplay" );
>> > + }
>> > +#endif
> I fail to see what this achieves. MakeConfig() is useful for including
> configuration variables into the lua script config, but apparently you
> have none.
I did have a config option before, but I took it out (setting the port
on the HTTP server the interface uses). I left that in case I could add
it back, but did not see a way to do so. I will remove it.
On the same note, if there is any way to set the port for the HTTP
server just for this, I would like to know. I only know how to change
it via the command-line arguments as for the LUA HTTP interface.
>> > +#ifdef __APPLE__
>> > + add_submodule ()
>> > + set_section( N_("Lua AirPlay"), 0 )
>> > + set_capability( "interface", 0 )
>> > + set_callbacks( Open_LuaAirplay, Close_LuaIntf )
>> > + set_description( N_("Lua AirPlay") )
>> > + add_shortcut( "luaairplay", "airplay" )
>> > +#endif
> I don't think that the lua-prepended shortcut "luaairplay" is very
> useful for a novelty.
I was copying the other interfaces. I will remove 'luaairplay' since it
is of no use.
>> > +--[==========================================================================[
>> > +Configuration options:
>> > + * none (port must be passed as a command-line argument to VLC)
>> > +--]==========================================================================]
>> > [...]
>> > +if config then
>> > + if config.host then
>> > + vlc.msg.err("\""..config.host.."\" HTTP host ignored")
>> > + local port = string.match(config.host, ":(%d+)[^]]*$")
>> > + vlc.msg.info("Pass --http-host=IP "..(port and "and --http-port="..port.." " or "").."on the command line instead.")
>> > + end
>> > +end
> This is useless since you have no config variable (and never had any
> since the script is new).
Another part I missed removing after I took out the config options.
Will remove.
> Also what does this interface do exactly? I haven't had time to read it
> all but I share R?mi's concerns about expanding the lua API.
The interface is for showing a video from an iPhone/iPod touch/iPad on a
computer through VLC. For example, I could have a video on YouTube open
on my phone, then switch to showing it on VLC and pause/seek from my
phone. It is useful when I want to watch a video that I have up on my
phone, but on a bigger screen. I think a lot of people would use it if
it is in VLC, but I only know that I find it useful.
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.
Thanks,
Brendon Justin
More information about the vlc-devel
mailing list