use PBO for timelapse data read
This commit is contained in:
@@ -792,7 +792,7 @@ void App::rec_loop()
|
||||
rec_running = true;
|
||||
while(rec_running)
|
||||
{
|
||||
std::unique_ptr<Image> frame;
|
||||
std::unique_ptr<PBO> frame;
|
||||
std::unique_lock<std::mutex> lock(rec_mutex);
|
||||
rec_cv.wait(lock, [this] { return !(rec_frames.empty() && rec_running); });
|
||||
if (!rec_running)
|
||||
@@ -809,7 +809,10 @@ void App::rec_loop()
|
||||
lock.unlock();
|
||||
if (frame && Canvas::I->m_encoder)
|
||||
{
|
||||
Canvas::I->m_encoder->encode(*frame);
|
||||
ImageRef img;
|
||||
img.create(frame->width, frame->height, frame->map());
|
||||
Canvas::I->m_encoder->encode(img);
|
||||
frame->unmap();
|
||||
LOG("frame encoded");
|
||||
}
|
||||
update_rec_frames();
|
||||
|
||||
Reference in New Issue
Block a user