Support Events for Grabbers generically

This commit is contained in:
Lord-Grey
2023-11-09 18:14:26 +01:00
parent 77b5bb633d
commit c3daeef077
8 changed files with 25 additions and 15 deletions

View File

@@ -2,8 +2,6 @@
#include <grabber/VideoWrapper.h>
#include <events/EventHandler.h>
// qt includes
#include <QTimer>
@@ -24,8 +22,6 @@ VideoWrapper::VideoWrapper()
connect(&_grabber, SIGNAL(readError(const char*)), this, SLOT(readError(const char*)), Qt::DirectConnection);
connect(&_grabber, SIGNAL(readError(const char*)), this, SLOT(readError(const char*)), Qt::DirectConnection);
QObject::connect(EventHandler::getInstance(), &EventHandler::signalEvent, this, &VideoWrapper::handleEvent);
}
VideoWrapper::~VideoWrapper()
@@ -44,11 +40,6 @@ void VideoWrapper::stop()
GrabberWrapper::stop();
}
void VideoWrapper::handleEvent(Event event)
{
_grabber.handleEvent(event);
}
void VideoWrapper::handleSettingsUpdate(settings::type type, const QJsonDocument& config)
{
if(type == settings::V4L2 && _grabberName.startsWith("V4L2"))