From 39d99247a25efc14eb007a55eaf9dbcc16f317c4 Mon Sep 17 00:00:00 2001 From: David Sansome Date: Mon, 22 Sep 2014 22:28:53 +1000 Subject: [PATCH] gstreamer-cdda is in gst-plugins-base in 1.0 and has a different header name. This still doesn't work because the API has changed and track listings are now delivered via a bus message instead of direct access to the struct's members. --- CMakeLists.txt | 2 -- src/CMakeLists.txt | 1 - src/core/songloader.cpp | 6 ++---- src/devices/cddadevice.h | 2 +- src/devices/cddalister.h | 2 -- 5 files changed, 3 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1dac97f46..9bbfb7d62 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,7 +64,6 @@ pkg_check_modules(GSTREAMER REQUIRED gstreamer-1.0) pkg_check_modules(GSTREAMER_APP REQUIRED gstreamer-app-1.0) pkg_check_modules(GSTREAMER_AUDIO REQUIRED gstreamer-audio-1.0) pkg_check_modules(GSTREAMER_BASE REQUIRED gstreamer-base-1.0) -#pkg_check_modules(GSTREAMER_CDDA gstreamer-cdda-0.10) pkg_check_modules(GSTREAMER_TAG REQUIRED gstreamer-tag-1.0) pkg_check_modules(INDICATEQT indicate-qt) pkg_check_modules(LIBGPOD libgpod-1.0>=0.7.92) @@ -154,7 +153,6 @@ include_directories(${GSTREAMER_INCLUDE_DIRS}) include_directories(${GSTREAMER_APP_INCLUDE_DIRS}) include_directories(${GSTREAMER_AUDIO_INCLUDE_DIRS}) include_directories(${GSTREAMER_BASE_INCLUDE_DIRS}) -include_directories(${GSTREAMER_CDDA_INCLUDE_DIRS}) include_directories(${GSTREAMER_TAG_INCLUDE_DIRS}) include_directories(${GLIB_INCLUDE_DIRS}) include_directories(${GLIBCONFIG_INCLUDE_DIRS}) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e99eceb99..3a5df15a6 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1269,7 +1269,6 @@ endif(HAVE_GIO) if(HAVE_AUDIOCD) target_link_libraries(clementine_lib ${CDIO_LIBRARIES}) - target_link_libraries(clementine_lib ${GSTREAMER_CDDA_LIBRARIES}) endif(HAVE_AUDIOCD) if(HAVE_MOODBAR) diff --git a/src/core/songloader.cpp b/src/core/songloader.cpp index a27dbb222..f5ac565e1 100644 --- a/src/core/songloader.cpp +++ b/src/core/songloader.cpp @@ -27,7 +27,7 @@ #include #ifdef HAVE_AUDIOCD -#include +#include #endif #include "config.h" @@ -158,10 +158,8 @@ SongLoader::Result SongLoader::LoadAudioCD() { // Get number of tracks GstFormat fmt = gst_format_get_by_nick("track"); - GstFormat out_fmt = fmt; gint64 num_tracks = 0; - if (!gst_element_query_duration(cdda, &out_fmt, &num_tracks) || - out_fmt != fmt) { + if (!gst_element_query_duration(cdda, fmt, &num_tracks)) { qLog(Error) << "Error while querying cdda GstElement"; gst_object_unref(GST_OBJECT(cdda)); return Error; diff --git a/src/devices/cddadevice.h b/src/devices/cddadevice.h index 4e5b11604..d89221f07 100644 --- a/src/devices/cddadevice.h +++ b/src/devices/cddadevice.h @@ -22,7 +22,7 @@ // These must come after Qt includes (issue 3247) #include -#include +#include #include "connecteddevice.h" #include "core/song.h" diff --git a/src/devices/cddalister.h b/src/devices/cddalister.h index 47718826a..373ce4f2c 100644 --- a/src/devices/cddalister.h +++ b/src/devices/cddalister.h @@ -18,8 +18,6 @@ #ifndef CDDALISTER_H #define CDDALISTER_H -#include - #include #include "devicelister.h"