MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / GetScreenshot

Method GetScreenshot

plugins/video/macro-condition-video.cpp:232–248  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232void MacroConditionVideo::GetScreenshot(bool blocking)
233{
234 auto source = obs_weak_source_get_source(_video.GetVideo());
235 _screenshotData.~Screenshot();
236 QRect screenshotArea;
237 if (_areaParameters.enable && _condition != VideoCondition::NO_IMAGE) {
238 screenshotArea.setRect(_areaParameters.area.x,
239 _areaParameters.area.y,
240 _areaParameters.area.width,
241 _areaParameters.area.height);
242 }
243 const int timeout = GetIntervalValue() < 300 ? 300 : GetIntervalValue();
244 new (&_screenshotData)
245 Screenshot(source, screenshotArea, blocking, timeout);
246 obs_source_release(source);
247 _getNextScreenshot = false;
248}
249
250bool MacroConditionVideo::LoadImageFromFile()
251{

Callers

nothing calls this directly

Calls 3

GetVideoMethod · 0.80
~ScreenshotMethod · 0.80
GetIntervalValueFunction · 0.50

Tested by

no test coverage detected