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:
parent
ddfc9d911b
commit
1d3540dca6
@ -35,7 +35,6 @@
|
|||||||
|
|
||||||
#include "ext/gstmoodbar/gstfastspectrum.h"
|
#include "ext/gstmoodbar/gstfastspectrum.h"
|
||||||
|
|
||||||
bool MoodbarPipeline::sIsAvailable = false;
|
|
||||||
const int MoodbarPipeline::kBands = 128;
|
const int MoodbarPipeline::kBands = 128;
|
||||||
|
|
||||||
MoodbarPipeline::MoodbarPipeline(const QUrl &local_filename, QObject *parent)
|
MoodbarPipeline::MoodbarPipeline(const QUrl &local_filename, QObject *parent)
|
||||||
@ -48,22 +47,6 @@ MoodbarPipeline::MoodbarPipeline(const QUrl &local_filename, QObject *parent)
|
|||||||
|
|
||||||
MoodbarPipeline::~MoodbarPipeline() { Cleanup(); }
|
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 *MoodbarPipeline::CreateElement(const QString &factory_name) {
|
||||||
|
|
||||||
GstElement *ret = gst_element_factory_make(factory_name.toLatin1().constData(), nullptr);
|
GstElement *ret = gst_element_factory_make(factory_name.toLatin1().constData(), nullptr);
|
||||||
|
@ -39,8 +39,6 @@ class MoodbarPipeline : public QObject {
|
|||||||
explicit MoodbarPipeline(const QUrl &local_filename, QObject *parent = nullptr);
|
explicit MoodbarPipeline(const QUrl &local_filename, QObject *parent = nullptr);
|
||||||
~MoodbarPipeline() override;
|
~MoodbarPipeline() override;
|
||||||
|
|
||||||
static bool IsAvailable();
|
|
||||||
|
|
||||||
bool success() const { return success_; }
|
bool success() const { return success_; }
|
||||||
const QByteArray &data() const { return data_; }
|
const QByteArray &data() const { return data_; }
|
||||||
|
|
||||||
@ -63,7 +61,6 @@ class MoodbarPipeline : public QObject {
|
|||||||
static GstBusSyncReply BusCallbackSync(GstBus*, GstMessage *msg, gpointer data);
|
static GstBusSyncReply BusCallbackSync(GstBus*, GstMessage *msg, gpointer data);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static bool sIsAvailable;
|
|
||||||
static const int kBands;
|
static const int kBands;
|
||||||
|
|
||||||
QUrl local_filename_;
|
QUrl local_filename_;
|
||||||
|
Loading…
Reference in New Issue
Block a user