commit d5512e599772f87146ba9b33d9d3fec0d0629853 Author: Philippe Normand Date: Fri Oct 28 16:47:14 2011 +0000 [GTK] Build fixes for glib 2.31 (current master) https://bugs.webkit.org/show_bug.cgi?id=70679 Reviewed by Martin Robinson. g_cond_new and g_mutex_new have been replaced by _init functions. Same for _free, replaced by _clear. * platform/graphics/gstreamer/VideoSinkGStreamer.cpp: (webkit_video_sink_init): (webkit_video_sink_dispose): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@98731 268f45cc-cd09-0410-ab3c-d52691b4dbfc Index: qtwebkit-2.2.1/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp =================================================================== --- qtwebkit-2.2.1.orig/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp 2013-06-26 13:32:58.941707781 +0200 +++ qtwebkit-2.2.1/Source/WebCore/platform/graphics/gstreamer/VideoSinkGStreamer.cpp 2013-06-26 13:32:58.913708927 +0200 @@ -33,6 +33,7 @@ #include #include #include +#include static GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE("sink", GST_PAD_SINK, GST_PAD_ALWAYS, @@ -104,8 +105,15 @@ WebKitVideoSinkPrivate* priv; sink->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE(sink, WEBKIT_TYPE_VIDEO_SINK, WebKitVideoSinkPrivate); +#if GLIB_CHECK_VERSION(2, 31, 0) + priv->data_cond = WTF::fastNew(); + g_cond_init(priv->data_cond); + priv->buffer_mutex = WTF::fastNew(); + g_mutex_init(priv->buffer_mutex); +#else priv->data_cond = g_cond_new(); priv->buffer_mutex = g_mutex_new(); +#endif } static gboolean @@ -234,12 +242,22 @@ WebKitVideoSinkPrivate* priv = sink->priv; if (priv->data_cond) { +#if GLIB_CHECK_VERSION(2, 31, 0) + g_cond_clear(priv->data_cond); + WTF::fastDelete(priv->data_cond); +#else g_cond_free(priv->data_cond); +#endif priv->data_cond = 0; } if (priv->buffer_mutex) { +#if GLIB_CHECK_VERSION(2, 31, 0) + g_mutex_clear(priv->buffer_mutex); + WTF::fastDelete(priv->buffer_mutex); +#else g_mutex_free(priv->buffer_mutex); +#endif priv->buffer_mutex = 0; }