Make chromaprint optional

This commit is contained in:
Jonas Kvinge
2018-07-16 07:23:37 +02:00
parent e181b47e3f
commit b2c26eb4ed
10 changed files with 86 additions and 46 deletions

View File

@@ -164,6 +164,7 @@ void CddaSongLoader::LoadSongs() {
}
emit SongsDurationLoaded(songs);
#ifdef HAVE_CHROMAPRINT
// Handle TAG message: generate MusicBrainz DiscId
if (msg_tag) {
GstTagList *tags = nullptr;
@@ -181,6 +182,7 @@ void CddaSongLoader::LoadSongs() {
gst_tag_list_free(tags);
}
}
#endif
gst_element_set_state(pipeline, GST_STATE_NULL);
// This will also cause cdda_ to be unref'd.
@@ -188,6 +190,7 @@ void CddaSongLoader::LoadSongs() {
}
#ifdef HAVE_CHROMAPRINT
void CddaSongLoader::AudioCDTagsLoaded(const QString &artist, const QString &album, const MusicBrainzClient::ResultList &results) {
MusicBrainzClient *musicbrainz_client = qobject_cast<MusicBrainzClient*>(sender());
@@ -213,6 +216,7 @@ void CddaSongLoader::AudioCDTagsLoaded(const QString &artist, const QString &alb
emit SongsMetadataLoaded(songs);
}
#endif
bool CddaSongLoader::HasChanged() {