| 31 | } |
| 32 | |
| 33 | void ScreenWorker::run() { |
| 34 | traceScope(); |
| 35 | logln("screen processor started"); |
| 36 | |
| 37 | if (auto srv = getApp()->getServer()) { |
| 38 | if (srv->getScreenCapturingFFmpeg()) { |
| 39 | runFFmpeg(); |
| 40 | } else if (!srv->getScreenCapturingOff()) { |
| 41 | runNative(); |
| 42 | } else { |
| 43 | while (!threadShouldExit() && nullptr != m_socket && m_socket->isConnected()) { |
| 44 | sleepExitAware(100); |
| 45 | } |
| 46 | } |
| 47 | } else { |
| 48 | m_error = "no server object"; |
| 49 | } |
| 50 | |
| 51 | if (m_error.isNotEmpty()) { |
| 52 | logln("screen processor error: " << m_error); |
| 53 | } |
| 54 | |
| 55 | logln("screen processor terminated"); |
| 56 | } |
| 57 | |
| 58 | void ScreenWorker::runFFmpeg() { |
| 59 | traceScope(); |
nothing calls this directly
no test coverage detected