From: Carl Hetherington Date: Sun, 20 Oct 2019 20:20:06 +0000 (+0200) Subject: Remove redundant FilmViewer::video_position() and use FilmViewer::position() instead. X-Git-Tag: v2.15.40^2~44 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=d6d5e36cbeb285c78c33d88a09882d964f83d563 Remove redundant FilmViewer::video_position() and use FilmViewer::position() instead. --- diff --git a/src/wx/film_viewer.h b/src/wx/film_viewer.h index d64eef4a9..d0041bd95 100644 --- a/src/wx/film_viewer.h +++ b/src/wx/film_viewer.h @@ -135,9 +135,6 @@ public: bool pad_black () const { return _pad_black; } - dcpomatic::DCPTime video_position () const { - return _video_position; - } boost::signals2::signal)> ImageChanged; boost::signals2::signal PositionChanged; diff --git a/src/wx/simple_video_view.cc b/src/wx/simple_video_view.cc index 56e50ebed..9aa73fe7f 100644 --- a/src/wx/simple_video_view.cc +++ b/src/wx/simple_video_view.cc @@ -83,10 +83,10 @@ SimpleVideoView::paint () #ifdef DCPOMATIC_VARIANT_SWAROOP DCPTime const period = DCPTime::from_seconds(Config::instance()->player_watermark_period() * 60); - int64_t n = _viewer->video_position().get() / period.get(); + int64_t n = _viewer->position().get() / period.get(); DCPTime from(n * period.get()); DCPTime to = from + DCPTime::from_seconds(Config::instance()->player_watermark_duration() / 1000.0); - if (from <= _viewer->video_position() && _viewer->video_position() <= to) { + if (from <= _viewer->position() && _viewer->position() <= to) { if (!_in_watermark) { _in_watermark = true; _watermark_x = rand() % panel_size.GetWidth();