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.
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)