summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ca17962)
raw | patch | inline | side by side (parent: ca17962)
author | Tim-Philipp Müller <tim.muller@collabora.co.uk> | |
Sat, 3 Dec 2011 15:36:58 +0000 (15:36 +0000) | ||
committer | Tim-Philipp Müller <tim.muller@collabora.co.uk> | |
Sat, 3 Dec 2011 15:36:58 +0000 (15:36 +0000) |
gst/gsttaglist.c | patch | blob | history |
diff --git a/gst/gsttaglist.c b/gst/gsttaglist.c
index 566a4e0d9dfd66e61b50f10a7d2e8a0260e6a4a8..282c920048889392b34a37614ba5ac9fda1fa5d4 100644 (file)
--- a/gst/gsttaglist.c
+++ b/gst/gsttaglist.c
}
GstTagInfo;
+#if GLIB_CHECK_VERSION (2, 31, 0)
+#define g_value_get_char g_value_get_schar
+#endif
+
+#if !GLIB_CHECK_VERSION (2, 31, 0)
static GMutex *__tag_mutex;
+#define TAG_LOCK g_mutex_lock (__tag_mutex)
+#define TAG_UNLOCK g_mutex_unlock (__tag_mutex)
+#else
+static GMutex __tag_mutex;
+#define TAG_LOCK g_mutex_lock (&__tag_mutex)
+#define TAG_UNLOCK g_mutex_unlock (&__tag_mutex)
+#endif
/* tags hash table: maps tag name string => GstTagInfo */
static GHashTable *__tags;
-#define TAG_LOCK g_mutex_lock (__tag_mutex)
-#define TAG_UNLOCK g_mutex_unlock (__tag_mutex)
-
GType
gst_tag_list_get_type (void)
{
void
_gst_tag_initialize (void)
{
+#if !GLIB_CHECK_VERSION (2, 31, 0)
__tag_mutex = g_mutex_new ();
+#else
+ g_mutex_init (&__tag_mutex);
+#endif
__tags = g_hash_table_new (g_str_hash, g_str_equal);
gst_tag_register (GST_TAG_TITLE, GST_TAG_FLAG_META,
G_TYPE_STRING,