diff options
Diffstat (limited to 'Userland/Libraries/LibVideo')
-rw-r--r-- | Userland/Libraries/LibVideo/PlaybackManager.cpp | 11 | ||||
-rw-r--r-- | Userland/Libraries/LibVideo/PlaybackManager.h | 4 |
2 files changed, 4 insertions, 11 deletions
diff --git a/Userland/Libraries/LibVideo/PlaybackManager.cpp b/Userland/Libraries/LibVideo/PlaybackManager.cpp index 725516dee4..77d881a8fb 100644 --- a/Userland/Libraries/LibVideo/PlaybackManager.cpp +++ b/Userland/Libraries/LibVideo/PlaybackManager.cpp @@ -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) diff --git a/Userland/Libraries/LibVideo/PlaybackManager.h b/Userland/Libraries/LibVideo/PlaybackManager.h index 9fd77674b4..950c5be667 100644 --- a/Userland/Libraries/LibVideo/PlaybackManager.h +++ b/Userland/Libraries/LibVideo/PlaybackManager.h @@ -155,10 +155,10 @@ private: NonnullOwnPtr<VideoFrameQueue> m_frame_queue; Optional<FrameQueueItem> m_next_frame; - NonnullRefPtr<Core::Timer> m_present_timer; + RefPtr<Core::Timer> m_present_timer; unsigned m_decoding_buffer_time_ms = 16; - NonnullRefPtr<Core::Timer> m_decode_timer; + RefPtr<Core::Timer> m_decode_timer; u64 m_skipped_frames; }; |