Commit graph

21 commits

Author SHA1 Message Date
Tim-Philipp Müller
b6411ae74c 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 14:45:56 +01:00
Tim-Philipp Müller
a05006944a codecparsers: GST_EXPORT -> GST_CODEC_PARSERS_API
We need different export decorators for the different libs.
For now no actual change though, just rename before the release,
and add prelude headers to define the new decorator to GST_EXPORT.
2018-03-13 12:34:24 +00:00
Aaron Boxer
e7e6a3579d jpeg2000parse: use enums for colorspace and sampling, rather than strings
Also, move gstjpeg2000sampling to codecparsers project

https://bugzilla.gnome.org/show_bug.cgi?id=767908
2016-06-24 11:23:31 +03:00
Tim-Philipp Müller
10392acca5 codecparsers: vp9: move license blurb into header and remove aux files
This is just a bunch of lookup tables..
2015-12-30 11:04:32 +00:00
Sebastian Dröge
45f2ad952f vp9parser: Rename symbols to prevent symbol conflicts
Also make clamp() a static function for the same reason and use CLAMP (as
defined by GLib) in the GStreamer code.
2015-12-30 11:37:59 +02:00
Sreerenj Balachandran
b245e0f16c codecparsers: Add VP9 codec parser
https://bugzilla.gnome.org/show_bug.cgi?id=757597
2015-12-30 11:19:33 +02:00
Gwenole Beauchesne
7e7b4d68f4 codecparsers: jpeg: add JPEG bitstream parser
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=673925
2015-06-21 11:28:30 +01:00
Tim-Philipp Müller
699452ef31 Remove obsolete Android build cruft
This is not needed any longer.
2015-04-26 18:59:32 +01:00
Sebastian Dröge
cea860021d codecparsers: vp8: rename dboolhuff symbols.
Rename VP8 dboolhuff symbols so that to avoid clashes with libvpx when
static linking.
2014-04-18 16:32:40 +02:00
Gwenole Beauchesne
e2aaa91c5a codecparsers: vp8: add GStreamer native utilities.
Import libvpx 1.3.0 range decoder files (dboolhuff.[ch]) to implement
the VP8 utilities native interface. Likewise, copy and use the default
libvpx generated entropy probabilities tables.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-04-18 16:32:40 +02:00
Zhao, Halley
3da5a54399 codecparsers: add VP8 bitstream parser.
https://bugzilla.gnome.org/show_bug.cgi?id=722760

[refactored, among other fixes]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
2014-04-18 16:32:40 +02:00
Thiago Santos
61192a1619 codecparsers: refactor common nal parsing to nalutils
Moves common code from h264 and h265 to a separate file
2014-01-24 09:30:35 -03:00
Reynaldo H. Verdejo Pinochet
b4f29e6945 codecparsers: Add -lm needed by H.265 parser 2013-11-13 19:51:12 -03:00
Sreerenj Balachandran
33451e0791 codecparsers: add H.265 HEVC bitstream parser
https://bugzilla.gnome.org/show_bug.cgi?id=708438
2013-11-06 23:14:22 +00:00
Edward Hervey
67ac84c7b5 codecparsers: Add Mpeg Video GstMeta
This can be used by parsers to provide pre-parsed information to
downstream elements that would require it (so they can avoid having
to parse the bitstream again).
2013-03-31 18:55:29 +02:00
Sebastian Dröge
1318a97e0a gst: Update versioning 2012-04-04 14:44:34 +02:00
Thibault Saunier
fd593d6cc8 codecparsers: mpeg4: Implement an Mpeg4 part 2 parsing library 2011-11-28 21:25:34 -03:00
Thibault Saunier
4439048e4a codecparsers: Move shared code to a parser utils file 2011-11-28 21:25:34 -03:00
Thibault Saunier
705a80d957 codecparser: VC1: Implement a VC1 parsing library 2011-09-26 08:46:37 -03:00
Thibault Saunier
a1cfba43f6 codecparsers: h264: Add an h.264 bitstream parsing library 2011-09-02 15:46:02 +02:00
Thibault Saunier
c64b99339c codecparsers: mpeg: Add an mpeg video bitstream parsing library
Create a new codecparsers library
2011-09-02 15:46:02 +02:00