From a7347ca8f78c28506cf82ca7762e3b107669ded1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Mon, 24 Sep 2018 15:41:24 +0100 Subject: [PATCH] WIP: ges: fix API export/import and 'inconsistent linkage' on MSVC Export GES library API in headers when we're building the library itself, otherwise import the API from the headers. This fixes linker warnings on Windows when building with MSVC. Fix up some missing config.h includes when building the lib which is needed to get the export api define from config.h Fixes https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/42 --- configure.ac | 8 +++++++- ges/Makefile.am | 2 +- ges/ges-asset.c | 3 +++ ges/ges-audio-source.c | 3 +++ ges/ges-audio-test-source.c | 3 +++ ges/ges-audio-track.c | 3 +++ ges/ges-audio-transition.c | 3 +++ ges/ges-audio-uri-source.c | 3 +++ ges/ges-auto-transition.c | 3 +++ ges/ges-base-effect-clip.c | 3 +++ ges/ges-base-effect.c | 3 +++ ges/ges-base-transition-clip.c | 3 +++ ges/ges-base-xml-formatter.c | 3 +++ ges/ges-clip-asset.c | 3 +++ ges/ges-clip.c | 3 +++ ges/ges-command-line-formatter.c | 3 +++ ges/ges-container.c | 3 +++ ges/ges-effect-asset.c | 3 +++ ges/ges-effect-clip.c | 3 +++ ges/ges-effect.c | 3 +++ ges/ges-enums.c | 3 +++ ges/ges-extractable.c | 4 ++++ ges/ges-formatter.c | 3 +++ ges/ges-group.c | 3 +++ ges/ges-image-source.c | 3 +++ ges/ges-layer.c | 3 +++ ges/ges-meta-container.c | 3 +++ ges/ges-multi-file-source.c | 4 ++++ ges/ges-operation-clip.c | 3 +++ ges/ges-operation.c | 3 +++ ges/ges-overlay-clip.c | 3 +++ ges/ges-pipeline.c | 3 +++ ges/ges-pitivi-formatter.c | 6 +++++- ges/ges-prelude.h | 6 +++++- ges/ges-project.c | 4 ++++ ges/ges-screenshot.c | 3 +++ ges/ges-smart-adder.c | 4 ++++ ges/ges-smart-video-mixer.c | 3 +++ ges/ges-source-clip.c | 3 +++ ges/ges-source.c | 3 +++ ges/ges-structure-parser.c | 3 +++ ges/ges-structured-interface.c | 4 ++++ ges/ges-test-clip.c | 3 +++ ges/ges-text-overlay-clip.c | 3 +++ ges/ges-text-overlay.c | 3 +++ ges/ges-timeline-element.c | 3 +++ ges/ges-timeline.c | 3 +++ ges/ges-title-clip.c | 3 +++ ges/ges-title-source.c | 3 +++ ges/ges-track-element-asset.c | 3 +++ ges/ges-track-element.c | 4 ++++ ges/ges-track.c | 3 +++ ges/ges-transition-clip.c | 3 +++ ges/ges-transition.c | 3 +++ ges/ges-uri-asset.c | 4 ++++ ges/ges-uri-clip.c | 3 +++ ges/ges-utils.c | 3 +++ ges/ges-video-source.c | 3 +++ ges/ges-video-test-source.c | 3 +++ ges/ges-video-track.c | 3 +++ ges/ges-video-transition.c | 3 +++ ges/ges-video-uri-source.c | 3 +++ ges/ges-xml-formatter.c | 4 ++++ ges/meson.build | 2 +- meson.build | 14 ++++++++++++-- 65 files changed, 216 insertions(+), 7 deletions(-) diff --git a/configure.ac b/configure.ac index ea89600145..95dd7288a7 100644 --- a/configure.ac +++ b/configure.ac @@ -353,7 +353,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) dnl disable strict aliasing diff --git a/ges/Makefile.am b/ges/Makefile.am index dae513f768..18d2444a3c 100644 --- a/ges/Makefile.am +++ b/ges/Makefile.am @@ -155,7 +155,7 @@ noinst_HEADERS = \ libges_@GST_API_VERSION@_la_CFLAGS = -I$(top_srcdir) $(GST_PBUTILS_CFLAGS) \ $(GST_VIDEO_CFLAGS) $(GST_CONTROLLER_CFLAGS) $(GST_PLUGINS_BASE_CFLAGS) \ $(GST_CFLAGS) $(XML_CFLAGS) $(GIO_CFLAGS) $(GST_VALIDATE_CFLAGS) \ - -DG_LOG_DOMAIN=\"GES\" + -DG_LOG_DOMAIN=\"GES\" -DBUILDING_GES libges_@GST_API_VERSION@_la_LIBADD = $(GST_PBUTILS_LIBS) \ $(GST_VIDEO_LIBS) $(GST_CONTROLLER_LIBS) $(GST_PLUGINS_BASE_LIBS) \ $(GST_BASE_LIBS) $(GST_LIBS) $(XML_LIBS) $(GIO_LIBS) $(GST_VALIDATE_LIBS) diff --git a/ges/ges-asset.c b/ges/ges-asset.c index a7d5d30334..9503b3ef94 100644 --- a/ges/ges-asset.c +++ b/ges/ges-asset.c @@ -82,6 +82,9 @@ * ges_asset_request_async(). All the #GESAssets are cached and thus any asset that has already * been created can be requested again without overhead. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges.h" #include "ges-internal.h" diff --git a/ges/ges-audio-source.c b/ges/ges-audio-source.c index 1588a1e4d7..8997107dae 100644 --- a/ges/ges-audio-source.c +++ b/ges/ges-audio-source.c @@ -48,6 +48,9 @@ * * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges/ges-meta-container.h" diff --git a/ges/ges-audio-test-source.c b/ges/ges-audio-test-source.c index 03831ad0c3..81627ab622 100644 --- a/ges/ges-audio-test-source.c +++ b/ges/ges-audio-test-source.c @@ -27,6 +27,9 @@ * output silence. Useful for testing pipelines, or to fill gaps in an audio * track. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-track-element.h" diff --git a/ges/ges-audio-track.c b/ges/ges-audio-track.c index 68bc2f723a..1ac8af07c5 100644 --- a/ges/ges-audio-track.c +++ b/ges/ges-audio-track.c @@ -36,6 +36,9 @@ * - rate: 44100 * - layout: interleaved */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-smart-adder.h" diff --git a/ges/ges-audio-transition.c b/ges/ges-audio-transition.c index 10c70e2c80..3a94876991 100644 --- a/ges/ges-audio-transition.c +++ b/ges/ges-audio-transition.c @@ -23,6 +23,9 @@ * @title: GESAudioTransition * @short_description: implements audio crossfade transition */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-track-element.h" diff --git a/ges/ges-audio-uri-source.c b/ges/ges-audio-uri-source.c index 11c367542a..755d6e0fa0 100644 --- a/ges/ges-audio-uri-source.c +++ b/ges/ges-audio-uri-source.c @@ -23,6 +23,9 @@ * @title: GESAudioUriSource * @short_description: outputs a single audio stream from a given file */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-utils.h" #include "ges-internal.h" diff --git a/ges/ges-auto-transition.c b/ges/ges-auto-transition.c index 18e41cf295..37ea759c65 100644 --- a/ges/ges-auto-transition.c +++ b/ges/ges-auto-transition.c @@ -22,6 +22,9 @@ * * NOTE: This is for internal use exclusively */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-auto-transition.h" #include "ges-internal.h" diff --git a/ges/ges-base-effect-clip.c b/ges/ges-base-effect-clip.c index 18e03d18f4..4cf1e65be4 100644 --- a/ges/ges-base-effect-clip.c +++ b/ges/ges-base-effect-clip.c @@ -25,6 +25,9 @@ * The effect will be applied on the sources that have lower priorities * (higher number) between the inpoint and the end of it. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include "ges-internal.h" diff --git a/ges/ges-base-effect.c b/ges/ges-base-effect.c index ee11d6c680..b604833c81 100644 --- a/ges/ges-base-effect.c +++ b/ges/ges-base-effect.c @@ -23,6 +23,9 @@ * @short_description: adds an effect to a stream in a GESSourceClip or a * GESLayer */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include diff --git a/ges/ges-base-transition-clip.c b/ges/ges-base-transition-clip.c index b2347bfccc..ac3a47cf9a 100644 --- a/ges/ges-base-transition-clip.c +++ b/ges/ges-base-transition-clip.c @@ -23,6 +23,9 @@ * @title: GESBaseTransitionClip * @short_description: Base classes for transitions */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include "ges-internal.h" diff --git a/ges/ges-base-xml-formatter.c b/ges/ges-base-xml-formatter.c index 414fc0c7da..5e1fe772e7 100644 --- a/ges/ges-base-xml-formatter.c +++ b/ges/ges-base-xml-formatter.c @@ -17,6 +17,9 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges.h" #include "ges-internal.h" diff --git a/ges/ges-clip-asset.c b/ges/ges-clip-asset.c index 4561084f50..e749c8af82 100644 --- a/ges/ges-clip-asset.c +++ b/ges/ges-clip-asset.c @@ -26,6 +26,9 @@ * it is mostly used to get information about the #GESTrackType-s the objects extracted * from it can potentialy create #GESTrackElement for. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-clip-asset.h" diff --git a/ges/ges-clip.c b/ges/ges-clip.c index 1393516c6b..a7110a1bf7 100644 --- a/ges/ges-clip.c +++ b/ges/ges-clip.c @@ -31,6 +31,9 @@ * Keeps a reference to the #GESTrackElement(s) it created and * sets/updates their properties. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-clip.h" #include "ges.h" diff --git a/ges/ges-command-line-formatter.c b/ges/ges-command-line-formatter.c index 4dbc181f55..afca778684 100644 --- a/ges/ges-command-line-formatter.c +++ b/ges/ges-command-line-formatter.c @@ -17,6 +17,9 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-command-line-formatter.h" diff --git a/ges/ges-container.c b/ges/ges-container.c index 06f2a25200..35abcbfdc4 100644 --- a/ges/ges-container.c +++ b/ges/ges-container.c @@ -24,6 +24,9 @@ * @short_description: Base Class for objects responsible for controlling other * GESTimelineElement-s */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-container.h" #include "ges.h" diff --git a/ges/ges-effect-asset.c b/ges/ges-effect-asset.c index b836ed573a..120dbf41e3 100644 --- a/ges/ges-effect-asset.c +++ b/ges/ges-effect-asset.c @@ -24,6 +24,9 @@ * This is internal, and implementation details, so we are not showing it in the * documentation */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-effect-asset.h" #include "ges-track-element.h" diff --git a/ges/ges-effect-clip.c b/ges/ges-effect-clip.c index fab0370079..f43f2f4e37 100644 --- a/ges/ges-effect-clip.c +++ b/ges/ges-effect-clip.c @@ -26,6 +26,9 @@ * The effect will be applied on the sources that have lower priorities * (higher number) between the inpoint and the end of it. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include "ges-internal.h" diff --git a/ges/ges-effect.c b/ges/ges-effect.c index 84ef696021..a2a80f4494 100644 --- a/ges/ges-effect.c +++ b/ges/ges-effect.c @@ -23,6 +23,9 @@ * @short_description: adds an effect build from a parse-launch style * bin description to a stream in a GESSourceClip or a GESLayer */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-extractable.h" diff --git a/ges/ges-enums.c b/ges/ges-enums.c index 440657ea49..c4072ff46b 100644 --- a/ges/ges-enums.c +++ b/ges/ges-enums.c @@ -23,6 +23,9 @@ * @title: GES Enumerations * @short_description: Various enums for the Gstreamer Editing Services */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-enums.h" #include "ges-internal.h" diff --git a/ges/ges-extractable.c b/ges/ges-extractable.c index 77f56d67b5..9d7d3f1349 100644 --- a/ges/ges-extractable.c +++ b/ges/ges-extractable.c @@ -25,6 +25,10 @@ * * FIXME: Long description needed */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "ges-asset.h" #include "ges-internal.h" #include "ges-extractable.h" diff --git a/ges/ges-formatter.c b/ges/ges-formatter.c index 5ff9f04eca..2bc22e25f6 100644 --- a/ges/ges-formatter.c +++ b/ges/ges-formatter.c @@ -24,6 +24,9 @@ * @short_description: Timeline saving and loading. * **/ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include diff --git a/ges/ges-group.c b/ges/ges-group.c index f6762690d5..a0fb24edb7 100644 --- a/ges/ges-group.c +++ b/ges/ges-group.c @@ -31,6 +31,9 @@ * should be instaciated to group the various #GESTimelineElement passed * in parametter. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-group.h" #include "ges.h" diff --git a/ges/ges-image-source.c b/ges/ges-image-source.c index 54ebcb44a3..b4c3eb4eba 100644 --- a/ges/ges-image-source.c +++ b/ges/ges-image-source.c @@ -28,6 +28,9 @@ * chosen will be determined by the in-point property on the track element. For * image files, do not set the in-point property. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-track-element.h" diff --git a/ges/ges-layer.c b/ges/ges-layer.c index fcc036c7df..ad33c02139 100644 --- a/ges/ges-layer.c +++ b/ges/ges-layer.c @@ -30,6 +30,9 @@ * priorities of individual Clips. Two layers should not have the * same priority within a given timeline. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-layer.h" diff --git a/ges/ges-meta-container.c b/ges/ges-meta-container.c index 883eb98ec8..e9a352217b 100644 --- a/ges/ges-meta-container.c +++ b/ges/ges-meta-container.c @@ -17,6 +17,9 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include diff --git a/ges/ges-multi-file-source.c b/ges/ges-multi-file-source.c index ce9e19df4d..f6b6c4b48e 100644 --- a/ges/ges-multi-file-source.c +++ b/ges/ges-multi-file-source.c @@ -25,6 +25,10 @@ * Outputs the video stream from a given image sequence. The start frame * chosen will be determined by the in-point property on the track element. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include "ges-internal.h" diff --git a/ges/ges-operation-clip.c b/ges/ges-operation-clip.c index 9b8116890d..d8be92dc97 100644 --- a/ges/ges-operation-clip.c +++ b/ges/ges-operation-clip.c @@ -25,6 +25,9 @@ * * Operations are any kind of object that both outputs AND consumes data. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges.h" #include "ges-internal.h" diff --git a/ges/ges-operation.c b/ges/ges-operation.c index 6bf10cd452..15a7102f14 100644 --- a/ges/ges-operation.c +++ b/ges/ges-operation.c @@ -23,6 +23,9 @@ * @title: GESOperation * @short_description: Base Class for effects and overlays */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-track-element.h" diff --git a/ges/ges-overlay-clip.c b/ges/ges-overlay-clip.c index 51e0488c7d..8ab9695b92 100644 --- a/ges/ges-overlay-clip.c +++ b/ges/ges-overlay-clip.c @@ -30,6 +30,9 @@ * Transitions, which change from one source to another over time, are * not considered overlays. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-operation-clip.h" diff --git a/ges/ges-pipeline.c b/ges/ges-pipeline.c index 9dda9307c3..de68b58178 100644 --- a/ges/ges-pipeline.c +++ b/ges/ges-pipeline.c @@ -27,6 +27,9 @@ * in a simple fashion. * Its usage is inspired by the 'playbin' element from gst-plugins-base. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include diff --git a/ges/ges-pitivi-formatter.c b/ges/ges-pitivi-formatter.c index 76cdda0674..38fd0a278c 100644 --- a/ges/ges-pitivi-formatter.c +++ b/ges/ges-pitivi-formatter.c @@ -27,6 +27,10 @@ * * Deprecated: 1.0 */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#undef VERSION +#endif #include #include @@ -41,7 +45,7 @@ #include /* The Pitivi etree formatter is 0.1 we set GES one to 0.2 */ -#define VERSION "0.2" +//#define VERSION "0.2" #define DOUBLE_VERSION 0.2 #undef GST_CAT_DEFAULT diff --git a/ges/ges-prelude.h b/ges/ges-prelude.h index fc6c9400b5..ccfff57eb4 100644 --- a/ges/ges-prelude.h +++ b/ges/ges-prelude.h @@ -25,7 +25,11 @@ #include #ifndef GES_API -#define GES_API GST_EXPORT +# ifdef BUILDING_GES +# define GES_API GST_API_EXPORT /* from config.h */ +# else +# define GES_API GST_API_IMPORT +# endif #endif #endif /* __GST_GES_PRELUDE_H__ */ diff --git a/ges/ges-project.c b/ges/ges-project.c index e4d9f20d13..4ad62817f4 100644 --- a/ges/ges-project.c +++ b/ges/ges-project.c @@ -44,6 +44,10 @@ * a set of signals. Also it handles problem such as missing files/missing * #GstElement and lets you try to recover from those. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "ges.h" #include "ges-internal.h" diff --git a/ges/ges-screenshot.c b/ges/ges-screenshot.c index 755aae76b2..1a99a5ed0a 100644 --- a/ges/ges-screenshot.c +++ b/ges/ges-screenshot.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 #include diff --git a/ges/ges-smart-adder.c b/ges/ges-smart-adder.c index 5d8b2bcc76..85ea017114 100644 --- a/ges/ges-smart-adder.c +++ b/ges/ges-smart-adder.c @@ -17,6 +17,10 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see ."; */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include "ges-types.h" diff --git a/ges/ges-smart-video-mixer.c b/ges/ges-smart-video-mixer.c index 6315f416cd..aa396518de 100644 --- a/ges/ges-smart-video-mixer.c +++ b/ges/ges-smart-video-mixer.c @@ -16,6 +16,9 @@ * You should have received a copy of the GNU Lesser General Public License * along with this program. If not, see ."; */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "gstframepositioner.h" #include "ges-types.h" diff --git a/ges/ges-source-clip.c b/ges/ges-source-clip.c index 24dd0bffcd..21c9f9562b 100644 --- a/ges/ges-source-clip.c +++ b/ges/ges-source-clip.c @@ -23,6 +23,9 @@ * @title: GESSourceClip * @short_description: Base Class for sources of a GESLayer */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-clip.h" diff --git a/ges/ges-source.c b/ges/ges-source.c index 90119e6b37..e70c4e5f42 100644 --- a/ges/ges-source.c +++ b/ges/ges-source.c @@ -23,6 +23,9 @@ * @title: GESSource * @short_description: Base Class for single-media sources */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges/ges-meta-container.h" diff --git a/ges/ges-structure-parser.c b/ges/ges-structure-parser.c index ae05622b62..bcd2a24c15 100644 --- a/ges/ges-structure-parser.c +++ b/ges/ges-structure-parser.c @@ -17,6 +17,9 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-structure-parser.h" diff --git a/ges/ges-structured-interface.c b/ges/ges-structured-interface.c index 1e00a3dac2..cf1de50d97 100644 --- a/ges/ges-structured-interface.c +++ b/ges/ges-structured-interface.c @@ -17,6 +17,10 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "ges-structured-interface.h" #include diff --git a/ges/ges-test-clip.c b/ges/ges-test-clip.c index 9f2c5fb887..77bd5f346f 100644 --- a/ges/ges-test-clip.c +++ b/ges/ges-test-clip.c @@ -28,6 +28,9 @@ * You can use the ges_asset_request_simple API to create an Asset * capable of extracting GESTestClip-s */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-test-clip.h" diff --git a/ges/ges-text-overlay-clip.c b/ges/ges-text-overlay-clip.c index 57f1f3a8ef..72d826509e 100644 --- a/ges/ges-text-overlay-clip.c +++ b/ges/ges-text-overlay-clip.c @@ -25,6 +25,9 @@ * * Renders text onto the next lower priority stream using textrender. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-text-overlay-clip.h" diff --git a/ges/ges-text-overlay.c b/ges/ges-text-overlay.c index 1278a6d0d9..98d90b823a 100644 --- a/ges/ges-text-overlay.c +++ b/ges/ges-text-overlay.c @@ -24,6 +24,9 @@ * @short_description: render text onto another video stream in a GESLayer * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-track-element.h" diff --git a/ges/ges-timeline-element.c b/ges/ges-timeline-element.c index fffaf5a83b..4a1e3522b3 100644 --- a/ges/ges-timeline-element.c +++ b/ges/ges-timeline-element.c @@ -26,6 +26,9 @@ * as priority. A GESTimelineElement can have a parent object which will be * responsible for controlling its timing properties. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-utils.h" #include "ges-timeline-element.h" diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c index 4394146dd2..041c29bb87 100644 --- a/ges/ges-timeline.c +++ b/ges/ges-timeline.c @@ -40,6 +40,9 @@ * Note that any change you make in the timeline will not actually be taken * into account until you call the #ges_timeline_commit method. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-project.h" diff --git a/ges/ges-title-clip.c b/ges/ges-title-clip.c index 4e012a16e8..f663a227db 100644 --- a/ges/ges-title-clip.c +++ b/ges/ges-title-clip.c @@ -26,6 +26,9 @@ * Renders the given text in the specified font, at specified position, and * with the specified background pattern. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-title-clip.h" diff --git a/ges/ges-title-source.c b/ges/ges-title-source.c index 82ddaa2890..be4671e899 100644 --- a/ges/ges-title-source.c +++ b/ges/ges-title-source.c @@ -87,6 +87,9 @@ * * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-track-element.h" diff --git a/ges/ges-track-element-asset.c b/ges/ges-track-element-asset.c index 9e54c40125..d6ed7a2fcc 100644 --- a/ges/ges-track-element-asset.c +++ b/ges/ges-track-element-asset.c @@ -23,6 +23,9 @@ * @title: GESTrackElementAsset * @short_description: A GESAsset subclass specialized in GESTrackElement extraction */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-track-element-asset.h" diff --git a/ges/ges-track-element.c b/ges/ges-track-element.c index ffc77dc552..2fc2c33cc9 100644 --- a/ges/ges-track-element.c +++ b/ges/ges-track-element.c @@ -30,6 +30,10 @@ * its container, like the start position, the inpoint, the duration and the * priority. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include "ges-internal.h" #include "ges-extractable.h" #include "ges-track-element.h" diff --git a/ges/ges-track.c b/ges/ges-track.c index 534a7af63a..b23d47ccf0 100644 --- a/ges/ges-track.c +++ b/ges/ges-track.c @@ -27,6 +27,9 @@ * * Contains the compatible TrackElement(s). */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-track.h" diff --git a/ges/ges-transition-clip.c b/ges/ges-transition-clip.c index acff2f3b2a..8a64291ea0 100644 --- a/ges/ges-transition-clip.c +++ b/ges/ges-transition-clip.c @@ -36,6 +36,9 @@ * that this value can be changed after creation and the GESExtractable.asset value * will be updated when needed. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include "ges-internal.h" diff --git a/ges/ges-transition.c b/ges/ges-transition.c index 00365645af..65c07e6612 100644 --- a/ges/ges-transition.c +++ b/ges/ges-transition.c @@ -24,6 +24,9 @@ * @short_description: base class for audio and video transitions * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include "ges-internal.h" diff --git a/ges/ges-uri-asset.c b/ges/ges-uri-asset.c index b440d77ef9..7a28515272 100644 --- a/ges/ges-uri-asset.c +++ b/ges/ges-uri-asset.c @@ -28,6 +28,10 @@ * let you get information about the medias. Also, the tags found in the media file are * set as Metadatas of the Asser. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + #include #include #include "ges.h" diff --git a/ges/ges-uri-clip.c b/ges/ges-uri-clip.c index d4ae1417b9..3f8f63c538 100644 --- a/ges/ges-uri-clip.c +++ b/ges/ges-uri-clip.c @@ -26,6 +26,9 @@ * Represents all the output streams from a particular uri. It is assumed that * the URI points to a file of some type. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-uri-clip.h" diff --git a/ges/ges-utils.c b/ges/ges-utils.c index bd330cb05f..adb0d0ca04 100644 --- a/ges/ges-utils.c +++ b/ges/ges-utils.c @@ -23,6 +23,9 @@ * @short_description: Convenience methods * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include diff --git a/ges/ges-video-source.c b/ges/ges-video-source.c index f73a8f104b..4433d88776 100644 --- a/ges/ges-video-source.c +++ b/ges/ges-video-source.c @@ -77,6 +77,9 @@ * * */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include diff --git a/ges/ges-video-test-source.c b/ges/ges-video-test-source.c index baea99fe16..22e04d864a 100644 --- a/ges/ges-video-test-source.c +++ b/ges/ges-video-test-source.c @@ -23,6 +23,9 @@ * @title: GESVideoTestSource * @short_description: produce solid colors and patterns */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-internal.h" #include "ges-track-element.h" diff --git a/ges/ges-video-track.c b/ges/ges-video-track.c index 0bcf1dff9c..90fdeda841 100644 --- a/ges/ges-video-track.c +++ b/ges/ges-video-track.c @@ -22,6 +22,9 @@ * @title: GESVideoTrack * @short_description: A standard GESTrack for raw video */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include "ges-video-track.h" #include "ges-smart-video-mixer.h" diff --git a/ges/ges-video-transition.c b/ges/ges-video-transition.c index 58af634bee..61657357db 100644 --- a/ges/ges-video-transition.c +++ b/ges/ges-video-transition.c @@ -23,6 +23,9 @@ * @title: GESVideoTransition * @short_description: implements video crossfade transition */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include #include "ges-internal.h" diff --git a/ges/ges-video-uri-source.c b/ges/ges-video-uri-source.c index 7b72539bd1..1939046b81 100644 --- a/ges/ges-video-uri-source.c +++ b/ges/ges-video-uri-source.c @@ -23,6 +23,9 @@ * @title: GESVideoUriSource * @short_description: outputs a single video stream from a given file */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #include diff --git a/ges/ges-xml-formatter.c b/ges/ges-xml-formatter.c index 4fe7c6511b..d52921293f 100644 --- a/ges/ges-xml-formatter.c +++ b/ges/ges-xml-formatter.c @@ -17,6 +17,10 @@ * Free Software Foundation, Inc., 59 Temple Place - Suite 330, * Boston, MA 02111-1307, USA. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#undef VERSION +#endif /* TODO Determine error codes numbers */ diff --git a/ges/meson.build b/ges/meson.build index d3421913cf..ba89315adb 100644 --- a/ges/meson.build +++ b/ges/meson.build @@ -160,7 +160,7 @@ libges = library('ges-1.0', ges_sources, parser, version : libversion, soversion : soversion, darwin_versions : osxversion, - c_args : [ges_c_args], + c_args : [ges_c_args] + ['-DBUILDING_GES'], include_directories : [configinc], install : true, dependencies : libges_deps) diff --git a/meson.build b/meson.build index 80cf650f58..4dfc112476 100644 --- a/meson.build +++ b/meson.build @@ -29,6 +29,9 @@ glib_req = '>= 2.40.0' gst_req = '>= @0@.@1@.0'.format(gst_version_major, gst_version_minor) cc = meson.get_compiler('c') + +cdata = configuration_data() + # Ignore several spurious warnings for things gstreamer does very commonly # If a warning is completely useless and spammy, use '/wdXXXX' to suppress it # If a warning is harmless but hard to fix, use '/woXXXX' so it's shown once @@ -47,16 +50,23 @@ 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 +# 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') add_project_arguments('-fno-strict-aliasing', language: 'c') endif -cdata = configuration_data() cdata.set('VERSION', '"@0@"'.format(gst_version)) cdata.set('PACKAGE', '"gst-editing-services"') cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))