added an new config variable that takes an comma separated list of

interface modules to be loaded in the background when vlc starts. This is
usefull for lirc, logger and xosd. Also got rid of the hacky way the sap
module was inserted, as this just needs to be added to this list now.
parent 831d6ca5
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libvlc.c: main libvlc source * libvlc.c: main libvlc source
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2002 VideoLAN * Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.c,v 1.57 2003/01/19 03:16:24 sam Exp $ * $Id: libvlc.c,v 1.58 2003/01/22 22:19:29 sigmunau Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -213,6 +213,8 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) ...@@ -213,6 +213,8 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
{ {
char p_capabilities[200]; char p_capabilities[200];
char * p_tmp; char * p_tmp;
char * psz_modules;
char * psz_parser;
vlc_bool_t b_exit; vlc_bool_t b_exit;
vlc_t * p_vlc; vlc_t * p_vlc;
module_t *p_help_module; module_t *p_help_module;
...@@ -486,6 +488,28 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] ) ...@@ -486,6 +488,28 @@ int VLC_Init( int i_object, int i_argc, char *ppsz_argv[] )
return VLC_EGENERIC; return VLC_EGENERIC;
} }
/*
* Load background interfaces
*/
psz_modules = config_GetPsz( p_vlc, "extraintf" );
psz_parser = psz_modules;
while ( psz_parser && *psz_parser )
{
char *psz_module;
psz_module = psz_parser;
psz_parser = strchr( psz_module, ',' );
if ( psz_parser )
{
*psz_parser = '\0';
psz_parser++;
}
VLC_AddIntf( 0, psz_module, VLC_FALSE );
}
if ( psz_modules )
{
free( psz_modules );
}
/* /*
* Get input filenames given as commandline arguments * Get input filenames given as commandline arguments
*/ */
...@@ -782,13 +806,6 @@ int VLC_Play( int i_object ) ...@@ -782,13 +806,6 @@ int VLC_Play( int i_object )
return VLC_ENOOBJ; return VLC_ENOOBJ;
} }
/* add pseudo sap interface; non blocking */
if( config_GetInt( p_vlc, "sap" ) )
{
msg_Dbg( p_vlc, "adding sap interface" );
VLC_AddIntf( 0, "sap", VLC_FALSE );
}
vlc_thread_set_priority( p_vlc, VLC_THREAD_PRIORITY_LOW ); vlc_thread_set_priority( p_vlc, VLC_THREAD_PRIORITY_LOW );
p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_CHILD ); p_playlist = vlc_object_find( p_vlc, VLC_OBJECT_PLAYLIST, FIND_CHILD );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* libvlc.h: main libvlc header * libvlc.h: main libvlc header
***************************************************************************** *****************************************************************************
* Copyright (C) 1998-2002 VideoLAN * Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.h,v 1.36 2003/01/22 10:44:50 fenrir Exp $ * $Id: libvlc.h,v 1.37 2003/01/22 22:19:29 sigmunau Exp $
* *
* Authors: Vincent Seguin <seguin@via.ecp.fr> * Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org> * Samuel Hocevar <sam@zoy.org>
...@@ -40,6 +40,12 @@ static char *ppsz_sout_vcodec[] = { "", "mpeg1", "mpeg2", "mpeg4", NULL }; ...@@ -40,6 +40,12 @@ static char *ppsz_sout_vcodec[] = { "", "mpeg1", "mpeg2", "mpeg4", NULL };
"The default behavior is to automatically select the best module " \ "The default behavior is to automatically select the best module " \
"available.") "available.")
#define EXTRAINTF_TEXT N_("extra interface modules")
#define EXTRAINTF_LONGTEXT N_( \
"This option allows you to select additional interfaces used by vlc. " \
"These will be launch in the background in addition to the default " \
"interface. Use a comma separated list of interface modules.")
#define VERBOSE_TEXT N_("verbosity (0,1,2)") #define VERBOSE_TEXT N_("verbosity (0,1,2)")
#define VERBOSE_LONGTEXT N_( \ #define VERBOSE_LONGTEXT N_( \
"This options sets the verbosity level (0=only errors and " \ "This options sets the verbosity level (0=only errors and " \
...@@ -398,9 +404,6 @@ static char *ppsz_sout_vcodec[] = { "", "mpeg1", "mpeg2", "mpeg4", NULL }; ...@@ -398,9 +404,6 @@ static char *ppsz_sout_vcodec[] = { "", "mpeg1", "mpeg2", "mpeg4", NULL };
"\n vlc:quit quit VLC" \ "\n vlc:quit quit VLC" \
"\n") "\n")
#define SAP_TEXT N_( "Session Announcement Protocol support" )
#define SAP_LONGTEXT N_( "Session Announcement Protocol support" )
/* /*
* Quick usage guide for the configuration options: * Quick usage guide for the configuration options:
...@@ -421,6 +424,7 @@ vlc_module_begin(); ...@@ -421,6 +424,7 @@ vlc_module_begin();
add_category_hint( N_("Interface"), NULL); add_category_hint( N_("Interface"), NULL);
add_module_with_short( "intf", 'I', "interface", NULL, NULL, add_module_with_short( "intf", 'I', "interface", NULL, NULL,
INTF_TEXT, INTF_LONGTEXT ); INTF_TEXT, INTF_LONGTEXT );
add_string( "extraintf", NULL, NULL, EXTRAINTF_TEXT, EXTRAINTF_LONGTEXT );
add_integer_with_short( "verbose", 'v', -1, NULL, add_integer_with_short( "verbose", 'v', -1, NULL,
VERBOSE_TEXT, VERBOSE_LONGTEXT ); VERBOSE_TEXT, VERBOSE_LONGTEXT );
add_bool_with_short( "quiet", 'q', 0, NULL, QUIET_TEXT, QUIET_LONGTEXT ); add_bool_with_short( "quiet", 'q', 0, NULL, QUIET_TEXT, QUIET_LONGTEXT );
...@@ -536,7 +540,6 @@ vlc_module_begin(); ...@@ -536,7 +540,6 @@ vlc_module_begin();
/* Misc options */ /* Misc options */
add_category_hint( N_("Miscellaneous"), NULL ); add_category_hint( N_("Miscellaneous"), NULL );
add_bool( "sap", 0, NULL, SAP_TEXT, SAP_LONGTEXT );
add_module( "memcpy", "memcpy", NULL, NULL, MEMCPY_TEXT, MEMCPY_LONGTEXT ); add_module( "memcpy", "memcpy", NULL, NULL, MEMCPY_TEXT, MEMCPY_LONGTEXT );
add_module( "access", "access", NULL, NULL, ACCESS_TEXT, ACCESS_LONGTEXT ); add_module( "access", "access", NULL, NULL, ACCESS_TEXT, ACCESS_LONGTEXT );
add_module( "demux", "demux", NULL, NULL, DEMUX_TEXT, DEMUX_LONGTEXT ); add_module( "demux", "demux", NULL, NULL, DEMUX_TEXT, DEMUX_LONGTEXT );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment