Move _dropped into VideoView.
[dcpomatic.git] / src / wx / video_view.h
index 656d8621e779cdda57723918381656aa69231cd5..8d9dce68d07e71a32a799ffb1778fede718d704c 100644 (file)
@@ -34,14 +34,7 @@ class PlayerVideo;
 class VideoView
 {
 public:
-       VideoView (FilmViewer* viewer)
-               : _viewer (viewer)
-#ifdef DCPOMATIC_VARIANT_SWAROOP
-               , _in_watermark (false)
-#endif
-               , _video_frame_rate (0)
-       {}
-
+       VideoView (FilmViewer* viewer);
        virtual ~VideoView () {}
 
        virtual void set_image (boost::shared_ptr<const Image> image) = 0;
@@ -51,8 +44,7 @@ public:
         */
        virtual void update () = 0;
 
-       /* XXX_b: make pure */
-       virtual void start () {}
+       virtual void start ();
        /* XXX_b: make pure */
        virtual void stop () {}
 
@@ -65,6 +57,11 @@ public:
        /* XXX_b: to remove */
        virtual void display_player_video () {}
 
+       int dropped () const {
+               boost::mutex::scoped_lock lm (_mutex);
+               return _dropped;
+       }
+
        dcpomatic::DCPTime position () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _player_video.second;
@@ -103,6 +100,11 @@ protected:
                return _player_video;
        }
 
+       void add_dropped () {
+               boost::mutex::scoped_lock lm (_mutex);
+               ++_dropped;
+       }
+
        FilmViewer* _viewer;
 
 #ifdef DCPOMATIC_VARIANT_SWAROOP
@@ -119,6 +121,8 @@ private:
        int _video_frame_rate;
        /** length of the film we are playing, or 0 if there is none */
        dcpomatic::DCPTime _length;
+
+       int _dropped;
 };
 
 #endif