2014-02-23 22:39:23 +01:00
|
|
|
#pragma once
|
|
|
|
|
2016-08-11 07:13:55 +02:00
|
|
|
#include <hyperion/GrabberWrapper.h>
|
2014-02-23 22:39:23 +01:00
|
|
|
#include <grabber/V4L2Grabber.h>
|
|
|
|
|
2016-08-11 07:13:55 +02:00
|
|
|
class V4L2Wrapper : public GrabberWrapper
|
2014-02-23 22:39:23 +01:00
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-03-04 22:17:42 +01:00
|
|
|
V4L2Wrapper(const QString & device,
|
2014-02-23 22:39:23 +01:00
|
|
|
VideoStandard videoStandard,
|
2014-03-31 17:36:36 +02:00
|
|
|
PixelFormat pixelFormat,
|
2018-12-27 23:11:32 +01:00
|
|
|
int pixelDecimation );
|
2017-08-12 07:55:32 +02:00
|
|
|
virtual ~V4L2Wrapper() {};
|
2014-02-23 22:39:23 +01:00
|
|
|
|
2017-03-15 20:33:11 +01:00
|
|
|
bool getSignalDetectionEnable();
|
|
|
|
|
2014-02-23 22:39:23 +01:00
|
|
|
public slots:
|
2016-07-14 23:40:10 +02:00
|
|
|
bool start();
|
2014-02-23 22:39:23 +01:00
|
|
|
void stop();
|
|
|
|
|
2018-12-27 23:11:32 +01:00
|
|
|
void setSignalThreshold(double redSignalThreshold, double greenSignalThreshold, double blueSignalThreshold);
|
2016-08-12 23:07:32 +02:00
|
|
|
void setCropping(int cropLeft, int cropRight, int cropTop, int cropBottom);
|
2016-12-16 19:48:43 +01:00
|
|
|
void setSignalDetectionOffset(double verticalMin, double horizontalMin, double verticalMax, double horizontalMax);
|
2017-03-15 20:33:11 +01:00
|
|
|
void setSignalDetectionEnable(bool enable);
|
2014-02-23 22:39:23 +01:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void newFrame(const Image<ColorRgb> & image);
|
2016-08-12 09:39:41 +02:00
|
|
|
void readError(const char* err);
|
2014-02-23 22:39:23 +01:00
|
|
|
|
2016-08-11 07:13:55 +02:00
|
|
|
virtual void action();
|
2014-03-22 15:35:25 +01:00
|
|
|
|
2014-02-23 22:39:23 +01:00
|
|
|
private:
|
|
|
|
/// The V4L2 grabber
|
|
|
|
V4L2Grabber _grabber;
|
|
|
|
};
|