]> git.sesse.net Git - vlc/blobdiff - src/libvlc.c
vlc_opendir: simplify and partly revert previous commit
[vlc] / src / libvlc.c
index ef517d4ab91a5a5380b3d68578aeb273a3f24543..9eb08cf16d72676ac3ac39517ad8b5e7be64f399 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * libvlc.c: libvlc instances creation and deletion, interfaces handling
  *****************************************************************************
- * Copyright (C) 1998-2008 the VideoLAN team
+ * Copyright (C) 1998-2008 VLC authors and VideoLAN
  * $Id$
  *
  * Authors: Vincent Seguin <seguin@via.ecp.fr>
  *          Derk-Jan Hartman <hartman at videolan dot org>
  *          RĂ©mi Denis-Courmont <rem # videolan : org>
  *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
  * (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 /** \file
@@ -66,9 +66,6 @@
 #include <vlc_playlist.h>
 #include <vlc_interface.h>
 
-#include <vlc_aout.h>
-#include "audio_output/aout_internal.h"
-
 #include <vlc_charset.h>
 #include <vlc_fs.h>
 #include <vlc_cpu.h>
@@ -193,7 +190,6 @@ libvlc_int_t * libvlc_InternalCreate( void )
 
     /* Initialize mutexes */
     vlc_mutex_init( &priv->ml_lock );
-    vlc_mutex_init( &priv->timer_lock );
     vlc_ExitInit( &priv->exit );
 
     return p_libvlc;
@@ -518,8 +514,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     vlc_object_set_name( p_libvlc, "main" );
 
     priv->b_stats = var_InheritBool( p_libvlc, "stats" );
-    priv->i_timers = 0;
-    priv->pp_timers = NULL;
 
     /*
      * Initialize hotkey handling
@@ -649,24 +643,11 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
      */
     intf_Create( p_libvlc, "hotkeys,none" );
 
-#ifdef HAVE_DBUS
-    /* loads dbus control interface if in one-instance mode
-     * we do it only when playlist exists, because dbus module needs it */
-    if( var_InheritBool( p_libvlc, "one-instance" )
-     || ( var_InheritBool( p_libvlc, "one-instance-when-started-from-file" )
-       && var_InheritBool( p_libvlc, "started-from-file" ) ) )
-        intf_Create( p_libvlc, "dbus,none" );
-
-# if !defined (HAVE_MAEMO)
-    /* Prevents the power management daemon from suspending the system
-     * when VLC is active */
-    if( var_InheritBool( p_libvlc, "inhibit" ) > 0 )
-        intf_Create( p_libvlc, "inhibit,none" );
-# endif
+    if( var_InheritBool( p_libvlc, "file-logging" )
+#ifdef HAVE_SYSLOG_H
+        && !var_InheritBool( p_libvlc, "syslog" )
 #endif
-
-    if( var_InheritBool( p_libvlc, "file-logging" ) &&
-        !var_InheritBool( p_libvlc, "syslog" ) )
+        )
     {
         intf_Create( p_libvlc, "logger,none" );
     }
@@ -769,8 +750,6 @@ void libvlc_InternalCleanup( libvlc_int_t *p_libvlc )
 
     /* Free playlist now, all threads are gone */
     playlist_Destroy( p_playlist );
-    stats_TimersDumpAll( p_libvlc );
-    stats_TimersCleanAll( p_libvlc );
 
     msg_Dbg( p_libvlc, "removing stats" );
 
@@ -824,7 +803,6 @@ void libvlc_InternalDestroy( libvlc_int_t *p_libvlc )
 
     /* Destroy mutexes */
     vlc_ExitDestroy( &priv->exit );
-    vlc_mutex_destroy( &priv->timer_lock );
     vlc_mutex_destroy( &priv->ml_lock );
 
 #ifndef NDEBUG /* Hack to dump leaked objects tree */