Missing #include for previous.
[dcpomatic.git] / src / lib / player.h
index 9f3dc7e71c9c2cea77d0705c2c2fa5913bbdaf5f..c2911bf1087e19dae86257c37c14ce9c1a864b21 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2013-2018 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2013-2019 Carl Hetherington <cth@carlh.net>
 
     This file is part of DCP-o-matic.
 
@@ -35,6 +35,7 @@
 #include "empty.h"
 #include <boost/shared_ptr.hpp>
 #include <boost/enable_shared_from_this.hpp>
+#include <boost/atomic.hpp>
 #include <list>
 
 namespace dcp {
@@ -110,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 ();
@@ -148,8 +150,8 @@ private:
        boost::shared_ptr<const Film> _film;
        boost::shared_ptr<const Playlist> _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<int> _suspended;
        std::list<boost::shared_ptr<Piece> > _pieces;
 
        /** Size of the image in the DCP (e.g. 1990x1080 for flat) */
@@ -164,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;
 
@@ -203,6 +207,9 @@ private:
        ActiveText _active_texts[TEXT_COUNT];
        boost::shared_ptr<AudioProcessor> _audio_processor;
 
+       /* Cached stuff */
+       boost::optional<dcpomatic::DCPTime> _film_length;
+
        boost::signals2::scoped_connection _film_changed_connection;
        boost::signals2::scoped_connection _playlist_change_connection;
        boost::signals2::scoped_connection _playlist_content_change_connection;