Missing #include for previous.
[dcpomatic.git] / src / lib / player.h
index 7558f6da0bd2fd62376ae2e666623239cefd1729..c2911bf1087e19dae86257c37c14ce9c1a864b21 100644 (file)
@@ -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) */
@@ -205,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;