summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2017-12-06 13:01:39 +0200
committerSebastian Dröge <sebastian@centricular.com>2017-12-06 13:01:39 +0200
commit0f7e4c90d5248537a066c53ecdd8d1bd86b66a06 (patch)
treef87e3cc433920ba21f4034f5f02d5e3eaa727c00
parent755df25dc2c53284fa49bd0d1bac3a65137b3423 (diff)
cdio: Fix build with cdio >= 1.0
LIBCDIO_VERSION_NUM was defined as e.g. 94 for 0.94 but is now defined as 1 for 1.0. We had various checks for < 83, which of course succeeded now although we are >= 0.83. Fix this by checking for < 76 (0.76) too, as that is the minimum version we currently support and everything < 76 is going to be >= 1.0. https://bugzilla.gnome.org/show_bug.cgi?id=791301
-rw-r--r--ext/cdio/gstcdio.c6
-rw-r--r--ext/cdio/gstcdio.h6
-rw-r--r--ext/cdio/gstcdiocddasrc.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/ext/cdio/gstcdio.c b/ext/cdio/gstcdio.c
index e89e1055..6d0e5593 100644
--- a/ext/cdio/gstcdio.c
+++ b/ext/cdio/gstcdio.c
@@ -49,7 +49,7 @@ gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext, track_t track,
const gchar *txt;
gchar *txt_utf8;
-#if LIBCDIO_VERSION_NUM > 83
+#if LIBCDIO_VERSION_NUM > 83 || LIBCDIO_VERSION_NUM < 76
txt = cdtext_get_const (cdtext, field, track);
#else
txt = cdtext_get_const (field, cdtext);
@@ -82,7 +82,7 @@ gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext, track_t track,
}
GstTagList *
-#if LIBCDIO_VERSION_NUM > 83
+#if LIBCDIO_VERSION_NUM > 83 || LIBCDIO_VERSION_NUM < 76
gst_cdio_get_cdtext (GstObject * src, cdtext_t * t, track_t track)
{
GstTagList *tags = NULL;
@@ -109,7 +109,7 @@ gst_cdio_get_cdtext (GstObject * src, CdIo * cdio, track_t track)
}
void
-#if LIBCDIO_VERSION_NUM > 83
+#if LIBCDIO_VERSION_NUM > 83 || LIBCDIO_VERSION_NUM < 76
gst_cdio_add_cdtext_album_tags (GstObject * src, cdtext_t * t,
GstTagList * tags)
{
diff --git a/ext/cdio/gstcdio.h b/ext/cdio/gstcdio.h
index 6d7c733d..06657816 100644
--- a/ext/cdio/gstcdio.h
+++ b/ext/cdio/gstcdio.h
@@ -25,7 +25,7 @@
#include <cdio/cdio.h>
#include <cdio/cdtext.h>
-#if LIBCDIO_VERSION_NUM <= 83
+#if LIBCDIO_VERSION_NUM <= 83 && LIBCDIO_VERSION_NUM >= 76
#define CDTEXT_FIELD_PERFORMER CDTEXT_PERFORMER
#define CDTEXT_FIELD_GENRE CDTEXT_GENRE
#define CDTEXT_FIELD_TITLE CDTEXT_TITLE
@@ -42,7 +42,7 @@ void gst_cdio_add_cdtext_field (GstObject * src,
GstTagList ** p_tags);
GstTagList * gst_cdio_get_cdtext (GstObject * src,
-#if LIBCDIO_VERSION_NUM > 83
+#if LIBCDIO_VERSION_NUM > 83 || LIBCDIO_VERSION_NUM < 76
cdtext_t * t,
#else
CdIo * cdio,
@@ -50,7 +50,7 @@ GstTagList * gst_cdio_get_cdtext (GstObject * src,
track_t track);
void gst_cdio_add_cdtext_album_tags (GstObject * src,
-#if LIBCDIO_VERSION_NUM > 83
+#if LIBCDIO_VERSION_NUM > 83 || LIBCDIO_VERSION_NUM < 76
cdtext_t * t,
#else
CdIo * cdio,
diff --git a/ext/cdio/gstcdiocddasrc.c b/ext/cdio/gstcdiocddasrc.c
index 601ee98d..0990b500 100644
--- a/ext/cdio/gstcdiocddasrc.c
+++ b/ext/cdio/gstcdiocddasrc.c
@@ -317,7 +317,7 @@ gst_cdio_cdda_src_open (GstAudioCdSrc * audiocdsrc, const gchar * device)
discmode_t discmode;
gint first_track, num_tracks, i;
gint first_audio_sector = 0, last_audio_sector = 0;
-#if LIBCDIO_VERSION_NUM > 83
+#if LIBCDIO_VERSION_NUM > 83 || LIBCDIO_VERSION_NUM < 76
cdtext_t *cdtext;
#endif
@@ -346,7 +346,7 @@ gst_cdio_cdda_src_open (GstAudioCdSrc * audiocdsrc, const gchar * device)
if (src->read_speed != -1)
cdio_set_speed (src->cdio, src->read_speed);
-#if LIBCDIO_VERSION_NUM > 83
+#if LIBCDIO_VERSION_NUM > 83 || LIBCDIO_VERSION_NUM < 76
cdtext = cdio_get_cdtext (src->cdio);
if (NULL == cdtext)
@@ -379,7 +379,7 @@ gst_cdio_cdda_src_open (GstAudioCdSrc * audiocdsrc, const gchar * device)
first_audio_sector = MIN (first_audio_sector, track.start);
last_audio_sector = MAX (last_audio_sector, track.end);
}
-#if LIBCDIO_VERSION_NUM > 83
+#if LIBCDIO_VERSION_NUM > 83 || LIBCDIO_VERSION_NUM < 76
if (NULL != cdtext)
track.tags = gst_cdio_get_cdtext (GST_OBJECT (src), cdtext,
i + first_track);