Initialize gstreamer independent of witch engine is used

This commit is contained in:
Jonas Kvinge
2019-04-20 15:25:31 +02:00
parent ba76385a2f
commit 3ed6817ac9
10 changed files with 207 additions and 82 deletions

View File

@@ -38,6 +38,9 @@
#include "urlhandler.h"
#include "engine/engine_fwd.h"
#include "engine/enginetype.h"
#ifdef HAVE_GSTREAMER
#include "engine/gststartup.h"
#endif
#include "playlist/playlistitem.h"
class Application;
@@ -45,6 +48,8 @@ class Song;
class AnalyzerContainer;
class Equalizer;
using std::unique_ptr;
namespace Engine {
struct SimpleMetaBundle;
} // namespace Engine
@@ -183,6 +188,9 @@ class Player : public PlayerInterface {
void HandleAuthentication();
signals:
void EngineChanged(Engine::EngineType enginetype);
private slots:
void EngineStateChanged(Engine::State);
void EngineMetadataReceived(const Engine::SimpleMetaBundle &bundle);
@@ -207,6 +215,10 @@ class Player : public PlayerInterface {
private:
Application *app_;
std::unique_ptr<EngineBase> engine_;
#ifdef HAVE_GSTREAMER
GstStartup *gst_startup_;
#endif
AnalyzerContainer *analyzer_;
Equalizer *equalizer_;
@@ -214,7 +226,6 @@ class Player : public PlayerInterface {
PlaylistItemPtr current_item_;
std::unique_ptr<EngineBase> engine_;
Engine::TrackChangeFlags stream_change_type_;
Engine::State last_state_;
int nb_errors_received_;