mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
@@ -85,7 +85,7 @@ private slots:
|
||||
/// @param instance The index of instance
|
||||
/// @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:
|
||||
///
|
||||
|
@@ -18,7 +18,7 @@ public:
|
||||
/// @param[in] height The heigth of the captured screenshot
|
||||
///
|
||||
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
|
||||
|
@@ -20,11 +20,6 @@ public:
|
||||
///
|
||||
AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeight);
|
||||
|
||||
///
|
||||
/// Destructor of this dispmanx frame grabber. Releases any claimed resources.
|
||||
///
|
||||
virtual ~AmlogicWrapper() {};
|
||||
|
||||
public slots:
|
||||
///
|
||||
/// Performs a single frame grab and computes the led-colors
|
||||
|
@@ -27,7 +27,7 @@ public:
|
||||
/// @param[in] height The heigth of the captured screenshot
|
||||
///
|
||||
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);
|
||||
int vc_dispmanx_snapshot(int, DISPMANX_RESOURCE_HANDLE_T resource, int vc_flags);
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -22,11 +22,6 @@ public:
|
||||
///
|
||||
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:
|
||||
///
|
||||
/// Performs a single frame grab and computes the led-colors
|
||||
|
@@ -18,7 +18,6 @@ public:
|
||||
/// @param[in] height The heigth of the captured screenshot
|
||||
///
|
||||
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
|
||||
@@ -36,12 +35,6 @@ public:
|
||||
virtual void setDevicePath(const QString& path);
|
||||
|
||||
private:
|
||||
/// Framebuffer file descriptor
|
||||
int _fbfd;
|
||||
|
||||
/// Pointer to framebuffer
|
||||
unsigned char * _fbp;
|
||||
|
||||
/// Framebuffer device e.g. /dev/fb0
|
||||
QString _fbDevice;
|
||||
};
|
||||
|
@@ -22,11 +22,6 @@ public:
|
||||
///
|
||||
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:
|
||||
///
|
||||
/// Performs a single frame grab and computes the led-colors
|
||||
|
@@ -25,7 +25,7 @@ public:
|
||||
/// @param[in] height The heigth of the captured screenshot
|
||||
///
|
||||
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
|
||||
|
@@ -22,11 +22,6 @@ public:
|
||||
///
|
||||
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:
|
||||
///
|
||||
/// 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);
|
||||
|
||||
virtual ~QtGrabber();
|
||||
~QtGrabber() override;
|
||||
|
||||
///
|
||||
/// 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);
|
||||
|
||||
///
|
||||
/// Destructor of this qt frame grabber. Releases any claimed resources.
|
||||
///
|
||||
virtual ~QtWrapper() {};
|
||||
|
||||
public slots:
|
||||
///
|
||||
/// Performs a single frame grab and computes the led-colors
|
||||
|
@@ -16,7 +16,6 @@ public:
|
||||
VideoStandard videoStandard,
|
||||
PixelFormat pixelFormat,
|
||||
int pixelDecimation );
|
||||
virtual ~V4L2Wrapper() {};
|
||||
|
||||
bool getSignalDetectionEnable();
|
||||
|
||||
|
@@ -19,7 +19,7 @@ public:
|
||||
|
||||
X11Grabber(int cropLeft, int cropRight, int cropTop, int cropBottom, int pixelDecimation);
|
||||
|
||||
virtual ~X11Grabber();
|
||||
~X11Grabber() override;
|
||||
|
||||
bool Setup();
|
||||
|
||||
|
@@ -26,11 +26,6 @@ public:
|
||||
///
|
||||
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:
|
||||
///
|
||||
/// Performs a single frame grab and computes the led-colors
|
||||
|
@@ -17,7 +17,6 @@ class CaptureCont : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
CaptureCont(Hyperion* hyperion);
|
||||
~CaptureCont();
|
||||
|
||||
void setSystemCaptureEnable(const bool& enable);
|
||||
void setV4LCaptureEnable(const bool& enable);
|
||||
|
@@ -23,7 +23,6 @@ class Grabber : public QObject
|
||||
|
||||
public:
|
||||
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)
|
||||
|
@@ -2,7 +2,6 @@
|
||||
|
||||
// stl includes
|
||||
#include <list>
|
||||
#include <QMap>
|
||||
|
||||
// QT includes
|
||||
#include <QString>
|
||||
@@ -11,6 +10,7 @@
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QJsonArray>
|
||||
#include <QMap>
|
||||
#include <QMutex>
|
||||
|
||||
// hyperion-utils includes
|
||||
@@ -59,32 +59,25 @@ class Hyperion : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
/// Type definition of the info structure used by the priority muxer
|
||||
typedef PriorityMuxer::InputInfo InputInfo;
|
||||
///
|
||||
/// RGB-Color channel enumeration
|
||||
///
|
||||
enum RgbChannel
|
||||
{
|
||||
BLACK, WHITE, RED, GREEN, BLUE, CYAN, MAGENTA, YELLOW, INVALID
|
||||
};
|
||||
using InputInfo = PriorityMuxer::InputInfo;
|
||||
|
||||
///
|
||||
/// Destructor; cleans up resources
|
||||
///
|
||||
virtual ~Hyperion();
|
||||
~Hyperion() override;
|
||||
|
||||
///
|
||||
/// free all alocated objects, should be called only from constructor or before restarting hyperion
|
||||
///
|
||||
void freeObjects(bool emitCloseSignal=false);
|
||||
|
||||
ImageProcessor* getImageProcessor() { return _imageProcessor; };
|
||||
ImageProcessor* getImageProcessor() { return _imageProcessor; }
|
||||
|
||||
///
|
||||
/// @brief Get instance 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
|
||||
@@ -94,7 +87,7 @@ public:
|
||||
///
|
||||
/// @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
|
||||
const int & getLedMappingType();
|
||||
@@ -110,8 +103,8 @@ public:
|
||||
|
||||
///
|
||||
/// @brief Get the current active led device
|
||||
/// @return The device nam
|
||||
/// e
|
||||
/// @return The device name
|
||||
///
|
||||
const QString & getActiveDeviceType();
|
||||
|
||||
///
|
||||
@@ -206,7 +199,7 @@ public slots:
|
||||
/// @return EffectEngine instance pointer
|
||||
///
|
||||
|
||||
EffectEngine* getEffectEngineInstance() { return _effectEngine; };
|
||||
EffectEngine* getEffectEngineInstance() { return _effectEngine; }
|
||||
///
|
||||
/// @brief Save an effect
|
||||
/// @param obj The effect args
|
||||
@@ -259,7 +252,7 @@ public slots:
|
||||
/// @brief Get a pointer to the priorityMuxer instance
|
||||
/// @return PriorityMuxer instance pointer
|
||||
///
|
||||
PriorityMuxer* getMuxerInstance() { return &_muxer; };
|
||||
PriorityMuxer* getMuxerInstance() { return &_muxer; }
|
||||
|
||||
///
|
||||
/// @brief enable/disable automatic/priorized source selection
|
||||
@@ -335,7 +328,7 @@ public slots:
|
||||
/// @brief Get the component Register
|
||||
/// 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
|
||||
@@ -489,7 +482,7 @@ private slots:
|
||||
///
|
||||
/// @brief Apply new videoMode from Daemon to _currVideoMode
|
||||
///
|
||||
void handleNewVideoMode(const VideoMode& mode) { _currVideoMode = mode; };
|
||||
void handleNewVideoMode(const VideoMode& mode) { _currVideoMode = mode; }
|
||||
|
||||
private:
|
||||
friend class HyperionDaemon;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
class Hyperion;
|
||||
class InstanceTable;
|
||||
|
||||
enum instanceState{
|
||||
enum class InstanceState{
|
||||
H_STARTED,
|
||||
H_ON_STOP,
|
||||
H_STOPPED,
|
||||
@@ -29,7 +29,7 @@ class HyperionIManager : public QObject
|
||||
|
||||
public:
|
||||
// global instance pointer
|
||||
static HyperionIManager* getInstance() { return HIMinstance; };
|
||||
static HyperionIManager* getInstance() { return HIMinstance; }
|
||||
static HyperionIManager* HIMinstance;
|
||||
|
||||
public slots:
|
||||
@@ -38,7 +38,7 @@ public slots:
|
||||
/// @param inst The instance to check
|
||||
/// @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
|
||||
@@ -103,7 +103,7 @@ signals:
|
||||
/// @param instance The index of instance
|
||||
/// @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
|
||||
@@ -172,7 +172,7 @@ private:
|
||||
/// @brief check if a instance is allowed for management. Instance 0 represents the root instance
|
||||
/// @apram inst The instance to check
|
||||
///
|
||||
bool isInstAllowed(const quint8& inst) { return (inst > 0); };
|
||||
bool isInstAllowed(const quint8& inst) { return (inst > 0); }
|
||||
|
||||
private:
|
||||
Logger* _log;
|
||||
|
@@ -40,6 +40,7 @@ inline QString colorOrderToString(const ColorOrder colorOrder)
|
||||
return "not-a-colororder";
|
||||
}
|
||||
}
|
||||
|
||||
inline ColorOrder stringToColorOrder(const QString & order)
|
||||
{
|
||||
if (order == "rgb")
|
||||
|
@@ -36,7 +36,7 @@ class LedDevice : public QObject
|
||||
|
||||
public:
|
||||
LedDevice(const QJsonObject& config = QJsonObject(), QObject* parent = nullptr);
|
||||
virtual ~LedDevice();
|
||||
~LedDevice() override;
|
||||
|
||||
///
|
||||
/// @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
|
||||
///
|
||||
virtual void start() { _deviceReady = (open() == 0 ? true : false);}
|
||||
virtual void start() { _deviceReady = (open() == 0); }
|
||||
|
||||
///
|
||||
/// Update the RGB-Color values to the leds.
|
||||
@@ -186,7 +186,6 @@ protected:
|
||||
/// Time a device requires mandatorily between two writes
|
||||
int _latchTime_ms;
|
||||
|
||||
|
||||
protected slots:
|
||||
|
||||
/// Write the last data to the leds again
|
||||
|
@@ -19,7 +19,7 @@ class LedDeviceWrapper : public QObject
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit LedDeviceWrapper(Hyperion* hyperion);
|
||||
~LedDeviceWrapper();
|
||||
~LedDeviceWrapper() override;
|
||||
///
|
||||
/// @brief Contructs a new LedDevice, moves to thread and starts
|
||||
/// @param config With the given config
|
||||
@@ -106,7 +106,7 @@ protected:
|
||||
private:
|
||||
///
|
||||
/// @brief switchOff() the device and Stops the device thread
|
||||
///
|
||||
///
|
||||
void stopDeviceThread();
|
||||
|
||||
private:
|
||||
|
@@ -22,7 +22,7 @@ class ProtoServer : public QObject
|
||||
|
||||
public:
|
||||
ProtoServer(const QJsonDocument& config, QObject* parent = nullptr);
|
||||
~ProtoServer();
|
||||
~ProtoServer() override;
|
||||
|
||||
public slots:
|
||||
///
|
||||
|
@@ -24,7 +24,7 @@ public:
|
||||
|
||||
///
|
||||
/// @brief Sends BYE BYE and stop server
|
||||
///
|
||||
///
|
||||
void stopServer();
|
||||
|
||||
public slots:
|
||||
@@ -50,23 +50,23 @@ private:
|
||||
///
|
||||
/// @brief Build http url for current ip:port/desc.xml
|
||||
///
|
||||
const QString getDescAddress();
|
||||
QString getDescAddress() const;
|
||||
|
||||
///
|
||||
/// @brief Get the base address
|
||||
///
|
||||
const QString getBaseAddress();
|
||||
QString getBaseAddress() const;
|
||||
|
||||
///
|
||||
/// @brief Build the ssdp description (description.xml)
|
||||
///
|
||||
const QString buildDesc();
|
||||
QString buildDesc() const;
|
||||
|
||||
///
|
||||
/// @brief Get the local address of interface
|
||||
/// @return the address, might be empty
|
||||
///
|
||||
const QString getLocalAddress();
|
||||
QString getLocalAddress() const;
|
||||
|
||||
///
|
||||
/// @brief Send alive/byebye message based on _deviceList
|
||||
|
@@ -4,8 +4,6 @@
|
||||
#include <cstdint>
|
||||
#include <ostream>
|
||||
|
||||
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) << "}";
|
||||
return os;
|
||||
}
|
||||
|
||||
|
@@ -4,8 +4,6 @@
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
|
||||
struct ColorBgr;
|
||||
|
||||
///
|
||||
/// 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
|
||||
|
@@ -6,8 +6,6 @@
|
||||
|
||||
#include <QTextStream>
|
||||
|
||||
struct ColorRgb;
|
||||
|
||||
///
|
||||
/// 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
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -4,8 +4,6 @@
|
||||
#include <cstdint>
|
||||
#include <ostream>
|
||||
|
||||
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) << "}";
|
||||
return os;
|
||||
}
|
||||
|
||||
|
@@ -4,8 +4,6 @@
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
|
||||
struct ColorRgbw;
|
||||
|
||||
///
|
||||
/// 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
|
||||
|
@@ -67,7 +67,7 @@ inline const char* componentToIdString(Components c)
|
||||
}
|
||||
}
|
||||
|
||||
inline Components stringToComponent(QString component)
|
||||
inline Components stringToComponent(QString component)
|
||||
{
|
||||
component = component.toUpper();
|
||||
if (component == "ALL") return COMP_ALL;
|
||||
|
@@ -10,8 +10,8 @@
|
||||
|
||||
namespace FileUtils {
|
||||
|
||||
QString getBaseName(QString sourceFile);
|
||||
QString getDirName(QString sourceFile);
|
||||
QString getBaseName(QString sourceFile);
|
||||
QString getDirName(QString sourceFile);
|
||||
|
||||
///
|
||||
/// @brief remove directory recursive given by path
|
||||
|
@@ -21,7 +21,7 @@ public:
|
||||
return & instance;
|
||||
}
|
||||
private:
|
||||
GlobalSignals() {}
|
||||
GlobalSignals() = default;
|
||||
|
||||
public:
|
||||
GlobalSignals(GlobalSignals const&) = delete;
|
||||
|
@@ -21,7 +21,7 @@ For more profiler function see the macros listed below
|
||||
*/
|
||||
|
||||
#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
|
||||
|
||||
// profiler
|
||||
@@ -50,4 +50,3 @@ private:
|
||||
unsigned int _blockId;
|
||||
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);
|
||||
|
||||
///
|
||||
/// Destructor
|
||||
///
|
||||
~RgbTransform();
|
||||
|
||||
/// @return The current red gamma value
|
||||
double getGammaR() const;
|
||||
|
||||
|
@@ -20,7 +20,6 @@ public:
|
||||
QString domainName;
|
||||
};
|
||||
|
||||
~SysInfo();
|
||||
static HyperionSysInfo get();
|
||||
|
||||
private:
|
||||
|
@@ -34,15 +34,15 @@ class WebServer : public QObject {
|
||||
public:
|
||||
WebServer (const QJsonDocument& config, const bool& useSsl, QObject * parent = 0);
|
||||
|
||||
virtual ~WebServer (void);
|
||||
~WebServer () override;
|
||||
|
||||
void start();
|
||||
void stop();
|
||||
|
||||
quint16 getPort() { return _port; };
|
||||
quint16 getPort() const { return _port; }
|
||||
|
||||
/// 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
|
||||
|
Reference in New Issue
Block a user