/** @class Player
* @brief A class which can play a Playlist.
*/
-class Player : public std::enable_shared_from_this<Player>
+class Player
{
public:
Player (std::shared_ptr<const Film>, Image::Alignment subtitle_alignment);
/** > 0 if we are suspended (i.e. pass() and seek() do nothing) */
boost::atomic<int> _suspended;
- std::list<std::shared_ptr<Piece>> _pieces;
+ std::vector<std::shared_ptr<Piece>> _pieces;
/** Size of the image we are rendering to; this may be the DCP frame size, or
* the size of preview in a window.
public:
StreamState () {}
- StreamState (std::shared_ptr<Piece> p, dcpomatic::DCPTime l)
+ explicit StreamState(std::shared_ptr<Piece> p)
: piece(p)
- , last_push_end(l)
{}
std::shared_ptr<Piece> piece;
- dcpomatic::DCPTime last_push_end;
+ boost::optional<dcpomatic::DCPTime> last_push_end;
};
std::map<AudioStreamPtr, StreamState> _stream_states;