Add FilmViewer::time_until_next_frame.
[dcpomatic.git] / src / wx / film_viewer.cc
index 8b90cd9c99c81c429ce41543861e43b12881f0c4..373e6d717246d956f982242d83103ce1cbc405fb 100644 (file)
@@ -633,3 +633,11 @@ FilmViewer::set_pad_black (bool p)
 {
        _pad_black = p;
 }
+
+/* XXX_b: comment */
+int
+FilmViewer::time_until_next_frame () const
+{
+       DCPTime const next = position() + one_video_frame();
+       return max ((next.seconds() - time().seconds()) * 1000, 1.0);
+}