mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
-Reload MF Grabber only once per WebUI update
- Cleanup
This commit is contained in:
@@ -56,7 +56,7 @@ public:
|
||||
QList<DevicePropertiesItem> valid = QList<DevicePropertiesItem>();
|
||||
};
|
||||
|
||||
MFGrabber(const QString & device, const unsigned width, const unsigned height, const unsigned fps, const unsigned input, int pixelDecimation, QString flipMode);
|
||||
MFGrabber(const QString & device, const unsigned width, const unsigned height, const unsigned fps, int pixelDecimation, QString flipMode);
|
||||
~MFGrabber() override;
|
||||
|
||||
void receive_image(const void *frameImageBuffer, int size);
|
||||
@@ -74,14 +74,15 @@ public:
|
||||
void setSignalDetectionEnable(bool enable) override;
|
||||
void setPixelDecimation(int pixelDecimation) override;
|
||||
void setCecDetectionEnable(bool enable) override;
|
||||
void setDeviceVideoStandard(QString device, VideoStandard videoStandard) override;
|
||||
bool setInput(int input) override;
|
||||
bool setDevice(QString device) override;
|
||||
bool setWidthHeight(int width, int height) override;
|
||||
bool setFramerate(int fps) override;
|
||||
void setFpsSoftwareDecimation(int decimation);
|
||||
void setEncoding(QString enc);
|
||||
bool setEncoding(QString enc);
|
||||
void setFlipMode(QString flipMode);
|
||||
void setBrightnessContrastSaturationHue(int brightness, int contrast, int saturation, int hue);
|
||||
bool setBrightnessContrastSaturationHue(int brightness, int contrast, int saturation, int hue);
|
||||
|
||||
void reloadGrabber();
|
||||
|
||||
public slots:
|
||||
bool start();
|
||||
@@ -105,7 +106,7 @@ private:
|
||||
QMap<QString, MFGrabber::DeviceProperties> _deviceProperties;
|
||||
HRESULT _hr;
|
||||
SourceReaderCB* _sourceReaderCB;
|
||||
PixelFormat _pixelFormat;
|
||||
PixelFormat _pixelFormat, _pixelFormatConfig;
|
||||
int _pixelDecimation,
|
||||
_lineLength,
|
||||
_frameByteSize,
|
||||
|
@@ -51,25 +51,15 @@ private:
|
||||
tjtransform* _xform;
|
||||
#endif
|
||||
|
||||
static volatile bool _isActive;
|
||||
static volatile bool _isActive;
|
||||
volatile bool _isBusy;
|
||||
QSemaphore _semaphore;
|
||||
unsigned int _threadIndex;
|
||||
PixelFormat _pixelFormat;
|
||||
uint8_t* _localData;
|
||||
int _localDataSize,
|
||||
_scalingFactorsCount,
|
||||
_size,
|
||||
_width,
|
||||
_height,
|
||||
_lineLength,
|
||||
_subsamp,
|
||||
_currentFrame,
|
||||
_pixelDecimation;
|
||||
unsigned _cropLeft,
|
||||
_cropTop,
|
||||
_cropBottom,
|
||||
_cropRight;
|
||||
uint8_t* _localData, *_flipBuffer;
|
||||
int _scalingFactorsCount, _width, _height, _lineLength, _subsamp, _currentFrame, _pixelDecimation;
|
||||
unsigned long _size;
|
||||
unsigned _cropLeft, _cropTop, _cropBottom, _cropRight;
|
||||
FlipMode _flipMode;
|
||||
ImageResampler _imageResampler;
|
||||
};
|
||||
|
@@ -8,7 +8,7 @@ class MFWrapper : public GrabberWrapper
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
MFWrapper(const QString & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned fps, const unsigned input, int pixelDecimation, QString flipMode);
|
||||
MFWrapper(const QString & device, const unsigned grabWidth, const unsigned grabHeight, const unsigned fps, int pixelDecimation, QString flipMode);
|
||||
~MFWrapper() override;
|
||||
|
||||
bool getSignalDetectionEnable() const;
|
||||
@@ -23,17 +23,11 @@ public slots:
|
||||
void setSignalDetectionOffset(double verticalMin, double horizontalMin, double verticalMax, double horizontalMax);
|
||||
void setSignalDetectionEnable(bool enable);
|
||||
void setCecDetectionEnable(bool enable);
|
||||
void setDeviceVideoStandard(const QString& device, VideoStandard videoStandard);
|
||||
void handleSettingsUpdate(settings::type type, const QJsonDocument& config) override;
|
||||
|
||||
///
|
||||
/// @brief set software decimation (v4l2)
|
||||
///
|
||||
bool setDevice(const QString& device);
|
||||
void setFpsSoftwareDecimation(int decimation);
|
||||
|
||||
void setEncoding(QString enc);
|
||||
|
||||
void setBrightnessContrastSaturationHue(int brightness, int contrast, int saturation, int hue);
|
||||
bool setEncoding(QString enc);
|
||||
bool setBrightnessContrastSaturationHue(int brightness, int contrast, int saturation, int hue);
|
||||
void handleSettingsUpdate(settings::type type, const QJsonDocument& config) override;
|
||||
|
||||
private slots:
|
||||
void newFrame(const Image<ColorRgb> & image);
|
||||
|
Reference in New Issue
Block a user