X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplayer.h;h=76721837931fecc910ec45d3bc2afd33c1342a61;hb=9bfa07293928c371d59db2091ba2b7e715ce5994;hp=8fc02d9c676312829ce8fb2ee497bf9c0ebeefd2;hpb=a7dab6e86e66269df937650a6e5ed7f63a3757ac;p=dcpomatic.git diff --git a/src/lib/player.h b/src/lib/player.h index 8fc02d9c6..767218379 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -18,26 +18,30 @@ */ + #ifndef DCPOMATIC_PLAYER_H #define DCPOMATIC_PLAYER_H -#include "atmos_metadata.h" -#include "player_text.h" + #include "active_text.h" -#include "content_text.h" -#include "film.h" +#include "atmos_metadata.h" +#include "audio_merger.h" +#include "audio_stream.h" #include "content.h" #include "content_atmos.h" -#include "position_image.h" -#include "piece.h" -#include "content_video.h" #include "content_audio.h" -#include "audio_stream.h" -#include "audio_merger.h" +#include "content_text.h" +#include "content_video.h" #include "empty.h" +#include "film.h" +#include "piece.h" +#include "player_text.h" +#include "position_image.h" +#include "shuffler.h" #include #include + namespace dcp { class ReelAsset; } @@ -53,6 +57,7 @@ class AudioBuffers; class ReferencedReelAsset; class Shuffler; + class PlayerProperty { public: @@ -64,15 +69,15 @@ public: static int const PLAYBACK_LENGTH; }; + /** @class Player * @brief A class which can play a Playlist. */ class Player : public std::enable_shared_from_this { public: - Player (std::shared_ptr); + Player (std::shared_ptr, bool aligned_subtitles); Player (std::shared_ptr, std::shared_ptr playlist); - ~Player (); Player (Player const& Player) = delete; Player& operator= (Player const& Player) = delete; @@ -202,7 +207,7 @@ private: LastVideoMap _last_video; AudioMerger _audio_merger; - Shuffler* _shuffler = nullptr; + std::unique_ptr _shuffler; std::list, dcpomatic::DCPTime> > _delay; class StreamState @@ -228,9 +233,13 @@ private: dcpomatic::DCPTime _playback_length; + /** aligned flag for subtitle images that we create */ + bool _aligned_subtitles = true; + boost::signals2::scoped_connection _film_changed_connection; boost::signals2::scoped_connection _playlist_change_connection; boost::signals2::scoped_connection _playlist_content_change_connection; }; + #endif