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:
parent
6edc0cf5ab
commit
e181b1cb82
12 changed files with 37 additions and 51 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue