2015-01-18 00:04:45 +01: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/FramebufferFrameGrabber.h>
|
2015-01-18 00:04:45 +01:00
|
|
|
|
|
|
|
///
|
|
|
|
/// The FramebufferWrapper uses an instance of the FramebufferFrameGrabber 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 FramebufferWrapper: public GrabberWrapper
|
2015-01-18 00:04:45 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
///
|
|
|
|
/// Constructs the framebuffer frame grabber with a specified grab size and update rate.
|
|
|
|
///
|
|
|
|
/// @param[in] device Framebuffer device name/path
|
|
|
|
/// @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
|
|
|
FramebufferWrapper(const QString & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
|
2015-01-18 00:04:45 +01:00
|
|
|
|
|
|
|
public slots:
|
|
|
|
///
|
|
|
|
/// Performs a single frame grab and computes the led-colors
|
|
|
|
///
|
2020-08-02 22:35:09 +02:00
|
|
|
void action() override;
|
2015-01-18 00:04:45 +01:00
|
|
|
|
|
|
|
private:
|
|
|
|
/// The actual grabber
|
2017-08-12 07:55:32 +02:00
|
|
|
FramebufferFrameGrabber _grabber;
|
2015-01-18 00:04:45 +01:00
|
|
|
};
|