mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
Active grabber fix
This commit is contained in:
parent
39f648087e
commit
d72a59e981
@ -47,6 +47,7 @@ void CaptureCont::handleV4lImage(const QString& name, const Image<ColorRgb> & im
|
||||
{
|
||||
_hyperion->registerInput(_v4lCaptPrio, hyperion::COMP_V4L, "System", name);
|
||||
_v4lCaptName = name;
|
||||
emit GlobalSignals::getInstance()->requestSource(hyperion::COMP_V4L, int(_hyperion->getInstanceIndex()), _v4lCaptEnabled);
|
||||
}
|
||||
_v4lInactiveTimer->start();
|
||||
_hyperion->setInputImage(_v4lCaptPrio, image);
|
||||
@ -58,6 +59,7 @@ void CaptureCont::handleSystemImage(const QString& name, const Image<ColorRgb>&
|
||||
{
|
||||
_hyperion->registerInput(_systemCaptPrio, hyperion::COMP_GRABBER, "System", name);
|
||||
_systemCaptName = name;
|
||||
emit GlobalSignals::getInstance()->requestSource(hyperion::COMP_GRABBER, int(_hyperion->getInstanceIndex()), _systemCaptEnabled);
|
||||
}
|
||||
_systemInactiveTimer->start();
|
||||
_hyperion->setInputImage(_systemCaptPrio, image);
|
||||
|
@ -43,12 +43,15 @@ GrabberWrapper::~GrabberWrapper()
|
||||
}
|
||||
|
||||
bool GrabberWrapper::start()
|
||||
{
|
||||
if (!_timer->isActive())
|
||||
{
|
||||
// Start the timer with the pre configured interval
|
||||
Debug(_log,"Grabber start()");
|
||||
_timer->start();
|
||||
return _timer->isActive();
|
||||
}
|
||||
}
|
||||
|
||||
void GrabberWrapper::stop()
|
||||
{
|
||||
@ -185,9 +188,9 @@ void GrabberWrapper::handleSourceRequest(hyperion::Components component, int hyp
|
||||
{
|
||||
if(component == hyperion::Components::COMP_GRABBER && !_grabberName.startsWith("V4L"))
|
||||
{
|
||||
if(listen && !GRABBER_SYS_CLIENTS.contains(hyperionInd))
|
||||
if(listen)
|
||||
GRABBER_SYS_CLIENTS.insert(hyperionInd, _grabberName);
|
||||
else if (!listen)
|
||||
else
|
||||
GRABBER_SYS_CLIENTS.remove(hyperionInd);
|
||||
|
||||
if(GRABBER_SYS_CLIENTS.empty())
|
||||
@ -197,9 +200,9 @@ void GrabberWrapper::handleSourceRequest(hyperion::Components component, int hyp
|
||||
}
|
||||
else if(component == hyperion::Components::COMP_V4L && _grabberName.startsWith("V4L"))
|
||||
{
|
||||
if(listen && !GRABBER_V4L_CLIENTS.contains(hyperionInd))
|
||||
if(listen)
|
||||
GRABBER_V4L_CLIENTS.insert(hyperionInd, _grabberName);
|
||||
else if (!listen)
|
||||
else
|
||||
GRABBER_V4L_CLIENTS.remove(hyperionInd);
|
||||
|
||||
if(GRABBER_V4L_CLIENTS.empty())
|
||||
|
Loading…
Reference in New Issue
Block a user