diff --git a/common b/common index ed78bee437..cd1dee06bf 160000 --- a/common +++ b/common @@ -1 +1 @@ -Subproject commit ed78bee437dcbe22e6eef0031d9a29d157c0461f +Subproject commit cd1dee06bf07f094677d0cf3eea4a2e8c2636b24 diff --git a/configure.ac b/configure.ac index 326db3be75..1a27f917d9 100644 --- a/configure.ac +++ b/configure.ac @@ -2485,7 +2485,13 @@ fi AC_SUBST(DEPRECATED_CFLAGS) VISIBILITY_CFLAGS="" -AS_COMPILER_FLAG([-fvisibility=hidden], [VISIBILITY_CFLAGS="-fvisibility=hidden"]) +AS_COMPILER_FLAG([-fvisibility=hidden], [ + VISIBILITY_CFLAGS="-fvisibility=hidden" + AC_DEFINE(GST_API_EXPORT, [extern __attribute__ ((visibility ("default")))], [public symbol export define]) +], [ + VISIBILITY_CFLAGS="" + AC_DEFINE(GST_API_EXPORT, [extern], [public symbol export define]) +]) AC_SUBST(VISIBILITY_CFLAGS) VISIBILITY_CXXFLAGS="" diff --git a/gst-libs/gst/adaptivedemux/Makefile.am b/gst-libs/gst/adaptivedemux/Makefile.am index 2af05173a6..05b2198c15 100644 --- a/gst-libs/gst/adaptivedemux/Makefile.am +++ b/gst-libs/gst/adaptivedemux/Makefile.am @@ -14,6 +14,7 @@ libgstadaptivedemux_@GST_API_VERSION@_la_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ -DGST_USE_UNSTABLE_API \ + -DBUILDING_GST_ADAPTIVE_DEMUX \ $(GST_CFLAGS) libgstadaptivedemux_@GST_API_VERSION@_la_LIBADD = \ $(top_builddir)/gst-libs/gst/uridownloader/libgsturidownloader-$(GST_API_VERSION).la \ diff --git a/gst-libs/gst/adaptivedemux/adaptive-demux-prelude.h b/gst-libs/gst/adaptivedemux/adaptive-demux-prelude.h index 402a78fa5a..04104cffeb 100644 --- a/gst-libs/gst/adaptivedemux/adaptive-demux-prelude.h +++ b/gst-libs/gst/adaptivedemux/adaptive-demux-prelude.h @@ -25,7 +25,11 @@ #include #ifndef GST_ADAPTIVE_DEMUX_API -#define GST_ADAPTIVE_DEMUX_API GST_EXPORT +# ifdef BUILDING_GST_ADAPTIVE_DEMUX +# define GST_ADAPTIVE_DEMUX_API GST_API_EXPORT /* from config.h */ +# else +# define GST_ADAPTIVE_DEMUX_API GST_API_IMPORT +# endif #endif #endif /* __GST_ADAPTIVE_DEMUX_PRELUDE_H__ */ diff --git a/gst-libs/gst/adaptivedemux/meson.build b/gst-libs/gst/adaptivedemux/meson.build index 5f8eac32d4..de64a271ba 100644 --- a/gst-libs/gst/adaptivedemux/meson.build +++ b/gst-libs/gst/adaptivedemux/meson.build @@ -1,6 +1,6 @@ gstadaptivedemux = library('gstadaptivedemux-' + api_version, 'gstadaptivedemux.c', - c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_ADAPTIVE_DEMUX'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/audio/Makefile.am b/gst-libs/gst/audio/Makefile.am index 0ad482d71c..6615bfc89f 100644 --- a/gst-libs/gst/audio/Makefile.am +++ b/gst-libs/gst/audio/Makefile.am @@ -11,6 +11,7 @@ nodist_libgstbadaudio_@GST_API_VERSION@_la_SOURCES = $(BUILT_SOURCES) libgstbadaudio_@GST_API_VERSION@_la_CFLAGS = \ -DGST_USE_UNSTABLE_API \ + -DBUILDING_GST_AUDIO_BAD \ -I$(top_srcdir)/gst-libs \ -I$(top_builddir)/gst-libs \ $(GST_CFLAGS) $(ORC_CFLAGS) \ diff --git a/gst-libs/gst/audio/audio-bad-prelude.h b/gst-libs/gst/audio/audio-bad-prelude.h index 71b326c330..ceb4d95150 100644 --- a/gst-libs/gst/audio/audio-bad-prelude.h +++ b/gst-libs/gst/audio/audio-bad-prelude.h @@ -25,7 +25,11 @@ #include #ifndef GST_AUDIO_BAD_API -#define GST_AUDIO_BAD_API GST_EXPORT +# ifdef BUILDING_GST_AUDIO_BAD +# define GST_AUDIO_BAD_API GST_API_EXPORT /* from config.h */ +# else +# define GST_AUDIO_BAD_API GST_API_IMPORT +# endif #endif #endif /* __GST_AUDIO_BAD_PRELUDE_H__ */ diff --git a/gst-libs/gst/audio/gstplanaraudioadapter.c b/gst-libs/gst/audio/gstplanaraudioadapter.c index 87a4f128b1..758c1c925a 100644 --- a/gst-libs/gst/audio/gstplanaraudioadapter.c +++ b/gst-libs/gst/audio/gstplanaraudioadapter.c @@ -27,6 +27,9 @@ * non-interleaved (planar) audio buffers. Before using, an audio format * must be configured with gst_planar_audio_adapter_configure() */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "gstplanaraudioadapter.h" diff --git a/gst-libs/gst/audio/meson.build b/gst-libs/gst/audio/meson.build index b8b7bd5924..b0f11a72a6 100644 --- a/gst-libs/gst/audio/meson.build +++ b/gst-libs/gst/audio/meson.build @@ -5,7 +5,7 @@ install_headers(badaudio_headers, subdir : 'gstreamer-1.0/gst/audio') gstbadaudio = library('gstbadaudio-' + api_version, badaudio_sources, - c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_AUDIO_BAD'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/basecamerabinsrc/Makefile.am b/gst-libs/gst/basecamerabinsrc/Makefile.am index 5c68f0fbbc..3a669ad628 100644 --- a/gst-libs/gst/basecamerabinsrc/Makefile.am +++ b/gst-libs/gst/basecamerabinsrc/Makefile.am @@ -19,6 +19,7 @@ libgstbasecamerabinsrc_@GST_API_VERSION@_la_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ -DGST_USE_UNSTABLE_API \ + -DBUILDING_GST_BASE_CAMERA_BIN_SRC \ $(GST_CFLAGS) libgstbasecamerabinsrc_@GST_API_VERSION@_la_LIBADD = \ -lgstapp-$(GST_API_VERSION) $(GST_PLUGINS_BASE_LIBS) $(GST_BASE_LIBS) $(GST_LIBS) diff --git a/gst-libs/gst/basecamerabinsrc/basecamerabinsrc-prelude.h b/gst-libs/gst/basecamerabinsrc/basecamerabinsrc-prelude.h index 6dc1477e15..ec9a766085 100644 --- a/gst-libs/gst/basecamerabinsrc/basecamerabinsrc-prelude.h +++ b/gst-libs/gst/basecamerabinsrc/basecamerabinsrc-prelude.h @@ -25,7 +25,11 @@ #include #ifndef GST_BASE_CAMERA_BIN_SRC_API -#define GST_BASE_CAMERA_BIN_SRC_API GST_EXPORT +# ifdef BUILDING_GST_BASE_CAMERA_BIN_SRC +# define GST_BASE_CAMERA_BIN_SRC_API GST_API_EXPORT /* from config.h */ +# else +# define GST_BASE_CAMERA_BIN_SRC_API GST_API_IMPORT +# endif #endif #endif /* __GST_BASE_CAMERA_BIN_SRC_PRELUDE_H__ */ diff --git a/gst-libs/gst/basecamerabinsrc/gstcamerabin-enum.c b/gst-libs/gst/basecamerabinsrc/gstcamerabin-enum.c index bd9088c940..f55680627d 100644 --- a/gst-libs/gst/basecamerabinsrc/gstcamerabin-enum.c +++ b/gst-libs/gst/basecamerabinsrc/gstcamerabin-enum.c @@ -17,6 +17,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "gstcamerabin-enum.h" diff --git a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c index 48ec2fec8a..6d8545f127 100644 --- a/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c +++ b/gst-libs/gst/basecamerabinsrc/gstcamerabinpreview.c @@ -26,6 +26,10 @@ * #GstCameraBinVideo. * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include diff --git a/gst-libs/gst/basecamerabinsrc/meson.build b/gst-libs/gst/basecamerabinsrc/meson.build index b1ba106890..830e9157a1 100644 --- a/gst-libs/gst/basecamerabinsrc/meson.build +++ b/gst-libs/gst/basecamerabinsrc/meson.build @@ -13,7 +13,7 @@ install_headers(camerabin_headers, subdir : 'gstreamer-1.0/gst/basecamerabinsrc' gstbasecamerabin = library('gstbasecamerabinsrc-' + api_version, camerabin_sources, - c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_BASE_CAMERA_BIN_SRC'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/codecparsers/Makefile.am b/gst-libs/gst/codecparsers/Makefile.am index 47ad21d218..081deead2d 100644 --- a/gst-libs/gst/codecparsers/Makefile.am +++ b/gst-libs/gst/codecparsers/Makefile.am @@ -26,6 +26,7 @@ libgstcodecparsers_@GST_API_VERSION@include_HEADERS = \ libgstcodecparsers_@GST_API_VERSION@_la_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ -DGST_USE_UNSTABLE_API \ + -DBUILDING_GST_CODEC_PARSERS \ $(GST_CFLAGS) \ -Dvp8_norm=gst_codecparsers_vp8_norm \ -Dvp8dx_start_decode=gst_codecparsers_vp8dx_start_decode \ diff --git a/gst-libs/gst/codecparsers/codecparsers-prelude.h b/gst-libs/gst/codecparsers/codecparsers-prelude.h index 6fe11d3049..b056c6489e 100644 --- a/gst-libs/gst/codecparsers/codecparsers-prelude.h +++ b/gst-libs/gst/codecparsers/codecparsers-prelude.h @@ -25,7 +25,11 @@ #include #ifndef GST_CODEC_PARSERS_API -#define GST_CODEC_PARSERS_API GST_EXPORT +# ifdef BUILDING_GST_CODEC_PARSERS +# define GST_CODEC_PARSERS_API GST_API_EXPORT /* from config.h */ +# else +# define GST_CODEC_PARSERS_API GST_API_IMPORT +# endif #endif #endif /* __GST_CODEC_PARSERS_PRELUDE_H__ */ diff --git a/gst-libs/gst/codecparsers/dboolhuff.c b/gst-libs/gst/codecparsers/dboolhuff.c index 692d78be6e..15e6c7cf33 100644 --- a/gst-libs/gst/codecparsers/dboolhuff.c +++ b/gst-libs/gst/codecparsers/dboolhuff.c @@ -7,7 +7,9 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ - +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "dboolhuff.h" diff --git a/gst-libs/gst/codecparsers/gstjpeg2000sampling.c b/gst-libs/gst/codecparsers/gstjpeg2000sampling.c index 543282d495..526a7ecce0 100644 --- a/gst-libs/gst/codecparsers/gstjpeg2000sampling.c +++ b/gst-libs/gst/codecparsers/gstjpeg2000sampling.c @@ -24,6 +24,9 @@ * @short_description: Manage JPEG 2000 sampling and colorspace fields * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "gstjpeg2000sampling.h" diff --git a/gst-libs/gst/codecparsers/gstjpegparser.c b/gst-libs/gst/codecparsers/gstjpegparser.c index bbc1f181ee..64110763f2 100644 --- a/gst-libs/gst/codecparsers/gstjpegparser.c +++ b/gst-libs/gst/codecparsers/gstjpegparser.c @@ -26,6 +26,9 @@ * Provides useful functions for parsing JPEG images * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include diff --git a/gst-libs/gst/codecparsers/gstvp8rangedecoder.c b/gst-libs/gst/codecparsers/gstvp8rangedecoder.c index 4d381c5a7a..9bf1035f91 100644 --- a/gst-libs/gst/codecparsers/gstvp8rangedecoder.c +++ b/gst-libs/gst/codecparsers/gstvp8rangedecoder.c @@ -7,6 +7,9 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "gstvp8rangedecoder.h" #include "dboolhuff.h" diff --git a/gst-libs/gst/codecparsers/meson.build b/gst-libs/gst/codecparsers/meson.build index 12168ec534..c08803db24 100644 --- a/gst-libs/gst/codecparsers/meson.build +++ b/gst-libs/gst/codecparsers/meson.build @@ -34,6 +34,7 @@ install_headers(codecparser_headers, subdir : 'gstreamer-1.0/gst/codecparsers') cp_args = [ '-DGST_USE_UNSTABLE_API', + '-DBUILDING_GST_CODEC_PARSERS', '-Dvp8_norm=gst_codecparsers_vp8_norm', '-Dvp8dx_start_decode=gst_codecparsers_vp8dx_start_decode', '-Dvp8dx_bool_decoder_fill=gst_codecparsers_vp8dx_bool_decoder_fill', diff --git a/gst-libs/gst/codecparsers/parserutils.c b/gst-libs/gst/codecparsers/parserutils.c index d4a3f40ce7..098f43644d 100644 --- a/gst-libs/gst/codecparsers/parserutils.c +++ b/gst-libs/gst/codecparsers/parserutils.c @@ -18,6 +18,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "parserutils.h" diff --git a/gst-libs/gst/codecparsers/vp8utils.c b/gst-libs/gst/codecparsers/vp8utils.c index c2e7d238cf..2905beb0f1 100644 --- a/gst-libs/gst/codecparsers/vp8utils.c +++ b/gst-libs/gst/codecparsers/vp8utils.c @@ -7,6 +7,9 @@ * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include "vp8utils.h" diff --git a/gst-libs/gst/insertbin/Makefile.am b/gst-libs/gst/insertbin/Makefile.am index 330af83388..57b24a1140 100644 --- a/gst-libs/gst/insertbin/Makefile.am +++ b/gst-libs/gst/insertbin/Makefile.am @@ -9,6 +9,7 @@ libgstinsertbin_@GST_API_VERSION@include_HEADERS = gstinsertbin.h libgstinsertbin_@GST_API_VERSION@_la_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ + -DBUILDING_GST_INSERT_BIN \ $(GST_CFLAGS) libgstinsertbin_@GST_API_VERSION@_la_LIBADD = \ diff --git a/gst-libs/gst/insertbin/gstinsertbin.h b/gst-libs/gst/insertbin/gstinsertbin.h index d5539a4055..705ae309c7 100644 --- a/gst-libs/gst/insertbin/gstinsertbin.h +++ b/gst-libs/gst/insertbin/gstinsertbin.h @@ -34,7 +34,11 @@ #include #ifndef GST_INSERT_BIN_API -#define GST_INSERT_BIN_API GST_EXPORT +# ifdef BUILDING_GST_INSERT_BIN +# define GST_INSERT_BIN_API GST_API_EXPORT /* from config.h */ +# else +# define GST_INSERT_BIN_API GST_API_IMPORT +# endif #endif G_BEGIN_DECLS diff --git a/gst-libs/gst/insertbin/meson.build b/gst-libs/gst/insertbin/meson.build index 8c9e1f5a89..ac8f2b350e 100644 --- a/gst-libs/gst/insertbin/meson.build +++ b/gst-libs/gst/insertbin/meson.build @@ -4,7 +4,7 @@ install_headers(insert_headers, subdir : 'gstreamer-1.0/gst/insertbin') gstinsertbin = library('gstinsertbin-' + api_version, insert_sources, - c_args : gst_plugins_bad_args + [ '-DGST_USE_UNSTABLE_API' ], + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_INSERT_BIN'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/interfaces/Makefile.am b/gst-libs/gst/interfaces/Makefile.am index de9d2a6647..660853ab16 100644 --- a/gst-libs/gst/interfaces/Makefile.am +++ b/gst-libs/gst/interfaces/Makefile.am @@ -34,6 +34,7 @@ nodist_libgstphotography_@GST_API_VERSION@_la_SOURCES = \ libgstphotography_@GST_API_VERSION@_la_CFLAGS = \ -DGST_USE_UNSTABLE_API \ + -DBUILDING_GST_PHOTOGRAPHY \ $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_CFLAGS) libgstphotography_@GST_API_VERSION@_la_LIBADD = $(GST_LIBS) diff --git a/gst-libs/gst/interfaces/meson.build b/gst-libs/gst/interfaces/meson.build index 4e2fb4305b..52284715bb 100644 --- a/gst-libs/gst/interfaces/meson.build +++ b/gst-libs/gst/interfaces/meson.build @@ -4,6 +4,7 @@ install_headers(photo_headers, subdir : 'gstreamer-1.0/gst/interfaces') photo_enums = gnome.mkenums_simple('photography-enumtypes', sources : photo_headers, + body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif', header_prefix : '#include ', decorator: 'GST_PHOTOGRAPHY_API', install_header: true, @@ -14,7 +15,7 @@ photoenum_h = photo_enums[1] gstphotography = library('gstphotography-' + api_version, photography_sources, photoenum_h, photoenum_c, - c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_PHOTOGRAPHY'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/interfaces/photography-prelude.h b/gst-libs/gst/interfaces/photography-prelude.h index 7e300e60a9..dbb7f13f95 100644 --- a/gst-libs/gst/interfaces/photography-prelude.h +++ b/gst-libs/gst/interfaces/photography-prelude.h @@ -25,7 +25,11 @@ #include #ifndef GST_PHOTOGRAPHY_API -#define GST_PHOTOGRAPHY_API GST_EXPORT +# ifdef BUILDING_GST_PHOTOGRAPHY +# define GST_PHOTOGRAPHY_API GST_API_EXPORT /* from config.h */ +# else +# define GST_PHOTOGRAPHY_API GST_API_IMPORT +# endif #endif #endif /* __GST_PHOTOGRAPHY_PRELUDE_H__ */ diff --git a/gst-libs/gst/isoff/Makefile.am b/gst-libs/gst/isoff/Makefile.am index b99acaed65..a375089ab4 100644 --- a/gst-libs/gst/isoff/Makefile.am +++ b/gst-libs/gst/isoff/Makefile.am @@ -12,6 +12,7 @@ libgstisoff_@GST_API_VERSION@include_HEADERS = \ libgstisoff_@GST_API_VERSION@_la_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ -DGST_USE_UNSTABLE_API \ + -DBUILDING_GST_ISOFF \ $(GST_CFLAGS) libgstisoff_@GST_API_VERSION@_la_LIBADD = \ diff --git a/gst-libs/gst/isoff/gstisoff.c b/gst-libs/gst/isoff/gstisoff.c index e6f0cfbcb7..56e2a064d9 100644 --- a/gst-libs/gst/isoff/gstisoff.c +++ b/gst-libs/gst/isoff/gstisoff.c @@ -21,6 +21,9 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "gstisoff.h" #include diff --git a/gst-libs/gst/isoff/gstisoff.h b/gst-libs/gst/isoff/gstisoff.h index 437859b2e2..43d337516d 100644 --- a/gst-libs/gst/isoff/gstisoff.h +++ b/gst-libs/gst/isoff/gstisoff.h @@ -31,7 +31,11 @@ G_BEGIN_DECLS #ifndef GST_ISOFF_API -#define GST_ISOFF_API GST_EXPORT +# ifdef BUILDING_GST_ISOFF +# define GST_ISOFF_API GST_API_EXPORT /* from config.h */ +# else +# define GST_ISOFF_API GST_API_IMPORT +# endif #endif typedef enum { diff --git a/gst-libs/gst/isoff/meson.build b/gst-libs/gst/isoff/meson.build index d468a5a671..4cb75426cd 100644 --- a/gst-libs/gst/isoff/meson.build +++ b/gst-libs/gst/isoff/meson.build @@ -8,7 +8,7 @@ install_headers(isoff_headers, subdir : 'gstreamer-1.0/gst/isoff') gstisoff = library('gstisoff-' + api_version, isoff_sources, - c_args : gst_plugins_bad_args + [ '-DGST_USE_UNSTABLE_API' ], + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_ISOFF'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/mpegts/Makefile.am b/gst-libs/gst/mpegts/Makefile.am index 70498209b6..59a3ddd4ba 100644 --- a/gst-libs/gst/mpegts/Makefile.am +++ b/gst-libs/gst/mpegts/Makefile.am @@ -28,6 +28,7 @@ nodist_libgstmpegts_@GST_API_VERSION@include_HEADERS = \ libgstmpegts_@GST_API_VERSION@_la_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ -DGST_USE_UNSTABLE_API \ + -DBUILDING_GST_MPEGTS \ $(GST_CFLAGS) libgstmpegts_@GST_API_VERSION@_la_LIBADD = \ diff --git a/gst-libs/gst/mpegts/gst-atsc-section.c b/gst-libs/gst/mpegts/gst-atsc-section.c index 7532548950..a67863f8ba 100644 --- a/gst-libs/gst/mpegts/gst-atsc-section.c +++ b/gst-libs/gst/mpegts/gst-atsc-section.c @@ -19,6 +19,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include diff --git a/gst-libs/gst/mpegts/gst-dvb-descriptor.c b/gst-libs/gst/mpegts/gst-dvb-descriptor.c index 8410a898f1..bd8a069b5f 100644 --- a/gst-libs/gst/mpegts/gst-dvb-descriptor.c +++ b/gst-libs/gst/mpegts/gst-dvb-descriptor.c @@ -20,6 +20,10 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include diff --git a/gst-libs/gst/mpegts/gst-dvb-section.c b/gst-libs/gst/mpegts/gst-dvb-section.c index 46fc634494..58f71f6102 100644 --- a/gst-libs/gst/mpegts/gst-dvb-section.c +++ b/gst-libs/gst/mpegts/gst-dvb-section.c @@ -28,6 +28,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include diff --git a/gst-libs/gst/mpegts/gstmpegtsdescriptor.c b/gst-libs/gst/mpegts/gstmpegtsdescriptor.c index 588413239f..a553c94935 100644 --- a/gst-libs/gst/mpegts/gstmpegtsdescriptor.c +++ b/gst-libs/gst/mpegts/gstmpegtsdescriptor.c @@ -20,6 +20,10 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include diff --git a/gst-libs/gst/mpegts/gstmpegtssection.c b/gst-libs/gst/mpegts/gstmpegtssection.c index 62657da615..41c970ac10 100644 --- a/gst-libs/gst/mpegts/gstmpegtssection.c +++ b/gst-libs/gst/mpegts/gstmpegtssection.c @@ -28,6 +28,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include diff --git a/gst-libs/gst/mpegts/meson.build b/gst-libs/gst/mpegts/meson.build index 6c3758e0a1..f017e86a0a 100644 --- a/gst-libs/gst/mpegts/meson.build +++ b/gst-libs/gst/mpegts/meson.build @@ -20,6 +20,7 @@ install_headers(mpegts_headers, subdir : 'gstreamer-1.0/gst/mpegts') mpegts_enums = gnome.mkenums_simple('gstmpegts-enumtypes', sources : mpegts_headers, + body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif', header_prefix : '#include ', decorator : 'GST_MPEGTS_API', install_header: true, @@ -31,7 +32,7 @@ gen_sources = [mpegtsenumtypes_h] gstmpegts = library('gstmpegts-' + api_version, mpegts_sources, mpegts_enums, - c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_MPEGTS'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/mpegts/mpegts-prelude.h b/gst-libs/gst/mpegts/mpegts-prelude.h index 26c00a4b10..2b66e26d98 100644 --- a/gst-libs/gst/mpegts/mpegts-prelude.h +++ b/gst-libs/gst/mpegts/mpegts-prelude.h @@ -25,7 +25,11 @@ #include #ifndef GST_MPEGTS_API -#define GST_MPEGTS_API GST_EXPORT +# ifdef BUILDING_GST_MPEGTS +# define GST_MPEGTS_API GST_API_EXPORT /* from config.h */ +# else +# define GST_MPEGTS_API GST_API_IMPORT +# endif #endif #endif /* __GST_MPEGTS_PRELUDE_H__ */ diff --git a/gst-libs/gst/opencv/Makefile.am b/gst-libs/gst/opencv/Makefile.am index cc0d67f44a..5c36a92b7f 100644 --- a/gst-libs/gst/opencv/Makefile.am +++ b/gst-libs/gst/opencv/Makefile.am @@ -7,6 +7,7 @@ libgstopencv_@GST_API_VERSION@_la_SOURCES = \ libgstopencv_@GST_API_VERSION@_la_CXXFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) $(GST_BASE_CFLAGS) $(GST_CXXFLAGS) \ + -DBUILDING_GST_OPENCV \ $(OPENCV_CFLAGS) libgstopencv_@GST_API_VERSION@_la_LIBADD = $(GST_LIBS) $(GST_BASE_LIBS) \ diff --git a/gst-libs/gst/opencv/meson.build b/gst-libs/gst/opencv/meson.build index 848aac4b3f..2babdec85b 100644 --- a/gst-libs/gst/opencv/meson.build +++ b/gst-libs/gst/opencv/meson.build @@ -13,7 +13,7 @@ opencv_dep = dependency('opencv', version : '>= 3.0.0', required : get_option('o if opencv_dep.found() gstopencv = library('gstopencv-' + api_version, opencv_sources, - c_args : gst_plugins_bad_args, + c_args : gst_plugins_bad_args + ['-DBUILDING_GST_OPENCV'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/opencv/opencv-prelude.h b/gst-libs/gst/opencv/opencv-prelude.h index 2cbea56f91..fe719d48f3 100644 --- a/gst-libs/gst/opencv/opencv-prelude.h +++ b/gst-libs/gst/opencv/opencv-prelude.h @@ -25,7 +25,11 @@ #include #ifndef GST_OPENCV_API -#define GST_OPENCV_API GST_EXPORT +# ifdef BUILDING_GST_OPENCV +# define GST_OPENCV_API GST_API_EXPORT /* from config.h */ +# else +# define GST_OPENCV_API GST_API_IMPORT +# endif #endif #endif /* __GST_OPENCV_PRELUDE_H__ */ diff --git a/gst-libs/gst/player/Makefile.am b/gst-libs/gst/player/Makefile.am index 2f3a59a6a9..46b194b07a 100644 --- a/gst-libs/gst/player/Makefile.am +++ b/gst-libs/gst/player/Makefile.am @@ -12,6 +12,7 @@ libgstplayer_@GST_API_VERSION@_la_SOURCES = \ libgstplayer_@GST_API_VERSION@_la_CFLAGS = \ -I$(top_srcdir)/gst-libs \ -I$(top_builddir)/gst-libs \ + -DBUILDING_GST_PLAYER \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) diff --git a/gst-libs/gst/player/meson.build b/gst-libs/gst/player/meson.build index 3619de5590..a615bcd960 100644 --- a/gst-libs/gst/player/meson.build +++ b/gst-libs/gst/player/meson.build @@ -25,7 +25,7 @@ install_headers(gstplayer_headers, subdir : 'gstreamer-' + api_version + '/gst/p gstplayer = library('gstplayer-' + api_version, gstplayer_sources, - c_args : gst_plugins_bad_args, + c_args : gst_plugins_bad_args + ['-DBUILDING_GST_PLAYER'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/player/player-prelude.h b/gst-libs/gst/player/player-prelude.h index a24010a4bc..2a8b87e66d 100644 --- a/gst-libs/gst/player/player-prelude.h +++ b/gst-libs/gst/player/player-prelude.h @@ -25,7 +25,11 @@ #include #ifndef GST_PLAYER_API -#define GST_PLAYER_API GST_EXPORT +# ifdef BUILDING_GST_PLAYER +# define GST_PLAYER_API GST_API_EXPORT /* from config.h */ +# else +# define GST_PLAYER_API GST_API_IMPORT +# endif #endif #endif /* __GST_PLAYER_PRELUDE_H__ */ diff --git a/gst-libs/gst/sctp/Makefile.am b/gst-libs/gst/sctp/Makefile.am index 56ef208676..4648e9c876 100644 --- a/gst-libs/gst/sctp/Makefile.am +++ b/gst-libs/gst/sctp/Makefile.am @@ -7,6 +7,7 @@ libgstsctp_1_0_la_SOURCES = \ libgstsctp_1_0_la_CFLAGS = \ -I$(top_srcdir)/gst-libs \ -I$(top_builddir)/gst-libs \ + -DBUILDING_GST_SCTP \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) diff --git a/gst-libs/gst/sctp/meson.build b/gst-libs/gst/sctp/meson.build index b3d12a4549..876f990e8d 100644 --- a/gst-libs/gst/sctp/meson.build +++ b/gst-libs/gst/sctp/meson.build @@ -13,7 +13,7 @@ install_headers(sctp_headers, subdir : 'gstreamer-1.0/gst/sctp') libgstsctp = library('gstsctp-' + api_version, sctp_sources, - c_args : gst_plugins_bad_args, + c_args : gst_plugins_bad_args + ['-DBUILDING_GST_SCTP'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/sctp/sctp-prelude.h b/gst-libs/gst/sctp/sctp-prelude.h index b89984c2f7..ac16e9d7fe 100644 --- a/gst-libs/gst/sctp/sctp-prelude.h +++ b/gst-libs/gst/sctp/sctp-prelude.h @@ -25,7 +25,11 @@ #include #ifndef GST_SCTP_API -#define GST_SCTP_API GST_EXPORT +# ifdef BUILDING_GST_SCTP +# define GST_SCTP_API GST_API_EXPORT /* from config.h */ +# else +# define GST_SCTP_API GST_API_IMPORT +# endif #endif #endif /* __GST_SCTP_PRELUDE_H__ */ diff --git a/gst-libs/gst/sctp/sctpreceivemeta.c b/gst-libs/gst/sctp/sctpreceivemeta.c index 9fcff236f0..e1c77d4660 100644 --- a/gst-libs/gst/sctp/sctpreceivemeta.c +++ b/gst-libs/gst/sctp/sctpreceivemeta.c @@ -22,6 +22,9 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "sctpreceivemeta.h" diff --git a/gst-libs/gst/sctp/sctpsendmeta.c b/gst-libs/gst/sctp/sctpsendmeta.c index e2083af9b5..d8ce14fc93 100644 --- a/gst-libs/gst/sctp/sctpsendmeta.c +++ b/gst-libs/gst/sctp/sctpsendmeta.c @@ -22,6 +22,9 @@ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "sctpsendmeta.h" diff --git a/gst-libs/gst/uridownloader/Makefile.am b/gst-libs/gst/uridownloader/Makefile.am index d12257aed3..7447e43bfe 100644 --- a/gst-libs/gst/uridownloader/Makefile.am +++ b/gst-libs/gst/uridownloader/Makefile.am @@ -12,6 +12,7 @@ libgsturidownloader_@GST_API_VERSION@include_HEADERS = \ libgsturidownloader_@GST_API_VERSION@_la_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ -DGST_USE_UNSTABLE_API \ + -DBUILDING_GST_URI_DOWNLOADER \ $(GST_CFLAGS) libgsturidownloader_@GST_API_VERSION@_la_LIBADD = \ diff --git a/gst-libs/gst/uridownloader/gstfragment.c b/gst-libs/gst/uridownloader/gstfragment.c index dd9c615ed2..570375a4ba 100644 --- a/gst-libs/gst/uridownloader/gstfragment.c +++ b/gst-libs/gst/uridownloader/gstfragment.c @@ -18,6 +18,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include diff --git a/gst-libs/gst/uridownloader/gsturidownloader.c b/gst-libs/gst/uridownloader/gsturidownloader.c index afc7c01dda..d33d851244 100644 --- a/gst-libs/gst/uridownloader/gsturidownloader.c +++ b/gst-libs/gst/uridownloader/gsturidownloader.c @@ -18,6 +18,9 @@ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, * Boston, MA 02110-1301, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include "gstfragment.h" diff --git a/gst-libs/gst/uridownloader/meson.build b/gst-libs/gst/uridownloader/meson.build index cccb3b61eb..7bea2fbcc2 100644 --- a/gst-libs/gst/uridownloader/meson.build +++ b/gst-libs/gst/uridownloader/meson.build @@ -12,7 +12,7 @@ install_headers(urid_headers, subdir : 'gstreamer-1.0/gst/uridownloader') gsturidownloader = library('gsturidownloader-' + api_version, urid_sources, - c_args : gst_plugins_bad_args + [ '-DGST_USE_UNSTABLE_API' ], + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_URI_DOWNLOADER'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/uridownloader/uridownloader-prelude.h b/gst-libs/gst/uridownloader/uridownloader-prelude.h index f5ad5843c7..92a6abbf69 100644 --- a/gst-libs/gst/uridownloader/uridownloader-prelude.h +++ b/gst-libs/gst/uridownloader/uridownloader-prelude.h @@ -25,7 +25,11 @@ #include #ifndef GST_URI_DOWNLOADER_API -#define GST_URI_DOWNLOADER_API GST_EXPORT +# ifdef BUILDING_GST_URI_DOWNLOADER +# define GST_URI_DOWNLOADER_API GST_API_EXPORT /* from config.h */ +# else +# define GST_URI_DOWNLOADER_API GST_API_IMPORT +# endif #endif #endif /* __GST_URI_DOWNLOADER_PRELUDE_H__ */ diff --git a/gst-libs/gst/video/Makefile.am b/gst-libs/gst/video/Makefile.am index c8d2eb636a..481d2654e3 100644 --- a/gst-libs/gst/video/Makefile.am +++ b/gst-libs/gst/video/Makefile.am @@ -10,6 +10,7 @@ nodist_libgstbadvideo_@GST_API_VERSION@_la_SOURCES = $(BUILT_SOURCES) libgstbadvideo_@GST_API_VERSION@_la_CFLAGS = \ -DGST_USE_UNSTABLE_API \ + -DBUILDING_GST_VIDEO_BAD \ -I$(top_srcdir)/gst-libs \ -I$(top_builddir)/gst-libs \ $(GST_CFLAGS) $(ORC_CFLAGS) \ diff --git a/gst-libs/gst/video/meson.build b/gst-libs/gst/video/meson.build index a1432db250..58e1cd6fbf 100644 --- a/gst-libs/gst/video/meson.build +++ b/gst-libs/gst/video/meson.build @@ -10,7 +10,7 @@ install_headers(badvideo_headers, subdir : 'gstreamer-1.0/gst/video') gstbadvideo = library('gstbadvideo-' + api_version, badvideo_sources, - c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_VIDEO_BAD'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/video/video-bad-prelude.h b/gst-libs/gst/video/video-bad-prelude.h index 3638a421fa..8303b5022c 100644 --- a/gst-libs/gst/video/video-bad-prelude.h +++ b/gst-libs/gst/video/video-bad-prelude.h @@ -25,7 +25,11 @@ #include #ifndef GST_VIDEO_BAD_API -#define GST_VIDEO_BAD_API GST_EXPORT +# ifdef BUILDING_GST_VIDEO_BAD +# define GST_VIDEO_BAD_API GST_API_EXPORT /* from config.h */ +# else +# define GST_VIDEO_BAD_API GST_API_IMPORT +# endif #endif #endif /* __GST_VIDEO_BAD_PRELUDE_H__ */ diff --git a/gst-libs/gst/wayland/Makefile.am b/gst-libs/gst/wayland/Makefile.am index 743a489606..a9f3f7b571 100644 --- a/gst-libs/gst/wayland/Makefile.am +++ b/gst-libs/gst/wayland/Makefile.am @@ -9,6 +9,7 @@ libgstwayland_@GST_API_VERSION@_la_CFLAGS = \ $(GST_PLUGINS_BAD_CFLAGS) \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_CFLAGS) \ + -DBUILDING_GST_WAYLAND \ $(WAYLAND_CFLAGS) libgstwayland_@GST_API_VERSION@_la_LIBADD = \ diff --git a/gst-libs/gst/wayland/meson.build b/gst-libs/gst/wayland/meson.build index ddade69cda..8bfefcb3b1 100644 --- a/gst-libs/gst/wayland/meson.build +++ b/gst-libs/gst/wayland/meson.build @@ -9,7 +9,7 @@ use_wayland = wl_protocol_dep.found() and wl_client_dep.found() and wl_scanner.f if use_wayland gstwayland = library('gstwayland-' + api_version, 'wayland.c', - c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_WAYLAND'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/wayland/wayland.h b/gst-libs/gst/wayland/wayland.h index 5cc0e5f749..c60c57ccdf 100644 --- a/gst-libs/gst/wayland/wayland.h +++ b/gst-libs/gst/wayland/wayland.h @@ -30,7 +30,11 @@ #include #ifndef GST_WAYLAND_API -#define GST_WAYLAND_API GST_EXPORT +# ifdef BUILDING_GST_WAYLAND +# define GST_WAYLAND_API GST_API_EXPORT /* from config.h */ +# else +# define GST_WAYLAND_API GST_API_IMPORT +# endif #endif G_BEGIN_DECLS diff --git a/gst-libs/gst/webrtc/Makefile.am b/gst-libs/gst/webrtc/Makefile.am index 945c4c079d..edc9de0aaa 100644 --- a/gst-libs/gst/webrtc/Makefile.am +++ b/gst-libs/gst/webrtc/Makefile.am @@ -38,6 +38,7 @@ nodist_libgstwebrtc_@GST_API_VERSION@include_HEADERS = $(built_headers) libgstwebrtc_@GST_API_VERSION@_la_CFLAGS = \ -I$(top_builddir)/gst-libs \ -I$(top_srcdir)/gst-libs \ + -DBUILDING_GST_WEBRTC \ $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_BASE_CFLAGS) \ $(GST_CFLAGS) \ diff --git a/gst-libs/gst/webrtc/meson.build b/gst-libs/gst/webrtc/meson.build index 24e43765e4..a9f11dc593 100644 --- a/gst-libs/gst/webrtc/meson.build +++ b/gst-libs/gst/webrtc/meson.build @@ -27,6 +27,7 @@ webrtc_enumtypes_headers = [ webrtc_enums = gnome.mkenums_simple('webrtc-enumtypes', sources : webrtc_enumtypes_headers, + body_prefix : '#ifdef HAVE_CONFIG_H\n#include "config.h"\n#endif', header_prefix : '#include ', decorator: 'GST_WEBRTC_API', install_header: true, @@ -41,7 +42,7 @@ gstwebrtc_dependencies = [gstbase_dep, gstsdp_dep] gstwebrtc = library('gstwebrtc-' + api_version, webrtc_sources, gstwebrtc_c, gstwebrtc_h, - c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'], + c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API', '-DBUILDING_GST_WEBRTC'], include_directories : [configinc, libsinc], version : libversion, soversion : soversion, diff --git a/gst-libs/gst/webrtc/webrtc_fwd.h b/gst-libs/gst/webrtc/webrtc_fwd.h index 2e50125f50..e7309e36d4 100644 --- a/gst-libs/gst/webrtc/webrtc_fwd.h +++ b/gst-libs/gst/webrtc/webrtc_fwd.h @@ -28,7 +28,11 @@ #include #ifndef GST_WEBRTC_API -#define GST_WEBRTC_API GST_EXPORT +# ifdef BUILDING_GST_WEBRTC +# define GST_WEBRTC_API GST_API_EXPORT /* from config.h */ +# else +# define GST_WEBRTC_API GST_API_IMPORT +# endif #endif #include diff --git a/meson.build b/meson.build index b52c0cd1c4..b36a32d1b9 100644 --- a/meson.build +++ b/meson.build @@ -32,6 +32,8 @@ plugins_install_dir = '@0@/gstreamer-1.0'.format(get_option('libdir')) cc = meson.get_compiler('c') cxx = meson.get_compiler('cpp') +cdata = configuration_data() + if cc.get_id() == 'msvc' # Ignore several spurious warnings for things gstreamer does very commonly # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it @@ -61,12 +63,17 @@ if cc.has_link_argument('-Wl,-Bsymbolic-functions') endif # Symbol visibility -if cc.has_argument('-fvisibility=hidden') +if cc.get_id() == 'msvc' + export_define = '__declspec(dllexport) extern' +elif cc.has_argument('-fvisibility=hidden') add_project_arguments('-fvisibility=hidden', language: 'c') + export_define = 'extern __attribute__ ((visibility ("default")))' +else + export_define = 'extern' endif -if cxx.has_argument('-fvisibility=hidden') - add_project_arguments('-fvisibility=hidden', language: 'cpp') -endif + +# Passing this through the command line would be too messy +cdata.set('GST_API_EXPORT', export_define) # Disable strict aliasing if cc.has_argument('-fno-strict-aliasing') @@ -100,7 +107,6 @@ if glib_checks.disabled() or (glib_checks.auto() and not gst_version_is_dev) add_project_arguments('-DG_DISABLE_CHECKS', language: 'c') endif -cdata = configuration_data() check_headers = [ ['HAVE_DLFCN_H', 'dlfcn.h'], ['HAVE_FCNTL_H', 'fcntl.h'],