projects
/
dcpomatic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0b21bfb
)
Some simple-video-view tidy-ups.
author
Carl Hetherington
<cth@carlh.net>
Mon, 25 Nov 2019 23:33:46 +0000
(
00:33
+0100)
committer
Carl Hetherington
<cth@carlh.net>
Wed, 8 Jan 2020 20:56:47 +0000
(21:56 +0100)
src/wx/simple_video_view.cc
patch
|
blob
|
history
diff --git
a/src/wx/simple_video_view.cc
b/src/wx/simple_video_view.cc
index e349b865cf03185531318a20eae95a7bda40bf29..ae13fe1bcde1d10502acb594bd3cd906f29b5d3f 100644
(file)
--- 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);
#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);
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();
if (!_in_watermark) {
_in_watermark = true;
_watermark_x = rand() % panel_size.GetWidth();
@@
-150,11
+150,10
@@
SimpleVideoView::timer ()
}
display_next_frame (false);
}
display_next_frame (false);
- DCPTime const next =
_viewer->
position() + _viewer->one_video_frame();
+ DCPTime const next = position() + _viewer->one_video_frame();
if (next >= length()) {
if (next >= length()) {
- _viewer->stop ();
- _viewer->Finished ();
+ _viewer->finished ();
return;
}
return;
}