Use branch of ffmpeg.
[dcpomatic.git] / src / wx / video_view.h
index f9e0670435ed13edaa2e919cc373e11d12a0a48d..e5fbb671dd20e7f770fee744a5c8c676fd45d509 100644 (file)
@@ -33,6 +33,7 @@
 class Image;
 class wxWindow;
 class FilmViewer;
+class Player;
 class PlayerVideo;
 
 class VideoView : public ExceptionStore, public boost::noncopyable
@@ -49,11 +50,18 @@ public:
        virtual void start ();
        /** Called when playback stops */
        virtual void stop () {}
+
+       enum NextFrameResult {
+               FAIL,
+               AGAIN,
+               SUCCESS
+       };
+
        /** Get the next frame and display it; used after seek */
-       virtual bool display_next_frame (bool) = 0;
+       virtual NextFrameResult display_next_frame (bool) = 0;
 
        void clear ();
-       bool refresh_metadata (boost::shared_ptr<const Film> film, dcp::Size video_container_size, dcp::Size film_frame_size);
+       bool reset_metadata (boost::shared_ptr<const Film> film, dcp::Size player_video_container_size);
 
        /** Emitted from the GUI thread when our display changes in size */
        boost::signals2::signal<void()> Sized;
@@ -66,6 +74,11 @@ public:
                return _dropped;
        }
 
+       int errored () const {
+               boost::mutex::scoped_lock lm (_mutex);
+               return _errored;
+       }
+
        int gets () const {
                boost::mutex::scoped_lock lm (_mutex);
                return _gets;
@@ -106,7 +119,7 @@ public:
        }
 
 protected:
-       bool get_next_frame (bool non_blocking);
+       NextFrameResult get_next_frame (bool non_blocking);
        boost::optional<int> time_until_next_frame () const;
        dcpomatic::DCPTime one_video_frame () const;
 
@@ -137,12 +150,6 @@ protected:
 
        FilmViewer* _viewer;
 
-#ifdef DCPOMATIC_VARIANT_SWAROOP
-       bool _in_watermark;
-       int _watermark_x;
-       int _watermark_y;
-#endif
-
        StateTimer _state_timer;
 
 private:
@@ -157,6 +164,7 @@ private:
        bool _three_d;
 
        int _dropped;
+       int _errored;
        int _gets;
 };