_priv_gst_caps_initialize ();
_priv_gst_meta_initialize ();
+ g_mutex_init (&_gst_trace_mutex);
+
g_type_class_ref (gst_object_get_type ());
g_type_class_ref (gst_pad_get_type ());
g_type_class_ref (gst_element_factory_get_type ());
_priv_gst_registry_cleanup ();
+ g_mutex_clear (&_gst_trace_mutex);
+
g_type_class_unref (g_type_class_peek (gst_object_get_type ()));
g_type_class_unref (g_type_class_peek (gst_pad_get_type ()));
g_type_class_unref (g_type_class_peek (gst_element_factory_get_type ()));
void gst_trace_read_tsc (gint64 *dst);
-GST_EXPORT GStaticMutex _gst_trace_mutex;
+GST_EXPORT GMutex _gst_trace_mutex;
gboolean gst_alloc_trace_available (void);
const GList* gst_alloc_trace_list (void);
#define gst_alloc_trace_new(trace, mem) \
G_STMT_START { \
if (G_UNLIKELY ((trace)->flags)) { \
- g_static_mutex_lock (&_gst_trace_mutex); \
+ g_mutex_lock (&_gst_trace_mutex); \
if ((trace)->flags & GST_ALLOC_TRACE_LIVE) \
(trace)->live++; \
if ((trace)->flags & GST_ALLOC_TRACE_MEM_LIVE) \
(trace)->mem_live = \
g_slist_prepend ((trace)->mem_live, mem); \
- g_static_mutex_unlock (&_gst_trace_mutex); \
+ g_mutex_unlock (&_gst_trace_mutex); \
} \
} G_STMT_END
#define gst_alloc_trace_free(trace, mem) \
G_STMT_START { \
if (G_UNLIKELY ((trace)->flags)) { \
- g_static_mutex_lock (&_gst_trace_mutex); \
+ g_mutex_lock (&_gst_trace_mutex); \
if ((trace)->flags & GST_ALLOC_TRACE_LIVE) \
(trace)->live--; \
if ((trace)->flags & GST_ALLOC_TRACE_MEM_LIVE) \
(trace)->mem_live = \
g_slist_remove ((trace)->mem_live, mem); \
- g_static_mutex_unlock (&_gst_trace_mutex); \
+ g_mutex_unlock (&_gst_trace_mutex); \
} \
} G_STMT_END