mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Support Events for Grabbers generically
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
// utils includes
|
||||
#include <utils/GlobalSignals.h>
|
||||
#include <events/EventHandler.h>
|
||||
|
||||
// qt
|
||||
#include <QTimer>
|
||||
@@ -49,6 +50,8 @@ GrabberWrapper::GrabberWrapper(const QString& grabberName, Grabber * ggrabber, i
|
||||
|
||||
// listen for source requests
|
||||
connect(GlobalSignals::getInstance(), &GlobalSignals::requestSource, this, &GrabberWrapper::handleSourceRequest);
|
||||
|
||||
QObject::connect(EventHandler::getInstance(), &EventHandler::signalEvent, this, &GrabberWrapper::handleEvent);
|
||||
}
|
||||
|
||||
GrabberWrapper::~GrabberWrapper()
|
||||
@@ -83,6 +86,11 @@ void GrabberWrapper::stop()
|
||||
}
|
||||
}
|
||||
|
||||
void GrabberWrapper::handleEvent(Event event)
|
||||
{
|
||||
_ggrabber->handleEvent(event);
|
||||
}
|
||||
|
||||
bool GrabberWrapper::isActive() const
|
||||
{
|
||||
return _timer->isActive();
|
||||
|
Reference in New Issue
Block a user