]> git.sesse.net Git - vlc/blobdiff - src/libvlc.h
Use a per-object spin around the reference count.
[vlc] / src / libvlc.h
index a6ba7be74365b2982e196372593e0ace3b4657c5..0da4d2f574513faf97ba1e46759f4a3ed02b26b6 100644 (file)
@@ -187,6 +187,7 @@ struct vlc_object_internals_t
     vlc_spinlock_t  spin;
 
     /* Objects management */
+    vlc_spinlock_t   ref_spin;
     unsigned         i_refcount;
     vlc_destructor_t pf_destructor;
     bool             b_attached;
@@ -211,9 +212,6 @@ typedef struct libvlc_priv_t
     /* Configuration */
     vlc_mutex_t        config_lock; ///< config file lock
     char *             psz_configfile;   ///< location of config file
-    char              *psz_configdir;    ///< user configuration directory
-    char              *psz_datadir;      ///< user data directory
-    char              *psz_cachedir; ///< user cache directory
 
     /* There is no real reason to keep a list of items, but not to break
      * everything, let's keep it */
@@ -235,7 +233,8 @@ typedef struct libvlc_priv_t
                                           /// (needs cleanup)
 
     module_t          *p_memcpy_module;  ///< Fast memcpy plugin used
-    vlm_t             *p_vlm;  ///< VLM if created from libvlc-common.c
+    playlist_t        *p_playlist; //< the playlist singleton
+    vlm_t             *p_vlm;  ///< the VLM singleton (or NULL)
     vlc_object_t      *p_interaction;    ///< interface interaction object
     httpd_t           *p_httpd; ///< HTTP daemon (src/network/httpd.c)
 } libvlc_priv_t;
@@ -245,10 +244,7 @@ static inline libvlc_priv_t *libvlc_priv (libvlc_int_t *libvlc)
     return (libvlc_priv_t *)(libvlc + 1);
 }
 
-static inline bool libvlc_stats (vlc_object_t *obj)
-{
-   return libvlc_priv (obj->p_libvlc)->b_stats;
-}
+#define libvlc_stats( o ) (libvlc_priv((VLC_OBJECT(o))->p_libvlc)->b_stats)
 
 /**
  * LibVLC "main module" configuration settings array.