Make static

This commit is contained in:
Jonas Kvinge
2021-06-22 13:41:38 +02:00
parent e3ab0c0192
commit 8c2b907ff5
89 changed files with 157 additions and 169 deletions

View File

@@ -47,7 +47,7 @@ class Chromaprinter {
QString CreateFingerprint();
private:
GstElement *CreateElement(const QString &factory_name, GstElement *bin = nullptr);
static GstElement *CreateElement(const QString &factory_name, GstElement *bin = nullptr);
static void NewPadCallback(GstElement*, GstPad *pad, gpointer data);
static GstFlowReturn NewBufferCallback(GstAppSink *app_sink, gpointer self);

View File

@@ -41,7 +41,7 @@ class GstElementDeleter : public QObject {
void DeleteElementLater(GstElement *element);
private slots:
void DeleteElement(GstElement *element);
static void DeleteElement(GstElement *element);
};
#endif // GSTELEMENTDELETER_H

View File

@@ -985,7 +985,7 @@ void GstEnginePipeline::TagMessageReceived(GstMessage *msg) {
}
QString GstEnginePipeline::ParseStrTag(GstTagList *list, const char *tag) const {
QString GstEnginePipeline::ParseStrTag(GstTagList *list, const char *tag) {
gchar *data = nullptr;
bool success = gst_tag_list_get_string(list, tag, &data);
@@ -999,7 +999,7 @@ QString GstEnginePipeline::ParseStrTag(GstTagList *list, const char *tag) const
}
guint GstEnginePipeline::ParseUIntTag(GstTagList *list, const char *tag) const {
guint GstEnginePipeline::ParseUIntTag(GstTagList *list, const char *tag) {
guint data = 0;
bool success = gst_tag_list_get_uint(list, tag, &data);

View File

@@ -161,8 +161,8 @@ class GstEnginePipeline : public QObject {
void StreamStatusMessageReceived(GstMessage*);
void StreamStartMessageReceived();
QString ParseStrTag(GstTagList *list, const char *tag) const;
guint ParseUIntTag(GstTagList *list, const char *tag) const;
static QString ParseStrTag(GstTagList *list, const char *tag);
static guint ParseUIntTag(GstTagList *list, const char *tag);
void UpdateVolume();
void UpdateStereoBalance();

View File

@@ -62,11 +62,7 @@ gpointer GstStartup::GLibMainLoopThreadFunc(gpointer) {
GstStartup::GstStartup(QObject *parent) : QObject(parent) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
initializing_ = QtConcurrent::run(&GstStartup::InitializeGStreamer, this);
#else
initializing_ = QtConcurrent::run(this, &GstStartup::InitializeGStreamer);
#endif
initializing_ = QtConcurrent::run(&GstStartup::InitializeGStreamer);
const QMetaObject *mo = QAbstractEventDispatcher::instance(qApp->thread())->metaObject();
if (mo && strcmp(mo->className(), "QEventDispatcherGlib") != 0 && strcmp(mo->superClass()->className(), "QEventDispatcherGlib") != 0) {

View File

@@ -42,8 +42,8 @@ class GstStartup : public QObject {
static GThread *kGThread;
static gpointer GLibMainLoopThreadFunc(gpointer);
void InitializeGStreamer();
void SetEnvironment();
static void InitializeGStreamer();
static void SetEnvironment();
QFuture<void> initializing_;

View File

@@ -75,7 +75,7 @@ class VLCEngine : public Engine::Base {
bool Initialized() const { return (instance_ && player_); }
uint position() const;
uint length() const;
bool CanDecode(const QUrl &url);
static bool CanDecode(const QUrl &url);
void AttachCallback(libvlc_event_manager_t *em, libvlc_event_type_t type, libvlc_callback_t callback);
static void StateChangedCallback(const libvlc_event_t *e, void *data);