Own preview and recording workers

This commit is contained in:
2026-06-16 07:18:08 +02:00
parent 4d7a23a1fd
commit 3366b54c7f
8 changed files with 78 additions and 51 deletions

View File

@@ -21,11 +21,12 @@ public:
void start_thread() override
{
app_.update_rec_frames();
app_.rec_thread = std::thread(&App::rec_loop, &app_);
app_.rec_thread = std::jthread(&App::rec_loop, &app_);
}
void stop_thread() override
{
app_.rec_thread.request_stop();
app_.rec_running = false;
app_.rec_cv.notify_all();
if (app_.rec_thread.joinable())