"This option allows you to specify an additional path for VLC to look " \
"for its modules.")
+#define VLM_CONF_TEXT N_("VLM configuration file")
+#define VLM_CONF_LONGTEXT N_( \
+ "This option allows you to specify a VLM configuration file that will " \
+ "be read when VLM is launched.")
+
#define PLUGINS_CACHE_TEXT N_("Use a plugins cache")
#define PLUGINS_CACHE_LONGTEXT N_( \
"This option allows you to use a plugins cache which will greatly " \
PLUGINS_CACHE_LONGTEXT, VLC_TRUE );
add_directory( "plugin-path", NULL, NULL, PLUGIN_PATH_TEXT,
PLUGIN_PATH_LONGTEXT, VLC_TRUE );
+ add_string( "vlm-conf", NULL, NULL, VLM_CONF_TEXT,
+ VLM_CONF_LONGTEXT, VLC_TRUE );
#if !defined(WIN32)
add_bool( "daemon", 0, NULL, DAEMON_TEXT, DAEMON_LONGTEXT, VLC_TRUE );
return NULL;
}
- return p_vlm;
+ /* try loading the vlm conf file given by --vlm-conf */
+ char *psz_vlmconf = config_GetPsz( p_vlm, "vlm-conf" );
+
+ if( psz_vlmconf && *psz_vlmconf )
+ {
+ vlm_message_t *p_message = NULL;
+ char *psz_buffer = NULL;
+
+ msg_Dbg( p_this, "loading vlm conf ..." );
+ asprintf(&psz_buffer, "load %s", psz_vlmconf );
+ if( psz_buffer )
+ {
+ msg_Dbg( p_this, psz_buffer);
+ if( vlm_ExecuteCommand( p_vlm, psz_buffer, &p_message ) ){
+ msg_Warn( p_this, "error while loading the vlm conf file" );
+ }
+ free(p_message);
+ free(psz_buffer);
+ }
+ }
+ free(psz_vlmconf);
+
+ return p_vlm;
}
/*****************************************************************************