mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Create image callback using Qt signal
Former-commit-id: cf469ba01ffd26d286e6fb8d9f081cf126042e50
This commit is contained in:
24
src/hyperion-v4l2/ScreenshotHandler.h
Normal file
24
src/hyperion-v4l2/ScreenshotHandler.h
Normal file
@@ -0,0 +1,24 @@
|
||||
// Qt includes
|
||||
#include <QObject>
|
||||
|
||||
// hyperionincludes
|
||||
#include <utils/Image.h>
|
||||
#include <utils/ColorRgb.h>
|
||||
|
||||
/// This class handles callbacks from the V4L2 grabber
|
||||
class ScreenshotHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
ScreenshotHandler(const std::string & filename);
|
||||
virtual ~ScreenshotHandler();
|
||||
|
||||
public slots:
|
||||
/// Handle a single image
|
||||
/// @param image The image to process
|
||||
void receiveImage(const Image<ColorRgb> & image);
|
||||
|
||||
private:
|
||||
const std::string _filename;
|
||||
};
|
||||
Reference in New Issue
Block a user