| 110 | } |
| 111 | |
| 112 | void 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 | |
| 138 | void ProcessorWindow::startCapturing() { |
| 139 | traceScope(); |
nothing calls this directly
no test coverage detected