ProtoBuffer, UDPListener ...

Protocol Buffer reimplemented to receive image data from third-party apps
The status of the component "UDPListener" is now displayed correctly in WebUI
Global signal names for WebUI added
This commit is contained in:
Paulchen-Panther
2019-02-17 15:26:11 +01:00
parent 777caafb24
commit 7ff9d7037b
38 changed files with 990 additions and 64 deletions

View File

@@ -5,6 +5,7 @@
#include <bonjour/bonjourserviceregister.h>
// hyperion includes
#include <hyperion/Hyperion.h>
#include "HyperionConfig.h"
// qt includes
@@ -22,6 +23,9 @@ UDPListener::UDPListener(const QJsonDocument& config) :
_isActive(false),
_listenPort(0)
{
// listen for component change
connect(Hyperion::getInstance(), &Hyperion::componentStateChanged, this, &UDPListener::componentStateChanged);
// init
handleSettingsUpdate(settings::UDPLISTENER, config);
}
@@ -70,6 +74,8 @@ void UDPListener::start()
_serviceRegister->registerService("_hyperiond-udp._udp", _listenPort);
}
}
Hyperion::getInstance()->getComponentRegister().componentStateChanged(COMP_UDPLISTENER, _isActive);
}
void UDPListener::stop()
@@ -80,7 +86,7 @@ void UDPListener::stop()
_server->close();
_isActive = false;
Info(_log, "Stopped");
// emit clearGlobalPriority(_priority, hyperion::COMP_UDPLISTENER);
Hyperion::getInstance()->getComponentRegister().componentStateChanged(COMP_UDPLISTENER, _isActive);
}
void UDPListener::componentStateChanged(const hyperion::Components component, bool enable)