summaryrefslogtreecommitdiff
path: root/sys/ximage/ximagesink.c
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2011-12-04 16:43:38 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2011-12-04 17:16:30 +0000
commit0d98aa25b8a163625281b0b1d7f05dd0ed345218 (patch)
tree287d1f541ca876cc25a6a090b3713d8de4cae88b /sys/ximage/ximagesink.c
parent6098442bd0b2eb1e19c595aace0911af44b6a439 (diff)
Work around deprecated thread API in glib master
Add private replacements for deprecated functions such as g_mutex_new(), g_mutex_free(), g_cond_new() etc., mostly to avoid the deprecation warnings. We'll change these over to the new API once we depend on glib >= 2.32. Replace g_thread_create() with g_thread_try_new().
Diffstat (limited to 'sys/ximage/ximagesink.c')
-rw-r--r--sys/ximage/ximagesink.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/ximage/ximagesink.c b/sys/ximage/ximagesink.c
index 7e5cb1a7c..2adcc735c 100644
--- a/sys/ximage/ximagesink.c
+++ b/sys/ximage/ximagesink.c
@@ -113,6 +113,8 @@
/* Debugging category */
#include <gst/gstinfo.h>
+#include "gst/glib-compat-private.h"
+
GST_DEBUG_CATEGORY_EXTERN (gst_debug_ximagesink);
#define GST_CAT_DEFAULT gst_debug_ximagesink
@@ -1171,8 +1173,13 @@ gst_ximagesink_manage_event_thread (GstXImageSink * ximagesink)
GST_DEBUG_OBJECT (ximagesink, "run xevent thread, expose %d, events %d",
ximagesink->handle_expose, ximagesink->handle_events);
ximagesink->running = TRUE;
+#if !GLIB_CHECK_VERSION (2, 31, 0)
ximagesink->event_thread = g_thread_create (
(GThreadFunc) gst_ximagesink_event_thread, ximagesink, TRUE, NULL);
+#else
+ ximagesink->event_thread = g_thread_try_new ("ximagesink-events",
+ (GThreadFunc) gst_ximagesink_event_thread, ximagesink, NULL);
+#endif
}
} else {
if (ximagesink->event_thread) {