diff options
author | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-11-02 11:27:12 +0100 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2012-11-02 11:27:12 +0100 |
commit | b18be63defc798d0434b797a39561dc2967a7214 (patch) | |
tree | 4b395a0bcba08a85096e7d0d398d8b38295a0efa | |
parent | e6e9be660c044705ec56d7d88eb875c3762172c6 (diff) |
opensles: Use GLib 2.24 thread API
-rw-r--r-- | sys/opensles/opensles.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/opensles/opensles.c b/sys/opensles/opensles.c index d3fd0ba35..cf92223e0 100644 --- a/sys/opensles/opensles.c +++ b/sys/opensles/opensles.c @@ -28,14 +28,14 @@ #include "openslessink.h" #include "openslessrc.h" -static GMutex engine_mutex; +static GMutex *engine_mutex; static SLObjectItf engine_object = NULL; static gint engine_object_refcount = 0; SLObjectItf gst_opensles_get_engine (void) { - g_mutex_lock (&engine_mutex); + g_mutex_lock (engine_mutex); if (!engine_object) { SLresult result; result = slCreateEngine (&engine_object, 0, NULL, 0, NULL, NULL); @@ -55,7 +55,7 @@ gst_opensles_get_engine (void) if (engine_object) { engine_object_refcount++; } - g_mutex_unlock (&engine_mutex); + g_mutex_unlock (engine_mutex); return engine_object; } @@ -63,7 +63,7 @@ gst_opensles_get_engine (void) void gst_opensles_release_engine (SLObjectItf engine_object_parameter) { - g_mutex_lock (&engine_mutex); + g_mutex_lock (engine_mutex); g_assert (engine_object == engine_object_parameter); if (engine_object) { @@ -74,13 +74,13 @@ gst_opensles_release_engine (SLObjectItf engine_object_parameter) engine_object = NULL; } } - g_mutex_unlock (&engine_mutex); + g_mutex_unlock (engine_mutex); } static gboolean plugin_init (GstPlugin * plugin) { - g_mutex_init (&engine_mutex); + engine_mutex = g_mutex_new (); if (!gst_element_register (plugin, "openslessink", GST_RANK_PRIMARY, GST_TYPE_OPENSLES_SINK)) { |