even more changes

Signed-off-by: Paulchen-Panther <Paulchen--Panter@gmx.net>
This commit is contained in:
Paulchen-Panther
2018-12-28 18:12:45 +01:00
parent 3700566d10
commit 2a77f6f012
99 changed files with 2610 additions and 673 deletions

View File

@@ -6,6 +6,7 @@
#include <utils/Image.h>
class Hyperion;
class QTimer;
///
/// @brief Capture Control class which is a interface to the HyperionDaemon native capture classes.
@@ -48,6 +49,11 @@ private slots:
///
void handleV4lImage(const Image<ColorRgb> & image);
///
/// @brief Is called from _v4lInactiveTimer to set source after specific time to inactive
///
void setV4lInactive();
private:
/// Hyperion instance
Hyperion* _hyperion;
@@ -59,4 +65,5 @@ private:
/// Reflect state of v4l capture and prio
bool _v4lCaptEnabled;
quint8 _v4lCaptPrio;
QTimer* _v4lInactiveTimer;
};

View File

@@ -33,9 +33,9 @@ public:
///
/// @brief Check if a component is currently enabled
/// @param comp The component from enum
/// @return True if component is running else false
/// @return True if component is running else false. Not found is -1
///
bool isComponentEnabled(const hyperion::Components& comp) const;
int isComponentEnabled(const hyperion::Components& comp) const;
/// contains all components and their state
std::map<hyperion::Components, bool> getRegister() { return _componentStates; };

View File

@@ -36,7 +36,7 @@ public:
///
/// @brief Apply new width/height values, on errors (collide with cropping) reject the values
///
virtual void setWidthHeight(int width, int height);
virtual bool setWidthHeight(int width, int height);
///
/// @brief Apply new pixelDecimation (used from x11)
@@ -66,9 +66,9 @@ public:
virtual void setSignalDetectionEnable(bool enable) {};
///
/// @brief Apply input and videoStanded (used from v4l)
/// @brief Apply device and videoStanded (used from v4l)
///
virtual void setInputVideoStandard(int input, VideoStandard videoStandard) {};
virtual void setDeviceVideoStandard(QString device, VideoStandard videoStandard) {};
///
/// @brief Apply display index (used from x11)

View File

@@ -1,12 +1,13 @@
#pragma once
#include <QObject>
#include <QJsonObject>
#include <QJsonArray>
#include <QString>
#include <QStringList>
#include <utils/Logger.h>
#include <utils/Components.h>
#include <hyperion/Hyperion.h>
#include <utils/Image.h>
#include <utils/ColorRgb.h>
#include <utils/VideoMode.h>
@@ -98,9 +99,6 @@ protected:
QString _grabberName;
/// Pointer to Hyperion for writing led values
Hyperion * _hyperion;
/// The timer for generating events with the specified update rate
QTimer* _timer;
@@ -110,9 +108,6 @@ protected:
/// The Logger instance
Logger * _log;
// forwarding enabled
bool _forward;
Grabber *_ggrabber;
/// The image used for grabbing frames

View File

@@ -49,6 +49,7 @@ class ColorAdjustment;
class SettingsManager;
class BGEffectHandler;
class CaptureCont;
class BoblightServer;
///
/// The main class of Hyperion. This gives other 'users' access to the attached LedDevice through
@@ -105,6 +106,8 @@ public:
///
PriorityMuxer* getMuxerInstance() { return &_muxer; };
ImageProcessor* getImageProcessor() { return _imageProcessor; };
///
/// @brief Get a setting by settings::type from SettingsManager
/// @param type The settingsType from enum
@@ -145,7 +148,7 @@ public:
bool isCurrentPriority(const int priority) const;
///
/// Returns a list of active priorities
/// Returns a list of all registered priorities
///
/// @return The list with priorities
///
@@ -279,6 +282,13 @@ public slots:
///
const bool setInputImage(const int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1, const bool& clearEffect = true);
///
/// @brief Set the given priority to inactive
/// @param priority The priority
/// @return True on success false if not found
///
const bool setInputInactive(const quint8& priority);
///
/// Writes a single color to all the leds for the given time and priority
/// Registers comp color or provided type against muxer
@@ -540,4 +550,7 @@ private:
std::vector<ColorRgb> _ledBuffer;
/// buffer for leds (without adjustment)
std::vector<ColorRgb> _rawLedBuffer;
/// Boblight instance
BoblightServer* _boblightServer;
};

View File

@@ -162,6 +162,13 @@ public:
///
const bool setInputImage(const int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1);
///
/// @brief Set the given priority to inactive
/// @param priority The priority
/// @return True on success false if not found
///
const bool setInputInactive(const quint8& priority);
///
/// Clears the specified priority channel and update _currentPriority on success
///

View File

@@ -6,7 +6,6 @@
// qt incl
#include <QJsonObject>
class SettingsTable;
class Hyperion;
///
@@ -63,8 +62,6 @@ private:
Hyperion* _hyperion;
/// Logger instance
Logger* _log;
/// instance of database table interface
SettingsTable* _sTable;
/// the schema
static QJsonObject schemaJson;
/// the current config of this instance