summaryrefslogtreecommitdiff
path: root/gst/audiovisualizers/gstbaseaudiovisualizer.c
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@collabora.co.uk>2012-01-19 11:34:26 +0100
committerWim Taymans <wim.taymans@collabora.co.uk>2012-01-19 11:34:26 +0100
commit27ee60a27b771aa0bd34d06267e95e41927a61d6 (patch)
tree15b6d480ad87a3d7b87d8eae5c304b999e7c8369 /gst/audiovisualizers/gstbaseaudiovisualizer.c
parenta0d9ac6bb1fdfebd1211607c319acd53df669663 (diff)
port to new gthread API
Diffstat (limited to 'gst/audiovisualizers/gstbaseaudiovisualizer.c')
-rw-r--r--gst/audiovisualizers/gstbaseaudiovisualizer.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gst/audiovisualizers/gstbaseaudiovisualizer.c b/gst/audiovisualizers/gstbaseaudiovisualizer.c
index 0c8ba7df0..6cb8a5837 100644
--- a/gst/audiovisualizers/gstbaseaudiovisualizer.c
+++ b/gst/audiovisualizers/gstbaseaudiovisualizer.c
@@ -501,7 +501,7 @@ gst_base_audio_visualizer_init (GstBaseAudioVisualizer * scope,
scope->rate = GST_AUDIO_DEF_RATE;
scope->channels = 2;
- scope->config_lock = g_mutex_new ();
+ g_mutex_init (&scope->config_lock);
}
static void
@@ -560,9 +560,9 @@ gst_base_audio_visualizer_dispose (GObject * object)
g_free (scope->pixelbuf);
scope->pixelbuf = NULL;
}
- if (scope->config_lock) {
- g_mutex_free (scope->config_lock);
- scope->config_lock = NULL;
+ if (scope->config_lock.p) {
+ g_mutex_clear (&scope->config_lock);
+ scope->config_lock.p = NULL;
}
G_OBJECT_CLASS (parent_class)->dispose (object);
}
@@ -821,7 +821,7 @@ gst_base_audio_visualizer_chain (GstPad * pad, GstObject * parent,
gst_adapter_push (scope->adapter, buffer);
- g_mutex_lock (scope->config_lock);
+ g_mutex_lock (&scope->config_lock);
/* this is what we want */
sbpf = scope->req_spf * scope->channels * sizeof (gint16);
@@ -865,9 +865,9 @@ gst_base_audio_visualizer_chain (GstPad * pad, GstObject * parent,
}
}
- g_mutex_unlock (scope->config_lock);
+ g_mutex_unlock (&scope->config_lock);
ret = gst_buffer_pool_acquire_buffer (scope->pool, &outbuf, NULL);
- g_mutex_lock (scope->config_lock);
+ g_mutex_lock (&scope->config_lock);
/* recheck as the value could have changed */
sbpf = scope->req_spf * scope->channels * sizeof (gint16);
@@ -910,10 +910,10 @@ gst_base_audio_visualizer_chain (GstPad * pad, GstObject * parent,
gst_buffer_unmap (outbuf, vdata, scope->bpf);
- g_mutex_unlock (scope->config_lock);
+ g_mutex_unlock (&scope->config_lock);
ret = gst_pad_push (scope->srcpad, outbuf);
outbuf = NULL;
- g_mutex_lock (scope->config_lock);
+ g_mutex_lock (&scope->config_lock);
skip:
/* recheck as the value could have changed */
@@ -935,7 +935,7 @@ gst_base_audio_visualizer_chain (GstPad * pad, GstObject * parent,
break;
}
- g_mutex_unlock (scope->config_lock);
+ g_mutex_unlock (&scope->config_lock);
beach:
return ret;