gstreamer/gst-libs/gst/video
Tim-Philipp Müller dc29bc4e13 libs: fix API export/import and 'inconsistent linkage' on MSVC
For each lib we build export its own API in headers when we're
building it, otherwise import the API from the headers.

This fixes linker warnings on Windows when building with MSVC.

The problem was that we had defined all GST_*_API decorators
unconditionally to GST_EXPORT. This was intentional and only
supposed to be temporary, but caused linker warnings because
we tell the linker that we want to export all symbols even
those from externall DLLs, and when the linker notices that
they were in external DLLS and not present locally it warns.

What we need to do when building each library is: export
the library's own symbols and import all other symbols. To
this end we define e.g. BUILDING_GST_FOO and then we define
the GST_FOO_API decorator either to export or to import
symbols depending on whether BUILDING_GST_FOO is set or not.
That way external users of each library API automatically
get the import.

While we're at it, add new GST_API_EXPORT in config.h and use
that for GST_*_API decorators instead of GST_EXPORT.

The right export define depends on the toolchain and whether
we're using -fvisibility=hidden or not, so it's better to set it
to the right thing directly than hard-coding a compiler whitelist
in the public header.

We put the export define into config.h instead of passing it via the
command line to the compiler because it might contain spaces and brackets
and in the autotools scenario we'd have to pass that through multiple
layers of plumbing and Makefile/shell escaping and we're just not going
to be *that* lucky.

The export define is only used if we're compiling our lib, not by external
users of the lib headers, so it's not a problem to put it into config.h

Also, this means all .c files of libs need to include config.h
to get the export marker defined, so fix up a few that didn't
include config.h.

This commit depends on a common submodule commit that makes gst-glib-gen.mak
add an #include "config.h" to generated enum/marshal .c files for the
autotools build.

https://bugzilla.gnome.org/show_bug.cgi?id=797185
2018-09-24 08:45:34 +01:00
..
.gitignore Update .gitignore 2012-08-08 09:06:30 +01:00
colorbalance.c docs: Convert gtkdoc comments to markdown 2017-03-10 18:19:17 -03:00
colorbalance.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
colorbalancechannel.c docs: Convert gtkdoc comments to markdown 2017-03-10 18:19:17 -03:00
colorbalancechannel.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
convertframe.c gst-libs: include config.h in all source files 2018-08-13 09:23:34 +01:00
gstvideoaffinetransformationmeta.c gst-libs: include config.h in all source files 2018-08-13 09:23:34 +01:00
gstvideoaffinetransformationmeta.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
gstvideodecoder.c videodecoder: Delete the link before pushing 2018-09-10 17:08:25 -04:00
gstvideodecoder.h video: Add gst_video_decoder_set_interlaced_output_state() 2018-08-29 12:14:38 -04:00
gstvideoencoder.c videoencoder: Release STREAM_LOCK during gst_pad_push() 2018-08-31 16:11:04 -04:00
gstvideoencoder.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
gstvideofilter.c video-filter: Support allocation pool with pool object 2017-09-06 14:20:46 -04:00
gstvideofilter.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
gstvideometa.c gst-libs: include config.h in all source files 2018-08-13 09:23:34 +01:00
gstvideometa.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
gstvideopool.c gst-libs: include config.h in all source files 2018-08-13 09:23:34 +01:00
gstvideopool.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
gstvideosink.c videosink: Set processing deadline to 15ms 2018-07-07 08:59:30 -04:00
gstvideosink.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
gstvideotimecode.c gst-libs: include config.h in all source files 2018-08-13 09:23:34 +01:00
gstvideotimecode.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
gstvideoutils.c video: Fix/Add section documentation 2018-04-02 16:49:19 +02:00
gstvideoutils.h libs: Documentation cleanup 2018-04-02 08:53:28 +02:00
gstvideoutilsprivate.c videoutilsprivate: fill more video fields. 2017-08-14 12:42:57 +02:00
gstvideoutilsprivate.h videoencoder/decoder: Move conversion utility functions to a common header and use consistently in encoder/decoder 2016-07-04 10:47:36 +02:00
Makefile.am libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 08:45:34 +01:00
meson.build libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 08:45:34 +01:00
navigation.c navigation: Add some validation while sending key/mouse events 2017-06-06 11:12:18 +05:30
navigation.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
TODO video: Base classes for video decoders and encoders 2012-04-24 17:03:40 +02:00
video-anc.c video: fix some GIR annotations 2018-04-23 19:33:19 +02:00
video-anc.h video: Add support for VANC and Closed Caption 2018-04-09 15:15:24 +02:00
video-blend.c video: Handle errors in gst_video_info_set_format() / gst_video_info_align() 2016-11-24 15:06:39 +02:00
video-blend.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
video-chroma.c video: Silence "restrict" issues with ORC code 2018-05-05 10:27:12 +02:00
video-chroma.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
video-color.c video: fix some GIR array annotations 2018-05-21 09:18:35 +02:00
video-color.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
video-converter.c video: Add NV12_10LE40 pixel format 2018-05-19 13:09:08 -04:00
video-converter.h libs: Documentation cleanup 2018-04-02 08:53:28 +02:00
video-dither.c gst-libs: include config.h in all source files 2018-08-13 09:23:34 +01:00
video-dither.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
video-event.c gst-libs: include config.h in all source files 2018-08-13 09:23:34 +01:00
video-event.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
video-format.c video: Add NV12_10LE40 pixel format 2018-05-19 13:09:08 -04:00
video-format.h video: Add NV12_10LE40 pixel format 2018-05-19 13:09:08 -04:00
video-frame.c video: Safe guard info->finfo when mapping a frame 2018-04-21 20:47:31 -03:00
video-frame.h video: Add format for single fields of interlaced video in a buffer 2018-08-29 12:14:38 -04:00
video-info.c video: Add GST_VIDEO_INFO_FIELD_HEIGHT() macro 2018-08-29 12:14:38 -04:00
video-info.h video: Add GST_VIDEO_INFO_FIELD_RATE_N() macro 2018-08-29 12:14:38 -04:00
video-multiview.c libs: Documentation cleanup 2018-04-02 08:53:28 +02:00
video-multiview.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
video-orc-dist.c Update disted orc file 2017-10-31 11:57:23 +01:00
video-orc-dist.h video: update orc generated files 2017-06-01 23:21:48 +01:00
video-orc.orc Fix RGBA and ABGR pack/unpack on big endian cpu 2017-06-01 17:47:22 +02:00
video-overlay-composition.c libs: Documentation cleanup 2018-04-02 08:53:28 +02:00
video-overlay-composition.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
video-prelude.h libs: fix API export/import and 'inconsistent linkage' on MSVC 2018-09-24 08:45:34 +01:00
video-resampler.c docs: Convert gtkdoc comments to markdown 2017-03-10 18:19:17 -03:00
video-resampler.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
video-scaler.c libs: Documentation cleanup 2018-04-02 08:53:28 +02:00
video-scaler.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
video-tile.c gst-libs: include config.h in all source files 2018-08-13 09:23:34 +01:00
video-tile.h video: Set correct value in g-i annotations for tile related mask constants 2018-03-21 10:28:05 +02:00
video.c video: Fix/Add section documentation 2018-04-02 16:49:19 +02:00
video.h video: Add support for VANC and Closed Caption 2018-04-09 15:15:24 +02:00
videodirection.c docs: Convert gtkdoc comments to markdown 2017-03-10 18:19:17 -03:00
videodirection.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
videoorientation.c video: fix some GIR annotations 2018-04-23 19:33:19 +02:00
videoorientation.h video: GST_EXPORT -> GST_VIDEO_API 2018-03-13 12:16:42 +00:00
videooverlay.c video-overlay: Add helpers for render-rectangle property 2018-01-29 16:26:09 +00:00
videooverlay.h libs: Documentation cleanup 2018-04-02 08:53:28 +02:00