C++11 tidying.
[dcpomatic.git] / src / lib / player.h
index daade1d7bf6452c98838304a4772cae5cdabc678..14fb8d0ee06b50d495268411b827b283ca8fabfa 100644 (file)
@@ -34,6 +34,7 @@
 #include "content_video.h"
 #include "empty.h"
 #include "film.h"
+#include "image.h"
 #include "piece.h"
 #include "player_text.h"
 #include "position_image.h"
@@ -76,9 +77,8 @@ public:
 class Player : public std::enable_shared_from_this<Player>
 {
 public:
-       Player (std::shared_ptr<const Film>);
+       Player (std::shared_ptr<const Film>, Image::Alignment subtitle_alignment);
        Player (std::shared_ptr<const Film>, std::shared_ptr<const Playlist> playlist);
-       ~Player ();
 
        Player (Player const& Player) = delete;
        Player& operator= (Player const& Player) = delete;
@@ -133,7 +133,6 @@ private:
        void construct ();
        void setup_pieces ();
        void setup_pieces_unlocked ();
-       void flush ();
        void film_change (ChangeType, Film::Property);
        void playlist_change (ChangeType);
        void playlist_content_change (ChangeType, int, bool);
@@ -175,7 +174,7 @@ private:
 
        /** > 0 if we are suspended (i.e. pass() and seek() do nothing) */
        boost::atomic<int> _suspended;
-       std::list<std::shared_ptr<Piece> > _pieces;
+       std::list<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.
@@ -208,8 +207,8 @@ private:
        LastVideoMap _last_video;
 
        AudioMerger _audio_merger;
-       Shuffler* _shuffler = nullptr;
-       std::list<std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime> > _delay;
+       std::unique_ptr<Shuffler> _shuffler;
+       std::list<std::pair<std::shared_ptr<PlayerVideo>, dcpomatic::DCPTime>> _delay;
 
        class StreamState
        {
@@ -234,9 +233,13 @@ private:
 
        dcpomatic::DCPTime _playback_length;
 
+       /** Alignment for subtitle images that we create */
+       Image::Alignment _subtitle_alignment = Image::Alignment::PADDED;
+
        boost::signals2::scoped_connection _film_changed_connection;
        boost::signals2::scoped_connection _playlist_change_connection;
        boost::signals2::scoped_connection _playlist_content_change_connection;
 };
 
+
 #endif