Commit graph

568 commits

Author SHA1 Message Date
Tim-Philipp Müller 289d8e53e2 Remove autotools build system 2019-10-13 14:15:43 +01:00
Matthew Waters 8ce2460ad5 build: fix debug output werror build with newer gcc
In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../gst-libs/gst/tag/tag.h:25,
                 from ../gst-libs/gst/tag/gsttageditingprivate.h:24,
                 from ../gst-libs/gst/tag/gsttageditingprivate.c:23:
../gst-libs/gst/tag/gsttageditingprivate.c: In function ‘__exif_tag_capturing_white_balance_to_exif_value’:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1068:27: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1068 | #define GST_WARNING(...)  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~
../gst-libs/gst/tag/gsttageditingprivate.c:265:3: note: in expansion of macro ‘GST_WARNING’
  265 |   GST_WARNING ("Invalid white balance: %s", str);
      |   ^~~~~~~~~~~
../gst-libs/gst/tag/gsttageditingprivate.c:265:40: note: format string is defined here
  265 |   GST_WARNING ("Invalid white balance: %s", str);
      |                                        ^~

In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../gst-libs/gst/tag/tag.h:25,
                 from ../gst-libs/gst/tag/gstxmptag.c:39:
../gst-libs/gst/tag/gstxmptag.c: In function ‘deserialize_exif_gps_direction’:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1068:27: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1068 | #define GST_WARNING(...)  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~
../gst-libs/gst/tag/gstxmptag.c:818:5: note: in expansion of macro ‘GST_WARNING’
  818 |     GST_WARNING ("Missing %s tag", dirref_str);
      |     ^~~~~~~~~~~
../gst-libs/gst/tag/gstxmptag.c:818:27: note: format string is defined here
  818 |     GST_WARNING ("Missing %s tag", dirref_str);
      |                           ^~
In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../gst-libs/gst/tag/tag.h:25,
                 from ../gst-libs/gst/tag/gstxmptag.c:39:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1068:27: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1068 | #define GST_WARNING(...)  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~
../gst-libs/gst/tag/gstxmptag.c:814:5: note: in expansion of macro ‘GST_WARNING’
  814 |     GST_WARNING ("Missing %s tag", dir_str);
      |     ^~~~~~~~~~~
../gst-libs/gst/tag/gstxmptag.c:814:27: note: format string is defined here
  814 |     GST_WARNING ("Missing %s tag", dir_str);
      |                           ^~

In file included from ../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gst.h:55,
                 from ../gst-libs/gst/gl/gstgl_fwd.h:24,
                 from ../gst-libs/gst/gl/gl.h:24,
                 from ../gst-libs/gst/gl/gstglsl.c:25:
../gst-libs/gst/gl/gstglsl.c: In function ‘gst_glsl_version_profile_from_string’:
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:645:5: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  645 |     gst_debug_log ((cat), (level), __FILE__, GST_FUNCTION, __LINE__, \
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  646 |         (GObject *) (object), __VA_ARGS__);    \
      |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../../../../dist/linux_x86_64/include/gstreamer-1.0/gst/gstinfo.h:1068:27: note: in expansion of macro ‘GST_CAT_LEVEL_LOG’
 1068 | #define GST_WARNING(...)  GST_CAT_LEVEL_LOG (GST_CAT_DEFAULT, GST_LEVEL_WARNING, NULL, __VA_ARGS__)
      |                           ^~~~~~~~~~~~~~~~~
../gst-libs/gst/gl/gstglsl.c:333:7: note: in expansion of macro ‘GST_WARNING’
  333 |       GST_WARNING ("Invalid preprocesser directive detected: %s", version_s);
      |       ^~~~~~~~~~~
../gst-libs/gst/gl/gstglsl.c:333:62: note: format string is defined here
  333 |       GST_WARNING ("Invalid preprocesser directive detected: %s", version_s);
      |                                                              ^~

In function ‘print_stream_info’,
    inlined from ‘print_topology’ at ../tools/gst-discoverer.c:352:3:
../tools/gst-discoverer.c:316:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
  316 |   g_print ("%*s%s: %s\n", 2 * GPOINTER_TO_INT (depth), " ",
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  317 |       gst_discoverer_stream_info_get_stream_type_nick (info), desc);
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2019-09-23 17:59:12 +10:00
Thibault Saunier 909baa2360 Pass the code through codespell 2019-08-30 13:05:36 +00:00
Jan Schmidt dd966c437f exiftag: Don't output rational numbers with denominator = 0 2019-07-30 04:01:55 +10:00
Sumaid Syed 18351dcd24 tag: Add tags for acoustid id & acoustid fingerprint
Mapping followed: https://picard.musicbrainz.org/docs/mappings/

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/612
2019-07-08 17:06:37 +05:30
Sumaid 8718458dc7 tag: Repair support for MusicBrainz IDs
Add missing release group ID and track ID
Mapping Followed:
https://picard.musicbrainz.org/docs/mappings/

https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/612
2019-07-08 16:31:34 +05:30
Niels De Graef 93daa1435a Use G_DEFINE_AUTOPTR_CLEANUP_FUNC unconditionally
Since we started depending on GLib 2.44, we can be sure this macro is
defined (it will be a no-op on compilers that don't support it). For
plugins we should just start using `G_DECLARE_FINAL_TYPE` which means we
no longer need the macro there, but for most types in base/gst-libs we
don't want to break ABI, which means it's better to just keep it like it
is (and use the `#ifdef` instead).
2019-06-04 20:31:09 -04:00
Thibault Saunier 287897e465 doc: Fix some gtk-doc comments 2019-05-13 11:34:08 -04:00
Thibault Saunier 685731e989 meson: Add variables for gir files
And flatten list of sources for dependencies
2019-05-13 10:19:22 -04:00
Sebastian Dröge 7095b7c47a id3tag: Correctly validate the year from v1 tags before passing to GstDateTime
By using strtoul(), invalid values will get mapped to MAXULONG and we
would have to check errno. They won't get mapped to 0.

To solve this, use the signed g_ascii_strtoll(). This will map errors to
0 or G_MAXINT64 or G_MININT64, and the valid range for GstDateTime is >
0 and <= 9999 so we can directly check for this here.

Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/issues/384
2019-04-26 09:46:58 +03:00
Xavier Claessens d3f9daf07c Check for zlib header 2018-11-22 20:03:33 -05:00
Xavier Claessens 7298139ba1 Fix zlib detection when there is no pkg-config file 2018-11-21 14:56:56 +00:00
Edward Hervey 8707914d23 tagdemux: Use upstream GST_EVENT_STREAM_START if present
If we have an upstream GST_EVENT_STREAM_START, use that one instead
of creating a new one which could be completely different from the
upstream one and drop information (like the stream flags and stream
object).

Only create a new event if we don't already have one from upstream

https://bugzilla.gnome.org/show_bug.cgi?id=797215
2018-09-27 15:09:06 +02:00
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
Nirbheek Chauhan a9cab426d0 meson: Maintain macOS ABI through dylib versioning
Requires Meson 0.48, but the feature will be ignored on older versions
so it's safe to add it without bumping the requirement.

Documentation:
https://github.com/mesonbuild/meson/blob/master/docs/markdown/Reference-manual.md#shared_library
2018-08-31 14:40:43 +05:30
Tim-Philipp Müller ca15315565 gst-libs: include config.h in all source files
This will be needed later when we get our export define from config.h
2018-08-13 09:23:34 +01:00
Tim-Philipp Müller 4b68e3e658 tag: add license to generated backup language name table and update
It's LGPL same as iso-codes
2018-08-12 13:24:39 +01:00
Tim-Philipp Müller 6eb6140969 meson: use iso-codes in gsttag if available 2018-08-12 12:55:00 +01:00
Tim-Philipp Müller 553de4906f meson: tag: check for zlib and support compressed id3v2 tag if found
https://bugzilla.gnome.org/show_bug.cgi?id=793995
2018-08-11 18:51:33 +01:00
Bastian Köcher efa9bdccf9 meson: fix install dir for generated header files
Nixos installs into a non-standard includedir, so need
to take account of the 'includedir' option instead of
just hard-coding 'include' here.

https://bugzilla.gnome.org/show_bug.cgi?id=794856
2018-08-10 12:43:38 +01:00
Sebastian Dröge 0340c7e1f8 tagdemux: Propagate flow returns from gst_type_find_helper_get_range() properly
Instead of considering every failed typefinding as an error, even in
case of e.g. GST_FLOW_FLUSHING.
2018-08-08 12:46:43 +02:00
Sebastian Dröge 2f497ed217 tagdemux: Properly propagate gst_pad_pull_range() errors
And don't consider FLUSHING an actual error, just stop in that case.

https://bugzilla.gnome.org/show_bug.cgi?id=796883
2018-07-27 16:23:09 +03:00
Nirbheek Chauhan eadedc68f8 meson: Add feature options for all plugins
GL dependency detection is still automagic.

https://bugzilla.gnome.org/show_bug.cgi?id=795107
2018-07-27 18:42:11 +05:30
Tim-Philipp Müller 92579cb845 tag: Update for g_type_class_add_private() deprecation in recent GLib
https://gitlab.gnome.org/GNOME/glib/merge_requests/7
2018-06-23 22:03:27 +02:00
Christoph Reiter eef72d0d85 meson: install license-translations.dict and set LICENSE_TRANSLATIONS_PATH
The autotools build installs the file and sets the LICENSE_TRANSLATIONS_PATH
macro which licences.c uses as a fallback path. Do the same with meson.

https://bugzilla.gnome.org/show_bug.cgi?id=796274
2018-05-20 14:27:39 +01:00
Antoine Jacoutot c765649505 libs: g-ir-scanner: do not hardcode libtool path
https://bugzilla.gnome.org/show_bug.cgi?id=726571
2018-05-18 13:41:25 +02:00
Kyrylo Polezhaiev b4df0bf07a tagdemux: avoid timestamp field initialisation for tag event
This field is not used and will be removed in 2.0 API.

https://bugzilla.gnome.org/show_bug.cgi?id=761462
2018-05-07 01:16:27 +10:00
Seungha Yang 46c024ea3d tagmux: Reset final tags for reusing element
If the output tag had been exposed, it never ever updated
even if we reset the tagmux using state change.

https://bugzilla.gnome.org/show_bug.cgi?id=795691
2018-05-01 09:51:53 +01:00
Mark Nauwelaerts 8197c2c1be tag: fix some GIR annotations
Mostly related to out and array parameters.
2018-04-13 20:19:08 +02:00
Alessandro Decina 345aa2cd9e meson: libs: use gnome.mkenums_simple() to generate enumtypes files
This way we no longer need custom wrapper scripts or template files.
2018-03-22 13:15:35 +00:00
Tim-Philipp Müller b618c5776d tag: GST_EXPORT -> GST_TAG_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:16:42 +00:00
Edward Hervey 6f5c9db1cc id3v2: re-fix handling of v2.4 extended headers
The various id3v2 specs handle the extended header sizes differently
(because hey, it wouldn't be fun otherwise).

http://id3.org/id3v2.3.0 states:
"Where the 'Extended header size', currently 6 or 10 bytes, excludes
 itself."

http://id3.org/id3v2.4.0-structure states:
  Extended header size   4 * %0xxxxxxx
     Number of flag bytes       $01
     Extended Flags             $xx

   Where the 'Extended header size' is the size of the whole extended
   header, stored as a 32 bit synchsafe integer. An extended header can
   thus never have a size of fewer than six bytes.

So in id3v2.4.0 it's the *whole* extended header size (a-la ISOBMFF
atom), whereas in id3v2.3.0 it's the extended header size *excluding*
those 4 initial bytes.

And for other versions, god knows..

Fixes regression introduced in commit da607005.

https://bugzilla.gnome.org/show_bug.cgi?id=792983
2018-03-01 12:42:10 +00:00
Tim-Philipp Müller a1af74feda tag: id3v2: don't leak stack pointer outside of block where it's valid
https://bugzilla.gnome.org/show_bug.cgi?id=788548
2018-01-19 20:43:57 +00:00
Edward Hervey 24a5a03d27 vorbistag: Fix previous comment
We already NULL-ended the string, don't use the bogus cur_size
2017-11-02 10:43:02 +01:00
Edward Hervey 62081fe583 vorbistag: Check whether tag name is valid
In the same way we check before whether the content of the tag
is UTF-8
2017-11-02 08:19:13 +01:00
Edward Hervey 8e867aefe0 vorbistag: Fix leak in error case
Don't leak the vendor_string on error cases
2017-11-01 10:53:54 +01:00
Havard Graff 43985b363d meson: remove vs_module_defs
GST_EXPORT should handle it.
2017-10-05 13:53:14 +01:00
Rico Tzschichholz fb3455d7a1 meson: Add some missing args and dependencies in the gir generation 2017-10-05 13:51:19 +01:00
Sebastian Dröge f996b05644 xmptag: Stop parsing GPS coordinate if sscanf() fails
CID 1139610
2017-08-04 13:39:31 +03:00
Tim-Philipp Müller af78896a82 tag: mark symbols explicitly for export with GST_EXPORT 2017-05-16 15:23:08 +01:00
Tim-Philipp Müller 60e9629860 g-i: no need to load registry in g-i scanner 2017-05-04 23:55:20 +01:00
Rico Tzschichholz 07a427b403 meson: Pass --c-include accordingly to GIR builds 2017-04-13 12:23:32 +01:00
Tim-Philipp Müller 4246198fb3 No need for newlines in debug log statements 2017-04-12 09:58:49 +01:00
Sebastian Dröge 78ae1411ce Revert "tag: Fix enum nicks for backwards compatibility"
This reverts commit 595b29519a.

Bindings are not using the nicks but the actual enum names.
2017-04-10 14:34:23 +03:00
Sebastian Dröge a69befecd3 app/tag: Fix build with srcdir!=builddir 2017-04-10 14:25:30 +03:00
Sebastian Dröge 595b29519a tag: Fix enum nicks for backwards compatibility
The enum values got the wrong name at some point, something to fix for 2.0.
2017-04-10 14:02:01 +03:00
Rico Tzschichholz dc4e041f07 app/tag: Add missing sources/headers to the GIR build 2017-04-10 13:55:58 +03:00
Sebastian Dröge 8169cfa737 meson: Define missing variable 2017-04-09 12:54:12 +03:00
Sebastian Dröge e74e1e80fa tag: Generate GLib enums/flags with glib-mkenums 2017-04-09 12:51:52 +03:00
Thibault Saunier 099ac9faf2 docs: Convert gtkdoc comments to markdown
Modernizing the documentation, making it simpler to read an
modify and allowing us to possibly switch to hotdoc in the
future.
2017-03-10 18:19:17 -03:00