1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:37:36 +00:00

Userland: Use Core::Timer::create_foo() factory functions where possible

This commit is contained in:
Sam Atkins 2023-01-11 20:00:46 +00:00 committed by Andreas Kling
parent 6edc0cf5ab
commit e181b1cb82
12 changed files with 37 additions and 51 deletions

View file

@ -33,16 +33,9 @@ PlaybackManager::PlaybackManager(Core::Object& event_handler, NonnullOwnPtr<Demu
, m_selected_video_track(video_track)
, m_decoder(move(decoder))
, m_frame_queue(make<VideoFrameQueue>())
, m_present_timer(Core::Timer::construct())
, m_decode_timer(Core::Timer::construct())
{
m_present_timer->set_single_shot(true);
m_present_timer->set_interval(0);
m_present_timer->on_timeout = [&] { update_presented_frame(); };
m_decode_timer->set_single_shot(true);
m_decode_timer->set_interval(0);
m_decode_timer->on_timeout = [&] { on_decode_timer(); };
m_present_timer = Core::Timer::create_single_shot(0, [&] { update_presented_frame(); }).release_value_but_fixme_should_propagate_errors();
m_decode_timer = Core::Timer::create_single_shot(0, [&] { on_decode_timer(); }).release_value_but_fixme_should_propagate_errors();
}
void PlaybackManager::set_playback_status(PlaybackStatus status)