]> git.sesse.net Git - vlc/blobdiff - src/libvlc.h
p_module_bank: move out of vlc_global
[vlc] / src / libvlc.h
index 0c7c295846dae957ed6b845bc2052e32c47d6d63..fe2d940c484db7f0ec9464e659bc2f0e113dc4c1 100644 (file)
@@ -45,12 +45,10 @@ void system_End       ( libvlc_int_t * );
  */
 int vlc_threads_init( void );
 void vlc_threads_end( void );
-vlc_object_t *vlc_threadobj (void);
-#ifdef LIBVLC_REFCHECK
-void vlc_refcheck (vlc_object_t *obj);
-#else
-# define vlc_refcheck( obj ) (void)0
-#endif
+
+/* Hopefully, no need to export this. There is a new thread API instead. */
+void vlc_thread_cancel (vlc_object_t *);
+
 
 /*
  * CPU capabilities
@@ -97,21 +95,9 @@ void msg_Flush   (libvlc_int_t *);
 void msg_Destroy (libvlc_int_t *);
 
 /** Internal message stack context */
-typedef struct
-{
-    int i_code;
-    char * psz_message;
-} msg_context_t;
-
 void msg_StackSet ( int, const char*, ... );
 void msg_StackAdd ( const char*, ... );
 const char* msg_StackMsg ( void );
-/** The global thread var for msg stack context
- *  We store this as a static global variable so we don't need a vlc_object_t
- *  everywhere.
- *  This key is created in vlc_threads_init and is therefore ready to use at
- *  the very beginning of the universe */
-extern vlc_threadvar_t msg_context_global_key;
 void msg_StackDestroy (void *);
 
 /*
@@ -154,14 +140,13 @@ typedef struct libvlc_global_data_t
 {
     VLC_COMMON_MEMBERS
 
-    /* Object structure data */
-    int                    i_counter;   ///< object counter
-
-    module_bank_t *        p_module_bank; ///< The module bank
-
     char *                 psz_vlcpath;
 } libvlc_global_data_t;
 
+/**
+ * The module bank
+ */
+extern module_bank_t *p_module_bank;
 
 libvlc_global_data_t *vlc_global (void);
 
@@ -189,9 +174,6 @@ struct vlc_object_internals_t
     vlc_spinlock_t   ref_spin;
     unsigned         i_refcount;
     vlc_destructor_t pf_destructor;
-#ifndef LIBVLC_REFCHECK
-    vlc_thread_t     creator_id;
-#endif
 
     /* Objects tree structure */
     vlc_object_t    *prev, *next;
@@ -207,21 +189,13 @@ struct vlc_object_internals_t
 
 #define vlc_internals( obj ) (((vlc_object_internals_t*)(VLC_OBJECT(obj)))-1)
 
-/* Signal an object without checking for locking consistency. This is wrong. */
-#ifdef __GNUC__
-__attribute__((deprecated))
-#endif
-static inline void
-vlc_object_signal_maybe (vlc_object_t *p_this)
-{
-    vlc_cond_signal (&(vlc_internals(p_this)->wait));
-}
-
 /**
  * Private LibVLC instance data.
  */
 typedef struct libvlc_priv_t
 {
+    libvlc_int_t       public_data;
+
     /* Configuration */
     vlc_mutex_t        config_lock; ///< config file lock
     char *             psz_configfile;   ///< location of config file
@@ -254,20 +228,11 @@ typedef struct libvlc_priv_t
 
     /* Private playlist data (FIXME - playlist_t is too public...) */
     sout_instance_t   *p_sout; ///< kept sout instance (for playlist)
-
-    /* Thread support */
-    unsigned           threads_count;
-    vlc_mutex_t        threads_lock;
-    vlc_cond_t         threads_wait;
-
-#ifdef WIN32
-    vlc_object_t       *ipc_helper;
-#endif
 } libvlc_priv_t;
 
 static inline libvlc_priv_t *libvlc_priv (libvlc_int_t *libvlc)
 {
-    return (libvlc_priv_t *)(libvlc + 1);
+    return (libvlc_priv_t *)libvlc;
 }
 
 void playlist_ServicesDiscoveryKillAll( playlist_t *p_playlist );