}
if( asprintf( &psz_temp, "%s,none", psz_module ) != -1)
{
- libvlc_InternalAddIntf( p_libvlc, psz_temp );
+ intf_Create( p_libvlc, psz_temp );
free( psz_temp );
}
}
/*
* Always load the hotkeys interface if it exists
*/
- libvlc_InternalAddIntf( p_libvlc, "hotkeys,none" );
+ intf_Create( p_libvlc, "hotkeys,none" );
#ifdef HAVE_DBUS
/* loads dbus control interface if in one-instance mode
if( config_GetInt( p_libvlc, "one-instance" ) > 0
|| ( config_GetInt( p_libvlc, "one-instance-when-started-from-file" )
&& config_GetInt( p_libvlc, "started-from-file" ) ) )
- libvlc_InternalAddIntf( p_libvlc, "dbus,none" );
+ intf_Create( p_libvlc, "dbus,none" );
/* Prevents the power management daemon from suspending the system
* when VLC is active */
if( config_GetInt( p_libvlc, "inhibit" ) > 0 )
- libvlc_InternalAddIntf( p_libvlc, "inhibit,none" );
+ intf_Create( p_libvlc, "inhibit,none" );
#endif
/*
#ifdef HAVE_X11_XLIB_H
if( config_GetInt( p_libvlc, "disable-screensaver" ) )
{
- libvlc_InternalAddIntf( p_libvlc, "screensaver,none" );
+ intf_Create( p_libvlc, "screensaver,none" );
}
#endif
if( (config_GetInt( p_libvlc, "file-logging" ) > 0) &&
!config_GetInt( p_libvlc, "syslog" ) )
{
- libvlc_InternalAddIntf( p_libvlc, "logger,none" );
+ intf_Create( p_libvlc, "logger,none" );
}
#ifdef HAVE_SYSLOG_H
if( config_GetInt( p_libvlc, "syslog" ) > 0 )
{
char *logmode = var_CreateGetString( p_libvlc, "logmode" );
var_SetString( p_libvlc, "logmode", "syslog" );
- libvlc_InternalAddIntf( p_libvlc, "logger,none" );
+ intf_Create( p_libvlc, "logger,none" );
if( logmode )
{
if( config_GetInt( p_libvlc, "show-intf" ) > 0 )
{
- libvlc_InternalAddIntf( p_libvlc, "showintf,none" );
+ intf_Create( p_libvlc, "showintf,none" );
}
if( config_GetInt( p_libvlc, "network-synchronisation") > 0 )
{
- libvlc_InternalAddIntf( p_libvlc, "netsync,none" );
+ intf_Create( p_libvlc, "netsync,none" );
}
#ifdef WIN32
/* Ask the interfaces to stop and destroy them */
msg_Dbg( p_libvlc, "removing all interfaces" );
- intf_thread_t *p_intf;
- while( (p_intf = vlc_object_find( p_libvlc, VLC_OBJECT_INTF, FIND_CHILD )) )
- {
- intf_StopThread( p_intf );
- vlc_object_detach( p_intf );
- vlc_object_release( p_intf ); /* for intf_Create() */
- vlc_object_release( p_intf ); /* for vlc_object_find() */
- }
+ libvlc_Quit( p_libvlc );
+ intf_DestroyAll( p_libvlc );
#ifdef ENABLE_VLM
/* Destroy VLM if created in libvlc_InternalInit */
*/
int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc, char const *psz_module )
{
- int i_err;
- intf_thread_t *p_intf = NULL;
-
if( !p_libvlc )
return VLC_EGENERIC;
}
/* Try to create the interface */
- p_intf = intf_Create( p_libvlc, psz_module ? psz_module : "$intf" );
- if( p_intf == NULL )
+ if( intf_Create( p_libvlc, psz_module ? psz_module : "$intf" ) )
{
msg_Err( p_libvlc, "interface \"%s\" initialization failed",
psz_module );
return VLC_EGENERIC;
}
-
- /* Try to run the interface */
- i_err = intf_RunThread( p_intf );
- if( i_err )
- {
- vlc_object_detach( p_intf );
- vlc_object_release( p_intf );
- return i_err;
- }
-
return VLC_SUCCESS;
-};
+}
static vlc_mutex_t exit_lock = VLC_STATIC_MUTEX;
{
if( b_color )
utf8_fprintf( stdout, "\n" WHITE "%s" GRAY "\n",
- _( "No matching module found. Use --list or" \
+ _( "No matching module found. Use --list or " \
"--list-verbose to list available modules." ) );
else
utf8_fprintf( stdout, "\n%s\n",
- _( "No matching module found. Use --list or" \
+ _( "No matching module found. Use --list or " \
"--list-verbose to list available modules." ) );
}
*****************************************************************************/
static void Version( void )
{
+ extern const char psz_vlc_changeset[];
#ifdef WIN32
ShowConsole( true );
#endif
- utf8_fprintf( stdout, _("VLC version %s\n"), VLC_Version() );
+ utf8_fprintf( stdout, _("VLC version %s (%s)\n"), VLC_Version(),
+ psz_vlc_changeset );
utf8_fprintf( stdout, _("Compiled by %s@%s.%s\n"),
VLC_CompileBy(), VLC_CompileHost(), VLC_CompileDomain() );
utf8_fprintf( stdout, _("Compiler: %s\n"), VLC_Compiler() );