mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Global component states across instances
This commit is contained in:
parent
17d4406deb
commit
cd62a41f22
@ -205,8 +205,20 @@ bool API::setComponentState(const QString &comp, bool &compState, QString &reply
|
||||
|
||||
if (component != COMP_INVALID)
|
||||
{
|
||||
QMetaObject::invokeMethod(_hyperion, "compStateChangeRequest", Qt::QueuedConnection, Q_ARG(hyperion::Components, component), Q_ARG(bool, compState));
|
||||
return true;
|
||||
if (component == COMP_FORWARDER ||
|
||||
component == COMP_GRABBER ||
|
||||
component == COMP_V4L ||
|
||||
component == COMP_FLATBUFSERVER ||
|
||||
component == COMP_PROTOSERVER)
|
||||
{
|
||||
QMetaObject::invokeMethod(_instanceManager, "compStateChangeRequest", Qt::QueuedConnection, Q_ARG(hyperion::Components, component), Q_ARG(bool, compState));
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
QMetaObject::invokeMethod(_hyperion, "compStateChangeRequest", Qt::QueuedConnection, Q_ARG(hyperion::Components, component), Q_ARG(bool, compState));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
replyMsg = QString("Unknown component name: %1").arg(comp);
|
||||
return false;
|
||||
|
@ -88,9 +88,9 @@ bool HyperionIManager::startInstance(quint8 inst, bool block, QObject* caller, i
|
||||
// from Hyperion
|
||||
connect(hyperion, &Hyperion::settingsChanged, this, &HyperionIManager::settingsChanged);
|
||||
connect(hyperion, &Hyperion::videoMode, this, &HyperionIManager::requestVideoMode);
|
||||
connect(hyperion, &Hyperion::compStateChangeRequest, this, &HyperionIManager::compStateChangeRequest);
|
||||
// to Hyperion
|
||||
connect(this, &HyperionIManager::newVideoMode, hyperion, &Hyperion::newVideoMode);
|
||||
connect(this, &HyperionIManager::compStateChangeRequest, hyperion, &Hyperion::compStateChangeRequest);
|
||||
|
||||
// add to queue and start
|
||||
_startQueue << inst;
|
||||
|
@ -125,9 +125,8 @@ HyperionDaemon::HyperionDaemon(const QString& rootPath, QObject* parent, bool lo
|
||||
//Cleaning up Hyperion before quit
|
||||
connect(parent, SIGNAL(aboutToQuit()), this, SLOT(freeObjects()));
|
||||
|
||||
// pipe settings changes and component state changes from HyperionIManager to Daemon
|
||||
// pipe settings changes from HyperionIManager to Daemon
|
||||
connect(_instanceManager, &HyperionIManager::settingsChanged, this, &HyperionDaemon::settingsChanged);
|
||||
connect(_instanceManager, &HyperionIManager::compStateChangeRequest, this, &HyperionDaemon::compStateChangeRequest);
|
||||
|
||||
// listen for setting changes of framegrabber and v4l2
|
||||
connect(this, &HyperionDaemon::settingsChanged, this, &HyperionDaemon::handleSettingsUpdate);
|
||||
|
Loading…
x
Reference in New Issue
Block a user