dash: do not use deprecated glib mutex API

This commit is contained in:
Thiago Santos 2013-05-02 14:11:54 -03:00
parent 34e1b59eca
commit 919cb34fee
3 changed files with 5 additions and 12 deletions

View file

@ -144,10 +144,6 @@
# include "config.h" # include "config.h"
#endif #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 <string.h> #include <string.h>
#include <inttypes.h> #include <inttypes.h>
#include <gst/base/gsttypefindhelper.h> #include <gst/base/gsttypefindhelper.h>

View file

@ -24,8 +24,6 @@
* Boston, MA 02111-1307, USA. * Boston, MA 02111-1307, USA.
*/ */
#define GLIB_DISABLE_DEPRECATION_WARNINGS
#include <string.h> #include <string.h>
#include <libxml/parser.h> #include <libxml/parser.h>
#include <libxml/tree.h> #include <libxml/tree.h>
@ -2599,7 +2597,7 @@ gst_mpd_client_new (void)
GstMpdClient *client; GstMpdClient *client;
client = g_new0 (GstMpdClient, 1); client = g_new0 (GstMpdClient, 1);
client->lock = g_mutex_new (); g_mutex_init (&client->lock);
return client; return client;
} }
@ -2631,8 +2629,7 @@ gst_mpd_client_free (GstMpdClient * client)
gst_active_streams_free (client); gst_active_streams_free (client);
if (client->lock) g_mutex_clear (&client->lock);
g_mutex_free (client->lock);
g_free (client->mpd_uri); g_free (client->mpd_uri);

View file

@ -61,8 +61,8 @@ typedef struct _GstSegmentBaseType GstSegmentBaseType;
typedef struct _GstURLType GstURLType; typedef struct _GstURLType GstURLType;
typedef struct _GstMultSegmentBaseType GstMultSegmentBaseType; typedef struct _GstMultSegmentBaseType GstMultSegmentBaseType;
#define GST_MPD_CLIENT_LOCK(c) g_mutex_lock (c->lock); #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_UNLOCK(c) g_mutex_unlock (&c->lock);
typedef enum typedef enum
{ {
@ -453,7 +453,7 @@ struct _GstMpdClient
guint update_failed_count; guint update_failed_count;
gchar *mpd_uri; /* manifest file URI */ gchar *mpd_uri; /* manifest file URI */
GMutex *lock; GMutex lock;
}; };
/* Basic initialization/deinitialization functions */ /* Basic initialization/deinitialization functions */