mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Change confusing logic #2
This commit is contained in:
parent
f06203672e
commit
0d7213b8bf
@ -98,17 +98,17 @@ private:
|
|||||||
void start_capturing();
|
void start_capturing();
|
||||||
void process_image(const void *frameImageBuffer, int size);
|
void process_image(const void *frameImageBuffer, int size);
|
||||||
|
|
||||||
QString _currentDeviceName,
|
QString _currentDeviceName,
|
||||||
_newDeviceName;
|
_newDeviceName;
|
||||||
QMap<QString, QList<DeviceProperties>> _deviceProperties;
|
QMap<QString, QList<DeviceProperties>> _deviceProperties;
|
||||||
QMap<QString, QList<DeviceControls>> _deviceControls;
|
QMap<QString, QList<DeviceControls>> _deviceControls;
|
||||||
HRESULT _hr;
|
HRESULT _hr;
|
||||||
IMFSourceReader* _sourceReader;
|
IMFSourceReader* _sourceReader;
|
||||||
SourceReaderCB* _sourceReaderCB;
|
SourceReaderCB* _sourceReaderCB;
|
||||||
EncoderThreadManager* _threadManager;
|
EncoderThreadManager* _threadManager;
|
||||||
PixelFormat _pixelFormat,
|
PixelFormat _pixelFormat,
|
||||||
_pixelFormatConfig;
|
_pixelFormatConfig;
|
||||||
int _lineLength,
|
int _lineLength,
|
||||||
_frameByteSize,
|
_frameByteSize,
|
||||||
_noSignalCounterThreshold,
|
_noSignalCounterThreshold,
|
||||||
_noSignalCounter,
|
_noSignalCounter,
|
||||||
@ -116,13 +116,13 @@ private:
|
|||||||
_contrast,
|
_contrast,
|
||||||
_saturation,
|
_saturation,
|
||||||
_hue;
|
_hue;
|
||||||
QAtomicInt _currentFrame;
|
QAtomicInt _currentFrame;
|
||||||
ColorRgb _noSignalThresholdColor;
|
ColorRgb _noSignalThresholdColor;
|
||||||
bool _signalDetectionEnabled,
|
bool _signalDetectionEnabled,
|
||||||
_noSignalDetected,
|
_signalDetected,
|
||||||
_initialized,
|
_initialized,
|
||||||
_reload;
|
_reload;
|
||||||
double _x_frac_min,
|
double _x_frac_min,
|
||||||
_y_frac_min,
|
_y_frac_min,
|
||||||
_x_frac_max,
|
_x_frac_max,
|
||||||
_y_frac_max;
|
_y_frac_max;
|
||||||
|
@ -158,7 +158,7 @@ private:
|
|||||||
// signal detection
|
// signal detection
|
||||||
int _noSignalCounterThreshold;
|
int _noSignalCounterThreshold;
|
||||||
ColorRgb _noSignalThresholdColor;
|
ColorRgb _noSignalThresholdColor;
|
||||||
bool _standbyActivated, _signalDetectionEnabled, _noSignalDetected;
|
bool _standbyActivated, _signalDetectionEnabled, _signalDetected;
|
||||||
int _noSignalCounter;
|
int _noSignalCounter;
|
||||||
int _brightness, _contrast, _saturation, _hue;
|
int _brightness, _contrast, _saturation, _hue;
|
||||||
double _x_frac_min;
|
double _x_frac_min;
|
||||||
|
@ -42,7 +42,7 @@ MFGrabber::MFGrabber()
|
|||||||
, _currentFrame(0)
|
, _currentFrame(0)
|
||||||
, _noSignalThresholdColor(ColorRgb{0,0,0})
|
, _noSignalThresholdColor(ColorRgb{0,0,0})
|
||||||
, _signalDetectionEnabled(true)
|
, _signalDetectionEnabled(true)
|
||||||
, _noSignalDetected(true)
|
, _signalDetected(false)
|
||||||
, _initialized(false)
|
, _initialized(false)
|
||||||
, _reload(false)
|
, _reload(false)
|
||||||
, _x_frac_min(0.25)
|
, _x_frac_min(0.25)
|
||||||
@ -580,7 +580,7 @@ void MFGrabber::newThreadFrame(Image<ColorRgb> image)
|
|||||||
{
|
{
|
||||||
if (_noSignalCounter >= _noSignalCounterThreshold)
|
if (_noSignalCounter >= _noSignalCounterThreshold)
|
||||||
{
|
{
|
||||||
_noSignalDetected = false;
|
_signalDetected = true;
|
||||||
Info(_log, "Signal detected");
|
Info(_log, "Signal detected");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -593,7 +593,7 @@ void MFGrabber::newThreadFrame(Image<ColorRgb> image)
|
|||||||
}
|
}
|
||||||
else if (_noSignalCounter == _noSignalCounterThreshold)
|
else if (_noSignalCounter == _noSignalCounterThreshold)
|
||||||
{
|
{
|
||||||
_noSignalDetected = true;
|
_signalDetected = false;
|
||||||
Info(_log, "Signal lost");
|
Info(_log, "Signal lost");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,7 +81,7 @@ V4L2Grabber::V4L2Grabber()
|
|||||||
, _noSignalThresholdColor(ColorRgb{0,0,0})
|
, _noSignalThresholdColor(ColorRgb{0,0,0})
|
||||||
, _standbyActivated(false)
|
, _standbyActivated(false)
|
||||||
, _signalDetectionEnabled(true)
|
, _signalDetectionEnabled(true)
|
||||||
, _noSignalDetected(true)
|
, _signalDetected(false)
|
||||||
, _noSignalCounter(0)
|
, _noSignalCounter(0)
|
||||||
, _brightness(0)
|
, _brightness(0)
|
||||||
, _contrast(0)
|
, _contrast(0)
|
||||||
@ -1060,7 +1060,7 @@ void V4L2Grabber::newThreadFrame(Image<ColorRgb> image)
|
|||||||
{
|
{
|
||||||
if (_noSignalCounter >= _noSignalCounterThreshold)
|
if (_noSignalCounter >= _noSignalCounterThreshold)
|
||||||
{
|
{
|
||||||
_noSignalDetected = false;
|
_signalDetected = true;
|
||||||
Info(_log, "Signal detected");
|
Info(_log, "Signal detected");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1073,7 +1073,7 @@ void V4L2Grabber::newThreadFrame(Image<ColorRgb> image)
|
|||||||
}
|
}
|
||||||
else if (_noSignalCounter == _noSignalCounterThreshold)
|
else if (_noSignalCounter == _noSignalCounterThreshold)
|
||||||
{
|
{
|
||||||
_noSignalDetected = true;
|
_signalDetected = false;
|
||||||
Info(_log, "Signal lost");
|
Info(_log, "Signal lost");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user