mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
parent
de9ece5139
commit
138b7d9c94
@ -85,7 +85,7 @@ private slots:
|
|||||||
/// @param instance The index of instance
|
/// @param instance The index of instance
|
||||||
/// @param name The name of the instance, just available with H_CREATED
|
/// @param name The name of the instance, just available with H_CREATED
|
||||||
///
|
///
|
||||||
void handleInstanceStateChange(const instanceState &state, const quint8 &instance, const QString &name = QString());
|
void handleInstanceStateChange(const InstanceState &state, const quint8 &instance, const QString &name = QString());
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
///
|
///
|
||||||
|
@ -18,7 +18,7 @@ public:
|
|||||||
/// @param[in] height The heigth of the captured screenshot
|
/// @param[in] height The heigth of the captured screenshot
|
||||||
///
|
///
|
||||||
AmlogicGrabber(const unsigned width, const unsigned height);
|
AmlogicGrabber(const unsigned width, const unsigned height);
|
||||||
~AmlogicGrabber();
|
~AmlogicGrabber() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Captures a single snapshot of the display and writes the data to the given image. The
|
/// Captures a single snapshot of the display and writes the data to the given image. The
|
||||||
|
@ -20,11 +20,6 @@ public:
|
|||||||
///
|
///
|
||||||
AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeight);
|
AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeight);
|
||||||
|
|
||||||
///
|
|
||||||
/// Destructor of this dispmanx frame grabber. Releases any claimed resources.
|
|
||||||
///
|
|
||||||
virtual ~AmlogicWrapper() {};
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
///
|
///
|
||||||
/// Performs a single frame grab and computes the led-colors
|
/// Performs a single frame grab and computes the led-colors
|
||||||
|
@ -27,7 +27,7 @@ public:
|
|||||||
/// @param[in] height The heigth of the captured screenshot
|
/// @param[in] height The heigth of the captured screenshot
|
||||||
///
|
///
|
||||||
DispmanxFrameGrabber(const unsigned width, const unsigned height);
|
DispmanxFrameGrabber(const unsigned width, const unsigned height);
|
||||||
~DispmanxFrameGrabber();
|
~DispmanxFrameGrabber() override;
|
||||||
|
|
||||||
|
|
||||||
///
|
///
|
||||||
|
@ -36,5 +36,4 @@ int vc_dispmanx_resource_read_data(DISPMANX_RESOURCE_HANDLE_T vc_resource, VC_R
|
|||||||
void vc_dispmanx_rect_set(VC_RECT_T *rectangle, int left, int top, int width, int height);
|
void vc_dispmanx_rect_set(VC_RECT_T *rectangle, int left, int top, int width, int height);
|
||||||
int vc_dispmanx_snapshot(int, DISPMANX_RESOURCE_HANDLE_T resource, int vc_flags);
|
int vc_dispmanx_snapshot(int, DISPMANX_RESOURCE_HANDLE_T resource, int vc_flags);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -22,11 +22,6 @@ public:
|
|||||||
///
|
///
|
||||||
DispmanxWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
|
DispmanxWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
|
||||||
|
|
||||||
///
|
|
||||||
/// Destructor of this dispmanx frame grabber. Releases any claimed resources.
|
|
||||||
///
|
|
||||||
virtual ~DispmanxWrapper() {};
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
///
|
///
|
||||||
/// Performs a single frame grab and computes the led-colors
|
/// Performs a single frame grab and computes the led-colors
|
||||||
|
@ -18,7 +18,6 @@ public:
|
|||||||
/// @param[in] height The heigth of the captured screenshot
|
/// @param[in] height The heigth of the captured screenshot
|
||||||
///
|
///
|
||||||
FramebufferFrameGrabber(const QString & device, const unsigned width, const unsigned height);
|
FramebufferFrameGrabber(const QString & device, const unsigned width, const unsigned height);
|
||||||
~FramebufferFrameGrabber();
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Captures a single snapshot of the display and writes the data to the given image. The
|
/// Captures a single snapshot of the display and writes the data to the given image. The
|
||||||
@ -36,12 +35,6 @@ public:
|
|||||||
virtual void setDevicePath(const QString& path);
|
virtual void setDevicePath(const QString& path);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// Framebuffer file descriptor
|
|
||||||
int _fbfd;
|
|
||||||
|
|
||||||
/// Pointer to framebuffer
|
|
||||||
unsigned char * _fbp;
|
|
||||||
|
|
||||||
/// Framebuffer device e.g. /dev/fb0
|
/// Framebuffer device e.g. /dev/fb0
|
||||||
QString _fbDevice;
|
QString _fbDevice;
|
||||||
};
|
};
|
||||||
|
@ -22,11 +22,6 @@ public:
|
|||||||
///
|
///
|
||||||
FramebufferWrapper(const QString & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
|
FramebufferWrapper(const QString & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
|
||||||
|
|
||||||
///
|
|
||||||
/// Destructor of this framebuffer frame grabber. Releases any claimed resources.
|
|
||||||
///
|
|
||||||
virtual ~FramebufferWrapper() {};
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
///
|
///
|
||||||
/// Performs a single frame grab and computes the led-colors
|
/// Performs a single frame grab and computes the led-colors
|
||||||
|
@ -25,7 +25,7 @@ public:
|
|||||||
/// @param[in] height The heigth of the captured screenshot
|
/// @param[in] height The heigth of the captured screenshot
|
||||||
///
|
///
|
||||||
OsxFrameGrabber(const unsigned display, const unsigned width, const unsigned height);
|
OsxFrameGrabber(const unsigned display, const unsigned width, const unsigned height);
|
||||||
~OsxFrameGrabber();
|
~OsxFrameGrabber() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Captures a single snapshot of the display and writes the data to the given image. The
|
/// Captures a single snapshot of the display and writes the data to the given image. The
|
||||||
|
@ -22,11 +22,6 @@ public:
|
|||||||
///
|
///
|
||||||
OsxWrapper(const unsigned display, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
|
OsxWrapper(const unsigned display, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
|
||||||
|
|
||||||
///
|
|
||||||
/// Destructor of this osx frame grabber. Releases any claimed resources.
|
|
||||||
///
|
|
||||||
virtual ~OsxWrapper() {};
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
///
|
///
|
||||||
/// Performs a single frame grab and computes the led-colors
|
/// Performs a single frame grab and computes the led-colors
|
||||||
|
@ -17,7 +17,7 @@ public:
|
|||||||
|
|
||||||
QtGrabber(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, int display);
|
QtGrabber(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, int display);
|
||||||
|
|
||||||
virtual ~QtGrabber();
|
~QtGrabber() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Captures a single snapshot of the display and writes the data to the given image. The
|
/// Captures a single snapshot of the display and writes the data to the given image. The
|
||||||
|
@ -21,11 +21,6 @@ public:
|
|||||||
///
|
///
|
||||||
QtWrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, int display, const unsigned updateRate_Hz);
|
QtWrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, int display, const unsigned updateRate_Hz);
|
||||||
|
|
||||||
///
|
|
||||||
/// Destructor of this qt frame grabber. Releases any claimed resources.
|
|
||||||
///
|
|
||||||
virtual ~QtWrapper() {};
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
///
|
///
|
||||||
/// Performs a single frame grab and computes the led-colors
|
/// Performs a single frame grab and computes the led-colors
|
||||||
|
@ -16,7 +16,6 @@ public:
|
|||||||
VideoStandard videoStandard,
|
VideoStandard videoStandard,
|
||||||
PixelFormat pixelFormat,
|
PixelFormat pixelFormat,
|
||||||
int pixelDecimation );
|
int pixelDecimation );
|
||||||
virtual ~V4L2Wrapper() {};
|
|
||||||
|
|
||||||
bool getSignalDetectionEnable();
|
bool getSignalDetectionEnable();
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ public:
|
|||||||
|
|
||||||
X11Grabber(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation);
|
X11Grabber(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation);
|
||||||
|
|
||||||
virtual ~X11Grabber();
|
~X11Grabber() override;
|
||||||
|
|
||||||
bool Setup();
|
bool Setup();
|
||||||
|
|
||||||
|
@ -26,11 +26,6 @@ public:
|
|||||||
///
|
///
|
||||||
X11Wrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, const unsigned updateRate_Hz);
|
X11Wrapper(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation, const unsigned updateRate_Hz);
|
||||||
|
|
||||||
///
|
|
||||||
/// Destructor of this framebuffer frame grabber. Releases any claimed resources.
|
|
||||||
///
|
|
||||||
virtual ~X11Wrapper() {};
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
///
|
///
|
||||||
/// Performs a single frame grab and computes the led-colors
|
/// Performs a single frame grab and computes the led-colors
|
||||||
|
@ -17,7 +17,6 @@ class CaptureCont : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
CaptureCont(Hyperion* hyperion);
|
CaptureCont(Hyperion* hyperion);
|
||||||
~CaptureCont();
|
|
||||||
|
|
||||||
void setSystemCaptureEnable(const bool& enable);
|
void setSystemCaptureEnable(const bool& enable);
|
||||||
void setV4LCaptureEnable(const bool& enable);
|
void setV4LCaptureEnable(const bool& enable);
|
||||||
|
@ -23,7 +23,6 @@ class Grabber : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
Grabber(QString grabberName = "", int width=0, int height=0, int cropLeft=0, int cropRight=0, int cropTop=0, int cropBottom=0);
|
Grabber(QString grabberName = "", int width=0, int height=0, int cropLeft=0, int cropRight=0, int cropTop=0, int cropBottom=0);
|
||||||
virtual ~Grabber();
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Set the video mode (2D/3D)
|
/// Set the video mode (2D/3D)
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
// stl includes
|
// stl includes
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <QMap>
|
|
||||||
|
|
||||||
// QT includes
|
// QT includes
|
||||||
#include <QString>
|
#include <QString>
|
||||||
@ -11,6 +10,7 @@
|
|||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QJsonValue>
|
#include <QJsonValue>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
|
#include <QMap>
|
||||||
#include <QMutex>
|
#include <QMutex>
|
||||||
|
|
||||||
// hyperion-utils includes
|
// hyperion-utils includes
|
||||||
@ -59,32 +59,25 @@ class Hyperion : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
/// Type definition of the info structure used by the priority muxer
|
/// Type definition of the info structure used by the priority muxer
|
||||||
typedef PriorityMuxer::InputInfo InputInfo;
|
using InputInfo = PriorityMuxer::InputInfo;
|
||||||
///
|
|
||||||
/// RGB-Color channel enumeration
|
|
||||||
///
|
|
||||||
enum RgbChannel
|
|
||||||
{
|
|
||||||
BLACK, WHITE, RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW, INVALID
|
|
||||||
};
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Destructor; cleans up resources
|
/// Destructor; cleans up resources
|
||||||
///
|
///
|
||||||
virtual ~Hyperion();
|
~Hyperion() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// free all alocated objects, should be called only from constructor or before restarting hyperion
|
/// free all alocated objects, should be called only from constructor or before restarting hyperion
|
||||||
///
|
///
|
||||||
void freeObjects(bool emitCloseSignal=false);
|
void freeObjects(bool emitCloseSignal=false);
|
||||||
|
|
||||||
ImageProcessor* getImageProcessor() { return _imageProcessor; };
|
ImageProcessor* getImageProcessor() { return _imageProcessor; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get instance index of this instance
|
/// @brief Get instance index of this instance
|
||||||
/// @return The index of this instance
|
/// @return The index of this instance
|
||||||
///
|
///
|
||||||
const quint8 & getInstanceIndex() { return _instIndex; };
|
const quint8 & getInstanceIndex() { return _instIndex; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Returns the number of attached leds
|
/// Returns the number of attached leds
|
||||||
@ -94,7 +87,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// @brief Return the size of led grid
|
/// @brief Return the size of led grid
|
||||||
///
|
///
|
||||||
QSize getLedGridSize() const { return _ledGridSize; };
|
QSize getLedGridSize() const { return _ledGridSize; }
|
||||||
|
|
||||||
/// gets the methode how image is maped to leds
|
/// gets the methode how image is maped to leds
|
||||||
const int & getLedMappingType();
|
const int & getLedMappingType();
|
||||||
@ -110,8 +103,8 @@ public:
|
|||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the current active led device
|
/// @brief Get the current active led device
|
||||||
/// @return The device nam
|
/// @return The device name
|
||||||
/// e
|
///
|
||||||
const QString & getActiveDeviceType();
|
const QString & getActiveDeviceType();
|
||||||
|
|
||||||
///
|
///
|
||||||
@ -206,7 +199,7 @@ public slots:
|
|||||||
/// @return EffectEngine instance pointer
|
/// @return EffectEngine instance pointer
|
||||||
///
|
///
|
||||||
|
|
||||||
EffectEngine* getEffectEngineInstance() { return _effectEngine; };
|
EffectEngine* getEffectEngineInstance() { return _effectEngine; }
|
||||||
///
|
///
|
||||||
/// @brief Save an effect
|
/// @brief Save an effect
|
||||||
/// @param obj The effect args
|
/// @param obj The effect args
|
||||||
@ -259,7 +252,7 @@ public slots:
|
|||||||
/// @brief Get a pointer to the priorityMuxer instance
|
/// @brief Get a pointer to the priorityMuxer instance
|
||||||
/// @return PriorityMuxer instance pointer
|
/// @return PriorityMuxer instance pointer
|
||||||
///
|
///
|
||||||
PriorityMuxer* getMuxerInstance() { return &_muxer; };
|
PriorityMuxer* getMuxerInstance() { return &_muxer; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief enable/disable automatic/priorized source selection
|
/// @brief enable/disable automatic/priorized source selection
|
||||||
@ -335,7 +328,7 @@ public slots:
|
|||||||
/// @brief Get the component Register
|
/// @brief Get the component Register
|
||||||
/// return Component register pointer
|
/// return Component register pointer
|
||||||
///
|
///
|
||||||
ComponentRegister& getComponentRegister() { return _componentRegister; };
|
ComponentRegister& getComponentRegister() { return _componentRegister; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Called from components to update their current state. DO NOT CALL FROM USERS
|
/// @brief Called from components to update their current state. DO NOT CALL FROM USERS
|
||||||
@ -489,7 +482,7 @@ private slots:
|
|||||||
///
|
///
|
||||||
/// @brief Apply new videoMode from Daemon to _currVideoMode
|
/// @brief Apply new videoMode from Daemon to _currVideoMode
|
||||||
///
|
///
|
||||||
void handleNewVideoMode(const VideoMode& mode) { _currVideoMode = mode; };
|
void handleNewVideoMode(const VideoMode& mode) { _currVideoMode = mode; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
friend class HyperionDaemon;
|
friend class HyperionDaemon;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
class Hyperion;
|
class Hyperion;
|
||||||
class InstanceTable;
|
class InstanceTable;
|
||||||
|
|
||||||
enum instanceState{
|
enum class InstanceState{
|
||||||
H_STARTED,
|
H_STARTED,
|
||||||
H_ON_STOP,
|
H_ON_STOP,
|
||||||
H_STOPPED,
|
H_STOPPED,
|
||||||
@ -29,7 +29,7 @@ class HyperionIManager : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// global instance pointer
|
// global instance pointer
|
||||||
static HyperionIManager* getInstance() { return HIMinstance; };
|
static HyperionIManager* getInstance() { return HIMinstance; }
|
||||||
static HyperionIManager* HIMinstance;
|
static HyperionIManager* HIMinstance;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
@ -38,7 +38,7 @@ public slots:
|
|||||||
/// @param inst The instance to check
|
/// @param inst The instance to check
|
||||||
/// @return True when running else false
|
/// @return True when running else false
|
||||||
///
|
///
|
||||||
bool IsInstanceRunning(const quint8& inst) { return _runningInstances.contains(inst); };
|
bool IsInstanceRunning(const quint8& inst) { return _runningInstances.contains(inst); }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get a Hyperion instance by index
|
/// @brief Get a Hyperion instance by index
|
||||||
@ -103,7 +103,7 @@ signals:
|
|||||||
/// @param instance The index of instance
|
/// @param instance The index of instance
|
||||||
/// @param name The name of the instance, just available with H_CREATED
|
/// @param name The name of the instance, just available with H_CREATED
|
||||||
///
|
///
|
||||||
void instanceStateChanged(const instanceState& state, const quint8& instance, const QString& name = QString());
|
void instanceStateChanged(const InstanceState& state, const quint8& instance, const QString& name = QString());
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Emits whenever something changes, the lazy version of instanceStateChanged (- H_ON_STOP) + saveName() emit
|
/// @brief Emits whenever something changes, the lazy version of instanceStateChanged (- H_ON_STOP) + saveName() emit
|
||||||
@ -172,7 +172,7 @@ private:
|
|||||||
/// @brief check if a instance is allowed for management. Instance 0 represents the root instance
|
/// @brief check if a instance is allowed for management. Instance 0 represents the root instance
|
||||||
/// @apram inst The instance to check
|
/// @apram inst The instance to check
|
||||||
///
|
///
|
||||||
bool isInstAllowed(const quint8& inst) { return (inst > 0); };
|
bool isInstAllowed(const quint8& inst) { return (inst > 0); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Logger* _log;
|
Logger* _log;
|
||||||
|
@ -40,6 +40,7 @@ inline QString colorOrderToString(const ColorOrder colorOrder)
|
|||||||
return "not-a-colororder";
|
return "not-a-colororder";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline ColorOrder stringToColorOrder(const QString & order)
|
inline ColorOrder stringToColorOrder(const QString & order)
|
||||||
{
|
{
|
||||||
if (order == "rgb")
|
if (order == "rgb")
|
||||||
|
@ -36,7 +36,7 @@ class LedDevice : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
LedDevice(const QJsonObject& config = QJsonObject(), QObject* parent = nullptr);
|
LedDevice(const QJsonObject& config = QJsonObject(), QObject* parent = nullptr);
|
||||||
virtual ~LedDevice();
|
~LedDevice() override;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get color order of device
|
/// @brief Get color order of device
|
||||||
@ -92,7 +92,7 @@ public slots:
|
|||||||
///
|
///
|
||||||
/// Is called on thread start, all construction tasks and init should run here
|
/// Is called on thread start, all construction tasks and init should run here
|
||||||
///
|
///
|
||||||
virtual void start() { _deviceReady = (open() == 0 ? true : false);}
|
virtual void start() { _deviceReady = (open() == 0); }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Update the RGB-Color values to the leds.
|
/// Update the RGB-Color values to the leds.
|
||||||
@ -186,7 +186,6 @@ protected:
|
|||||||
/// Time a device requires mandatorily between two writes
|
/// Time a device requires mandatorily between two writes
|
||||||
int _latchTime_ms;
|
int _latchTime_ms;
|
||||||
|
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
|
|
||||||
/// Write the last data to the leds again
|
/// Write the last data to the leds again
|
||||||
|
@ -19,7 +19,7 @@ class LedDeviceWrapper : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit LedDeviceWrapper(Hyperion* hyperion);
|
explicit LedDeviceWrapper(Hyperion* hyperion);
|
||||||
~LedDeviceWrapper();
|
~LedDeviceWrapper() override;
|
||||||
///
|
///
|
||||||
/// @brief Contructs a new LedDevice, moves to thread and starts
|
/// @brief Contructs a new LedDevice, moves to thread and starts
|
||||||
/// @param config With the given config
|
/// @param config With the given config
|
||||||
|
@ -22,7 +22,7 @@ class ProtoServer : public QObject
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
ProtoServer(const QJsonDocument& config, QObject* parent = nullptr);
|
ProtoServer(const QJsonDocument& config, QObject* parent = nullptr);
|
||||||
~ProtoServer();
|
~ProtoServer() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
///
|
///
|
||||||
|
@ -50,23 +50,23 @@ private:
|
|||||||
///
|
///
|
||||||
/// @brief Build http url for current ip:port/desc.xml
|
/// @brief Build http url for current ip:port/desc.xml
|
||||||
///
|
///
|
||||||
const QString getDescAddress();
|
QString getDescAddress() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the base address
|
/// @brief Get the base address
|
||||||
///
|
///
|
||||||
const QString getBaseAddress();
|
QString getBaseAddress() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Build the ssdp description (description.xml)
|
/// @brief Build the ssdp description (description.xml)
|
||||||
///
|
///
|
||||||
const QString buildDesc();
|
QString buildDesc() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Get the local address of interface
|
/// @brief Get the local address of interface
|
||||||
/// @return the address, might be empty
|
/// @return the address, might be empty
|
||||||
///
|
///
|
||||||
const QString getLocalAddress();
|
QString getLocalAddress() const;
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Send alive/byebye message based on _deviceList
|
/// @brief Send alive/byebye message based on _deviceList
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
struct ColorArgb;
|
|
||||||
|
|
||||||
struct ColorArgb
|
struct ColorArgb
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -49,4 +47,3 @@ inline std::ostream& operator<<(std::ostream& os, const ColorArgb& color)
|
|||||||
os << "{" << unsigned(color.alpha) << "," << unsigned(color.red) << "," << unsigned(color.green) << "," << unsigned(color.blue) << "}";
|
os << "{" << unsigned(color.alpha) << "," << unsigned(color.red) << "," << unsigned(color.green) << "," << unsigned(color.blue) << "}";
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
struct ColorBgr;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Plain-Old-Data structure containing the red-green-blue color specification. Size of the
|
/// Plain-Old-Data structure containing the red-green-blue color specification. Size of the
|
||||||
/// structure is exactly 3-bytes for easy writing to led-device
|
/// structure is exactly 3-bytes for easy writing to led-device
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
|
|
||||||
#include <QTextStream>
|
#include <QTextStream>
|
||||||
|
|
||||||
struct ColorRgb;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Plain-Old-Data structure containing the red-green-blue color specification. Size of the
|
/// Plain-Old-Data structure containing the red-green-blue color specification. Size of the
|
||||||
/// structure is exactly 3-bytes for easy writing to led-device
|
/// structure is exactly 3-bytes for easy writing to led-device
|
||||||
@ -87,4 +85,3 @@ inline bool operator>=(const ColorRgb & lhs, const ColorRgb & rhs)
|
|||||||
{
|
{
|
||||||
return (lhs.red >= rhs.red) && (lhs.green >= rhs.green) && (lhs.blue >= rhs.blue);
|
return (lhs.red >= rhs.red) && (lhs.green >= rhs.green) && (lhs.blue >= rhs.blue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
|
|
||||||
struct ColorRgba;
|
|
||||||
|
|
||||||
struct ColorRgba
|
struct ColorRgba
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -49,4 +47,3 @@ inline std::ostream& operator<<(std::ostream& os, const ColorRgba& color)
|
|||||||
os << "{" << unsigned(color.alpha) << "," << unsigned(color.red) << "," << unsigned(color.green) << "," << unsigned(color.blue) << "}";
|
os << "{" << unsigned(color.alpha) << "," << unsigned(color.red) << "," << unsigned(color.green) << "," << unsigned(color.blue) << "}";
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,8 +4,6 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
struct ColorRgbw;
|
|
||||||
|
|
||||||
///
|
///
|
||||||
/// Plain-Old-Data structure containing the red-green-blue color specification. Size of the
|
/// Plain-Old-Data structure containing the red-green-blue color specification. Size of the
|
||||||
/// structure is exactly 3-bytes for easy writing to led-device
|
/// structure is exactly 3-bytes for easy writing to led-device
|
||||||
|
@ -67,7 +67,7 @@ inline const char* componentToIdString(Components c)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
inline Components stringToComponent(QString component)
|
inline Components stringToComponent(QString component)
|
||||||
{
|
{
|
||||||
component = component.toUpper();
|
component = component.toUpper();
|
||||||
if (component == "ALL") return COMP_ALL;
|
if (component == "ALL") return COMP_ALL;
|
||||||
|
@ -10,8 +10,8 @@
|
|||||||
|
|
||||||
namespace FileUtils {
|
namespace FileUtils {
|
||||||
|
|
||||||
QString getBaseName(QString sourceFile);
|
QString getBaseName(QString sourceFile);
|
||||||
QString getDirName(QString sourceFile);
|
QString getDirName(QString sourceFile);
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief remove directory recursive given by path
|
/// @brief remove directory recursive given by path
|
||||||
|
@ -21,7 +21,7 @@ public:
|
|||||||
return & instance;
|
return & instance;
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
GlobalSignals() {}
|
GlobalSignals() = default;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GlobalSignals(GlobalSignals const&) = delete;
|
GlobalSignals(GlobalSignals const&) = delete;
|
||||||
|
@ -21,7 +21,7 @@ For more profiler function see the macros listed below
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef ENABLE_PROFILER
|
#ifndef ENABLE_PROFILER
|
||||||
#error "Profiler is not for productive code, enable it via cmake or remove header include"
|
#error "Profiler is not for production code, enable it via cmake or remove header include"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// profiler
|
// profiler
|
||||||
@ -50,4 +50,3 @@ private:
|
|||||||
unsigned int _blockId;
|
unsigned int _blockId;
|
||||||
clock_t _startTime;
|
clock_t _startTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -26,11 +26,6 @@ public:
|
|||||||
///
|
///
|
||||||
RgbTransform(double gammaR, double gammaG, double gammaB, double backlightThreshold, bool backlightColored, uint8_t brightness, uint8_t brightnessCompensation);
|
RgbTransform(double gammaR, double gammaG, double gammaB, double backlightThreshold, bool backlightColored, uint8_t brightness, uint8_t brightnessCompensation);
|
||||||
|
|
||||||
///
|
|
||||||
/// Destructor
|
|
||||||
///
|
|
||||||
~RgbTransform();
|
|
||||||
|
|
||||||
/// @return The current red gamma value
|
/// @return The current red gamma value
|
||||||
double getGammaR() const;
|
double getGammaR() const;
|
||||||
|
|
||||||
|
@ -20,7 +20,6 @@ public:
|
|||||||
QString domainName;
|
QString domainName;
|
||||||
};
|
};
|
||||||
|
|
||||||
~SysInfo();
|
|
||||||
static HyperionSysInfo get();
|
static HyperionSysInfo get();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -34,15 +34,15 @@ class WebServer : public QObject {
|
|||||||
public:
|
public:
|
||||||
WebServer (const QJsonDocument& config, const bool& useSsl, QObject * parent = 0);
|
WebServer (const QJsonDocument& config, const bool& useSsl, QObject * parent = 0);
|
||||||
|
|
||||||
virtual ~WebServer (void);
|
~WebServer () override;
|
||||||
|
|
||||||
void start();
|
void start();
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
quint16 getPort() { return _port; };
|
quint16 getPort() const { return _port; }
|
||||||
|
|
||||||
/// check if server has been inited
|
/// check if server has been inited
|
||||||
bool isInited() { return _inited; };
|
bool isInited() const { return _inited; }
|
||||||
|
|
||||||
///
|
///
|
||||||
/// @brief Set a new description, if empty the description is NotFound for clients
|
/// @brief Set a new description, if empty the description is NotFound for clients
|
||||||
|
@ -1526,11 +1526,11 @@ void JsonAPI::handleTokenResponse(const bool &success, const QString &token, con
|
|||||||
sendErrorReply("Token request timeout or denied", cmd, 5);
|
sendErrorReply("Token request timeout or denied", cmd, 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
void JsonAPI::handleInstanceStateChange(const instanceState &state, const quint8 &instance, const QString &name)
|
void JsonAPI::handleInstanceStateChange(const InstanceState &state, const quint8 &instance, const QString &name)
|
||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case H_ON_STOP:
|
case InstanceState::H_ON_STOP:
|
||||||
if (_hyperion->getInstanceIndex() == instance)
|
if (_hyperion->getInstanceIndex() == instance)
|
||||||
{
|
{
|
||||||
handleInstanceSwitch();
|
handleInstanceSwitch();
|
||||||
|
@ -223,7 +223,7 @@ void JsonCB::handlePriorityUpdate()
|
|||||||
activePriorities.removeAll(255);
|
activePriorities.removeAll(255);
|
||||||
int currentPriority = _prioMuxer->getCurrentPriority();
|
int currentPriority = _prioMuxer->getCurrentPriority();
|
||||||
|
|
||||||
foreach (int priority, activePriorities) {
|
for (int priority : activePriorities) {
|
||||||
const Hyperion::InputInfo priorityInfo = _prioMuxer->getInputInfo(priority);
|
const Hyperion::InputInfo priorityInfo = _prioMuxer->getInputInfo(priority);
|
||||||
QJsonObject item;
|
QJsonObject item;
|
||||||
item["priority"] = priority;
|
item["priority"] = priority;
|
||||||
|
@ -30,7 +30,7 @@ public:
|
|||||||
///
|
///
|
||||||
/// Destructor
|
/// Destructor
|
||||||
///
|
///
|
||||||
~BoblightClientConnection();
|
~BoblightClientConnection() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
///
|
///
|
||||||
|
@ -59,9 +59,8 @@ void BoblightServer::stop()
|
|||||||
if ( ! _server->isListening() )
|
if ( ! _server->isListening() )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
foreach (BoblightClientConnection * connection, _openConnections) {
|
qDeleteAll(_openConnections);
|
||||||
delete connection;
|
|
||||||
}
|
|
||||||
_server->close();
|
_server->close();
|
||||||
|
|
||||||
Info(_log, "Stopped");
|
Info(_log, "Stopped");
|
||||||
|
@ -12,7 +12,7 @@ BonjourBrowserWrapper* BonjourBrowserWrapper::instance = nullptr;
|
|||||||
BonjourBrowserWrapper::BonjourBrowserWrapper(QObject * parent)
|
BonjourBrowserWrapper::BonjourBrowserWrapper(QObject * parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
, _bonjourResolver(new BonjourServiceResolver(this))
|
, _bonjourResolver(new BonjourServiceResolver(this))
|
||||||
, _timerBonjourResolver( new QTimer(this))
|
, _timerBonjourResolver(new QTimer(this))
|
||||||
{
|
{
|
||||||
// register meta
|
// register meta
|
||||||
qRegisterMetaType<QMap<QString,BonjourRecord>>("QMap<QString,BonjourRecord>");
|
qRegisterMetaType<QMap<QString,BonjourRecord>>("QMap<QString,BonjourRecord>");
|
||||||
|
@ -22,7 +22,7 @@ bool ColorsOption::validate(Parser & parser, QString & value)
|
|||||||
QRegularExpressionMatch match = hexRe.match(value);
|
QRegularExpressionMatch match = hexRe.match(value);
|
||||||
if(match.hasMatch())
|
if(match.hasMatch())
|
||||||
{
|
{
|
||||||
Q_FOREACH(const QString m, match.capturedTexts())
|
for(const QString m : match.capturedTexts())
|
||||||
{
|
{
|
||||||
_colors.push_back(QColor(QString("#%1").arg(m)));
|
_colors.push_back(QColor(QString("#%1").arg(m)));
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,7 @@ bool Parser::parse(const QStringList &arguments)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Q_FOREACH(Option * option, _options)
|
for(Option * option : _options)
|
||||||
{
|
{
|
||||||
QString value = this->value(*option);
|
QString value = this->value(*option);
|
||||||
if (!option->validate(*this, value)) {
|
if (!option->validate(*this, value)) {
|
||||||
|
@ -28,7 +28,6 @@ EffectEngine::EffectEngine(Hyperion * hyperion)
|
|||||||
, _log(Logger::getInstance("EFFECTENGINE"))
|
, _log(Logger::getInstance("EFFECTENGINE"))
|
||||||
, _effectFileHandler(EffectFileHandler::getInstance())
|
, _effectFileHandler(EffectFileHandler::getInstance())
|
||||||
{
|
{
|
||||||
|
|
||||||
Q_INIT_RESOURCE(EffectEngine);
|
Q_INIT_RESOURCE(EffectEngine);
|
||||||
qRegisterMetaType<hyperion::Components>("hyperion::Components");
|
qRegisterMetaType<hyperion::Components>("hyperion::Components");
|
||||||
|
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include <linux/fb.h>
|
#include <linux/fb.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
#include <cstring>
|
||||||
|
|
||||||
// STL includes
|
// STL includes
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -14,17 +15,11 @@
|
|||||||
|
|
||||||
FramebufferFrameGrabber::FramebufferFrameGrabber(const QString & device, const unsigned width, const unsigned height)
|
FramebufferFrameGrabber::FramebufferFrameGrabber(const QString & device, const unsigned width, const unsigned height)
|
||||||
: Grabber("FRAMEBUFFERGRABBER", width, height)
|
: Grabber("FRAMEBUFFERGRABBER", width, height)
|
||||||
, _fbfd(0)
|
|
||||||
, _fbp(0)
|
|
||||||
, _fbDevice()
|
, _fbDevice()
|
||||||
{
|
{
|
||||||
setDevicePath(device);
|
setDevicePath(device);
|
||||||
}
|
}
|
||||||
|
|
||||||
FramebufferFrameGrabber::~FramebufferFrameGrabber()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
int FramebufferFrameGrabber::grabFrame(Image<ColorRgb> & image)
|
int FramebufferFrameGrabber::grabFrame(Image<ColorRgb> & image)
|
||||||
{
|
{
|
||||||
if (!_enabled) return 0;
|
if (!_enabled) return 0;
|
||||||
@ -34,10 +29,15 @@ int FramebufferFrameGrabber::grabFrame(Image<ColorRgb> & image)
|
|||||||
PixelFormat pixelFormat;
|
PixelFormat pixelFormat;
|
||||||
|
|
||||||
/* Open the framebuffer device */
|
/* Open the framebuffer device */
|
||||||
_fbfd = open(QSTRING_CSTR(_fbDevice), O_RDONLY);
|
int fbfd = open(QSTRING_CSTR(_fbDevice), O_RDONLY);
|
||||||
|
if (fbfd == -1)
|
||||||
|
{
|
||||||
|
Error(_log, "Error opening %s, %s : ", QSTRING_CSTR(_fbDevice), std::strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* get variable screen information */
|
/* get variable screen information */
|
||||||
ioctl (_fbfd, FBIOGET_VSCREENINFO, &vinfo);
|
ioctl (fbfd, FBIOGET_VSCREENINFO, &vinfo);
|
||||||
|
|
||||||
bytesPerPixel = vinfo.bits_per_pixel / 8;
|
bytesPerPixel = vinfo.bits_per_pixel / 8;
|
||||||
capSize = vinfo.xres * vinfo.yres * bytesPerPixel;
|
capSize = vinfo.xres * vinfo.yres * bytesPerPixel;
|
||||||
@ -53,24 +53,28 @@ int FramebufferFrameGrabber::grabFrame(Image<ColorRgb> & image)
|
|||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
Error(_log, "Unknown pixel format: %d bits per pixel", vinfo.bits_per_pixel);
|
Error(_log, "Unknown pixel format: %d bits per pixel", vinfo.bits_per_pixel);
|
||||||
close(_fbfd);
|
close(fbfd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* map the device to memory */
|
/* map the device to memory */
|
||||||
_fbp = (unsigned char*)mmap(0, capSize, PROT_READ, MAP_PRIVATE | MAP_NORESERVE, _fbfd, 0);
|
unsigned char * fbp = (unsigned char*)mmap(0, capSize, PROT_READ, MAP_PRIVATE | MAP_NORESERVE, fbfd, 0);
|
||||||
|
if (fbp == MAP_FAILED) {
|
||||||
|
Error(_log, "Error mapping %s, %s : ", QSTRING_CSTR(_fbDevice), std::strerror(errno));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
_imageResampler.setHorizontalPixelDecimation(vinfo.xres/_width);
|
_imageResampler.setHorizontalPixelDecimation(vinfo.xres/_width);
|
||||||
_imageResampler.setVerticalPixelDecimation(vinfo.yres/_height);
|
_imageResampler.setVerticalPixelDecimation(vinfo.yres/_height);
|
||||||
_imageResampler.processImage(_fbp,
|
_imageResampler.processImage(fbp,
|
||||||
vinfo.xres,
|
vinfo.xres,
|
||||||
vinfo.yres,
|
vinfo.yres,
|
||||||
vinfo.xres * bytesPerPixel,
|
vinfo.xres * bytesPerPixel,
|
||||||
pixelFormat,
|
pixelFormat,
|
||||||
image);
|
image);
|
||||||
|
|
||||||
munmap(_fbp, capSize);
|
munmap(fbp, capSize);
|
||||||
close(_fbfd);
|
close(fbfd);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -84,25 +88,24 @@ void FramebufferFrameGrabber::setDevicePath(const QString& path)
|
|||||||
struct fb_var_screeninfo vinfo;
|
struct fb_var_screeninfo vinfo;
|
||||||
|
|
||||||
// Check if the framebuffer device can be opened and display the current resolution
|
// Check if the framebuffer device can be opened and display the current resolution
|
||||||
_fbfd = open(QSTRING_CSTR(_fbDevice), O_RDONLY);
|
int fbfd = open(QSTRING_CSTR(_fbDevice), O_RDONLY);
|
||||||
if (_fbfd == 0)
|
if (fbfd == -1)
|
||||||
{
|
{
|
||||||
Error(_log, "Error openning %s", QSTRING_CSTR(_fbDevice));
|
Error(_log, "Error opening %s, %s : ", QSTRING_CSTR(_fbDevice), std::strerror(errno));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// get variable screen information
|
// get variable screen information
|
||||||
result = ioctl (_fbfd, FBIOGET_VSCREENINFO, &vinfo);
|
result = ioctl (fbfd, FBIOGET_VSCREENINFO, &vinfo);
|
||||||
if (result != 0)
|
if (result != 0)
|
||||||
{
|
{
|
||||||
Error(_log, "Could not get screen information");
|
Error(_log, "Could not get screen information, %s", std::strerror(errno));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Info(_log, "Display opened with resolution: %dx%d@%dbit", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel);
|
Info(_log, "Display opened with resolution: %dx%d@%dbit", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel);
|
||||||
}
|
}
|
||||||
close(_fbfd);
|
close(fbfd);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ bool V4L2Grabber::init()
|
|||||||
QString v4lDevices_str;
|
QString v4lDevices_str;
|
||||||
|
|
||||||
// show list only once
|
// show list only once
|
||||||
if (!QString(QSTRING_CSTR(_deviceName)).startsWith("/dev/"))
|
if (!_deviceName.startsWith("/dev/"))
|
||||||
{
|
{
|
||||||
for (auto& dev: _v4lDevices)
|
for (auto& dev: _v4lDevices)
|
||||||
{
|
{
|
||||||
@ -369,11 +369,8 @@ void V4L2Grabber::close_device()
|
|||||||
|
|
||||||
_fileDescriptor = -1;
|
_fileDescriptor = -1;
|
||||||
|
|
||||||
if (_streamNotifier != nullptr)
|
delete _streamNotifier;
|
||||||
{
|
_streamNotifier = nullptr;
|
||||||
delete _streamNotifier;
|
|
||||||
_streamNotifier = nullptr;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void V4L2Grabber::init_read(unsigned int buffer_size)
|
void V4L2Grabber::init_read(unsigned int buffer_size)
|
||||||
|
@ -41,10 +41,6 @@ CaptureCont::CaptureCont(Hyperion* hyperion)
|
|||||||
handleSettingsUpdate(settings::INSTCAPTURE, _hyperion->getSetting(settings::INSTCAPTURE));
|
handleSettingsUpdate(settings::INSTCAPTURE, _hyperion->getSetting(settings::INSTCAPTURE));
|
||||||
}
|
}
|
||||||
|
|
||||||
CaptureCont::~CaptureCont()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void CaptureCont::handleV4lImage(const QString& name, const Image<ColorRgb> & image)
|
void CaptureCont::handleV4lImage(const QString& name, const Image<ColorRgb> & image)
|
||||||
{
|
{
|
||||||
if(_v4lCaptName != name)
|
if(_v4lCaptName != name)
|
||||||
|
@ -20,10 +20,6 @@ Grabber::Grabber(QString grabberName, int width, int height, int cropLeft, int c
|
|||||||
Grabber::setCropping(cropLeft, cropRight, cropTop, cropBottom);
|
Grabber::setCropping(cropLeft, cropRight, cropTop, cropBottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
Grabber::~Grabber()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void Grabber::setEnabled(bool enable)
|
void Grabber::setEnabled(bool enable)
|
||||||
{
|
{
|
||||||
Info(_log,"Capture interface is now %s", enable ? "enabled" : "disabled");
|
Info(_log,"Capture interface is now %s", enable ? "enabled" : "disabled");
|
||||||
|
@ -380,7 +380,7 @@ void Hyperion::setColor(const int priority, const std::vector<ColorRgb> &ledColo
|
|||||||
_effectEngine->channelCleared(priority);
|
_effectEngine->channelCleared(priority);
|
||||||
|
|
||||||
// create full led vector from single/multiple colors
|
// create full led vector from single/multiple colors
|
||||||
unsigned int size = _ledString.leds().size();
|
size_t size = _ledString.leds().size();
|
||||||
std::vector<ColorRgb> newLedColors;
|
std::vector<ColorRgb> newLedColors;
|
||||||
while (true)
|
while (true)
|
||||||
{
|
{
|
||||||
|
@ -16,7 +16,7 @@ HyperionIManager::HyperionIManager(const QString& rootPath, QObject* parent)
|
|||||||
, _rootPath( rootPath )
|
, _rootPath( rootPath )
|
||||||
{
|
{
|
||||||
HIMinstance = this;
|
HIMinstance = this;
|
||||||
qRegisterMetaType<instanceState>("instanceState");
|
qRegisterMetaType<InstanceState>("InstanceState");
|
||||||
}
|
}
|
||||||
|
|
||||||
Hyperion* HyperionIManager::getHyperionInstance(const quint8& instance)
|
Hyperion* HyperionIManager::getHyperionInstance(const quint8& instance)
|
||||||
@ -124,7 +124,7 @@ bool HyperionIManager::stopInstance(const quint8& inst)
|
|||||||
if(_runningInstances.contains(inst))
|
if(_runningInstances.contains(inst))
|
||||||
{
|
{
|
||||||
// notify a ON_STOP rather sooner than later, queued signal listener should have some time to drop the pointer before it's deleted
|
// notify a ON_STOP rather sooner than later, queued signal listener should have some time to drop the pointer before it's deleted
|
||||||
emit instanceStateChanged(H_ON_STOP, inst);
|
emit instanceStateChanged(InstanceState::H_ON_STOP, inst);
|
||||||
Hyperion* hyperion = _runningInstances.value(inst);
|
Hyperion* hyperion = _runningInstances.value(inst);
|
||||||
hyperion->stop();
|
hyperion->stop();
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ bool HyperionIManager::createInstance(const QString& name, const bool& start)
|
|||||||
if(_instanceTable->createInstance(name, inst))
|
if(_instanceTable->createInstance(name, inst))
|
||||||
{
|
{
|
||||||
Info(_log,"New Hyperion instance created with name '%s'",QSTRING_CSTR(name));
|
Info(_log,"New Hyperion instance created with name '%s'",QSTRING_CSTR(name));
|
||||||
emit instanceStateChanged(H_CREATED, inst, name);
|
emit instanceStateChanged(InstanceState::H_CREATED, inst, name);
|
||||||
emit change();
|
emit change();
|
||||||
|
|
||||||
if(start)
|
if(start)
|
||||||
@ -168,7 +168,7 @@ bool HyperionIManager::deleteInstance(const quint8& inst)
|
|||||||
if(_instanceTable->deleteInstance(inst))
|
if(_instanceTable->deleteInstance(inst))
|
||||||
{
|
{
|
||||||
Info(_log,"Hyperion instance with index '%d' has been deleted", inst);
|
Info(_log,"Hyperion instance with index '%d' has been deleted", inst);
|
||||||
emit instanceStateChanged(H_DELETED, inst);
|
emit instanceStateChanged(InstanceState::H_DELETED, inst);
|
||||||
emit change();
|
emit change();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@ -195,7 +195,7 @@ void HyperionIManager::handleFinished()
|
|||||||
|
|
||||||
_runningInstances.remove(instance);
|
_runningInstances.remove(instance);
|
||||||
hyperion->deleteLater();
|
hyperion->deleteLater();
|
||||||
emit instanceStateChanged(H_STOPPED, instance);
|
emit instanceStateChanged(InstanceState::H_STOPPED, instance);
|
||||||
emit change();
|
emit change();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -208,6 +208,6 @@ void HyperionIManager::handleStarted()
|
|||||||
|
|
||||||
_startQueue.removeAll(instance);
|
_startQueue.removeAll(instance);
|
||||||
_runningInstances.insert(instance, hyperion);
|
_runningInstances.insert(instance, hyperion);
|
||||||
emit instanceStateChanged(H_STARTED, instance);
|
emit instanceStateChanged(InstanceState::H_STARTED, instance);
|
||||||
emit change();
|
emit change();
|
||||||
}
|
}
|
||||||
|
@ -69,11 +69,8 @@ void ImageProcessor::setSize(const unsigned width, const unsigned height)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( _imageToLeds != nullptr)
|
// Clean up the old buffer and mapping
|
||||||
{
|
delete _imageToLeds;
|
||||||
// Clean up the old buffer and mapping
|
|
||||||
delete _imageToLeds;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Construct a new buffer and mapping
|
// Construct a new buffer and mapping
|
||||||
_imageToLeds = (width>0 && height>0) ? (new ImageToLedsMap(width, height, 0, 0, _ledString.leds())) : nullptr;
|
_imageToLeds = (width>0 && height>0) ? (new ImageToLedsMap(width, height, 0, 0, _ledString.leds())) : nullptr;
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
// hyperion includes
|
// hyperion includes
|
||||||
#include <hyperion/LedString.h>
|
#include <hyperion/LedString.h>
|
||||||
|
|
||||||
|
|
||||||
LedString::LedString()
|
LedString::LedString()
|
||||||
{
|
{
|
||||||
// empty
|
// empty
|
||||||
|
@ -43,11 +43,6 @@ LinearColorSmoothing::LinearColorSmoothing(const QJsonDocument& config, Hyperion
|
|||||||
connect(_timer, &QTimer::timeout, this, &LinearColorSmoothing::updateLeds);
|
connect(_timer, &QTimer::timeout, this, &LinearColorSmoothing::updateLeds);
|
||||||
}
|
}
|
||||||
|
|
||||||
LinearColorSmoothing::~LinearColorSmoothing()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
void LinearColorSmoothing::handleSettingsUpdate(const settings::type& type, const QJsonDocument& config)
|
void LinearColorSmoothing::handleSettingsUpdate(const settings::type& type, const QJsonDocument& config)
|
||||||
{
|
{
|
||||||
if(type == settings::SMOOTHING)
|
if(type == settings::SMOOTHING)
|
||||||
@ -224,7 +219,6 @@ void LinearColorSmoothing::componentStateChange(const hyperion::Components compo
|
|||||||
{
|
{
|
||||||
setEnable(state);
|
setEnable(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LinearColorSmoothing::setEnable(bool enable)
|
void LinearColorSmoothing::setEnable(bool enable)
|
||||||
|
@ -32,9 +32,6 @@ public:
|
|||||||
///
|
///
|
||||||
LinearColorSmoothing(const QJsonDocument& config, Hyperion* hyperion);
|
LinearColorSmoothing(const QJsonDocument& config, Hyperion* hyperion);
|
||||||
|
|
||||||
/// Destructor
|
|
||||||
virtual ~LinearColorSmoothing();
|
|
||||||
|
|
||||||
/// LED values as input for the smoothing filter
|
/// LED values as input for the smoothing filter
|
||||||
///
|
///
|
||||||
/// @param ledValues The color-value per led
|
/// @param ledValues The color-value per led
|
||||||
|
@ -88,7 +88,7 @@ SettingsManager::SettingsManager(const quint8& instance, QObject* parent)
|
|||||||
// check if our main schema syntax is IO
|
// check if our main schema syntax is IO
|
||||||
if (!valid.second)
|
if (!valid.second)
|
||||||
{
|
{
|
||||||
foreach (auto & schemaError, schemaChecker.getMessages())
|
for (auto & schemaError : schemaChecker.getMessages())
|
||||||
Error(_log, "Schema Syntax Error: %s", QSTRING_CSTR(schemaError));
|
Error(_log, "Schema Syntax Error: %s", QSTRING_CSTR(schemaError));
|
||||||
throw std::runtime_error("The config schema has invalid syntax. This should never happen! Go fix it!");
|
throw std::runtime_error("The config schema has invalid syntax. This should never happen! Go fix it!");
|
||||||
}
|
}
|
||||||
@ -97,7 +97,7 @@ SettingsManager::SettingsManager(const quint8& instance, QObject* parent)
|
|||||||
Info(_log,"Table upgrade required...");
|
Info(_log,"Table upgrade required...");
|
||||||
dbConfig = schemaChecker.getAutoCorrectedConfig(dbConfig);
|
dbConfig = schemaChecker.getAutoCorrectedConfig(dbConfig);
|
||||||
|
|
||||||
foreach (auto & schemaError, schemaChecker.getMessages())
|
for (auto & schemaError : schemaChecker.getMessages())
|
||||||
Warning(_log, "Config Fix: %s", QSTRING_CSTR(schemaError));
|
Warning(_log, "Config Fix: %s", QSTRING_CSTR(schemaError));
|
||||||
|
|
||||||
saveSettings(dbConfig);
|
saveSettings(dbConfig);
|
||||||
@ -131,7 +131,7 @@ bool SettingsManager::saveSettings(QJsonObject config, const bool& correct)
|
|||||||
Warning(_log,"Fixing json data!");
|
Warning(_log,"Fixing json data!");
|
||||||
config = schemaChecker.getAutoCorrectedConfig(config);
|
config = schemaChecker.getAutoCorrectedConfig(config);
|
||||||
|
|
||||||
foreach (auto & schemaError, schemaChecker.getMessages())
|
for (auto & schemaError : schemaChecker.getMessages())
|
||||||
Warning(_log, "Config Fix: %s", QSTRING_CSTR(schemaError));
|
Warning(_log, "Config Fix: %s", QSTRING_CSTR(schemaError));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,9 +35,7 @@ JsonServer::JsonServer(const QJsonDocument& config)
|
|||||||
|
|
||||||
JsonServer::~JsonServer()
|
JsonServer::~JsonServer()
|
||||||
{
|
{
|
||||||
foreach (JsonClientConnection * connection, _openConnections) {
|
qDeleteAll(_openConnections);
|
||||||
delete connection;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void JsonServer::start()
|
void JsonServer::start()
|
||||||
|
@ -7,10 +7,6 @@ LedDeviceTemplate::LedDeviceTemplate(const QJsonObject &deviceConfig)
|
|||||||
_deviceReady = false;
|
_deviceReady = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
LedDeviceTemplate::~LedDeviceTemplate()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
LedDevice* LedDeviceTemplate::construct(const QJsonObject &deviceConfig)
|
LedDevice* LedDeviceTemplate::construct(const QJsonObject &deviceConfig)
|
||||||
{
|
{
|
||||||
return new LedDeviceTemplate(deviceConfig);
|
return new LedDeviceTemplate(deviceConfig);
|
||||||
@ -83,5 +79,3 @@ int LedDeviceTemplate::write(const std::vector<ColorRgb> & ledValues)
|
|||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,11 +17,6 @@ public:
|
|||||||
///
|
///
|
||||||
explicit LedDeviceTemplate(const QJsonObject &deviceConfig);
|
explicit LedDeviceTemplate(const QJsonObject &deviceConfig);
|
||||||
|
|
||||||
///
|
|
||||||
/// Destructor of this LedDevice
|
|
||||||
///
|
|
||||||
virtual ~LedDeviceTemplate() override;
|
|
||||||
|
|
||||||
/// constructs leddevice
|
/// constructs leddevice
|
||||||
static LedDevice* construct(const QJsonObject &deviceConfig);
|
static LedDevice* construct(const QJsonObject &deviceConfig);
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ int LedDeviceMultiLightpack::open()
|
|||||||
std::sort(_lightpacks.begin(), _lightpacks.end(), compareLightpacks);
|
std::sort(_lightpacks.begin(), _lightpacks.end(), compareLightpacks);
|
||||||
|
|
||||||
// open each lightpack device
|
// open each lightpack device
|
||||||
foreach (auto serial , serialList)
|
for (auto serial : serialList)
|
||||||
{
|
{
|
||||||
LedDeviceLightpack * device = new LedDeviceLightpack(serial);
|
LedDeviceLightpack * device = new LedDeviceLightpack(serial);
|
||||||
int error = device->open();
|
int error = device->open();
|
||||||
|
@ -57,7 +57,7 @@ bool LedDeviceAtmoOrb::init(const QJsonObject &deviceConfig)
|
|||||||
|
|
||||||
_orbIds.clear();
|
_orbIds.clear();
|
||||||
|
|
||||||
foreach(auto & id_str, orbIds)
|
for(auto & id_str : orbIds)
|
||||||
{
|
{
|
||||||
bool ok;
|
bool ok;
|
||||||
int id = id_str.toInt(&ok);
|
int id = id_str.toInt(&ok);
|
||||||
|
@ -205,7 +205,7 @@ bool LedDeviceNanoleaf::initLeds()
|
|||||||
std::map<uint, std::map<uint, uint>> panelMap;
|
std::map<uint, std::map<uint, uint>> panelMap;
|
||||||
|
|
||||||
// Loop over all children.
|
// Loop over all children.
|
||||||
foreach (const QJsonValue & value, positionData)
|
for (const QJsonValue & value : positionData)
|
||||||
{
|
{
|
||||||
QJsonObject panelObj = value.toObject();
|
QJsonObject panelObj = value.toObject();
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QRgb>
|
#include <QRgb>
|
||||||
|
|
||||||
// TODO Remove this class if third-party apps have been migrated (eg. Hyperion Android Gabber, Windows Screen grabber etc.)
|
// TODO Remove this class if third-party apps have been migrated (eg. Hyperion Android Grabber, Windows Screen grabber etc.)
|
||||||
|
|
||||||
ProtoClientConnection::ProtoClientConnection(QTcpSocket* socket, const int &timeout, QObject *parent)
|
ProtoClientConnection::ProtoClientConnection(QTcpSocket* socket, const int &timeout, QObject *parent)
|
||||||
: QObject(parent)
|
: QObject(parent)
|
||||||
|
@ -27,11 +27,12 @@ PythonInit::PythonInit()
|
|||||||
EffectModule::registerHyperionExtensionModule();
|
EffectModule::registerHyperionExtensionModule();
|
||||||
|
|
||||||
// set Python module path when exists
|
// set Python module path when exists
|
||||||
wchar_t *pythonPath = Py_DecodeLocale((QDir::cleanPath(qApp->applicationDirPath() + "/../lib/python")).toLatin1().data(), nullptr);
|
wchar_t *pythonPath = nullptr;
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
pythonPath = Py_DecodeLocale((QDir::cleanPath(qApp->applicationDirPath()) + "/python" + STRINGIFY(PYTHON_VERSION_MAJOR_MINOR) + ".zip").toLatin1().data(), nullptr);
|
pythonPath = Py_DecodeLocale((QDir::cleanPath(qApp->applicationDirPath()) + "/python" + STRINGIFY(PYTHON_VERSION_MAJOR_MINOR) + ".zip").toLatin1().data(), nullptr);
|
||||||
if(QFile(QString::fromWCharArray(pythonPath)).exists())
|
if(QFile(QString::fromWCharArray(pythonPath)).exists())
|
||||||
#else
|
#else
|
||||||
|
pythonPath = Py_DecodeLocale((QDir::cleanPath(qApp->applicationDirPath() + "/../lib/python")).toLatin1().data(), nullptr);
|
||||||
if(QDir(QString::fromWCharArray(pythonPath)).exists())
|
if(QDir(QString::fromWCharArray(pythonPath)).exists())
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -68,9 +68,10 @@ void SSDPHandler::stopServer()
|
|||||||
|
|
||||||
void SSDPHandler::handleSettingsUpdate(const settings::type& type, const QJsonDocument& config)
|
void SSDPHandler::handleSettingsUpdate(const settings::type& type, const QJsonDocument& config)
|
||||||
{
|
{
|
||||||
|
const QJsonObject& obj = config.object();
|
||||||
|
|
||||||
if(type == settings::FLATBUFSERVER)
|
if(type == settings::FLATBUFSERVER)
|
||||||
{
|
{
|
||||||
const QJsonObject& obj = config.object();
|
|
||||||
if(obj["port"].toInt() != SSDPServer::getFlatBufPort())
|
if(obj["port"].toInt() != SSDPServer::getFlatBufPort())
|
||||||
{
|
{
|
||||||
SSDPServer::setFlatBufPort(obj["port"].toInt());
|
SSDPServer::setFlatBufPort(obj["port"].toInt());
|
||||||
@ -79,7 +80,6 @@ void SSDPHandler::handleSettingsUpdate(const settings::type& type, const QJsonDo
|
|||||||
|
|
||||||
if(type == settings::JSONSERVER)
|
if(type == settings::JSONSERVER)
|
||||||
{
|
{
|
||||||
const QJsonObject& obj = config.object();
|
|
||||||
if(obj["port"].toInt() != SSDPServer::getJsonServerPort())
|
if(obj["port"].toInt() != SSDPServer::getJsonServerPort())
|
||||||
{
|
{
|
||||||
SSDPServer::setJsonServerPort(obj["port"].toInt());
|
SSDPServer::setJsonServerPort(obj["port"].toInt());
|
||||||
@ -88,7 +88,6 @@ void SSDPHandler::handleSettingsUpdate(const settings::type& type, const QJsonDo
|
|||||||
|
|
||||||
if (type == settings::GENERAL)
|
if (type == settings::GENERAL)
|
||||||
{
|
{
|
||||||
const QJsonObject &obj = config.object();
|
|
||||||
if (obj["name"].toString() != SSDPServer::getHyperionName())
|
if (obj["name"].toString() != SSDPServer::getHyperionName())
|
||||||
{
|
{
|
||||||
SSDPServer::setHyperionName(obj["name"].toString());
|
SSDPServer::setHyperionName(obj["name"].toString());
|
||||||
@ -134,13 +133,13 @@ void SSDPHandler::handleNetworkConfigurationChanged(const QNetworkConfiguration
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString SSDPHandler::getLocalAddress()
|
QString SSDPHandler::getLocalAddress() const
|
||||||
{
|
{
|
||||||
// get the first valid IPv4 address. This is probably not that one we actually want to announce
|
// get the first valid IPv4 address. This is probably not that one we actually want to announce
|
||||||
for( const auto & address : QNetworkInterface::allAddresses())
|
for(const auto & address : QNetworkInterface::allAddresses())
|
||||||
{
|
{
|
||||||
// is valid when, no loopback, IPv4
|
// is valid when, no loopback, IPv4
|
||||||
if (!address.isLoopback() && address.protocol() == QAbstractSocket::IPv4Protocol )
|
if (!address.isLoopback() && address.protocol() == QAbstractSocket::IPv4Protocol)
|
||||||
{
|
{
|
||||||
return address.toString();
|
return address.toString();
|
||||||
}
|
}
|
||||||
@ -174,26 +173,27 @@ void SSDPHandler::handleMSearchRequest(const QString& target, const QString& mx,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString SSDPHandler::getDescAddress()
|
QString SSDPHandler::getDescAddress() const
|
||||||
{
|
{
|
||||||
return getBaseAddress()+"description.xml";
|
return getBaseAddress()+"description.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString SSDPHandler::getBaseAddress()
|
QString SSDPHandler::getBaseAddress() const
|
||||||
{
|
{
|
||||||
return "http://"+_localAddress+":"+QString::number(_webserver->getPort())+"/";
|
return QString("http://%1:%2/").arg(_localAddress).arg(_webserver->getPort());
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString SSDPHandler::buildDesc()
|
QString SSDPHandler::buildDesc() const
|
||||||
{
|
{
|
||||||
/// %1 base url http://192.168.0.177:80/
|
/// %1 base url http://192.168.0.177:80/
|
||||||
/// %2 friendly name Hyperion 2.0.0 (192.168.0.177)
|
/// %2 friendly name Hyperion 2.0.0 (192.168.0.177)
|
||||||
/// %3 modelNumber 2.0.0
|
/// %3 modelNumber 2.0.0
|
||||||
/// %4 serialNumber / UDN (H ID) Fjsa723dD0....
|
/// %4 serialNumber / UDN (H ID) Fjsa723dD0....
|
||||||
return SSDP_DESCRIPTION.arg(getBaseAddress(), QString("Hyperion (%2)").arg(_localAddress), QString(HYPERION_VERSION), _uuid);
|
return SSDP_DESCRIPTION.arg(getBaseAddress(), QString("Hyperion (%1)").arg(_localAddress), QString(HYPERION_VERSION), _uuid);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SSDPHandler::sendAnnounceList(const bool alive){
|
void SSDPHandler::sendAnnounceList(const bool alive)
|
||||||
|
{
|
||||||
for(const auto & entry : _deviceList){
|
for(const auto & entry : _deviceList){
|
||||||
alive ? SSDPServer::sendAlive(entry) : SSDPServer::sendByeBye(entry);
|
alive ? SSDPServer::sendAlive(entry) : SSDPServer::sendByeBye(entry);
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,6 @@ Profiler::Profiler(const char* sourceFile, const char* func, unsigned int line)
|
|||||||
_logger->Message(Logger::DEBUG,_file,_func,_line,">>> enter block %d", _blockId);
|
_logger->Message(Logger::DEBUG,_file,_func,_line,">>> enter block %d", _blockId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Profiler::~Profiler()
|
Profiler::~Profiler()
|
||||||
{
|
{
|
||||||
_logger->Message( Logger::DEBUG, _file,_func, _line, "<<< exit block %d, executed for %f s", _blockId, getClockDelta(_startTime));
|
_logger->Message( Logger::DEBUG, _file,_func, _line, "<<< exit block %d, executed for %f s", _blockId, getClockDelta(_startTime));
|
||||||
@ -86,4 +85,3 @@ void Profiler::TimerGetTime(const QString timerName, const char* sourceFile, con
|
|||||||
_logger->Message(Logger::DEBUG, sourceFile, func, line, "ERROR timer '%s' not started", QSTRING_CSTR(timerName));
|
_logger->Message(Logger::DEBUG, sourceFile, func, line, "ERROR timer '%s' not started", QSTRING_CSTR(timerName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,10 +22,6 @@ void RgbTransform::init(double gammaR, double gammaG, double gammaB, double back
|
|||||||
initializeMapping();
|
initializeMapping();
|
||||||
}
|
}
|
||||||
|
|
||||||
RgbTransform::~RgbTransform()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
double RgbTransform::getGammaR() const
|
double RgbTransform::getGammaR() const
|
||||||
{
|
{
|
||||||
return _gammaR;
|
return _gammaR;
|
||||||
@ -175,4 +171,3 @@ void RgbTransform::transform(uint8_t & red, uint8_t & green, uint8_t & blue)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,10 +19,6 @@ SysInfo::SysInfo()
|
|||||||
_sysinfo.domainName = QHostInfo::localDomainName();
|
_sysinfo.domainName = QHostInfo::localDomainName();
|
||||||
}
|
}
|
||||||
|
|
||||||
SysInfo::~SysInfo()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
SysInfo::HyperionSysInfo SysInfo::get()
|
SysInfo::HyperionSysInfo SysInfo::get()
|
||||||
{
|
{
|
||||||
if (SysInfo::_instance == nullptr)
|
if (SysInfo::_instance == nullptr)
|
||||||
|
@ -21,10 +21,6 @@ CgiHandler::CgiHandler (QObject * parent)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
CgiHandler::~CgiHandler()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void CgiHandler::setBaseUrl(const QString& url)
|
void CgiHandler::setBaseUrl(const QString& url)
|
||||||
{
|
{
|
||||||
_baseUrl = url;
|
_baseUrl = url;
|
||||||
|
@ -15,7 +15,6 @@ class CgiHandler : public QObject {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
CgiHandler (QObject * parent = NULL);
|
CgiHandler (QObject * parent = NULL);
|
||||||
virtual ~CgiHandler (void);
|
|
||||||
|
|
||||||
void setBaseUrl(const QString& url);
|
void setBaseUrl(const QString& url);
|
||||||
void exec(const QStringList & args,QtHttpRequest * request, QtHttpReply * reply);
|
void exec(const QStringList & args,QtHttpRequest * request, QtHttpReply * reply);
|
||||||
|
@ -54,7 +54,7 @@ void WebServer::initServer()
|
|||||||
|
|
||||||
void WebServer::onServerStarted (quint16 port)
|
void WebServer::onServerStarted (quint16 port)
|
||||||
{
|
{
|
||||||
_inited= true;
|
_inited = true;
|
||||||
|
|
||||||
Info(_log, "Started on port %d name '%s'", port ,_server->getServerName().toStdString().c_str());
|
Info(_log, "Started on port %d name '%s'", port ,_server->getServerName().toStdString().c_str());
|
||||||
#ifdef ENABLE_AVAHI
|
#ifdef ENABLE_AVAHI
|
||||||
|
@ -252,7 +252,7 @@ int main(int argc, char** argv)
|
|||||||
std::cout << "extract to folder: " << std::endl;
|
std::cout << "extract to folder: " << std::endl;
|
||||||
QStringList filenames = directory.entryList(QStringList() << "*", QDir::Files, QDir::Name | QDir::IgnoreCase);
|
QStringList filenames = directory.entryList(QStringList() << "*", QDir::Files, QDir::Name | QDir::IgnoreCase);
|
||||||
QString destFileName;
|
QString destFileName;
|
||||||
foreach (const QString & filename, filenames)
|
for (const QString & filename : filenames)
|
||||||
{
|
{
|
||||||
destFileName = destDir.dirName()+"/"+filename;
|
destFileName = destDir.dirName()+"/"+filename;
|
||||||
if (QFile::exists(destFileName))
|
if (QFile::exists(destFileName))
|
||||||
|
@ -169,10 +169,10 @@ void SysTray::clearEfxColor()
|
|||||||
_hyperion->clear(1);
|
_hyperion->clear(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void SysTray::handleInstanceStateChange(const instanceState& state, const quint8& instance, const QString& name)
|
void SysTray::handleInstanceStateChange(const InstanceState& state, const quint8& instance, const QString& name)
|
||||||
{
|
{
|
||||||
switch(state){
|
switch(state){
|
||||||
case H_STARTED:
|
case InstanceState::H_STARTED:
|
||||||
if(instance == 0)
|
if(instance == 0)
|
||||||
{
|
{
|
||||||
_hyperion = _instanceManager->getHyperionInstance(0);
|
_hyperion = _instanceManager->getHyperionInstance(0);
|
||||||
|
@ -39,7 +39,7 @@ private slots:
|
|||||||
///
|
///
|
||||||
/// @brief is called whenever a hyperion isntance state changes
|
/// @brief is called whenever a hyperion isntance state changes
|
||||||
///
|
///
|
||||||
void handleInstanceStateChange(const instanceState& state, const quint8& instance, const QString& name);
|
void handleInstanceStateChange(const InstanceState& state, const quint8& instance, const QString& name);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void createTrayIcon();
|
void createTrayIcon();
|
||||||
|
@ -43,7 +43,7 @@ bool loadConfig(const QString & configFile, bool correct, bool ignore)
|
|||||||
if (!schemaChecker.validate(jsonConfig).first)
|
if (!schemaChecker.validate(jsonConfig).first)
|
||||||
{
|
{
|
||||||
QStringList schemaErrors = schemaChecker.getMessages();
|
QStringList schemaErrors = schemaChecker.getMessages();
|
||||||
foreach (auto & schemaError, schemaErrors)
|
for (auto & schemaError : schemaErrors)
|
||||||
{
|
{
|
||||||
qDebug() << "config write validation: " << schemaError;
|
qDebug() << "config write validation: " << schemaError;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user