This commit is contained in:
Paulchen-Panther
2018-12-31 15:48:29 +01:00
parent 0e3ddb7eca
commit d6b2cfaf9d
49 changed files with 899 additions and 535 deletions

View File

@@ -7,6 +7,7 @@ CaptureCont::CaptureCont(Hyperion* hyperion)
: QObject()
, _hyperion(hyperion)
, _systemCaptEnabled(false)
, _systemInactiveTimer(new QTimer(this))
, _v4lCaptEnabled(false)
, _v4lInactiveTimer(new QTimer(this))
{
@@ -16,6 +17,11 @@ CaptureCont::CaptureCont(Hyperion* hyperion)
// comp changes
connect(_hyperion, &Hyperion::componentStateChanged, this, &CaptureCont::componentStateChanged);
// inactive timer system
connect(_systemInactiveTimer, &QTimer::timeout, this, &CaptureCont::setSystemInactive);
_systemInactiveTimer->setSingleShot(true);
_systemInactiveTimer->setInterval(5000);
// inactive timer v4l
connect(_v4lInactiveTimer, &QTimer::timeout, this, &CaptureCont::setV4lInactive);
_v4lInactiveTimer->setSingleShot(true);
@@ -38,6 +44,7 @@ void CaptureCont::handleV4lImage(const Image<ColorRgb> & image)
void CaptureCont::handleSystemImage(const Image<ColorRgb>& image)
{
_systemInactiveTimer->start();
_hyperion->setInputImage(_systemCaptPrio, image);
}
@@ -118,3 +125,8 @@ void CaptureCont::setV4lInactive()
{
_hyperion->setInputInactive(_v4lCaptPrio);
}
void CaptureCont::setSystemInactive()
{
_hyperion->setInputInactive(_systemCaptPrio);
}