2020-12-18 17:38:21 +01:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <hyperion/GrabberWrapper.h>
|
|
|
|
#include <grabber/MFGrabber.h>
|
|
|
|
|
|
|
|
class MFWrapper : public GrabberWrapper
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2021-01-26 20:01:23 +01:00
|
|
|
MFWrapper(const QString & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned fps, int pixelDecimation, QString flipMode);
|
2020-12-18 17:38:21 +01:00
|
|
|
~MFWrapper() override;
|
|
|
|
|
|
|
|
bool getSignalDetectionEnable() const;
|
|
|
|
bool getCecDetectionEnable() const;
|
|
|
|
|
|
|
|
public slots:
|
|
|
|
bool start() override;
|
|
|
|
void stop() override;
|
|
|
|
|
|
|
|
void setSignalThreshold(double redSignalThreshold, double greenSignalThreshold, double blueSignalThreshold, int noSignalCounterThreshold);
|
|
|
|
void setCropping(unsigned cropLeft, unsigned cropRight, unsigned cropTop, unsigned cropBottom) override;
|
|
|
|
void setSignalDetectionOffset(double verticalMin, double horizontalMin, double verticalMax, double horizontalMax);
|
|
|
|
void setSignalDetectionEnable(bool enable);
|
|
|
|
void setCecDetectionEnable(bool enable);
|
2021-01-26 20:01:23 +01:00
|
|
|
bool setDevice(const QString& device);
|
2020-12-18 17:38:21 +01:00
|
|
|
void setFpsSoftwareDecimation(int decimation);
|
2021-01-26 20:01:23 +01:00
|
|
|
bool setEncoding(QString enc);
|
|
|
|
bool setBrightnessContrastSaturationHue(int brightness, int contrast, int saturation, int hue);
|
|
|
|
void handleSettingsUpdate(settings::type type, const QJsonDocument& config) override;
|
2020-12-18 17:38:21 +01:00
|
|
|
|
|
|
|
private slots:
|
|
|
|
void newFrame(const Image<ColorRgb> & image);
|
|
|
|
|
|
|
|
void action() override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
/// The Media Foundation grabber
|
|
|
|
MFGrabber _grabber;
|
|
|
|
};
|