mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
e6170ed698
cleanup some cmakelist files fix qt5 build Former-commit-id: 024b5b6dc5dc96fcb16f6e8958ad3684a6728504
43 lines
865 B
C++
43 lines
865 B
C++
|
|
// QT includes
|
|
#include <QTimer>
|
|
|
|
// Hyperion-Dispmanx includes
|
|
#include <grabber/FramebufferFrameGrabber.h>
|
|
|
|
class FramebufferWrapper : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
FramebufferWrapper(const std::string & device, 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
|
|
FramebufferFrameGrabber _grabber;
|
|
|
|
// image buffers
|
|
Image<ColorRgb> _screenshot;
|
|
|
|
};
|