X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=player.h;h=e251c6e86d8f20446e8692361bad34c2123d15bd;hb=e2e716b1d9fb1f354bbe8666465292b67432d403;hp=06e70b4570b83909b6fb3d66f71c9ae2787d20ed;hpb=9c8b3d2c80d20a391ada89a2a54910ec35c036d2;p=nageru diff --git a/player.h b/player.h index 06e70b4..e251c6e 100644 --- a/player.h +++ b/player.h @@ -14,6 +14,7 @@ public: Player(JPEGFrameView *destination); void play_clip(const Clip &clip, unsigned stream_idx); + void override_angle(unsigned stream_idx); // For the current clip only. // Not thread-safe to set concurrently with playing. // Will be called back from the player thread. @@ -27,12 +28,14 @@ private: done_callback_func done_callback; std::mutex mu; - Clip current_clip; // Under mu. + Clip current_clip; // Under mu. Can have pts_in = -1 for no clip. unsigned current_stream_idx; // Under mu. - enum { PAUSED, PLAYING } cue_state = PAUSED; // Under cue_state_mu. - std::mutex cue_state_mu; - std::condition_variable cue_is_playing; + std::mutex queue_state_mu; + std::condition_variable new_clip_changed; + bool new_clip_ready = false; // Under queue_state_mu. + bool playing = false; // Under queue_state_mu. + int override_stream_idx = -1; // Under queue_state_mu. }; #endif // !defined(_PLAYER_H)