gst: make compiler warn about unstable API if GST_USE_UNSTABLE_API is not defined
authorTim-Philipp Müller <tim.muller@collabora.co.uk>
Mon, 4 Jul 2011 23:10:26 +0000 (00:10 +0100)
committerTim-Philipp Müller <tim.muller@collabora.co.uk>
Tue, 5 Jul 2011 08:46:43 +0000 (09:46 +0100)
And define it in our own build.

configure.ac
gst/Makefile.am
gst/gst.h
libs/gst/base/Makefile.am
libs/gst/check/Makefile.am
libs/gst/controller/Makefile.am
libs/gst/dataprotocol/Makefile.am
libs/gst/net/Makefile.am

index 77614b5363a0f73e101680594205088e4d0fb985..a729c857e79f31b58c1fab2e793d218400f04963 100644 (file)
@@ -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)
 
index cfff0a9f0ee51689c314ecbbe2613681b441573c..dcb8c93e2ac93f2594df59f61bada86d50e607ec 100644 (file)
@@ -274,6 +274,7 @@ Gst-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstreamer-@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 \
index ce86d2101adcf4b6ee034bcbb38ecefba74f8353..da578d9273332ea5d4dd5b3a6ee82d55b3dbde64 100644 (file)
--- a/gst/gst.h
+++ b/gst/gst.h
 #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>
index 60c886d0fff92835dfd4feec5f31ea8f8b66329d..9a5f50ead5b727e62cc4e5b05c4e416dcd603b09 100644 (file)
@@ -74,6 +74,7 @@ GstBase-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstbase-@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) \
index 96acc4ca373c7a842d1f64db1e1efd4274627c31..7d3082ab3937a83717e6642c6c3e38449cb73222 100644 (file)
@@ -121,6 +121,7 @@ GstCheck-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstcheck-@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) \
index 61abdbc930b7cee49a6636e3016df0274b5a820a..7a28ee74cfa381e70a0d7f34fc7c0d22c2dc0056 100644 (file)
@@ -57,6 +57,7 @@ GstController-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstcontroller-@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) \
index c41d23a7d3ac2c4740b2d21b0de90f1bcf44cc75..59bd3878bef77357f10b607f384d78f9333515dc 100644 (file)
@@ -47,6 +47,7 @@ GstDataprotocol-@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) \
index 9e77b69ddb5803af11912ebfbd5581575cba77a5..67afa655405753d9d5172a191d898330ef8c580e 100644 (file)
@@ -49,6 +49,7 @@ GstNet-@GST_MAJORMINOR@.gir: $(INTROSPECTION_SCANNER) libgstnet-@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) \