X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=blobdiff_plain;f=src%2Fwx%2Fvideo_view.h;h=06067130c5a330d64a103b4bd47f0ac75eac514f;hp=d9ef2a65f4859afd8a8bea01dd8ef9abd0c8642b;hb=86a866d5f3f5bf2fec67d1c813524479c6727eab;hpb=046d84f45621f7e128cb30160a315f98881c6f4b diff --git a/src/wx/video_view.h b/src/wx/video_view.h index d9ef2a65f..06067130c 100644 --- a/src/wx/video_view.h +++ b/src/wx/video_view.h @@ -39,6 +39,7 @@ public: #ifdef DCPOMATIC_VARIANT_SWAROOP , _in_watermark (false) #endif + , _video_frame_rate (0) {} virtual ~VideoView () {} @@ -66,9 +67,14 @@ public: return _player_video.second; } - void set_film (boost::shared_ptr film) { + void set_video_frame_rate (int r) { boost::mutex::scoped_lock lm (_mutex); - _film = film; + _video_frame_rate = r; + } + + void set_length (dcpomatic::DCPTime len) { + boost::mutex::scoped_lock lm (_mutex); + _length = len; } protected: @@ -78,10 +84,13 @@ protected: bool get_next_frame (bool non_blocking); int time_until_next_frame () const; dcpomatic::DCPTime one_video_frame () const; - - boost::shared_ptr film () const { + int video_frame_rate () const { + boost::mutex::scoped_lock lm (_mutex); + return _video_frame_rate; + } + dcpomatic::DCPTime length () const { boost::mutex::scoped_lock lm (_mutex); - return _film; + return _length; } FilmViewer* _viewer; @@ -97,7 +106,8 @@ protected: #endif private: - boost::shared_ptr _film; + int _video_frame_rate; + dcpomatic::DCPTime _length; }; #endif