Own preview and recording workers
This commit is contained in:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user