Remove unnecessary non-const operator[].
[dcpomatic.git] / src / lib / player.h
index 894f74bfc760a5a8b0afb5fbfa62d314c5fca8e3..45dcd9900c256bce1996e3b92f4ec4699dfe83bd 100644 (file)
@@ -74,7 +74,7 @@ public:
 /** @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);
@@ -227,13 +227,12 @@ private:
        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;