| 2319 | } |
| 2320 | |
| 2321 | void captureThreadSync() { |
| 2322 | auto ref = capture_thread_sync.ref(); |
| 2323 | |
| 2324 | std::vector<std::unique_ptr<sync_session_ctx_t>> synced_session_ctxs; |
| 2325 | |
| 2326 | auto &ctx = ref->encode_session_ctx_queue; |
| 2327 | auto lg = util::fail_guard([&]() { |
| 2328 | ctx.stop(); |
| 2329 | |
| 2330 | for (auto &ctx : synced_session_ctxs) { |
| 2331 | ctx->shutdown_event->raise(true); |
| 2332 | ctx->join_event->raise(true); |
| 2333 | } |
| 2334 | |
| 2335 | for (auto &ctx : ctx.unsafe()) { |
| 2336 | ctx.shutdown_event->raise(true); |
| 2337 | ctx.join_event->raise(true); |
| 2338 | } |
| 2339 | }); |
| 2340 | |
| 2341 | // Encoding and capture takes place on this thread |
| 2342 | platf::adjust_thread_priority(platf::thread_priority_e::high); |
| 2343 | |
| 2344 | std::vector<std::string> display_names; |
| 2345 | int display_p = -1; |
| 2346 | while (encode_run_sync(synced_session_ctxs, ctx, display_names, display_p) == encode_e::reinit) {} |
| 2347 | } |
| 2348 | |
| 2349 | void capture_async( |
| 2350 | safe::mail_t mail, |
nothing calls this directly
no test coverage detected