Fix paths
- Use QStandardPaths - Load settings in StatusView widget - Update about - Remove redundant code - Temporary hide missing audiopanorama error as workaround for windows build
This commit is contained in:
@@ -33,14 +33,15 @@
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include <QTimer>
|
||||
#include <QRegExp>
|
||||
#include <QFile>
|
||||
#include <QSettings>
|
||||
#include <QCoreApplication>
|
||||
#include <QTimeLine>
|
||||
#include <QDir>
|
||||
#include <QStandardPaths>
|
||||
#include <QtConcurrentRun>
|
||||
#include <QSettings>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QRegExp>
|
||||
#include <QTimer>
|
||||
#include <QTimeLine>
|
||||
|
||||
#include "enginetype.h"
|
||||
#include "enginebase.h"
|
||||
@@ -169,7 +170,7 @@ void GstEngine::SetEnvironment() {
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN32) || defined(Q_OS_DARWIN)
|
||||
registry_filename = Utilities::GetConfigPath(Utilities::Path_GstreamerRegistry);
|
||||
registry_filename = QStandardPaths::writableLocation(QStandardPaths::AppLocalDataLocation) + QString("/gst-registry-%1-bin").arg(QCoreApplication::applicationVersion());
|
||||
#endif
|
||||
|
||||
if (!scanner_path.isEmpty()) Utilities::SetEnv("GST_PLUGIN_SCANNER", scanner_path);
|
||||
@@ -750,7 +751,7 @@ void GstEngine::NewMetaData(int pipeline_id, const Engine::SimpleMetaBundle &bun
|
||||
emit MetaData(bundle);
|
||||
}
|
||||
|
||||
GstElement *GstEngine::CreateElement(const QString &factoryName, GstElement *bin) {
|
||||
GstElement *GstEngine::CreateElement(const QString &factoryName, GstElement *bin, bool showerror) {
|
||||
|
||||
// Make a unique name
|
||||
QString name = factoryName + "-" + QString::number(next_element_id_++);
|
||||
@@ -758,7 +759,7 @@ GstElement *GstEngine::CreateElement(const QString &factoryName, GstElement *bin
|
||||
GstElement *element = gst_element_factory_make(factoryName.toUtf8().constData(), name.toUtf8().constData());
|
||||
|
||||
if (!element) {
|
||||
emit Error(QString("GStreamer could not create the element: %1. Please make sure that you have installed all necessary GStreamer plugins").arg(factoryName));
|
||||
if (showerror) emit Error(QString("GStreamer could not create the element: %1. Please make sure that you have installed all necessary GStreamer plugins").arg(factoryName));
|
||||
gst_object_unref(GST_OBJECT(bin));
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ class GstEngine : public Engine::Base, public BufferConsumer {
|
||||
|
||||
static bool ALSADeviceSupport(const QString &name);
|
||||
|
||||
GstElement *CreateElement(const QString &factoryName, GstElement *bin = 0);
|
||||
GstElement *CreateElement(const QString &factoryName, GstElement *bin = 0, bool showerror = true);
|
||||
|
||||
// BufferConsumer
|
||||
void ConsumeBuffer(GstBuffer *buffer, int pipeline_id);
|
||||
|
||||
@@ -230,7 +230,7 @@ bool GstEnginePipeline::InitAudioBin() {
|
||||
audio_queue = engine_->CreateElement("queue", audiobin_);
|
||||
equalizer_preamp_ = engine_->CreateElement("volume", audiobin_);
|
||||
equalizer_ = engine_->CreateElement("equalizer-nbands", audiobin_);
|
||||
stereo_panorama_ = engine_->CreateElement("audiopanorama", audiobin_);
|
||||
stereo_panorama_ = engine_->CreateElement("audiopanorama", audiobin_, false);
|
||||
volume_ = engine_->CreateElement("volume", audiobin_);
|
||||
audioscale_ = engine_->CreateElement("audioresample", audiobin_);
|
||||
convert = engine_->CreateElement("audioconvert", audiobin_);
|
||||
|
||||
Reference in New Issue
Block a user