diff --git a/plugins/video/macro-condition-video.cpp b/plugins/video/macro-condition-video.cpp index 7b5c3c51..f0dc3730 100644 --- a/plugins/video/macro-condition-video.cpp +++ b/plugins/video/macro-condition-video.cpp @@ -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(); } diff --git a/plugins/video/macro-condition-video.hpp b/plugins/video/macro-condition-video.hpp index 9a8d7efd..925a3831 100644 --- a/plugins/video/macro-condition-video.hpp +++ b/plugins/video/macro-condition-video.hpp @@ -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 _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;