X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=futatabi%2Fplayer.h;h=79ab64db4a1788430aa9658287db9621119b0001;hb=b3fa9338f37e8c7e2bb9ca07d3417a909fcc6d6e;hp=a097fd963c23f42476e1fa292c3d0644b565cbaf;hpb=e20bf0f86703779f11d575f44173ff73544e1c2d;p=nageru diff --git a/futatabi/player.h b/futatabi/player.h index a097fd9..79ab64d 100644 --- a/futatabi/player.h +++ b/futatabi/player.h @@ -61,6 +61,16 @@ public: pause_status = status; } + void skip_to_next() + { + should_skip_to_next = true; + } + + void set_master_speed(float speed) + { + change_master_speed = speed; + } + // Not thread-safe to set concurrently with playing. // Will be called back from the player thread. using done_callback_func = std::function; @@ -90,6 +100,8 @@ private: std::thread player_thread; std::atomic should_quit{ false }; + std::atomic should_skip_to_next{ false }; + std::atomic change_master_speed{ 0.0f / 0.0f }; JPEGFrameView *destination; done_callback_func done_callback;