mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Created first draft of 'hyperion-d'.
This commit is contained in:
@@ -4,18 +4,30 @@
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
|
||||
// Forward class declaration
|
||||
class ImageProcessor;
|
||||
class DispmanxFrameGrabber;
|
||||
// Utils includes
|
||||
#include <utils/RgbColor.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();
|
||||
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();
|
||||
|
||||
@@ -24,9 +36,17 @@ public slots:
|
||||
void stop();
|
||||
|
||||
private:
|
||||
const int _updateInterval_ms;
|
||||
const int _timeout_ms;
|
||||
|
||||
|
||||
QTimer _timer;
|
||||
|
||||
DispmanxFrameGrabber* _frameGrabber;
|
||||
ImageProcessor* _processor;
|
||||
DispmanxFrameGrabber * _frameGrabber;
|
||||
ImageProcessor * _processor;
|
||||
|
||||
std::vector<RgbColor> _ledColors;
|
||||
|
||||
Hyperion * _hyperion;
|
||||
};
|
||||
|
||||
|
@@ -20,7 +20,9 @@ public:
|
||||
|
||||
~Hyperion();
|
||||
|
||||
void setValue(int priority, std::vector<RgbColor> &ledColors);
|
||||
unsigned getLedCount() const;
|
||||
|
||||
void setValue(int priority, std::vector<RgbColor> &ledColors, const int timeout_ms);
|
||||
|
||||
private:
|
||||
void applyTransform(std::vector<RgbColor>& colors) const;
|
||||
|
@@ -1,11 +1,3 @@
|
||||
// Copyright (c) 2012 TNO, The Netherlands.
|
||||
//
|
||||
// This file contains information proprietary to TNO.
|
||||
//
|
||||
// Any disclosure or use of this information or any reproduction of this document or any part thereof for
|
||||
// other than the specified purpose for which it is intended is expressly prohibited except as TNO may
|
||||
// otherwise agree to in writing.
|
||||
|
||||
#pragma once
|
||||
|
||||
// stl includes
|
||||
|
Reference in New Issue
Block a user