PylonRecorder/grabber.h

34 lines
560 B
C++

#ifndef GRABBER_H
#define GRABBER_H
#include <QObject>
#include <QThread>
#include "pylonwrapper.h"
#include "imagebuffer.h"
class Grabber : public QThread
{
Q_OBJECT
public:
Grabber(PylonWrapper *camera, ImageBuffer*buffer, QObject *parent = nullptr) :
QThread(parent), camera(camera), buffer(buffer) {}
void run() override;
void stop();
private:
bool stop_request = false;
PylonWrapper *camera;
ImageBuffer *buffer;
public slots:
void requestStop() {
stop_request=true;
}
signals:
void terminated();
};
#endif // GRABBER_H