+ Player(JPEGFrameView *destination, bool also_output_to_stream);
+
+ void play_clip(const Clip &clip, size_t clip_idx, 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.
+ using done_callback_func = std::function<void()>;
+ void set_done_callback(done_callback_func cb) { done_callback = cb; }
+
+ // Not thread-safe to set concurrently with playing.
+ // Will be called back from the player thread.
+ // The second parameter is the clip's position in the play list.
+ using next_clip_callback_func = std::function<std::pair<Clip, size_t>()>;
+ void set_next_clip_callback(next_clip_callback_func cb) { next_clip_callback = cb; }