test equirect timelapse

This commit is contained in:
2019-11-02 14:36:44 +01:00
parent a6a4f4f501
commit 167cceabfd
3 changed files with 20 additions and 5 deletions

View File

@@ -623,7 +623,18 @@ void App::draw(float dt)
LOG("rec tick");
rec_timer = 0.f;
Canvas::I->draw_merge(true);
Texture2D equirect = Canvas::I->m_layers_merge.gen_equirect({ 1024, 512 });
auto img = std::make_unique<Image>(equirect.get_image());
{
std::lock_guard<std::mutex> lock(rec_mutex);
rec_frames.emplace_back(std::move(img));
rec_cv.notify_all();
}
equirect.destroy();
/*
auto img = std::make_unique<Image>();
img->create(width, height);
#if __IOS__
@@ -644,6 +655,7 @@ void App::draw(float dt)
rec_frames.emplace_back(std::move(img));
rec_cv.notify_all();
}
*/
update_rec_frames();
}
}
@@ -826,7 +838,7 @@ void App::rec_loop()
if (!m_encoder)
{
m_encoder = std::make_unique<MP4Encoder>();
m_encoder->init(512, 512, 30, 500 << 10);
m_encoder->init(1024, 512, 30, 500 << 10);
}
while(rec_running)
{