mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
The OSD will use 20Hz for frame capture frequency The video capture frequency is based on the amlvideodri capture module
42 lines
779 B
C++
42 lines
779 B
C++
|
|
// QT includes
|
|
#include <QThread>
|
|
|
|
// Hyperion-Dispmanx includes
|
|
#include <grabber/AmlogicGrabber.h>
|
|
|
|
class AmlogicWrapper : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
AmlogicWrapper(const unsigned grabWidth, const unsigned grabHeight);
|
|
|
|
const Image<ColorRgb> & getScreenshot();
|
|
|
|
///
|
|
/// Starts the threaded capturing of screenshots
|
|
///
|
|
void start();
|
|
|
|
void stop();
|
|
|
|
signals:
|
|
void sig_screenshot(const Image<ColorRgb> & screenshot);
|
|
|
|
private slots:
|
|
///
|
|
/// Performs screenshot captures and publishes the capture screenshot on the screenshot signal.
|
|
///
|
|
void capture();
|
|
|
|
private:
|
|
/// The QT thread to generate capture-publish events
|
|
QThread _thread;
|
|
|
|
/// The grabber for creating screenshots
|
|
AmlogicGrabber _grabber;
|
|
|
|
// image buffers
|
|
Image<ColorRgb> _screenshot;
|
|
};
|