mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:27:45 +00:00
LibVideo/PlaybackManager: Use a function to start the internal timer
In addition, this renames the internal timer to better suit its new purpose since the playback state handlers were added. Not only is it used to time frame presentations, but also to poll the queue when seeking or buffering.
This commit is contained in:
parent
71d70df34f
commit
e31f696ee6
2 changed files with 18 additions and 12 deletions
|
@ -161,6 +161,7 @@ private:
|
|||
Optional<Time> seek_demuxer_to_most_recent_keyframe(Time timestamp, Optional<Time> earliest_available_sample = OptionalNone());
|
||||
|
||||
Optional<FrameQueueItem> dequeue_one_frame();
|
||||
void set_state_update_timer(int delay_ms);
|
||||
|
||||
void decode_and_queue_one_sample();
|
||||
|
||||
|
@ -179,7 +180,7 @@ private:
|
|||
|
||||
VideoFrameQueue m_frame_queue;
|
||||
|
||||
RefPtr<Core::Timer> m_present_timer;
|
||||
RefPtr<Core::Timer> m_state_update_timer;
|
||||
unsigned m_decoding_buffer_time_ms = 16;
|
||||
|
||||
RefPtr<Threading::Thread> m_decode_thread;
|
||||
|
@ -216,7 +217,7 @@ private:
|
|||
|
||||
virtual Time current_time() const;
|
||||
|
||||
virtual ErrorOr<void> on_timer_callback() { return {}; };
|
||||
virtual ErrorOr<void> do_timed_state_update() { return {}; };
|
||||
|
||||
protected:
|
||||
template<class T, class... Args>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue