2015-08-07 14:37:41 +02:00
|
|
|
#pragma once
|
|
|
|
|
2016-08-11 07:13:55 +02:00
|
|
|
#include <hyperion/GrabberWrapper.h>
|
2017-08-12 07:55:32 +02:00
|
|
|
#include <grabber/AmlogicGrabber.h>
|
2015-08-07 14:37:41 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
/// The DispmanxWrapper uses an instance of the DispmanxFrameGrabber to obtain ImageRgb's from the
|
|
|
|
/// displayed content. This ImageRgb is processed to a ColorRgb for each led and commmited to the
|
|
|
|
/// attached Hyperion.
|
|
|
|
///
|
2016-08-11 07:13:55 +02:00
|
|
|
class AmlogicWrapper : public GrabberWrapper
|
2015-08-07 14:37:41 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
/// Constructs the dispmanx frame grabber with a specified grab size and update rate.
|
|
|
|
///
|
|
|
|
/// @param[in] grabWidth The width of the grabbed image [pixels]
|
|
|
|
/// @param[in] grabHeight The height of the grabbed images [pixels]
|
|
|
|
/// @param[in] updateRate_Hz The image grab rate [Hz]
|
2019-02-08 09:38:31 +01:00
|
|
|
/// @param[in] ge2d_mode use single or combine ge2d ioctl call
|
|
|
|
/// @param[in] device amlogic grabber device
|
2015-08-07 14:37:41 +02:00
|
|
|
///
|
2019-02-08 09:38:31 +01:00
|
|
|
AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, const unsigned ge2d_mode, const QString device);
|
2015-08-07 14:37:41 +02:00
|
|
|
|
|
|
|
///
|
|
|
|
/// Destructor of this dispmanx frame grabber. Releases any claimed resources.
|
|
|
|
///
|
2017-08-12 07:55:32 +02:00
|
|
|
virtual ~AmlogicWrapper() {};
|
2015-08-07 14:37:41 +02:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
///
|
|
|
|
/// Performs a single frame grab and computes the led-colors
|
|
|
|
///
|
2016-08-11 07:13:55 +02:00
|
|
|
virtual void action();
|
2015-08-07 14:37:41 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
/// The actual grabber
|
2017-08-12 07:55:32 +02:00
|
|
|
AmlogicGrabber _grabber;
|
2015-08-07 14:37:41 +02:00
|
|
|
};
|