Fix embedded V4L2 grabber

Former-commit-id: f9dc759a8fcac8ac95288b12a007e9c78aed82c3
This commit is contained in:
johan
2014-03-04 20:17:38 +01:00
parent 69c64c379a
commit e790cb87ca
3 changed files with 32 additions and 4 deletions

View File

@@ -1,3 +1,5 @@
#include <QMetaType>
#include <grabber/V4L2Wrapper.h>
#include <hyperion/ImageProcessorFactory.h>
@@ -25,6 +27,9 @@ V4L2Wrapper::V4L2Wrapper(const std::string &device,
_hyperion(hyperion),
_ledColors(hyperion->getLedCount(), ColorRgb{0,0,0})
{
// register the image type
qRegisterMetaType<Image<ColorRgb>>("Image<ColorRgb>");
// connect the new frame signal using a queued connection, because it will be called from a different thread
QObject::connect(&_grabber, SIGNAL(newFrame(Image<ColorRgb>)), this, SLOT(newFrame(Image<ColorRgb>)), Qt::QueuedConnection);
}