_panel->SetDoubleBuffered (true);
#endif
-#if wxMAJOR_VERSION == 2 && wxMINOR_VERSION >= 9
_panel->SetBackgroundStyle (wxBG_STYLE_PAINT);
-#endif
_v_sizer = new wxBoxSizer (wxVERTICAL);
SetSizer (_v_sizer);
if (!_player) {
return;
}
-
- Time const t = _film->video_frames_to_time (1);
-
- _player->seek (_player->video_position() - t * 1.5, true);
+
+ _player->seek (_player->video_position(), true);
fetch_next_frame ();
}
return;
}
- shared_ptr<SimpleImage> packed_frame (new SimpleImage (_frame, false));
+ shared_ptr<Image> packed_frame (new Image (_frame, false));
wxImage frame (_out_size.width, _out_size.height, packed_frame->data()[0], true);
wxBitmap frame_bitmap (frame);
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));
-
+
double w = static_cast<double>(t) / TIME_HZ;
int const h = (w / 3600);
w -= h * 3600;
try {
_got_frame = false;
- while (!_got_frame && !_player->pass ());
+ while (!_got_frame && !_player->pass ()) {}
} catch (DecodeError& e) {
_play_button->SetValue (false);
check_play_state ();
return;
}
- Time const t = _film->video_frames_to_time (1);
-
- _player->seek (_player->video_position() - t * 2.5, true);
+ _player->seek (_player->video_position() - _film->video_frames_to_time(1), true);
fetch_next_frame ();
}