mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
restructured project structure: move projects into sub-folders, split dispmanx-grabber from hyperion
This commit is contained in:
54
include/dispmanx-grabber/DispmanxWrapper.h
Normal file
54
include/dispmanx-grabber/DispmanxWrapper.h
Normal file
@@ -0,0 +1,54 @@
|
||||
#pragma once
|
||||
|
||||
// QT includes
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
|
||||
// Utils includes
|
||||
#include <utils/RgbColor.h>
|
||||
#include <utils/RgbImage.h>
|
||||
|
||||
// Forward class declaration
|
||||
class DispmanxFrameGrabber;
|
||||
class Hyperion;
|
||||
class ImageProcessor;
|
||||
|
||||
///
|
||||
/// The DispmanxWrapper uses an instance of the DispmanxFrameGrabber to obtain RgbImage's from the
|
||||
/// displayed content. This RgbImage is processed to a RgbColor for each led and commmited to the
|
||||
/// attached Hyperion.
|
||||
///
|
||||
class DispmanxWrapper: public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DispmanxWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz, Hyperion * hyperion);
|
||||
|
||||
virtual ~DispmanxWrapper();
|
||||
|
||||
signals:
|
||||
void ledValues(const unsigned priority, const std::vector<RgbColor> ledColors, const unsigned timeout_ms);
|
||||
|
||||
public slots:
|
||||
void start();
|
||||
|
||||
void action();
|
||||
|
||||
void stop();
|
||||
|
||||
private:
|
||||
const int _updateInterval_ms;
|
||||
const int _timeout_ms;
|
||||
|
||||
|
||||
QTimer _timer;
|
||||
|
||||
RgbImage _image;
|
||||
DispmanxFrameGrabber * _frameGrabber;
|
||||
ImageProcessor * _processor;
|
||||
|
||||
std::vector<RgbColor> _ledColors;
|
||||
|
||||
Hyperion * _hyperion;
|
||||
};
|
||||
|
Reference in New Issue
Block a user