mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
2c831c1110
fix standalone dispmanx grabber Former-commit-id: 5ace9bc90a6fe76f5a51ecef95d6e7119d1102db
44 lines
846 B
C++
44 lines
846 B
C++
|
|
// QT includes
|
|
#include <QTimer>
|
|
|
|
// Hyperion-Dispmanx includes
|
|
#include <grabber/AmlogicGrabber.h>
|
|
|
|
class AmlogicWrapper : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz);
|
|
|
|
const Image<ColorRgb> & getScreenshot();
|
|
|
|
///
|
|
/// Starts the timed capturing of screenshots
|
|
///
|
|
void start();
|
|
|
|
void stop();
|
|
|
|
signals:
|
|
void sig_screenshot(const Image<ColorRgb> & screenshot);
|
|
|
|
private slots:
|
|
///
|
|
/// Performs a single screenshot capture and publishes the capture screenshot on the screenshot signal.
|
|
///
|
|
void capture();
|
|
|
|
private:
|
|
/// The QT timer to generate capture-publish events
|
|
QTimer _timer;
|
|
|
|
/// The grabber for creating screenshots
|
|
AmlogicGrabber _grabber;
|
|
|
|
// image buffers
|
|
Image<ColorRgb> _screenshot_rgb;
|
|
Image<ColorBgr> _screenshot;
|
|
|
|
};
|