mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
update
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user