Do not limit priorities for Boblight (#1269) (#1298)

* Do not limit priorities for Boblight (#1269)

* Boblight - Allow to exclude component from build

* Fix merge

* Amlogic - Correct Pixelformat reference

* Remove "wrong" Amlogic ifdef, which was not working before
This commit is contained in:
LordGrey
2021-09-15 10:32:19 +02:00
committed by GitHub
parent 8a785e70c8
commit da49f25b4e
14 changed files with 273 additions and 226 deletions

View File

@@ -22,12 +22,15 @@ target_link_libraries(hyperion
flatbufserver
flatbuffers
leddevice
boblightserver
effectengine
database
${QT_LIBRARIES}
)
if(ENABLE_BOBLIGHT)
target_link_libraries(hyperion boblightserver)
endif()
if (ENABLE_AVAHI)
target_link_libraries(hyperion bonjour)
endif ()

View File

@@ -11,7 +11,12 @@ ComponentRegister::ComponentRegister(Hyperion* hyperion)
{
// init all comps to false
QVector<hyperion::Components> vect;
vect << COMP_ALL << COMP_SMOOTHING << COMP_BLACKBORDER << COMP_FORWARDER << COMP_BOBLIGHTSERVER << COMP_GRABBER << COMP_V4L << COMP_LEDDEVICE;
vect << COMP_ALL << COMP_SMOOTHING << COMP_BLACKBORDER << COMP_FORWARDER << COMP_GRABBER << COMP_V4L << COMP_LEDDEVICE;
#if defined(ENABLE_BOBLIGHT)
vect << COMP_BOBLIGHTSERVER;
#endif
for(auto e : vect)
{
_componentStates.emplace(e, (e == COMP_ALL));

View File

@@ -37,7 +37,9 @@
#include <hyperion/CaptureCont.h>
// Boblight
#if defined(ENABLE_BOBLIGHT)
#include <boblightserver/BoblightServer.h>
#endif
Hyperion::Hyperion(quint8 instance, bool readonlyMode)
: QObject()
@@ -58,7 +60,9 @@ Hyperion::Hyperion(quint8 instance, bool readonlyMode)
, _BGEffectHandler(nullptr)
, _captureCont(nullptr)
, _ledBuffer(_ledString.leds().size(), ColorRgb::BLACK)
#if defined(ENABLE_BOBLIGHT)
, _boblightServer(nullptr)
#endif
, _readOnlyMode(readonlyMode)
{
@@ -148,9 +152,11 @@ void Hyperion::start()
// if there is no startup / background effect and no sending capture interface we probably want to push once BLACK (as PrioMuxer won't emit a priority change)
update();
#if defined(ENABLE_BOBLIGHT)
// boblight, can't live in global scope as it depends on layout
_boblightServer = new BoblightServer(this, getSetting(settings::BOBLSERVER));
connect(this, &Hyperion::settingsChanged, _boblightServer, &BoblightServer::handleSettingsUpdate);
#endif
// instance initiated, enter thread event loop
emit started();
@@ -168,7 +174,9 @@ void Hyperion::freeObjects()
clear(-1,true);
// delete components on exit of hyperion core
#if defined(ENABLE_BOBLIGHT)
delete _boblightServer;
#endif
delete _captureCont;
delete _effectEngine;
delete _raw2ledAdjustment;

View File

@@ -23,8 +23,8 @@
{
"type" : "integer",
"title" : "edt_conf_general_priority_title",
"minimum" : 100,
"maximum" : 254,
"minimum" : 2,
"maximum" : 253,
"default" : 128,
"propertyOrder" : 3
}