2013-08-13 11:10:45 +02:00
|
|
|
#pragma once
|
|
|
|
|
2013-08-14 10:54:49 +02:00
|
|
|
// Utils includes
|
2013-11-11 10:00:37 +01:00
|
|
|
#include <utils/ColorRgba.h>
|
2016-08-11 07:13:55 +02:00
|
|
|
#include <hyperion/GrabberWrapper.h>
|
2017-08-12 07:55:32 +02:00
|
|
|
#include <grabber/DispmanxFrameGrabber.h>
|
2013-08-13 11:10:45 +02:00
|
|
|
|
2013-08-14 10:54:49 +02:00
|
|
|
///
|
2013-11-11 10:00:37 +01:00
|
|
|
/// The DispmanxWrapper uses an instance of the DispmanxFrameGrabber to obtain ImageRgb's from the
|
2018-12-27 23:11:32 +01:00
|
|
|
/// displayed content. This ImageRgb is forwarded to all Hyperion instances via HyperionDaemon
|
2013-08-14 10:54:49 +02:00
|
|
|
///
|
2016-08-11 07:13:55 +02:00
|
|
|
class DispmanxWrapper: public GrabberWrapper
|
2013-08-13 11:10:45 +02:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2013-09-06 21:26:58 +02:00
|
|
|
///
|
|
|
|
/// 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]
|
|
|
|
///
|
2018-12-27 23:11:32 +01:00
|
|
|
DispmanxWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
|
2013-08-13 11:10:45 +02:00
|
|
|
|
|
|
|
public slots:
|
2013-09-06 21:26:58 +02:00
|
|
|
///
|
|
|
|
/// Performs a single frame grab and computes the led-colors
|
|
|
|
///
|
2020-08-02 22:35:09 +02:00
|
|
|
void action() override;
|
2013-08-13 11:10:45 +02:00
|
|
|
|
|
|
|
private:
|
2013-09-06 21:26:58 +02:00
|
|
|
/// The actual grabber
|
2017-08-12 07:55:32 +02:00
|
|
|
DispmanxFrameGrabber _grabber;
|
2013-08-13 11:10:45 +02:00
|
|
|
};
|