_player_connection = _player->Changed.connect (boost::bind (&FilmViewer::player_changed, this, _1));
calculate_sizes ();
- get (_position, _last_get_accurate);
+ refresh ();
setup_sensitivity ();
}
if (!pvf.empty ()) {
try {
_frame = pvf.front()->image (PIX_FMT_RGB24, boost::bind (&Log::dcp_log, _film->log().get(), _1, _2));
+ ImageChanged (pvf.front ());
dcp::YUVToRGB yuv_to_rgb = dcp::YUV_TO_RGB_REC601;
if (pvf.front()->colour_conversion()) {
_panel_size.height = ev.GetSize().GetHeight();
calculate_sizes ();
- get (_position, _last_get_accurate);
+ refresh ();
update_position_label ();
update_position_slider ();
}
void
FilmViewer::forward_clicked ()
{
- get (_position + DCPTime::from_frames (1, _film->video_frame_rate ()), true);
+ DCPTime p = _position + DCPTime::from_frames (1, _film->video_frame_rate ());
+ if (p >= _film->length ()) {
+ p = _position;
+ }
+
+ get (p, true);
update_position_label ();
update_position_slider ();
}
}
calculate_sizes ();
- get (_position, _last_get_accurate);
+ refresh ();
update_position_label ();
update_position_slider ();
}
setup_sensitivity ();
}
}
+
+/** Re-get the current frame */
+void
+FilmViewer::refresh ()
+{
+ get (_position, _last_get_accurate);
+}