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
This commit is contained in:
Sebastian Dröge 2017-12-06 13:01:39 +02:00
parent 755df25dc2
commit 0f7e4c90d5
3 changed files with 9 additions and 9 deletions

View file

@ -49,7 +49,7 @@ gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext, track_t track,
const gchar *txt; const gchar *txt;
gchar *txt_utf8; gchar *txt_utf8;
#if LIBCDIO_VERSION_NUM > 83 #if LIBCDIO_VERSION_NUM > 83 || LIBCDIO_VERSION_NUM < 76
txt = cdtext_get_const (cdtext, field, track); txt = cdtext_get_const (cdtext, field, track);
#else #else
txt = cdtext_get_const (field, cdtext); txt = cdtext_get_const (field, cdtext);
@ -82,7 +82,7 @@ gst_cdio_add_cdtext_field (GstObject * src, cdtext_t * cdtext, track_t track,
} }
GstTagList * 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) gst_cdio_get_cdtext (GstObject * src, cdtext_t * t, track_t track)
{ {
GstTagList *tags = NULL; GstTagList *tags = NULL;
@ -109,7 +109,7 @@ gst_cdio_get_cdtext (GstObject * src, CdIo * cdio, track_t track)
} }
void 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, gst_cdio_add_cdtext_album_tags (GstObject * src, cdtext_t * t,
GstTagList * tags) GstTagList * tags)
{ {

View file

@ -25,7 +25,7 @@
#include <cdio/cdio.h> #include <cdio/cdio.h>
#include <cdio/cdtext.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_PERFORMER CDTEXT_PERFORMER
#define CDTEXT_FIELD_GENRE CDTEXT_GENRE #define CDTEXT_FIELD_GENRE CDTEXT_GENRE
#define CDTEXT_FIELD_TITLE CDTEXT_TITLE #define CDTEXT_FIELD_TITLE CDTEXT_TITLE
@ -42,7 +42,7 @@ void gst_cdio_add_cdtext_field (GstObject * src,
GstTagList ** p_tags); GstTagList ** p_tags);
GstTagList * gst_cdio_get_cdtext (GstObject * src, GstTagList * gst_cdio_get_cdtext (GstObject * src,
#if LIBCDIO_VERSION_NUM > 83 #if LIBCDIO_VERSION_NUM > 83 || LIBCDIO_VERSION_NUM < 76
cdtext_t * t, cdtext_t * t,
#else #else
CdIo * cdio, CdIo * cdio,
@ -50,7 +50,7 @@ GstTagList * gst_cdio_get_cdtext (GstObject * src,
track_t track); track_t track);
void gst_cdio_add_cdtext_album_tags (GstObject * src, 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, cdtext_t * t,
#else #else
CdIo * cdio, CdIo * cdio,

View file

@ -317,7 +317,7 @@ gst_cdio_cdda_src_open (GstAudioCdSrc * audiocdsrc, const gchar * device)
discmode_t discmode; discmode_t discmode;
gint first_track, num_tracks, i; gint first_track, num_tracks, i;
gint first_audio_sector = 0, last_audio_sector = 0; 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; cdtext_t *cdtext;
#endif #endif
@ -346,7 +346,7 @@ gst_cdio_cdda_src_open (GstAudioCdSrc * audiocdsrc, const gchar * device)
if (src->read_speed != -1) if (src->read_speed != -1)
cdio_set_speed (src->cdio, src->read_speed); 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); cdtext = cdio_get_cdtext (src->cdio);
if (NULL == cdtext) 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); first_audio_sector = MIN (first_audio_sector, track.start);
last_audio_sector = MAX (last_audio_sector, track.end); 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) if (NULL != cdtext)
track.tags = gst_cdio_get_cdtext (GST_OBJECT (src), cdtext, track.tags = gst_cdio_get_cdtext (GST_OBJECT (src), cdtext,
i + first_track); i + first_track);