mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 02:37:36 +00:00
VideoPlayer: Add an option to enable fast seeking
The fast seeking toggle is in the new Playback menu, and when enabled it makes the PlaybackManager immediately start playing after finding a keyframe to decode.
This commit is contained in:
parent
fd3ffd88ce
commit
ceb7632862
2 changed files with 42 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
#include <AK/FixedArray.h>
|
||||
#include <AK/NonnullRefPtr.h>
|
||||
#include <LibGUI/ActionGroup.h>
|
||||
#include <LibGUI/Forward.h>
|
||||
#include <LibGUI/Widget.h>
|
||||
#include <LibGfx/Forward.h>
|
||||
|
@ -30,6 +31,9 @@ public:
|
|||
|
||||
void update_title();
|
||||
|
||||
Video::PlaybackManager::SeekMode seek_mode();
|
||||
void set_seek_mode(Video::PlaybackManager::SeekMode seek_mode);
|
||||
|
||||
void initialize_menubar(GUI::Window&);
|
||||
|
||||
private:
|
||||
|
@ -40,6 +44,7 @@ private:
|
|||
void set_current_timestamp(Time);
|
||||
void set_time_label(Time);
|
||||
void on_decoding_error(Video::DecoderError const&);
|
||||
void update_seek_mode();
|
||||
void display_next_frame();
|
||||
|
||||
void cycle_sizing_modes();
|
||||
|
@ -63,6 +68,8 @@ private:
|
|||
RefPtr<GUI::Action> m_cycle_sizing_modes_action;
|
||||
RefPtr<GUI::HorizontalSlider> m_volume_slider;
|
||||
|
||||
RefPtr<GUI::Action> m_use_fast_seeking;
|
||||
|
||||
OwnPtr<Video::PlaybackManager> m_playback_manager;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue