X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fplayer.h;h=5a1b08ecf74fef3d9abb4a0747d5191f986641f5;hb=143cfcf6c9e8c0a0879652d0d741ec268e8d9541;hp=381aa80b71c113ab3b615bf5151a10487b9d8596;hpb=c4403784febdbdd42e9c32e67fadb147f11fe566;p=dcpomatic.git diff --git a/src/lib/player.h b/src/lib/player.h index 381aa80b7..5a1b08ecf 100644 --- a/src/lib/player.h +++ b/src/lib/player.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2013-2018 Carl Hetherington + Copyright (C) 2013-2019 Carl Hetherington This file is part of DCP-o-matic. @@ -35,15 +35,19 @@ #include "empty.h" #include #include +#include #include namespace dcp { class ReelAsset; } +namespace dcpomatic { + class Font; +} + class PlayerVideo; class Playlist; -class Font; class AudioBuffers; class ReferencedReelAsset; class Shuffler; @@ -64,13 +68,13 @@ public: class Player : public boost::enable_shared_from_this, public boost::noncopyable { public: - Player (boost::shared_ptr, boost::shared_ptr playlist); + Player (boost::shared_ptr, boost::shared_ptr playlist, dcpomatic::DCPTime playback_length); ~Player (); bool pass (); void seek (dcpomatic::DCPTime time, bool accurate); - std::list > get_subtitle_fonts (); + std::list > get_subtitle_fonts (); std::list get_reel_assets (); dcp::Size video_container_size () const { boost::mutex::scoped_lock lm (_mutex); @@ -107,6 +111,7 @@ private: friend struct player_subframe_test; friend struct empty_test1; friend struct empty_test2; + friend struct check_reuse_old_data_test; void setup_pieces (); void setup_pieces_unlocked (); @@ -145,8 +150,8 @@ private: boost::shared_ptr _film; boost::shared_ptr _playlist; - /** true if we are suspended (i.e. pass() and seek() do nothing) */ - bool _suspended; + /** > 0 if we are suspended (i.e. pass() and seek() do nothing) */ + boost::atomic _suspended; std::list > _pieces; /** Size of the image in the DCP (e.g. 1990x1080 for flat) */ @@ -161,6 +166,8 @@ private: bool _always_burn_open_subtitles; /** true if we should try to be fast rather than high quality */ bool _fast; + /** true if we should keep going in the face of `survivable' errors */ + bool _tolerant; /** true if we should `play' (i.e output) referenced DCP data (e.g. for preview) */ bool _play_referenced; @@ -200,6 +207,8 @@ private: ActiveText _active_texts[TEXT_COUNT]; boost::shared_ptr _audio_processor; + dcpomatic::DCPTime _playback_length; + boost::signals2::scoped_connection _film_changed_connection; boost::signals2::scoped_connection _playlist_change_connection; boost::signals2::scoped_connection _playlist_content_change_connection;