From 919cb34fee8198ec57f6ae01565e829c65dc7eb6 Mon Sep 17 00:00:00 2001 From: Thiago Santos Date: Thu, 2 May 2013 14:11:54 -0300 Subject: [PATCH] dash: do not use deprecated glib mutex API --- ext/dash/gstdashdemux.c | 4 ---- ext/dash/gstmpdparser.c | 7 ++----- ext/dash/gstmpdparser.h | 6 +++--- 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c index ad80a573aa..5c73142bf0 100644 --- a/ext/dash/gstdashdemux.c +++ b/ext/dash/gstdashdemux.c @@ -144,10 +144,6 @@ # include "config.h" #endif -/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex - * with newer GLib versions (>= 2.31.0) */ -#define GLIB_DISABLE_DEPRECATION_WARNINGS - #include #include #include diff --git a/ext/dash/gstmpdparser.c b/ext/dash/gstmpdparser.c index 74738116e4..0cb3d2c12f 100644 --- a/ext/dash/gstmpdparser.c +++ b/ext/dash/gstmpdparser.c @@ -24,8 +24,6 @@ * Boston, MA 02111-1307, USA. */ -#define GLIB_DISABLE_DEPRECATION_WARNINGS - #include #include #include @@ -2599,7 +2597,7 @@ gst_mpd_client_new (void) GstMpdClient *client; client = g_new0 (GstMpdClient, 1); - client->lock = g_mutex_new (); + g_mutex_init (&client->lock); return client; } @@ -2631,8 +2629,7 @@ gst_mpd_client_free (GstMpdClient * client) gst_active_streams_free (client); - if (client->lock) - g_mutex_free (client->lock); + g_mutex_clear (&client->lock); g_free (client->mpd_uri); diff --git a/ext/dash/gstmpdparser.h b/ext/dash/gstmpdparser.h index 9a6a72dea0..1069c5e41d 100644 --- a/ext/dash/gstmpdparser.h +++ b/ext/dash/gstmpdparser.h @@ -61,8 +61,8 @@ typedef struct _GstSegmentBaseType GstSegmentBaseType; typedef struct _GstURLType GstURLType; typedef struct _GstMultSegmentBaseType GstMultSegmentBaseType; -#define GST_MPD_CLIENT_LOCK(c) g_mutex_lock (c->lock); -#define GST_MPD_CLIENT_UNLOCK(c) g_mutex_unlock (c->lock); +#define GST_MPD_CLIENT_LOCK(c) g_mutex_lock (&c->lock); +#define GST_MPD_CLIENT_UNLOCK(c) g_mutex_unlock (&c->lock); typedef enum { @@ -453,7 +453,7 @@ struct _GstMpdClient guint update_failed_count; gchar *mpd_uri; /* manifest file URI */ - GMutex *lock; + GMutex lock; }; /* Basic initialization/deinitialization functions */