_frame.reset ();
_queue.clear ();
+ _slider->SetValue (0);
+ set_position_text (0);
+
if (!_film) {
return;
}
_frame = image;
_got_frame = true;
+ set_position_text (t);
+}
+
+void
+FilmViewer::set_position_text (Time t)
+{
+ if (!_film) {
+ _frame_number->SetLabel ("0");
+ _timecode->SetLabel ("0:0:0.0");
+ return;
+ }
+
double const fps = _film->dcp_video_frame_rate ();
/* Count frame number from 1 ... not sure if this is the best idea */
_frame_number->SetLabel (wxString::Format (wxT("%d"), int (rint (t * fps / TIME_HZ)) + 1));
int const s = floor (w);
w -= s;
int const f = rint (w * fps);
- _timecode->SetLabel (wxString::Format (wxT("%02d:%02d:%02d:%02d"), h, m, s, f));
+ _timecode->SetLabel (wxString::Format (wxT("%02d:%02d:%02d.%02d"), h, m, s, f));
}
/** Ask the player to emit its next frame, then update our display */
void back_clicked (wxCommandEvent &);
void forward_clicked (wxCommandEvent &);
void player_changed (bool);
+ void set_position_text (Time);
boost::shared_ptr<Film> _film;
boost::shared_ptr<Player> _player;