2016-06-17 01:25:40 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
|
|
|
|
#ifdef ENABLE_DISPMANX
|
|
|
|
#include <grabber/DispmanxWrapper.h>
|
|
|
|
#else
|
|
|
|
typedef QObject DispmanxWrapper;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ENABLE_V4L2
|
|
|
|
#include <grabber/V4L2Wrapper.h>
|
|
|
|
#else
|
|
|
|
typedef QObject V4L2Wrapper;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ENABLE_FB
|
|
|
|
#include <grabber/FramebufferWrapper.h>
|
|
|
|
#else
|
|
|
|
typedef QObject FramebufferWrapper;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ENABLE_AMLOGIC
|
|
|
|
#include <grabber/AmlogicWrapper.h>
|
|
|
|
#else
|
|
|
|
typedef QObject AmlogicWrapper;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef ENABLE_OSX
|
|
|
|
#include <grabber/OsxWrapper.h>
|
|
|
|
#else
|
|
|
|
typedef QObject OsxWrapper;
|
|
|
|
#endif
|
|
|
|
|
2016-06-19 00:56:47 +02:00
|
|
|
#include <utils/Logger.h>
|
|
|
|
|
2016-06-17 01:25:40 +02:00
|
|
|
#include <xbmcvideochecker/XBMCVideoChecker.h>
|
|
|
|
#include <jsonserver/JsonServer.h>
|
|
|
|
#include <protoserver/ProtoServer.h>
|
|
|
|
#include <boblightserver/BoblightServer.h>
|
2016-06-19 00:56:47 +02:00
|
|
|
#include <webconfig/WebConfig.h>
|
|
|
|
|
|
|
|
class HyperionDaemon : public QObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
HyperionDaemon(std::string configFile, QObject *parent=nullptr);
|
|
|
|
~HyperionDaemon();
|
|
|
|
|
|
|
|
void loadConfig(const std::string & configFile);
|
|
|
|
void run();
|
|
|
|
|
|
|
|
void startBootsequence();
|
|
|
|
void createXBMCVideoChecker();
|
|
|
|
void startNetworkServices();
|
2016-06-17 01:25:40 +02:00
|
|
|
|
2016-06-19 00:56:47 +02:00
|
|
|
// grabber creators
|
|
|
|
void createGrabberDispmanx();
|
|
|
|
void createGrabberV4L2();
|
|
|
|
void createGrabberAmlogic();
|
|
|
|
void createGrabberFramebuffer();
|
|
|
|
void createGrabberOsx();
|
2016-06-17 01:25:40 +02:00
|
|
|
|
2016-06-19 00:56:47 +02:00
|
|
|
private:
|
|
|
|
Logger* _log;
|
|
|
|
Json::Value _config;
|
|
|
|
XBMCVideoChecker* _xbmcVideoChecker;
|
|
|
|
JsonServer* _jsonServer;
|
|
|
|
ProtoServer* _protoServer;
|
|
|
|
BoblightServer* _boblightServer;
|
|
|
|
V4L2Wrapper* _v4l2Grabber;
|
|
|
|
DispmanxWrapper* _dispmanx;
|
|
|
|
AmlogicWrapper* _amlGrabber;
|
|
|
|
FramebufferWrapper* _fbGrabber;
|
|
|
|
OsxWrapper* _osxGrabber;
|
|
|
|
WebConfig* _webConfig;
|
|
|
|
};
|