summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-11-26 00:33:46 +0100
committerCarl Hetherington <cth@carlh.net>2020-01-08 21:56:47 +0100
commitc967096b5061e4bbb3a275d4daf04a2b9c084468 (patch)
tree3624a5fc92249f8331bb068bc61b4df612b34e7f
parent0b21bfba60be812a5d04cc5c10868e04b5579404 (diff)
Some simple-video-view tidy-ups.
-rw-r--r--src/wx/simple_video_view.cc9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/wx/simple_video_view.cc b/src/wx/simple_video_view.cc
index e349b865c..ae13fe1bc 100644
--- a/src/wx/simple_video_view.cc
+++ b/src/wx/simple_video_view.cc
@@ -85,10 +85,10 @@ SimpleVideoView::paint ()
#ifdef DCPOMATIC_VARIANT_SWAROOP
DCPTime const period = DCPTime::from_seconds(Config::instance()->player_watermark_period() * 60);
- int64_t n = _viewer->position().get() / period.get();
+ int64_t n = 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->position() && _viewer->position() <= to) {
+ if (from <= position() && position() <= to) {
if (!_in_watermark) {
_in_watermark = true;
_watermark_x = rand() % panel_size.GetWidth();
@@ -150,11 +150,10 @@ SimpleVideoView::timer ()
}
display_next_frame (false);
- DCPTime const next = _viewer->position() + _viewer->one_video_frame();
+ DCPTime const next = position() + _viewer->one_video_frame();
if (next >= length()) {
- _viewer->stop ();
- _viewer->Finished ();
+ _viewer->finished ();
return;
}