1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-16 10:38:53 +01:00

Remove unused MoodbarPipeline::IsAvailable function

This commit is contained in:
Jonas Kvinge 2021-09-26 14:41:36 +02:00
parent ddfc9d911b
commit 1d3540dca6
2 changed files with 0 additions and 20 deletions

View File

@ -35,7 +35,6 @@
#include "ext/gstmoodbar/gstfastspectrum.h"
bool MoodbarPipeline::sIsAvailable = false;
const int MoodbarPipeline::kBands = 128;
MoodbarPipeline::MoodbarPipeline(const QUrl &local_filename, QObject *parent)
@ -48,22 +47,6 @@ MoodbarPipeline::MoodbarPipeline(const QUrl &local_filename, QObject *parent)
MoodbarPipeline::~MoodbarPipeline() { Cleanup(); }
bool MoodbarPipeline::IsAvailable() {
if (!sIsAvailable) {
GstElementFactory *factory = gst_element_factory_find("fftwspectrum");
if (!factory) {
return false;
}
gst_object_unref(factory);
sIsAvailable = true;
}
return sIsAvailable;
}
GstElement *MoodbarPipeline::CreateElement(const QString &factory_name) {
GstElement *ret = gst_element_factory_make(factory_name.toLatin1().constData(), nullptr);

View File

@ -39,8 +39,6 @@ class MoodbarPipeline : public QObject {
explicit MoodbarPipeline(const QUrl &local_filename, QObject *parent = nullptr);
~MoodbarPipeline() override;
static bool IsAvailable();
bool success() const { return success_; }
const QByteArray &data() const { return data_; }
@ -63,7 +61,6 @@ class MoodbarPipeline : public QObject {
static GstBusSyncReply BusCallbackSync(GstBus*, GstMessage *msg, gpointer data);
private:
static bool sIsAvailable;
static const int kBands;
QUrl local_filename_;