summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/cog/Makefile.am1
-rw-r--r--ext/cog/gstcogmse.c1
-rw-r--r--ext/curl/Makefile.am1
-rw-r--r--ext/curl/gstcurlsink.c2
-rw-r--r--ext/gsettings/Makefile.am2
-rw-r--r--ext/gsettings/gstgsettingsaudiosink.c1
-rw-r--r--ext/gsettings/gstgsettingsaudiosrc.c1
-rw-r--r--ext/gsettings/gstgsettingsvideosink.c1
-rw-r--r--ext/gsettings/gstgsettingsvideosrc.c1
-rw-r--r--ext/kate/Makefile.am2
-rw-r--r--ext/kate/gstkatetiger.c1
-rw-r--r--ext/modplug/gstmodplug.cc4
-rw-r--r--ext/mpeg2enc/Makefile.am2
-rw-r--r--ext/mpeg2enc/gstmpeg2enc.cc1
-rw-r--r--ext/mplex/Makefile.am2
-rw-r--r--ext/mplex/gstmplex.cc1
-rw-r--r--ext/opus/Makefile.am1
-rw-r--r--ext/opus/gstopusenc.c1
-rw-r--r--ext/resindvd/resindvdbin.c1
-rw-r--r--ext/resindvd/resindvdsrc.c1
-rw-r--r--ext/resindvd/rsnparsetter.c1
-rw-r--r--ext/sdl/Makefile.am2
-rw-r--r--ext/sdl/sdlaudiosink.c2
-rw-r--r--ext/sdl/sdlvideosink.c1
-rw-r--r--gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c1
-rw-r--r--gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c1
-rw-r--r--gst-libs/gst/glib-compat-private.h148
-rw-r--r--gst-libs/gst/video/gstbasevideocodec.c4
-rw-r--r--gst-libs/gst/video/gstbasevideodecoder.c4
-rw-r--r--gst-libs/gst/video/gstbasevideoencoder.c4
-rw-r--r--gst/aiff/aiffparse.c5
-rw-r--r--gst/audiovisualizers/gstbaseaudiovisualizer.c5
-rw-r--r--gst/camerabin/gstcamerabin.c5
-rw-r--r--gst/camerabin/gstinputselector.c1
-rw-r--r--gst/camerabin2/gstcamerabin2.c1
-rw-r--r--gst/camerabin2/gstwrappercamerabinsrc.c4
-rw-r--r--gst/cdxaparse/gstcdxaparse.c5
-rw-r--r--gst/coloreffects/gstchromahold.c4
-rw-r--r--gst/dvbsuboverlay/gstdvbsuboverlay.c4
-rw-r--r--gst/dvdspu/gstdvdspu.c4
-rw-r--r--gst/hls/Makefile.am2
-rw-r--r--gst/hls/gsthlsdemux.c4
-rw-r--r--gst/hls/m3u8.c1
-rw-r--r--gst/inter/Makefile.am4
-rw-r--r--gst/inter/gstintersurface.c1
-rw-r--r--gst/inter/gstintertest.c3
-rw-r--r--gst/liveadder/Makefile.am2
-rw-r--r--gst/liveadder/liveadder.c1
-rw-r--r--gst/mpegdemux/gstmpegdemux.c4
-rw-r--r--gst/mpegtsdemux/mpegtsbase.c7
-rw-r--r--gst/mpegtsmux/mpegtsmux.c4
-rw-r--r--gst/mve/Makefile.am2
-rw-r--r--gst/mve/gstmvemux.c1
-rw-r--r--gst/mxf/mxfdemux.c4
-rw-r--r--gst/rawparse/gstrawparse.c4
-rw-r--r--gst/sdp/gstsdpdemux.c4
-rw-r--r--gst/tta/gstttaparse.c4
-rw-r--r--sys/decklink/Makefile.am1
-rw-r--r--sys/decklink/capture.cpp2
-rw-r--r--sys/decklink/gstdecklinksink.cpp2
-rw-r--r--sys/decklink/gstdecklinksrc.cpp5
-rw-r--r--sys/dvb/gstdvbsrc.c1
-rw-r--r--sys/shm/Makefile.am2
-rw-r--r--sys/shm/gstshmsink.c1
-rw-r--r--tests/examples/camerabin/gst-camera-perf.c2
-rw-r--r--tests/examples/camerabin/gst-camerabin-test.c2
-rw-r--r--tests/examples/camerabin2/gst-camerabin2-test.c2
-rw-r--r--tests/examples/mxf/mxfdemux-structure.c2
-rw-r--r--tests/examples/scaletempo/Makefile.am2
-rw-r--r--tests/examples/scaletempo/demo-gui.c1
-rw-r--r--tests/examples/scaletempo/demo-main.c2
71 files changed, 297 insertions, 16 deletions
diff --git a/ext/cog/Makefile.am b/ext/cog/Makefile.am
index 81e0f15e1..595dab7d9 100644
--- a/ext/cog/Makefile.am
+++ b/ext/cog/Makefile.am
@@ -7,6 +7,7 @@ libgstcog_la_CFLAGS = \
-DCOG_ENABLE_UNSTABLE_API \
-I$(srcdir)/.. \
$(GST_PLUGINS_BASE_CFLAGS) \
+ $(GST_PLUGINS_BAD_CFLAGS) \
$(GST_CFLAGS) \
$(ORC_CFLAGS) \
$(COG_CFLAGS)
diff --git a/ext/cog/gstcogmse.c b/ext/cog/gstcogmse.c
index f85c873c8..af29087f3 100644
--- a/ext/cog/gstcogmse.c
+++ b/ext/cog/gstcogmse.c
@@ -23,6 +23,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <gst/video/video.h>
#include <string.h>
#include <cog/cogframe.h>
diff --git a/ext/curl/Makefile.am b/ext/curl/Makefile.am
index 77b237385..4fc6868a7 100644
--- a/ext/curl/Makefile.am
+++ b/ext/curl/Makefile.am
@@ -3,6 +3,7 @@ plugin_LTLIBRARIES = libgstcurl.la
libgstcurl_la_SOURCES = gstcurl.c gstcurlsink.c
libgstcurl_la_CFLAGS = \
$(GST_BASE_CFLAGS) \
+ $(GST_PLUGINS_BAD_CFLAGS) \
$(GST_CFLAGS) \
$(CURL_CFLAGS)
libgstcurl_la_LIBADD = \
diff --git a/ext/curl/gstcurlsink.c b/ext/curl/gstcurlsink.c
index 75b459c55..4306de43b 100644
--- a/ext/curl/gstcurlsink.c
+++ b/ext/curl/gstcurlsink.c
@@ -57,6 +57,8 @@
#include "gstcurlsink.h"
+#include "gst/glib-compat-private.h"
+
/* Default values */
#define GST_CAT_DEFAULT gst_curl_sink_debug
#define DEFAULT_URL "localhost:5555"
diff --git a/ext/gsettings/Makefile.am b/ext/gsettings/Makefile.am
index 64801df9b..2c3abb114 100644
--- a/ext/gsettings/Makefile.am
+++ b/ext/gsettings/Makefile.am
@@ -18,7 +18,7 @@ libgstgsettingselements_la_SOURCES = \
gstswitchsrc.c \
plugin.c
-libgstgsettingselements_la_CFLAGS = $(GST_CFLAGS) $(GSETTINGS_CFLAGS) $(DIR_CFLAGS) \
+libgstgsettingselements_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) $(GSETTINGS_CFLAGS) $(DIR_CFLAGS) \
-DGstSwitchSrc=GstGSettingsSwitchSrc \
-DGstSwitchSrcClass=GstGSettingsSwitchSrcClass \
-DGstSwitchSink=GstGSettingsSwitchSink \
diff --git a/ext/gsettings/gstgsettingsaudiosink.c b/ext/gsettings/gstgsettingsaudiosink.c
index 7e115c9de..f4155b3bc 100644
--- a/ext/gsettings/gstgsettingsaudiosink.c
+++ b/ext/gsettings/gstgsettingsaudiosink.c
@@ -35,6 +35,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <string.h>
#include "gstgsettingsaudiosink.h"
diff --git a/ext/gsettings/gstgsettingsaudiosrc.c b/ext/gsettings/gstgsettingsaudiosrc.c
index 844c8eba4..7b9bd1f18 100644
--- a/ext/gsettings/gstgsettingsaudiosrc.c
+++ b/ext/gsettings/gstgsettingsaudiosrc.c
@@ -35,6 +35,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <string.h>
#include "gstgsettingsaudiosrc.h"
diff --git a/ext/gsettings/gstgsettingsvideosink.c b/ext/gsettings/gstgsettingsvideosink.c
index 2444c7c5d..f04e8054c 100644
--- a/ext/gsettings/gstgsettingsvideosink.c
+++ b/ext/gsettings/gstgsettingsvideosink.c
@@ -35,6 +35,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <string.h>
#include "gstgsettingsvideosink.h"
diff --git a/ext/gsettings/gstgsettingsvideosrc.c b/ext/gsettings/gstgsettingsvideosrc.c
index 42ee5fef5..877656814 100644
--- a/ext/gsettings/gstgsettingsvideosrc.c
+++ b/ext/gsettings/gstgsettingsvideosrc.c
@@ -35,6 +35,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <string.h>
#include "gstgsettingsvideosrc.h"
diff --git a/ext/kate/Makefile.am b/ext/kate/Makefile.am
index fd7d6ced4..d732ffa65 100644
--- a/ext/kate/Makefile.am
+++ b/ext/kate/Makefile.am
@@ -9,7 +9,7 @@ libgstkate_la_SOURCES += gstkatetiger.c
endif
# flags used to compile this plugin
-libgstkate_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(TIGER_CFLAGS) $(KATE_CFLAGS)
+libgstkate_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) $(TIGER_CFLAGS) $(KATE_CFLAGS)
libgstkate_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) -lgstvideo-$(GST_MAJORMINOR) -lgsttag-$(GST_MAJORMINOR) $(GST_LIBS) $(TIGER_LIBS) $(KATE_LIBS)
libgstkate_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstkate_la_LIBTOOLFLAGS = --tag=disable-static
diff --git a/ext/kate/gstkatetiger.c b/ext/kate/gstkatetiger.c
index c82be32a0..602192ffd 100644
--- a/ext/kate/gstkatetiger.c
+++ b/ext/kate/gstkatetiger.c
@@ -80,6 +80,7 @@
#include <string.h>
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <gst/video/video.h>
#include "gstkate.h"
diff --git a/ext/modplug/gstmodplug.cc b/ext/modplug/gstmodplug.cc
index 09836a910..9344cf9c0 100644
--- a/ext/modplug/gstmodplug.cc
+++ b/ext/modplug/gstmodplug.cc
@@ -43,6 +43,10 @@
#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
+
/* Required to not get an undefined warning
* https://bugzilla.gnome.org/show_bug.cgi?id=613795
*/
diff --git a/ext/mpeg2enc/Makefile.am b/ext/mpeg2enc/Makefile.am
index 1e3d94403..32e00c8ae 100644
--- a/ext/mpeg2enc/Makefile.am
+++ b/ext/mpeg2enc/Makefile.am
@@ -8,7 +8,7 @@ libgstmpeg2enc_la_SOURCES = \
gstmpeg2encpicturereader.cc
libgstmpeg2enc_la_CXXFLAGS = \
- $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(MPEG2ENC_CFLAGS)
+ $(GST_PLUGINS_BASE_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) $(GST_CXXFLAGS) $(MPEG2ENC_CFLAGS)
libgstmpeg2enc_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) $(GST_LIBS) $(MPEG2ENC_LIBS)
libgstmpeg2enc_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
diff --git a/ext/mpeg2enc/gstmpeg2enc.cc b/ext/mpeg2enc/gstmpeg2enc.cc
index 1987103e2..e437b34df 100644
--- a/ext/mpeg2enc/gstmpeg2enc.cc
+++ b/ext/mpeg2enc/gstmpeg2enc.cc
@@ -57,6 +57,7 @@
#include "config.h"
#endif
+#include <gst/glib-compat-private.h>
#include "gstmpeg2enc.hh"
GST_DEBUG_CATEGORY (mpeg2enc_debug);
diff --git a/ext/mplex/Makefile.am b/ext/mplex/Makefile.am
index 86ff2f215..4155d7048 100644
--- a/ext/mplex/Makefile.am
+++ b/ext/mplex/Makefile.am
@@ -7,7 +7,7 @@ libgstmplex_la_SOURCES = \
gstmplexoutputstream.cc
libgstmplex_la_CXXFLAGS = \
- $(GST_PLUGINS_BASE_CFLAGS) $(GST_CXXFLAGS) $(MPLEX_CFLAGS)
+ $(GST_PLUGINS_BASE_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) $(GST_CXXFLAGS) $(MPLEX_CFLAGS)
libgstmplex_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) $(MPLEX_LIBS)
libgstmplex_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(MPLEX_LDFLAGS)
diff --git a/ext/mplex/gstmplex.cc b/ext/mplex/gstmplex.cc
index ac94e7c29..31de91e5a 100644
--- a/ext/mplex/gstmplex.cc
+++ b/ext/mplex/gstmplex.cc
@@ -53,6 +53,7 @@
#include <string.h>
+#include <gst/glib-compat-private.h>
#include "gstmplex.hh"
#include "gstmplexoutputstream.hh"
#include "gstmplexibitstream.hh"
diff --git a/ext/opus/Makefile.am b/ext/opus/Makefile.am
index cdf3c30ac..1aaed7924 100644
--- a/ext/opus/Makefile.am
+++ b/ext/opus/Makefile.am
@@ -4,6 +4,7 @@ libgstopus_la_SOURCES = gstopus.c gstopusdec.c gstopusenc.c gstopusparse.c gstop
libgstopus_la_CFLAGS = \
-DGST_USE_UNSTABLE_API \
$(GST_PLUGINS_BASE_CFLAGS) \
+ $(GST_PLUGINS_BAD_CFLAGS) \
$(GST_CFLAGS) \
$(OPUS_CFLAGS)
libgstopus_la_LIBADD = \
diff --git a/ext/opus/gstopusenc.c b/ext/opus/gstopusenc.c
index 9b475cf8c..29b254ee2 100644
--- a/ext/opus/gstopusenc.c
+++ b/ext/opus/gstopusenc.c
@@ -48,6 +48,7 @@
#include <gst/gsttagsetter.h>
#include <gst/audio/audio.h>
+#include <gst/glib-compat-private.h>
#include "gstopusheader.h"
#include "gstopuscommon.h"
#include "gstopusenc.h"
diff --git a/ext/resindvd/resindvdbin.c b/ext/resindvd/resindvdbin.c
index c1a29eb3e..c8102e82e 100644
--- a/ext/resindvd/resindvdbin.c
+++ b/ext/resindvd/resindvdbin.c
@@ -24,6 +24,7 @@
#include <string.h>
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <gst/pbutils/missing-plugins.h>
#include "resindvdbin.h"
diff --git a/ext/resindvd/resindvdsrc.c b/ext/resindvd/resindvdsrc.c
index 75cefe813..2a52fcd8a 100644
--- a/ext/resindvd/resindvdsrc.c
+++ b/ext/resindvd/resindvdsrc.c
@@ -25,6 +25,7 @@
#include <string.h>
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <gst/gst-i18n-plugin.h>
#include <gst/interfaces/navigation.h>
#include <gst/video/video.h>
diff --git a/ext/resindvd/rsnparsetter.c b/ext/resindvd/rsnparsetter.c
index baaea2b44..ffa5ab50e 100644
--- a/ext/resindvd/rsnparsetter.c
+++ b/ext/resindvd/rsnparsetter.c
@@ -7,6 +7,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <gst/video/video.h>
#include <string.h>
diff --git a/ext/sdl/Makefile.am b/ext/sdl/Makefile.am
index 7f2998106..ce027dd2f 100644
--- a/ext/sdl/Makefile.am
+++ b/ext/sdl/Makefile.am
@@ -5,7 +5,7 @@ libgstsdl_la_SOURCES = \
sdlvideosink.c \
sdlaudiosink.c
-libgstsdl_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS) $(SDL_CFLAGS)
+libgstsdl_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS) $(SDL_CFLAGS)
libgstsdl_la_LIBADD = $(GST_PLUGINS_BASE_LIBS) \
-lgstvideo-$(GST_MAJORMINOR) \
-lgstaudio-$(GST_MAJORMINOR) \
diff --git a/ext/sdl/sdlaudiosink.c b/ext/sdl/sdlaudiosink.c
index 98f5bb709..62c975c4b 100644
--- a/ext/sdl/sdlaudiosink.c
+++ b/ext/sdl/sdlaudiosink.c
@@ -23,6 +23,8 @@
#include <unistd.h>
+#include <gst/glib-compat-private.h>
+
GST_DEBUG_CATEGORY_EXTERN (sdl_debug);
#define GST_CAT_DEFAULT sdl_debug
diff --git a/ext/sdl/sdlvideosink.c b/ext/sdl/sdlvideosink.c
index fe155a45e..0b89805ac 100644
--- a/ext/sdl/sdlvideosink.c
+++ b/ext/sdl/sdlvideosink.c
@@ -30,6 +30,7 @@
#endif
#include <stdlib.h>
+#include <gst/glib-compat-private.h>
#include <gst/interfaces/xoverlay.h>
#include <gst/interfaces/navigation.h>
diff --git a/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c
index 09995b823..99838ad0a 100644
--- a/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c
+++ b/gst-libs/gst/basecamerabinsrc/gstbasecamerasrc.c
@@ -54,6 +54,7 @@
# include <config.h>
#endif
+#include <gst/glib-compat-private.h>
#include "gstbasecamerasrc.h"
enum
diff --git a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
index 4273c7109..b1ab9c7f7 100644
--- a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
+++ b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c
@@ -28,6 +28,7 @@
*/
#include <gst/app/gstappsrc.h>
#include <gst/app/gstappsink.h>
+#include <gst/glib-compat-private.h>
#include "gstcamerabinpreview.h"
#include "gstbasecamerasrc.h"
diff --git a/gst-libs/gst/glib-compat-private.h b/gst-libs/gst/glib-compat-private.h
new file mode 100644
index 000000000..9d54e92fa
--- /dev/null
+++ b/gst-libs/gst/glib-compat-private.h
@@ -0,0 +1,148 @@
+/*
+ * glib-compat.c
+ * Functions copied from glib 2.10
+ *
+ * Copyright 2005 David Schleef <ds@schleef.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#ifndef __GLIB_COMPAT_PRIVATE_H__
+#define __GLIB_COMPAT_PRIVATE_H__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+#if !GLIB_CHECK_VERSION(2,25,0)
+
+#if defined (_MSC_VER) && !defined(_WIN64)
+typedef struct _stat32 GStatBuf;
+#else
+typedef struct stat GStatBuf;
+#endif
+
+#endif
+
+#if GLIB_CHECK_VERSION(2,26,0)
+#define GLIB_HAS_GDATETIME
+#endif
+
+/* See bug #651514 */
+#if GLIB_CHECK_VERSION(2,29,5)
+#define G_ATOMIC_POINTER_COMPARE_AND_EXCHANGE(a,b,c) \
+ g_atomic_pointer_compare_and_exchange ((a),(b),(c))
+#define G_ATOMIC_INT_COMPARE_AND_EXCHANGE(a,b,c) \
+ g_atomic_int_compare_and_exchange ((a),(b),(c))
+#else
+#define G_ATOMIC_POINTER_COMPARE_AND_EXCHANGE(a,b,c) \
+ g_atomic_pointer_compare_and_exchange ((volatile gpointer *)(a),(b),(c))
+#define G_ATOMIC_INT_COMPARE_AND_EXCHANGE(a,b,c) \
+ g_atomic_int_compare_and_exchange ((volatile int *)(a),(b),(c))
+#endif
+
+/* See bug #651514 */
+#if GLIB_CHECK_VERSION(2,29,5)
+#define G_ATOMIC_INT_ADD(a,b) g_atomic_int_add ((a),(b))
+#else
+#define G_ATOMIC_INT_ADD(a,b) g_atomic_int_exchange_and_add ((a),(b))
+#endif
+
+/* copies */
+
+#if GLIB_CHECK_VERSION (2, 31, 0)
+#define g_mutex_new gst_g_mutex_new
+static inline GMutex *
+gst_g_mutex_new (void)
+{
+ GMutex *mutex = g_slice_new (GMutex);
+ g_mutex_init (mutex);
+ return mutex;
+}
+#define g_mutex_free gst_g_mutex_free
+static inline void
+gst_g_mutex_free (GMutex *mutex)
+{
+ g_mutex_clear (mutex);
+ g_slice_free (GMutex, mutex);
+}
+#define g_static_rec_mutex_init gst_g_static_rec_mutex_init
+static inline void
+gst_g_static_rec_mutex_init (GStaticRecMutex *mutex)
+{
+ static const GStaticRecMutex init_mutex = G_STATIC_REC_MUTEX_INIT;
+
+ *mutex = init_mutex;
+}
+#define g_cond_new gst_g_cond_new
+static inline GCond *
+gst_g_cond_new (void)
+{
+ GCond *cond = g_slice_new (GCond);
+ g_cond_init (cond);
+ return cond;
+}
+#define g_cond_free gst_g_cond_free
+static inline void
+gst_g_cond_free (GCond *cond)
+{
+ g_cond_clear (cond);
+ g_slice_free (GCond, cond);
+}
+#define g_cond_timed_wait gst_g_cond_timed_wait
+static inline gboolean
+gst_g_cond_timed_wait (GCond *cond, GMutex *mutex, GTimeVal *abs_time)
+{
+ gint64 end_time;
+
+ if (abs_time == NULL) {
+ g_cond_wait (cond, mutex);
+ return TRUE;
+ }
+
+ end_time = abs_time->tv_sec;
+ end_time *= 1000000;
+ end_time += abs_time->tv_usec;
+
+ /* would be nice if we had clock_rtoffset, but that didn't seem to
+ * make it into the kernel yet...
+ */
+ /* if CLOCK_MONOTONIC is not defined then g_get_montonic_time() and
+ * g_get_real_time() are returning the same clock and we'd add ~0
+ */
+ end_time += g_get_monotonic_time () - g_get_real_time ();
+ return g_cond_wait_until (cond, mutex, end_time);
+}
+#endif /* GLIB_CHECK_VERSION (2, 31, 0) */
+
+#if GLIB_CHECK_VERSION (2, 31, 0)
+#define g_thread_create gst_g_thread_create
+static inline GThread *
+gst_g_thread_create (GThreadFunc func, gpointer data, gboolean joinable,
+ GError **error)
+{
+ GThread *thread = g_thread_try_new ("gst-check", func, data, error);
+ if (!joinable)
+ g_thread_unref (thread);
+ return thread;
+}
+#endif /* GLIB_CHECK_VERSION (2, 31, 0) */
+
+/* adaptations */
+
+G_END_DECLS
+
+#endif
diff --git a/gst-libs/gst/video/gstbasevideocodec.c b/gst-libs/gst/video/gstbasevideocodec.c
index 9c130ed5e..9bdee5936 100644
--- a/gst-libs/gst/video/gstbasevideocodec.c
+++ b/gst-libs/gst/video/gstbasevideocodec.c
@@ -21,6 +21,10 @@
#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 "gstbasevideocodec.h"
#include <string.h>
diff --git a/gst-libs/gst/video/gstbasevideodecoder.c b/gst-libs/gst/video/gstbasevideodecoder.c
index 83255f414..dab7ae898 100644
--- a/gst-libs/gst/video/gstbasevideodecoder.c
+++ b/gst-libs/gst/video/gstbasevideodecoder.c
@@ -127,6 +127,10 @@
#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 "gstbasevideodecoder.h"
#include "gstbasevideoutils.h"
diff --git a/gst-libs/gst/video/gstbasevideoencoder.c b/gst-libs/gst/video/gstbasevideoencoder.c
index e2c730e79..d643e7279 100644
--- a/gst-libs/gst/video/gstbasevideoencoder.c
+++ b/gst-libs/gst/video/gstbasevideoencoder.c
@@ -105,6 +105,10 @@
#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 "gstbasevideoencoder.h"
#include "gstbasevideoutils.h"
diff --git a/gst/aiff/aiffparse.c b/gst/aiff/aiffparse.c
index 6dbee6868..176c67960 100644
--- a/gst/aiff/aiffparse.c
+++ b/gst/aiff/aiffparse.c
@@ -52,6 +52,11 @@
#ifdef HAVE_CONFIG_H
#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 <string.h>
#include <math.h>
diff --git a/gst/audiovisualizers/gstbaseaudiovisualizer.c b/gst/audiovisualizers/gstbaseaudiovisualizer.c
index 6d42b7dc5..6613e3ae1 100644
--- a/gst/audiovisualizers/gstbaseaudiovisualizer.c
+++ b/gst/audiovisualizers/gstbaseaudiovisualizer.c
@@ -32,6 +32,11 @@
#ifdef HAVE_CONFIG_H
#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 <string.h>
#include <gst/controller/gstcontroller.h>
diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c
index c9f342bed..605780e40 100644
--- a/gst/camerabin/gstcamerabin.c
+++ b/gst/camerabin/gstcamerabin.c
@@ -151,11 +151,16 @@
# 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 <string.h>
#include <stdlib.h>
#include <gst/gst.h>
#include <gst/tag/tag.h>
+#include <gst/glib-compat-private.h>
/* FIXME: include #include <gst/gst-i18n-plugin.h> and use _(" ") */
#include "gstcamerabin.h"
diff --git a/gst/camerabin/gstinputselector.c b/gst/camerabin/gstinputselector.c
index 62ee38044..2f0c817e0 100644
--- a/gst/camerabin/gstinputselector.c
+++ b/gst/camerabin/gstinputselector.c
@@ -35,6 +35,7 @@
#include <string.h>
+#include <gst/glib-compat-private.h>
#include "gstinputselector.h"
#include "gstcamerabin-marshal.h"
diff --git a/gst/camerabin2/gstcamerabin2.c b/gst/camerabin2/gstcamerabin2.c
index 7d5f8f4c7..54cffc86f 100644
--- a/gst/camerabin2/gstcamerabin2.c
+++ b/gst/camerabin2/gstcamerabin2.c
@@ -165,6 +165,7 @@
#include "gstcamerabin2.h"
#include <gst/gst-i18n-plugin.h>
#include <gst/pbutils/pbutils.h>
+#include <gst/glib-compat-private.h>
#if GLIB_CHECK_VERSION(2,29,6)
#define gst_camerabin2_atomic_int_add g_atomic_int_add
diff --git a/gst/camerabin2/gstwrappercamerabinsrc.c b/gst/camerabin2/gstwrappercamerabinsrc.c
index 1fc71c0b2..2b4534255 100644
--- a/gst/camerabin2/gstwrappercamerabinsrc.c
+++ b/gst/camerabin2/gstwrappercamerabinsrc.c
@@ -31,6 +31,10 @@
# 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 <gst/interfaces/photography.h>
#include "gstwrappercamerabinsrc.h"
diff --git a/gst/cdxaparse/gstcdxaparse.c b/gst/cdxaparse/gstcdxaparse.c
index 1f997b7bb..7620fdab8 100644
--- a/gst/cdxaparse/gstcdxaparse.c
+++ b/gst/cdxaparse/gstcdxaparse.c
@@ -22,6 +22,11 @@
#ifdef HAVE_CONFIG_H
#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 <string.h>
#include "gstcdxaparse.h"
diff --git a/gst/coloreffects/gstchromahold.c b/gst/coloreffects/gstchromahold.c
index e6e7c4028..9a6a6954b 100644
--- a/gst/coloreffects/gstchromahold.c
+++ b/gst/coloreffects/gstchromahold.c
@@ -40,6 +40,10 @@
#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 "gstchromahold.h"
#include <stdlib.h>
diff --git a/gst/dvbsuboverlay/gstdvbsuboverlay.c b/gst/dvbsuboverlay/gstdvbsuboverlay.c
index 3c2cab3e4..5cd7a7fb8 100644
--- a/gst/dvbsuboverlay/gstdvbsuboverlay.c
+++ b/gst/dvbsuboverlay/gstdvbsuboverlay.c
@@ -38,6 +38,7 @@
# include <config.h>
#endif
+#include <gst/glib-compat-private.h>
#include "gstdvbsuboverlay.h"
#include <string.h>
@@ -123,8 +124,7 @@ gst_dvbsub_overlay_base_init (gpointer gclass)
gst_element_class_add_static_pad_template (element_class, &src_factory);
gst_element_class_add_static_pad_template (element_class,
&video_sink_factory);
- gst_element_class_add_static_pad_template (element_class,
- &text_sink_factory);
+ gst_element_class_add_static_pad_template (element_class, &text_sink_factory);
gst_element_class_set_details_simple (element_class,
"DVB Subtitles Overlay",
diff --git a/gst/dvdspu/gstdvdspu.c b/gst/dvdspu/gstdvdspu.c
index f57d3c20b..94e69be86 100644
--- a/gst/dvdspu/gstdvdspu.c
+++ b/gst/dvdspu/gstdvdspu.c
@@ -32,6 +32,10 @@
# 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 <gst/gst-i18n-plugin.h>
#include <gst/video/video.h>
diff --git a/gst/hls/Makefile.am b/gst/hls/Makefile.am
index 687b568e0..19fd6211f 100644
--- a/gst/hls/Makefile.am
+++ b/gst/hls/Makefile.am
@@ -6,7 +6,7 @@ libgstfragmented_la_SOURCES = \
gsthlsdemux.c \
gstfragmentedplugin.c
-libgstfragmented_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(SOUP_CFLAGS)
+libgstfragmented_la_CFLAGS = $(GST_CFLAGS) $(GST_BASE_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) $(SOUP_CFLAGS)
libgstfragmented_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) $(SOUP_LIBS)
libgstfragmented_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) -no-undefined
libgstfragmented_la_LIBTOOLFLAGS = --tag=disable-static
diff --git a/gst/hls/gsthlsdemux.c b/gst/hls/gsthlsdemux.c
index d840ae028..d0f77a39a 100644
--- a/gst/hls/gsthlsdemux.c
+++ b/gst/hls/gsthlsdemux.c
@@ -41,9 +41,13 @@
# 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 <string.h>
#include <gst/base/gsttypefindhelper.h>
+#include <gst/glib-compat-private.h>
#include "gsthlsdemux.h"
static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src%d",
diff --git a/gst/hls/m3u8.c b/gst/hls/m3u8.c
index 449b63ee9..c27f159b5 100644
--- a/gst/hls/m3u8.c
+++ b/gst/hls/m3u8.c
@@ -23,6 +23,7 @@
#include <errno.h>
#include <glib.h>
+#include <gst/glib-compat-private.h>
#include "gstfragmented.h"
#include "m3u8.h"
diff --git a/gst/inter/Makefile.am b/gst/inter/Makefile.am
index 7728de991..d6749a5ef 100644
--- a/gst/inter/Makefile.am
+++ b/gst/inter/Makefile.am
@@ -24,6 +24,7 @@ noinst_HEADERS = \
libgstinter_la_CFLAGS = \
$(GST_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) \
+ $(GST_PLUGINS_BAD_CFLAGS) \
$(GST_BASE_CFLAGS)
libgstinter_la_LIBADD = \
@@ -40,7 +41,8 @@ gstintertest_SOURCES = \
gstintertest_CFLAGS = \
$(GST_CFLAGS) \
- $(GST_PLUGINS_BASE_CFLAGS)
+ $(GST_PLUGINS_BASE_CFLAGS) \
+ $(GST_PLUGINS_BAD_CFLAGS)
gstintertest_LDADD = \
$(GST_LIBS) \
diff --git a/gst/inter/gstintersurface.c b/gst/inter/gstintersurface.c
index 1d23e5de1..0fc1c84cc 100644
--- a/gst/inter/gstintersurface.c
+++ b/gst/inter/gstintersurface.c
@@ -23,6 +23,7 @@
#include <string.h>
+#include <gst/glib-compat-private.h>
#include "gstintersurface.h"
static GList *list;
diff --git a/gst/inter/gstintertest.c b/gst/inter/gstintertest.c
index cb7b08c66..ff4c65f47 100644
--- a/gst/inter/gstintertest.c
+++ b/gst/inter/gstintertest.c
@@ -29,6 +29,7 @@
#endif
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <stdlib.h>
//#define GETTEXT_PACKAGE "intertest"
@@ -80,8 +81,10 @@ main (int argc, char *argv[])
GstInterTest *intertest2;
GMainLoop *main_loop;
+#if !GLIB_CHECK_VERSION (2, 31, 0)
if (!g_thread_supported ())
g_thread_init (NULL);
+#endif
context = g_option_context_new ("- FIXME");
g_option_context_add_main_entries (context, entries, GETTEXT_PACKAGE);
diff --git a/gst/liveadder/Makefile.am b/gst/liveadder/Makefile.am
index 4fe8e2959..14f490da7 100644
--- a/gst/liveadder/Makefile.am
+++ b/gst/liveadder/Makefile.am
@@ -1,7 +1,7 @@
plugin_LTLIBRARIES = libgstliveadder.la
libgstliveadder_la_SOURCES = liveadder.c
-libgstliveadder_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_CFLAGS)
+libgstliveadder_la_CFLAGS = $(GST_PLUGINS_BASE_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS)
libgstliveadder_la_LIBADD = \
$(GST_PLUGINS_BASE_LIBS) -lgstaudio-@GST_MAJORMINOR@ \
$(GST_BASE_LIBS) $(GST_LIBS)
diff --git a/gst/liveadder/liveadder.c b/gst/liveadder/liveadder.c
index 205bd020d..f9a39e7c7 100644
--- a/gst/liveadder/liveadder.c
+++ b/gst/liveadder/liveadder.c
@@ -44,6 +44,7 @@
#include "liveadder.h"
+#include <gst/glib-compat-private.h>
#include <gst/audio/audio.h>
#include <string.h>
diff --git a/gst/mpegdemux/gstmpegdemux.c b/gst/mpegdemux/gstmpegdemux.c
index ef29208de..0da3e0c77 100644
--- a/gst/mpegdemux/gstmpegdemux.c
+++ b/gst/mpegdemux/gstmpegdemux.c
@@ -46,6 +46,10 @@
#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 <string.h>
#include "gstmpegdefs.h"
diff --git a/gst/mpegtsdemux/mpegtsbase.c b/gst/mpegtsdemux/mpegtsbase.c
index c63170e1e..99b5ea7bf 100644
--- a/gst/mpegtsdemux/mpegtsbase.c
+++ b/gst/mpegtsdemux/mpegtsbase.c
@@ -32,6 +32,10 @@
#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 <stdlib.h>
#include <string.h>
@@ -169,8 +173,7 @@ mpegts_base_base_init (gpointer klass)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
- gst_element_class_add_static_pad_template (element_class,
- &sink_template);
+ gst_element_class_add_static_pad_template (element_class, &sink_template);
}
static void
diff --git a/gst/mpegtsmux/mpegtsmux.c b/gst/mpegtsmux/mpegtsmux.c
index f4b375ea9..4de290f2e 100644
--- a/gst/mpegtsmux/mpegtsmux.c
+++ b/gst/mpegtsmux/mpegtsmux.c
@@ -88,6 +88,10 @@
#include <stdio.h>
#include <string.h>
+/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
+ * with newer GLib versions (>= 2.31.0) */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <gst/video/video.h>
#include "mpegtsmux.h"
diff --git a/gst/mve/Makefile.am b/gst/mve/Makefile.am
index 272b91857..2c3104f64 100644
--- a/gst/mve/Makefile.am
+++ b/gst/mve/Makefile.am
@@ -1,6 +1,6 @@
plugin_LTLIBRARIES = libgstmve.la
-libgstmve_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_CFLAGS)
+libgstmve_la_CFLAGS = $(GST_BASE_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) $(GST_CFLAGS)
libgstmve_la_LIBADD = $(GST_BASE_LIBS) $(GST_LIBS) $(LIBM)
libgstmve_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstmve_la_LIBTOOLFLAGS = --tag=disable-static
diff --git a/gst/mve/gstmvemux.c b/gst/mve/gstmvemux.c
index fad163b82..0b1a24ce8 100644
--- a/gst/mve/gstmvemux.c
+++ b/gst/mve/gstmvemux.c
@@ -31,6 +31,7 @@ gst-launch-0.10 filesrc location=movie.mve ! mvedemux name=d !
#include <string.h>
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include "gstmvemux.h"
#include "mve.h"
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index 13ab13b60..d5ce5f23b 100644
--- a/gst/mxf/mxfdemux.c
+++ b/gst/mxf/mxfdemux.c
@@ -54,6 +54,10 @@
#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 "mxfdemux.h"
#include "mxfessence.h"
diff --git a/gst/rawparse/gstrawparse.c b/gst/rawparse/gstrawparse.c
index cf0f5d009..b49ddd053 100644
--- a/gst/rawparse/gstrawparse.c
+++ b/gst/rawparse/gstrawparse.c
@@ -29,6 +29,10 @@
#include <string.h>
+/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
+ * with newer GLib versions (>= 2.31.0) */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <gst/gst.h>
#include <gst/base/gstbasetransform.h>
#include <gst/base/gstadapter.h>
diff --git a/gst/sdp/gstsdpdemux.c b/gst/sdp/gstsdpdemux.c
index 9254dbcf1..9b65b18bb 100644
--- a/gst/sdp/gstsdpdemux.c
+++ b/gst/sdp/gstsdpdemux.c
@@ -47,6 +47,10 @@
#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
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
diff --git a/gst/tta/gstttaparse.c b/gst/tta/gstttaparse.c
index 52cd8e474..12269ac3b 100644
--- a/gst/tta/gstttaparse.c
+++ b/gst/tta/gstttaparse.c
@@ -19,6 +19,10 @@
* Boston, MA 02111-1307, USA.
*/
+/* FIXME 0.11: suppress warnings for deprecated API such as GStaticRecMutex
+ * with newer GLib versions (>= 2.31.0) */
+#define GLIB_DISABLE_DEPRECATION_WARNINGS
+
#include <gst/gst.h>
#include <math.h>
diff --git a/sys/decklink/Makefile.am b/sys/decklink/Makefile.am
index cb13a8ace..94dbb09ef 100644
--- a/sys/decklink/Makefile.am
+++ b/sys/decklink/Makefile.am
@@ -2,6 +2,7 @@ plugin_LTLIBRARIES = libgstdecklink.la
libgstdecklink_la_CPPFLAGS = \
$(GST_BASE_CFLAGS) \
+ $(GST_PLUGINS_BAD_CFLAGS) \
$(GST_CXXFLAGS) \
$(DECKLINK_CXXFLAGS)
libgstdecklink_la_LIBADD = \
diff --git a/sys/decklink/capture.cpp b/sys/decklink/capture.cpp
index bc3d9e087..39ee6c449 100644
--- a/sys/decklink/capture.cpp
+++ b/sys/decklink/capture.cpp
@@ -31,6 +31,8 @@
#include <unistd.h>
#include <fcntl.h>
+#include <gst/glib-compat-private.h>
+
#include "gstdecklinksrc.h"
#include "capture.h"
diff --git a/sys/decklink/gstdecklinksink.cpp b/sys/decklink/gstdecklinksink.cpp
index bc24cfefe..62cdff1ff 100644
--- a/sys/decklink/gstdecklinksink.cpp
+++ b/sys/decklink/gstdecklinksink.cpp
@@ -35,7 +35,7 @@
#endif
#include <gst/gst.h>
-#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include "gstdecklink.h"
#include "gstdecklinksink.h"
#include <string.h>
diff --git a/sys/decklink/gstdecklinksrc.cpp b/sys/decklink/gstdecklinksrc.cpp
index b2e2c5127..6b088e8ca 100644
--- a/sys/decklink/gstdecklinksrc.cpp
+++ b/sys/decklink/gstdecklinksrc.cpp
@@ -35,7 +35,12 @@
#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 <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include "gstdecklink.h"
#include "gstdecklinksrc.h"
#include "capture.h"
diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c
index 7eb2a2302..0fa673325 100644
--- a/sys/dvb/gstdvbsrc.c
+++ b/sys/dvb/gstdvbsrc.c
@@ -42,6 +42,7 @@
#include "gstdvbsrc.h"
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <sys/ioctl.h>
#include <sys/poll.h>
#include <fcntl.h>
diff --git a/sys/shm/Makefile.am b/sys/shm/Makefile.am
index bfe7b49fe..59a1e3b79 100644
--- a/sys/shm/Makefile.am
+++ b/sys/shm/Makefile.am
@@ -5,7 +5,7 @@ include $(top_srcdir)/common/glib-gen.mak
plugin_LTLIBRARIES = libgstshm.la
libgstshm_la_SOURCES = shmpipe.c shmalloc.c gstshm.c gstshmsrc.c gstshmsink.c
-libgstshm_la_CFLAGS = $(GST_CFLAGS) -DSHM_PIPE_USE_GLIB
+libgstshm_la_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) -DSHM_PIPE_USE_GLIB
libgstshm_la_LIBADD = -lrt
libgstshm_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS) $(GST_BASE_LIBS) $(GST_PLUGINS_BASE_LIBS)
libgstshm_la_LIBTOOLFLAGS = --tag=disable-static
diff --git a/sys/shm/gstshmsink.c b/sys/shm/gstshmsink.c
index 903760be1..111fbbf0f 100644
--- a/sys/shm/gstshmsink.c
+++ b/sys/shm/gstshmsink.c
@@ -27,6 +27,7 @@
#include "gstshmsink.h"
#include <gst/gst.h>
+#include <gst/glib-compat-private.h>
#include <string.h>
diff --git a/tests/examples/camerabin/gst-camera-perf.c b/tests/examples/camerabin/gst-camera-perf.c
index c5554a0e3..0c56ee6e5 100644
--- a/tests/examples/camerabin/gst-camera-perf.c
+++ b/tests/examples/camerabin/gst-camera-perf.c
@@ -979,8 +979,10 @@ main (int argc, char *argv[])
GOptionContext *ctx;
GError *err = NULL;
+#if !GLIB_CHECK_VERSION (2, 31, 0)
if (!g_thread_supported ())
g_thread_init (NULL);
+#endif
ctx = g_option_context_new (NULL);
g_option_context_add_main_entries (ctx, options, NULL);
diff --git a/tests/examples/camerabin/gst-camerabin-test.c b/tests/examples/camerabin/gst-camerabin-test.c
index 27037fad3..3f16a7fe5 100644
--- a/tests/examples/camerabin/gst-camerabin-test.c
+++ b/tests/examples/camerabin/gst-camerabin-test.c
@@ -786,8 +786,10 @@ main (int argc, char *argv[])
GOptionContext *ctx;
GError *err = NULL;
+#if !GLIB_CHECK_VERSION (2, 31, 0)
if (!g_thread_supported ())
g_thread_init (NULL);
+#endif
ctx = g_option_context_new ("\n\ncamerabin command line test application.");
g_option_context_add_main_entries (ctx, options, NULL);
diff --git a/tests/examples/camerabin2/gst-camerabin2-test.c b/tests/examples/camerabin2/gst-camerabin2-test.c
index f112dbcb3..cb4b00872 100644
--- a/tests/examples/camerabin2/gst-camerabin2-test.c
+++ b/tests/examples/camerabin2/gst-camerabin2-test.c
@@ -1257,8 +1257,10 @@ main (int argc, char *argv[])
GOptionContext *ctx;
GError *err = NULL;
+#if !GLIB_CHECK_VERSION (2, 31, 0)
if (!g_thread_supported ())
g_thread_init (NULL);
+#endif
ctx = g_option_context_new ("\n\ncamerabin command line test application.");
g_option_context_add_main_entries (ctx, options, NULL);
diff --git a/tests/examples/mxf/mxfdemux-structure.c b/tests/examples/mxf/mxfdemux-structure.c
index 6f735c4da..8a6c1b667 100644
--- a/tests/examples/mxf/mxfdemux-structure.c
+++ b/tests/examples/mxf/mxfdemux-structure.c
@@ -184,8 +184,10 @@ main (gint argc, gchar ** argv)
return -1;
}
+#if !GLIB_CHECK_VERSION (2, 31, 0)
if (!g_thread_supported ())
g_thread_init (NULL);
+#endif
gst_init (NULL, NULL);
gtk_init (NULL, NULL);
diff --git a/tests/examples/scaletempo/Makefile.am b/tests/examples/scaletempo/Makefile.am
index 5cdf3c7f0..500e51123 100644
--- a/tests/examples/scaletempo/Makefile.am
+++ b/tests/examples/scaletempo/Makefile.am
@@ -1,7 +1,7 @@
noinst_PROGRAMS = scaletempo-demo
scaletempo_demo_SOURCES = demo-main.c demo-player.c demo-gui.c
-scaletempo_demo_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GTK_CFLAGS)
+scaletempo_demo_CFLAGS = $(GST_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) $(GST_PLUGINS_BAD_CFLAGS) $(GTK_CFLAGS)
scaletempo_demo_LDFLAGS = $(GST_LIBS) $(GST_PLUGINS_BASE_LIBS) $(GTK_LIBS) -lgstinterfaces-@GST_MAJORMINOR@
noinst_HEADERS = demo-player.h demo-gui.h
diff --git a/tests/examples/scaletempo/demo-gui.c b/tests/examples/scaletempo/demo-gui.c
index c31c2bf19..61a5a66eb 100644
--- a/tests/examples/scaletempo/demo-gui.c
+++ b/tests/examples/scaletempo/demo-gui.c
@@ -19,6 +19,7 @@
#include "config.h"
#endif
+#include <gst/glib-compat-private.h>
#include <gtk/gtk.h>
#include <glib/gprintf.h>
#include <math.h>
diff --git a/tests/examples/scaletempo/demo-main.c b/tests/examples/scaletempo/demo-main.c
index 6ddcde71d..d2ed0df11 100644
--- a/tests/examples/scaletempo/demo-main.c
+++ b/tests/examples/scaletempo/demo-main.c
@@ -60,8 +60,10 @@ main (int argc, char *argv[])
{NULL,}
};
+#if !GLIB_CHECK_VERSION (2, 31, 0)
if (!g_thread_supported ())
g_thread_init (NULL);
+#endif
ctx = g_option_context_new ("uri ...");
g_option_context_add_group (ctx, gst_init_get_option_group ());