vlc/vlc-1.1 | branch: master | Rémi Duraffort <[email protected]> | Thu Sep 9 19:57:38 2010 +0200| [f3bc257ac852376648b93146c8f44e56d7818530] | committer: Rémi Duraffort
lua_intf: also provide the --rc-host option for backward compatibility. (cherry picked from commit 2ab3934faa8de2f5a4ced403d16f82e0bc1a37bb) Signed-off-by: Rémi Duraffort <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=f3bc257ac852376648b93146c8f44e56d7818530 --- modules/misc/lua/intf.c | 12 ++++++++++++ modules/misc/lua/vlc.c | 5 +++++ 2 files changed, 17 insertions(+), 0 deletions(-) diff --git a/modules/misc/lua/intf.c b/modules/misc/lua/intf.c index eb87685..f79e0ef 100644 --- a/modules/misc/lua/intf.c +++ b/modules/misc/lua/intf.c @@ -274,6 +274,18 @@ int Open_LuaIntf( vlc_object_t *p_this ) free( psz_telnet_passwd ); free( psz_telnet_host ); } + else if( !strcmp( psz_name, "rc" ) ) + { + char *psz_rc_host = var_CreateGetNonEmptyString( p_intf, "rc-host" ); + if( psz_rc_host ) + { + char *psz_esc_host = config_StringEscape( psz_rc_host ); + asprintf( &psz_config, "rc={host='%s'}", psz_esc_host ); + + free( psz_esc_host ); + free( psz_rc_host ); + } + } } if( psz_config ) diff --git a/modules/misc/lua/vlc.c b/modules/misc/lua/vlc.c index ee0b057..7270e14 100644 --- a/modules/misc/lua/vlc.c +++ b/modules/misc/lua/vlc.c @@ -82,6 +82,9 @@ #define TELNETPWD_LONGTEXT N_( "A single administration password is used " \ "to protect this interface. The default value is \"admin\"." ) #define TELNETPWD_DEFAULT "admin" +#define RCHOST_TEXT N_("TCP command input") +#define RCHOST_LONGTEXT N_("Accept commands over a socket rather than stdin. " \ + "You can set the address and port the interface will bind to." ) static int vlc_sd_probe_Open( vlc_object_t * ); @@ -106,6 +109,8 @@ vlc_module_begin () add_string ( "http-host", NULL, NULL, HOST_TEXT, HOST_LONGTEXT, true ) add_string ( "http-src", NULL, NULL, SRC_TEXT, SRC_LONGTEXT, true ) add_bool ( "http-index", false, NULL, INDEX_TEXT, INDEX_LONGTEXT, true ) + set_section( N_("Lua RC"), 0 ) + add_string( "rc-host", NULL, NULL, RCHOST_TEXT, RCHOST_LONGTEXT, true ) set_section( N_("Lua Telnet"), 0 ) add_string( "telnet-host", "localhost", NULL, TELNETHOST_TEXT, TELNETHOST_LONGTEXT, true ) _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
