MCPcopy Create free account
hub / github.com/apohl79/audiogridder / updateScreenCaptureArea

Method updateScreenCaptureArea

Server/Source/ProcessorWindow.cpp:112–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

110}
111
112void ProcessorWindow::updateScreenCaptureArea() {
113 traceScope();
114 auto rect = getScreenCaptureRect();
115 if (!rect.isEmpty()) {
116 if (auto rec = ScreenRecorder::getInstance()) {
117 if (rec->isRecording() && m_screenCaptureRect != rect &&
118 (m_processor->isClient() || (m_processor->hasEditor() && nullptr != m_editor))) {
119 traceln("updating area");
120 m_screenCaptureRect = rect;
121 rec->stop();
122
123 if (isFullyVisible()) {
124 rec->resume(m_screenCaptureRect);
125 } else {
126 if (auto onErr = getApp()->getWorkerErrorCallback(m_tid)) {
127 onErr("Screen capturing failed: The plugin window must be fully visible to be captured!");
128 }
129 logln("error: can't resume capturing when plugin window not fully visible");
130 }
131 }
132 }
133 } else {
134 logln("error: can't update screen capture area with empty rect");
135 }
136}
137
138void ProcessorWindow::startCapturing() {
139 traceScope();

Callers

nothing calls this directly

Calls 6

isRecordingMethod · 0.80
isClientMethod · 0.80
resumeMethod · 0.80
hasEditorMethod · 0.45
stopMethod · 0.45

Tested by

no test coverage detected