// QT includes #include // Hyperion-Dispmanx includes #include class FramebufferWrapper : public QObject { Q_OBJECT public: FramebufferWrapper(const QString & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned updateRate_Hz); const Image & getScreenshot(); /// /// Starts the timed capturing of screenshots /// void start(); void stop(); signals: void sig_screenshot(const Image & 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 _screenshot; };