[0.11] gstreamer: gst: make compiler warn about unstable API if GST_USE_UNSTABLE_API is not defined

Tim Müller tpm at kemper.freedesktop.org
Tue Jul 5 02:46:16 PDT 2011


Module: gstreamer
Branch: 0.11
Commit: 0a6ec8333620833d5e8bef08b93176fce842821b
URL:    http://cgit.freedesktop.org/gstreamer/gstreamer/commit/?id=0a6ec8333620833d5e8bef08b93176fce842821b

Author: Tim-Philipp Müller <tim.muller at collabora.co.uk>
Date:   Tue Jul  5 00:10:26 2011 +0100

gst: make compiler warn about unstable API if GST_USE_UNSTABLE_API is not defined

And define it in our own build.

---

 configure.ac                      |    2 ++
 gst/Makefile.am                   |    1 +
 gst/gst.h                         |    5 +++++
 libs/gst/base/Makefile.am         |    1 +
 libs/gst/check/Makefile.am        |    1 +
 libs/gst/controller/Makefile.am   |    1 +
 libs/gst/dataprotocol/Makefile.am |    1 +
 libs/gst/net/Makefile.am          |    1 +
 8 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/configure.ac b/configure.ac
index 77614b5..a729c85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -648,6 +648,8 @@ dnl every flag in GST_OPTION_CFLAGS can be overridden at make time via e.g.
 dnl make DEPRECATED_CFLAGS=''
 GST_OPTION_CFLAGS="\$(WARNING_CFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
 GST_OPTION_CXXFLAGS="\$(WARNING_CXXFLAGS) \$(ERROR_CXXFLAGS) \$(DEBUG_CFLAGS) \$(PROFILE_CFLAGS) \$(GCOV_CFLAGS) \$(OPT_CFLAGS) \$(DEPRECATED_CFLAGS)"
+GST_OPTION_CFLAGS="$GST_OPTION_CFLAGS -DGST_USE_UNSTABLE_API"
+GST_OPTION_CXXFLAGS="$GST_OPTION_CXXFLAGS -DGST_USE_UNSTABLE_API"
 AC_SUBST(GST_OPTION_CFLAGS)
 AC_SUBST(GST_OPTION_CXXFLAGS)
 
diff --git a/gst/Makefile.am b/gst/Makefile.am
index cfff0a9..dcb8c93 100644
--- a/gst/Makefile.am
+++ b/gst/Makefile.am
@@ -274,6 +274,7 @@ Gst- at GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstreamer- at GST_MAJORMINOR@
 		-I$(top_srcdir) \
 		-I$(top_builddir) \
 		-DIN_GOBJECT_INTROSPECTION=1 \
+		-DGST_USE_UNSTABLE_API \
 		--c-include='gst/gst.h' \
 		--library=libgstreamer-0.11.la \
 		--include=GLib-2.0 \
diff --git a/gst/gst.h b/gst/gst.h
index ce86d21..da578d9 100644
--- a/gst/gst.h
+++ b/gst/gst.h
@@ -24,6 +24,11 @@
 #ifndef __GST_H__
 #define __GST_H__
 
+#ifndef GST_USE_UNSTABLE_API
+#warning "The GStreamer 0.11 API is still unstable and will change in future."
+#warning "Define GST_USE_UNSTABLE_API to avoid this warning."
+#endif
+
 #include <glib.h>
 
 #include <gst/glib-compat.h>
diff --git a/libs/gst/base/Makefile.am b/libs/gst/base/Makefile.am
index 60c886d..9a5f50e 100644
--- a/libs/gst/base/Makefile.am
+++ b/libs/gst/base/Makefile.am
@@ -74,6 +74,7 @@ GstBase- at GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstbase- at GST_MAJORMINO
 		$(INTROSPECTION_SCANNER) -v --namespace GstBase \
 		--nsversion=@GST_MAJORMINOR@ \
 		--strip-prefix=Gst \
+		-DGST_USE_UNSTABLE_API \
 		-I$(top_srcdir) \
 		-I$(top_srcdir)/libs \
 		-I$(top_builddir) \
diff --git a/libs/gst/check/Makefile.am b/libs/gst/check/Makefile.am
index 96acc4c..7d3082a 100644
--- a/libs/gst/check/Makefile.am
+++ b/libs/gst/check/Makefile.am
@@ -121,6 +121,7 @@ GstCheck- at GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstcheck- at GST_MAJORMI
 		$(INTROSPECTION_SCANNER) -v --namespace GstCheck \
 		--nsversion=@GST_MAJORMINOR@ \
 		--strip-prefix=Gst \
+		-DGST_USE_UNSTABLE_API \
 		-I$(top_srcdir) \
 		-I$(top_srcdir)/libs \
 		-I$(top_builddir) \
diff --git a/libs/gst/controller/Makefile.am b/libs/gst/controller/Makefile.am
index 61abdbc..7a28ee7 100644
--- a/libs/gst/controller/Makefile.am
+++ b/libs/gst/controller/Makefile.am
@@ -57,6 +57,7 @@ GstController- at GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstcontroller- at G
 		$(INTROSPECTION_SCANNER) -v --namespace GstController \
 		--nsversion=@GST_MAJORMINOR@ \
 		--strip-prefix=Gst \
+		-DGST_USE_UNSTABLE_API \
 		-I$(top_srcdir) \
 		-I$(top_srcdir)/libs \
 		-I$(top_builddir) \
diff --git a/libs/gst/dataprotocol/Makefile.am b/libs/gst/dataprotocol/Makefile.am
index c41d23a..59bd387 100644
--- a/libs/gst/dataprotocol/Makefile.am
+++ b/libs/gst/dataprotocol/Makefile.am
@@ -47,6 +47,7 @@ GstDataprotocol- at GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstdataprotoco
 		$(INTROSPECTION_SCANNER) -v --namespace GstDataprotocol \
 		--strip-prefix=Gst \
 		--nsversion=@GST_MAJORMINOR@ \
+		-DGST_USE_UNSTABLE_API \
 		-I$(top_srcdir) \
 		-I$(top_builddir) \
 		$(gir_cincludes) \
diff --git a/libs/gst/net/Makefile.am b/libs/gst/net/Makefile.am
index 9e77b69..67afa65 100644
--- a/libs/gst/net/Makefile.am
+++ b/libs/gst/net/Makefile.am
@@ -49,6 +49,7 @@ GstNet- at GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstnet- at GST_MAJORMINOR@
 		$(INTROSPECTION_SCANNER) -v --namespace GstNet \
 		--strip-prefix=Gst \
 		--nsversion=@GST_MAJORMINOR@ \
+		-DGST_USE_UNSTABLE_API \
 		-I$(top_srcdir) \
 		-I$(top_srcdir)/libs \
 		-I$(top_builddir) \



More information about the gstreamer-commits mailing list