X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fvideo_view.h;h=5d5d3316377c2c3e03a9af08d11254086bf479bd;hb=f77529bdfa01ae13f889442900988fc401b63c62;hp=142cfd022d580135bdd530a938a905031add6a61;hpb=4f7e9f125716a27ed9e2a8e30f067100cbee773a;p=dcpomatic.git diff --git a/src/wx/video_view.h b/src/wx/video_view.h index 142cfd022..5d5d33163 100644 --- a/src/wx/video_view.h +++ b/src/wx/video_view.h @@ -22,34 +22,33 @@ #define DCPOMATIC_VIDEO_VIEW_H #include "lib/dcpomatic_time.h" +#include "lib/timer.h" +#include "lib/types.h" +#include "lib/exception_store.h" #include #include #include +#include class Image; class wxWindow; class FilmViewer; class PlayerVideo; -class VideoView +class VideoView : public ExceptionStore, public boost::noncopyable { 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 image) = 0; virtual wxWindow* get () const = 0; + /** Redraw the view after something has changed like content outlining, + * the film being removed, etc. + */ virtual void update () = 0; - /* XXX_b: make pure */ - virtual void start () {} + virtual void start (); /* XXX_b: make pure */ virtual void stop () {} @@ -62,6 +61,20 @@ public: /* XXX_b: to remove */ virtual void display_player_video () {} + int dropped () const { + boost::mutex::scoped_lock lm (_mutex); + return _dropped; + } + + int gets () const { + boost::mutex::scoped_lock lm (_mutex); + return _gets; + } + + StateTimer const & state_timer () const { + return _state_timer; + } + dcpomatic::DCPTime position () const { boost::mutex::scoped_lock lm (_mutex); return _player_video.second; @@ -77,6 +90,16 @@ public: _length = len; } + void set_eyes (Eyes eyes) { + boost::mutex::scoped_lock lm (_mutex); + _eyes = eyes; + } + + void set_three_d (bool t) { + boost::mutex::scoped_lock lm (_mutex); + _three_d = t; + } + protected: /* XXX_b: to remove */ friend class FilmViewer; @@ -100,6 +123,16 @@ protected: return _player_video; } + void add_dropped () { + boost::mutex::scoped_lock lm (_mutex); + ++_dropped; + } + + void add_get () { + boost::mutex::scoped_lock lm (_mutex); + ++_gets; + } + FilmViewer* _viewer; #ifdef DCPOMATIC_VARIANT_SWAROOP @@ -108,6 +141,8 @@ protected: int _watermark_y; #endif + StateTimer _state_timer; + private: /** Mutex protecting all the state in VideoView */ mutable boost::mutex _mutex; @@ -116,6 +151,11 @@ private: int _video_frame_rate; /** length of the film we are playing, or 0 if there is none */ dcpomatic::DCPTime _length; + Eyes _eyes; + bool _three_d; + + int _dropped; + int _gets; }; #endif