Missing fclose()
[dcpomatic.git] / src / lib / player.h
index b3eadd7c07e25521506bf6fcc29bc251262e811f..568c7a7a116d26da36c27b602bd0a40d51f36ce9 100644 (file)
@@ -41,7 +41,7 @@ class Resampler;
  *  @brief A class which can `play' a Playlist; emitting its audio and video.
  */
  
-class Player : public boost::enable_shared_from_this<Player>
+class Player : public boost::enable_shared_from_this<Player>, public boost::noncopyable
 {
 public:
        Player (boost::shared_ptr<const Film>, boost::shared_ptr<const Playlist>);
@@ -71,17 +71,20 @@ public:
        /** Emitted when something has changed such that if we went back and emitted
         *  the last frame again it would look different.  This is not emitted after
         *  a seek.
+        *
+        *  The parameter is true if these signals are currently likely to be frequent.
         */
-       boost::signals2::signal<void ()> Changed;
+       boost::signals2::signal<void (bool)> Changed;
 
 private:
+       friend class PlayerWrapper;
 
        void process_video (boost::weak_ptr<Piece>, boost::shared_ptr<const Image>, bool, VideoContent::Frame);
        void process_audio (boost::weak_ptr<Piece>, boost::shared_ptr<const AudioBuffers>, AudioContent::Frame);
        void process_subtitle (boost::weak_ptr<Piece>, boost::shared_ptr<Image>, dcpomatic::Rect<double>, Time, Time);
        void setup_pieces ();
        void playlist_changed ();
-       void content_changed (boost::weak_ptr<Content>, int);
+       void content_changed (boost::weak_ptr<Content>, int, bool);
        void do_seek (Time, bool);
        void flush ();
        void emit_black ();
@@ -126,6 +129,10 @@ private:
                Time from;
                Time to;
        } _out_subtitle;
+
+#ifdef DCPOMATIC_DEBUG
+       boost::shared_ptr<Content> _last_video;
+#endif 
 };
 
 #endif