return true;
}
-void
-FilmViewer::go_to (DCPTime t)
-{
- if (t < DCPTime ()) {
- t = DCPTime ();
- }
-
- if (t >= _film->length ()) {
- t = _film->length ();
- }
-
- seek (t, true);
- PositionChanged ();
-}
-
void
FilmViewer::player_change (ChangeType type, int property, bool frequent)
{
}
void
-FilmViewer::set_position (DCPTime p)
-{
- _video_position = p;
- seek (p, true);
- PositionChanged ();
-}
-
-void
-FilmViewer::set_position (shared_ptr<Content> content, ContentTime t)
+FilmViewer::seek (shared_ptr<Content> content, ContentTime t, bool accurate)
{
optional<DCPTime> dt = _player->content_time_to_dcp (content, t);
if (dt) {
- set_position (*dt);
+ seek (*dt, accurate);
}
}
return;
}
+ if (t < DCPTime ()) {
+ t = DCPTime ();
+ }
+
+ if (t >= _film->length ()) {
+ t = _film->length ();
+ }
+
bool const was_running = stop ();
_closed_captions_dialog->clear ();
if (was_running) {
start ();
}
+
+ PositionChanged ();
}
void
return DCPTime::from_frames (1, _film->video_frame_rate());
}
+/** Open a dialog box showing our film's closed captions */
void
FilmViewer::show_closed_captions ()
{
}
void
-FilmViewer::move (DCPTime by)
+FilmViewer::seek_by (DCPTime by, bool accurate)
{
- if (!_film) {
- return;
- }
-
- go_to (_video_position + by);
+ seek (_video_position + by, accurate);
}