implement dispmanx forwarding a a separate dispmanx wrapper

implement forwarding for amlogic grabber


Former-commit-id: 8a793d24bd083f9eca07c34ec3b222f0e54b4426
This commit is contained in:
redpanther
2016-02-24 14:34:19 +01:00
parent ec67caf24e
commit 6bef43887b
12 changed files with 314 additions and 44 deletions

View File

@@ -9,7 +9,7 @@
// Dispmanx grabber includes
#include <grabber/DispmanxWrapper.h>
#include "DispmanxFrameGrabber.h"
#include <grabber/DispmanxFrameGrabber.h>
DispmanxWrapper::DispmanxWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, Hyperion * hyperion) :
@@ -28,6 +28,7 @@ DispmanxWrapper::DispmanxWrapper(const unsigned grabWidth, const unsigned grabHe
_timer.setSingleShot(false);
_processor->setSize(grabWidth, grabHeight);
_forward = _hyperion->getForwarder()->protoForwardingEnabled();
// Connect the QTimer to this
QObject::connect(&_timer, SIGNAL(timeout()), this, SLOT(action()));
@@ -51,7 +52,12 @@ void DispmanxWrapper::action()
// Grab frame into the allocated image
_frameGrabber->grabFrame(_image);
//emit emitImage(_priority, _image, _timeout_ms);
if ( _forward )
{
Image<ColorRgb> image_rgb;
_image.toRgb(image_rgb);
emit emitImage(_priority, image_rgb, _timeout_ms);
}
_processor->process(_image, _ledColors);
_hyperion->setColors(_priority, _ledColors, _timeout_ms);