+ // 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; }
+
+ // Not thread-safe to set concurrently with playing.
+ // Will be called back from the player thread.
+ using progress_callback_func = std::function<void(const std::map<size_t, double> &progress)>;
+ void set_progress_callback(progress_callback_func cb) { progress_callback = cb; }
+
+ // QueueInterface.
+ void take_queue_spot() override;
+ void release_queue_spot() override;
+