summaryrefslogtreecommitdiff
path: root/src/wx/video_view.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-19 17:07:35 +0100
committerCarl Hetherington <cth@carlh.net>2020-01-08 21:56:47 +0100
commit86a866d5f3f5bf2fec67d1c813524479c6727eab (patch)
treed6399fb66872751ed10a0c2db0e143dea32c627e /src/wx/video_view.h
parent046d84f45621f7e128cb30160a315f98881c6f4b (diff)
Clean up access to stuff from Film.
Diffstat (limited to 'src/wx/video_view.h')
-rw-r--r--src/wx/video_view.h22
1 files changed, 16 insertions, 6 deletions
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<const Film> 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<const Film> 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<const Film> _film;
+ int _video_frame_rate;
+ dcpomatic::DCPTime _length;
};
#endif