mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Hide outdated video condition options
The "throttle" and "reduce matching latency" optiohns were introduced before "short circuit evaluation" was available and are now outdated. Both don't behave as expected with this option enabled. The throttling effect can be better achieved with an additional "Timer" condition.
This commit is contained in:
parent
98260b25a1
commit
7ec95e33eb
|
|
@ -234,8 +234,9 @@ void MacroConditionVideo::GetScreenshot(bool blocking)
|
|||
_areaParameters.area.width,
|
||||
_areaParameters.area.height);
|
||||
}
|
||||
new (&_screenshotData) Screenshot(source, screenshotArea, blocking,
|
||||
GetIntervalValue());
|
||||
const int timeout = GetIntervalValue() < 300 ? 300 : GetIntervalValue();
|
||||
new (&_screenshotData)
|
||||
Screenshot(source, screenshotArea, blocking, timeout);
|
||||
obs_source_release(source);
|
||||
_getNextScreenshot = false;
|
||||
}
|
||||
|
|
@ -1560,6 +1561,17 @@ void MacroConditionVideoEdit::SetWidgetVisibility()
|
|||
_patternMatchModeLayout,
|
||||
_entryData->_patternMatchParameters.useForChangedCheck);
|
||||
}
|
||||
|
||||
// TODO:
|
||||
// Remove "reduce matching latency" and "reduce cpu load" options as they
|
||||
// have become superfluous with short circuit evaluation
|
||||
if (!_entryData->_throttleEnabled) {
|
||||
SetLayoutVisible(_throttleControlLayout, false);
|
||||
}
|
||||
if (_entryData->_blockUntilScreenshotDone) {
|
||||
_reduceLatency->hide();
|
||||
}
|
||||
|
||||
Resize();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -60,13 +60,18 @@ public:
|
|||
// If not set the screenshot will be gathered in one interval and
|
||||
// checked in the next one.
|
||||
// If set both operations will happen in the same interval.
|
||||
bool _blockUntilScreenshotDone = false;
|
||||
//
|
||||
// TODO: Remove this option in a future release as it has become
|
||||
// superfluous with "short circuit" evaluation.
|
||||
bool _blockUntilScreenshotDone = true;
|
||||
NumberVariable<double> _brightnessThreshold = 0.5;
|
||||
PatternMatchParameters _patternMatchParameters;
|
||||
ObjDetectParameters _objMatchParameters;
|
||||
OCRParameters _ocrParameters;
|
||||
ColorParameters _colorParameters;
|
||||
AreaParameters _areaParameters;
|
||||
// TODO: Remove this option in a future release as it has become
|
||||
// superfluous with "short circuit" evaluation.
|
||||
bool _throttleEnabled = false;
|
||||
int _throttleCount = 3;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user