X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplayer.h;h=0add90e97c82aedc9d34c45eea2d1899a4296714;hb=9a87c9adf70bf1be221507d1e258a68e8c19c175;hp=7f30bf88c5521ed2607d90eaa7a8ba215636ae0a;hpb=f0c9eb891bed55ddc1afe13a87a997f68fd706be;p=dcpomatic.git diff --git a/src/lib/player.h b/src/lib/player.h index 7f30bf88c..0add90e97 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -63,20 +63,28 @@ public: static int const FILM_VIDEO_FRAME_RATE; static int const DCP_DECODE_REDUCTION; static int const PLAYBACK_LENGTH; + static int const IGNORE_VIDEO; + static int const IGNORE_AUDIO; + static int const IGNORE_TEXT; + static int const ALWAYS_BURN_OPEN_SUBTITLES; + static int const PLAY_REFERENCED; }; /** @class Player * @brief A class which can play a Playlist. */ -class Player : public std::enable_shared_from_this +class Player { public: Player (std::shared_ptr, Image::Alignment subtitle_alignment); Player (std::shared_ptr, std::shared_ptr playlist); - Player (Player const& Player) = delete; - Player& operator= (Player const& Player) = delete; + Player (Player const&) = delete; + Player& operator= (Player const&) = delete; + + Player(Player&& other); + Player& operator=(Player&& other); bool pass (); void seek (dcpomatic::DCPTime time, bool accurate); @@ -132,6 +140,7 @@ private: friend struct overlap_video_test1; void construct (); + void connect(); void setup_pieces (); void film_change (ChangeType, Film::Property); void playlist_change (ChangeType); @@ -168,9 +177,9 @@ private: */ mutable boost::mutex _mutex; - std::shared_ptr const _film; + std::weak_ptr _film; /** Playlist, or 0 if we are using the one from the _film */ - std::shared_ptr const _playlist; + std::shared_ptr _playlist; /** > 0 if we are suspended (i.e. pass() and seek() do nothing) */ boost::atomic _suspended; @@ -193,7 +202,7 @@ private: /** true if we should try to be fast rather than high quality */ boost::atomic _fast; /** true if we should keep going in the face of `survivable' errors */ - bool const _tolerant; + bool _tolerant; /** true if we should `play' (i.e output) referenced DCP data (e.g. for preview) */ boost::atomic _play_referenced; @@ -237,7 +246,7 @@ private: boost::atomic _playback_length; /** Alignment for subtitle images that we create */ - Image::Alignment const _subtitle_alignment = Image::Alignment::PADDED; + Image::Alignment _subtitle_alignment = Image::Alignment::PADDED; boost::signals2::scoped_connection _film_changed_connection; boost::signals2::scoped_connection _playlist_change_connection;