summaryrefslogtreecommitdiff
path: root/gst/inter
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.net>2013-02-09 20:22:09 +0000
committerTim-Philipp Müller <tim@centricular.net>2013-02-11 12:01:19 +0000
commit632f2ac1c63d9e0ea1f51c3aaea07ab81727df4e (patch)
treeb04da984227dbcdd223971b9f7cca7ea9e19a3f2 /gst/inter
parenteef2324e4d011c02b4e1f648fb775e3f0e4c3c68 (diff)
downloadgstreamer-plugins-bad-632f2ac1c63d9e0ea1f51c3aaea07ab81727df4e.tar.gz
inter: don't use deprecated GLib threading API
Diffstat (limited to 'gst/inter')
-rw-r--r--gst/inter/gstinteraudiosink.c8
-rw-r--r--gst/inter/gstinteraudiosrc.c4
-rw-r--r--gst/inter/gstintersubsink.c8
-rw-r--r--gst/inter/gstintersubsrc.c4
-rw-r--r--gst/inter/gstintersurface.c3
-rw-r--r--gst/inter/gstintersurface.h2
-rw-r--r--gst/inter/gstintertest.c1
-rw-r--r--gst/inter/gstintervideosink.c8
-rw-r--r--gst/inter/gstintervideosrc.c4
9 files changed, 20 insertions, 22 deletions
diff --git a/gst/inter/gstinteraudiosink.c b/gst/inter/gstinteraudiosink.c
index f83db3175..108c7a88a 100644
--- a/gst/inter/gstinteraudiosink.c
+++ b/gst/inter/gstinteraudiosink.c
@@ -213,9 +213,9 @@ gst_inter_audio_sink_stop (GstBaseSink * sink)
GST_DEBUG ("stop");
- g_mutex_lock (interaudiosink->surface->mutex);
+ g_mutex_lock (&interaudiosink->surface->mutex);
gst_adapter_clear (interaudiosink->surface->audio_adapter);
- g_mutex_unlock (interaudiosink->surface->mutex);
+ g_mutex_unlock (&interaudiosink->surface->mutex);
gst_inter_surface_unref (interaudiosink->surface);
interaudiosink->surface = NULL;
@@ -231,7 +231,7 @@ gst_inter_audio_sink_render (GstBaseSink * sink, GstBuffer * buffer)
GST_DEBUG ("render %" G_GSIZE_FORMAT, gst_buffer_get_size (buffer));
- g_mutex_lock (interaudiosink->surface->mutex);
+ g_mutex_lock (&interaudiosink->surface->mutex);
n = gst_adapter_available (interaudiosink->surface->audio_adapter) / 4;
#define SIZE 1600
if (n > (SIZE * 3)) {
@@ -241,7 +241,7 @@ gst_inter_audio_sink_render (GstBaseSink * sink, GstBuffer * buffer)
}
gst_adapter_push (interaudiosink->surface->audio_adapter,
gst_buffer_ref (buffer));
- g_mutex_unlock (interaudiosink->surface->mutex);
+ g_mutex_unlock (&interaudiosink->surface->mutex);
return GST_FLOW_OK;
}
diff --git a/gst/inter/gstinteraudiosrc.c b/gst/inter/gstinteraudiosrc.c
index 3e55be260..82603f756 100644
--- a/gst/inter/gstinteraudiosrc.c
+++ b/gst/inter/gstinteraudiosrc.c
@@ -272,7 +272,7 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
buffer = NULL;
- g_mutex_lock (interaudiosrc->surface->mutex);
+ g_mutex_lock (&interaudiosrc->surface->mutex);
n = gst_adapter_available (interaudiosrc->surface->audio_adapter) / 4;
if (n > SIZE * 3) {
GST_WARNING ("flushing %d samples", SIZE / 2);
@@ -285,7 +285,7 @@ gst_inter_audio_src_create (GstBaseSrc * src, guint64 offset, guint size,
buffer = gst_adapter_take_buffer (interaudiosrc->surface->audio_adapter,
n * 4);
}
- g_mutex_unlock (interaudiosrc->surface->mutex);
+ g_mutex_unlock (&interaudiosrc->surface->mutex);
if (n < SIZE) {
GstBuffer *newbuf = gst_buffer_new_and_alloc ((SIZE - n) * 4);
diff --git a/gst/inter/gstintersubsink.c b/gst/inter/gstintersubsink.c
index a5d669bd2..f2f83974b 100644
--- a/gst/inter/gstintersubsink.c
+++ b/gst/inter/gstintersubsink.c
@@ -194,12 +194,12 @@ gst_inter_sub_sink_stop (GstBaseSink * sink)
{
GstInterSubSink *intersubsink = GST_INTER_SUB_SINK (sink);
- g_mutex_lock (intersubsink->surface->mutex);
+ g_mutex_lock (&intersubsink->surface->mutex);
if (intersubsink->surface->sub_buffer) {
gst_buffer_unref (intersubsink->surface->sub_buffer);
}
intersubsink->surface->sub_buffer = NULL;
- g_mutex_unlock (intersubsink->surface->mutex);
+ g_mutex_unlock (&intersubsink->surface->mutex);
gst_inter_surface_unref (intersubsink->surface);
intersubsink->surface = NULL;
@@ -212,13 +212,13 @@ gst_inter_sub_sink_render (GstBaseSink * sink, GstBuffer * buffer)
{
GstInterSubSink *intersubsink = GST_INTER_SUB_SINK (sink);
- g_mutex_lock (intersubsink->surface->mutex);
+ g_mutex_lock (&intersubsink->surface->mutex);
if (intersubsink->surface->sub_buffer) {
gst_buffer_unref (intersubsink->surface->sub_buffer);
}
intersubsink->surface->sub_buffer = gst_buffer_ref (buffer);
//intersubsink->surface->sub_buffer_count = 0;
- g_mutex_unlock (intersubsink->surface->mutex);
+ g_mutex_unlock (&intersubsink->surface->mutex);
return GST_FLOW_OK;
}
diff --git a/gst/inter/gstintersubsrc.c b/gst/inter/gstintersubsrc.c
index cb6a6caff..9b1e34a18 100644
--- a/gst/inter/gstintersubsrc.c
+++ b/gst/inter/gstintersubsrc.c
@@ -227,7 +227,7 @@ gst_inter_sub_src_create (GstBaseSrc * src, guint64 offset, guint size,
buffer = NULL;
- g_mutex_lock (intersubsrc->surface->mutex);
+ g_mutex_lock (&intersubsrc->surface->mutex);
if (intersubsrc->surface->sub_buffer) {
buffer = gst_buffer_ref (intersubsrc->surface->sub_buffer);
//intersubsrc->surface->sub_buffer_count++;
@@ -236,7 +236,7 @@ gst_inter_sub_src_create (GstBaseSrc * src, guint64 offset, guint size,
intersubsrc->surface->sub_buffer = NULL;
//}
}
- g_mutex_unlock (intersubsrc->surface->mutex);
+ g_mutex_unlock (&intersubsrc->surface->mutex);
if (buffer == NULL) {
GstMapInfo map;
diff --git a/gst/inter/gstintersurface.c b/gst/inter/gstintersurface.c
index 1876a031e..d5b0cbd7b 100644
--- a/gst/inter/gstintersurface.c
+++ b/gst/inter/gstintersurface.c
@@ -23,7 +23,6 @@
#include <string.h>
-#include <gst/glib-compat-private.h>
#include "gstintersurface.h"
static GList *list;
@@ -48,7 +47,7 @@ gst_inter_surface_get (const char *name)
surface = g_malloc0 (sizeof (GstInterSurface));
surface->name = g_strdup (name);
- surface->mutex = g_mutex_new ();
+ g_mutex_init (&surface->mutex);
surface->audio_adapter = gst_adapter_new ();
list = g_list_append (list, surface);
diff --git a/gst/inter/gstintersurface.h b/gst/inter/gstintersurface.h
index f35a511bc..160f27e27 100644
--- a/gst/inter/gstintersurface.h
+++ b/gst/inter/gstintersurface.h
@@ -29,7 +29,7 @@ typedef struct _GstInterSurface GstInterSurface;
struct _GstInterSurface
{
- GMutex *mutex;
+ GMutex mutex;
char *name;
/* video */
diff --git a/gst/inter/gstintertest.c b/gst/inter/gstintertest.c
index 243e03642..99dbbea64 100644
--- a/gst/inter/gstintertest.c
+++ b/gst/inter/gstintertest.c
@@ -29,7 +29,6 @@
#endif
#include <gst/gst.h>
-#include <gst/glib-compat-private.h>
#include <stdlib.h>
//#define GETTEXT_PACKAGE "intertest"
diff --git a/gst/inter/gstintervideosink.c b/gst/inter/gstintervideosink.c
index e892ca039..ca63bce80 100644
--- a/gst/inter/gstintervideosink.c
+++ b/gst/inter/gstintervideosink.c
@@ -206,12 +206,12 @@ gst_inter_video_sink_stop (GstBaseSink * sink)
{
GstInterVideoSink *intervideosink = GST_INTER_VIDEO_SINK (sink);
- g_mutex_lock (intervideosink->surface->mutex);
+ g_mutex_lock (&intervideosink->surface->mutex);
if (intervideosink->surface->video_buffer) {
gst_buffer_unref (intervideosink->surface->video_buffer);
}
intervideosink->surface->video_buffer = NULL;
- g_mutex_unlock (intervideosink->surface->mutex);
+ g_mutex_unlock (&intervideosink->surface->mutex);
gst_inter_surface_unref (intervideosink->surface);
intervideosink->surface = NULL;
@@ -224,13 +224,13 @@ gst_inter_video_sink_render (GstBaseSink * sink, GstBuffer * buffer)
{
GstInterVideoSink *intervideosink = GST_INTER_VIDEO_SINK (sink);
- g_mutex_lock (intervideosink->surface->mutex);
+ g_mutex_lock (&intervideosink->surface->mutex);
if (intervideosink->surface->video_buffer) {
gst_buffer_unref (intervideosink->surface->video_buffer);
}
intervideosink->surface->video_buffer = gst_buffer_ref (buffer);
intervideosink->surface->video_buffer_count = 0;
- g_mutex_unlock (intervideosink->surface->mutex);
+ g_mutex_unlock (&intervideosink->surface->mutex);
return GST_FLOW_OK;
}
diff --git a/gst/inter/gstintervideosrc.c b/gst/inter/gstintervideosrc.c
index bc6f7175b..4f212cf13 100644
--- a/gst/inter/gstintervideosrc.c
+++ b/gst/inter/gstintervideosrc.c
@@ -256,7 +256,7 @@ gst_inter_video_src_create (GstBaseSrc * src, guint64 offset, guint size,
buffer = NULL;
- g_mutex_lock (intervideosrc->surface->mutex);
+ g_mutex_lock (&intervideosrc->surface->mutex);
if (intervideosrc->surface->video_buffer) {
buffer = gst_buffer_ref (intervideosrc->surface->video_buffer);
intervideosrc->surface->video_buffer_count++;
@@ -265,7 +265,7 @@ gst_inter_video_src_create (GstBaseSrc * src, guint64 offset, guint size,
intervideosrc->surface->video_buffer = NULL;
}
}
- g_mutex_unlock (intervideosrc->surface->mutex);
+ g_mutex_unlock (&intervideosrc->surface->mutex);
if (buffer == NULL) {
GstMapInfo map;