diff options
author | fosero <fosero@users.noreply.github.com> | 2016-02-28 15:45:15 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2016-03-21 20:33:32 +0100 |
commit | 4ad4d2110a4ab833f0a9244e8306d3717588fc0b (patch) | |
tree | ba29cd8e83a78387e4847497e1a0117e30d78100 | |
parent | ff309b642735ae441f1bdf2122f66277bbeefd8f (diff) | |
download | tracker-4ad4d2110a4ab833f0a9244e8306d3717588fc0b.tar.gz |
tracker-extract: adapt to libcue 2.0.0 API
Allow optional support for the libcue 2.0.0 API changes: new location of
libcue.h and a renamed enum.
https://bugzilla.gnome.org/show_bug.cgi?id=762512
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | src/tracker-extract/tracker-cue-sheet.c | 12 |
2 files changed, 17 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 524b89b3e..6ded545a6 100644 --- a/configure.ac +++ b/configure.ac @@ -2388,6 +2388,11 @@ if test "x$enable_libcue" != "xno" ; then if test "x$have_libcue" = "xyes"; then AC_DEFINE(HAVE_LIBCUE, [], [Define if we have libcue]) + + PKG_CHECK_EXISTS([libcue >= 2.0.0], have_libcue2=yes, have_libcue2=no) + if test "x$have_libcue2" = "xyes"; then + AC_DEFINE(HAVE_LIBCUE2, [], [Define if we have libcue 2 or up]) + fi fi else have_libcue="no (disabled)" @@ -2399,8 +2404,6 @@ if test "x$enable_libcue" = "xyes"; then fi fi -AM_CONDITIONAL(HAVE_LIBCUE, test "x$have_libcue" = "xyes") - #################################################################### # Check for tracker-extract: AbiWord #################################################################### @@ -2830,7 +2833,7 @@ Metadata Extractors: Support XML / HTML: $have_libxml2 Support embedded / sidecar XMP: $have_exempi Support generic media formats: $have_generic_media_handler ($have_generic_media_handler_app) (backend: $gstreamer_backend) - Support cue sheet parsing: $have_libcue + Support cue sheet parsing: $have_libcue (libcue2.0: $have_libcue2) Support playlists (w/ Totem): $have_playlist Support ISO image parsing: $have_libosinfo Support AbiWord document parsing: $have_abiword diff --git a/src/tracker-extract/tracker-cue-sheet.c b/src/tracker-extract/tracker-cue-sheet.c index 3c4b524c6..435f6cb4e 100644 --- a/src/tracker-extract/tracker-cue-sheet.c +++ b/src/tracker-extract/tracker-cue-sheet.c @@ -29,7 +29,9 @@ #include <gst/gst.h> #include <gst/tag/tag.h> -#if defined(HAVE_LIBCUE) +#if defined(HAVE_LIBCUE2) +#include <libcue.h> +#elif defined(HAVE_LIBCUE) #include <libcue/libcue.h> #endif @@ -94,7 +96,11 @@ add_cdtext_string_tag (Cdtext *cd_text, static void add_cdtext_comment_date_tag (Rem *cd_comments, +#if defined(HAVE_LIBCUE2) + enum RemType index, +#elif defined(HAVE_LIBCUE) enum Cmt index, +#endif GstTagList *tag_list, const gchar *tag) { @@ -117,7 +123,11 @@ add_cdtext_comment_date_tag (Rem *cd_comments, static void add_cdtext_comment_double_tag (Rem *cd_comments, +#if defined(HAVE_LIBCUE2) + enum RemType index, +#elif defined(HAVE_LIBCUE) enum Cmt index, +#endif GstTagList *tag_list, const gchar *tag) { |