add export timelapse

This commit is contained in:
2019-11-03 01:07:13 +01:00
parent cd128f215a
commit ee94e0ad86
7 changed files with 57 additions and 14 deletions

View File

@@ -794,7 +794,7 @@ void App::rec_loop()
{
std::unique_ptr<Image> frame;
std::unique_lock<std::mutex> lock(rec_mutex);
rec_cv.wait(lock);
rec_cv.wait(lock, [this] { return !(rec_frames.empty() && rec_running); });
if (!rec_running)
break;
if (!rec_frames.empty())
@@ -808,7 +808,10 @@ void App::rec_loop()
}
lock.unlock();
if (frame && Canvas::I->m_encoder)
{
Canvas::I->m_encoder->encode(*frame);
LOG("frame encoded");
}
update_rec_frames();
}
}