, _history_items (0)
, _history_position (0)
, _history_separator (0)
+ , _view_full_screen (0)
+ , _view_dual_screen (0)
{
#if defined(DCPOMATIC_WINDOWS)
_overall_panel = new wxPanel (this, wxID_ANY);
_viewer.reset (new FilmViewer (_overall_panel));
- _controls = new Controls (_overall_panel, _viewer);
+ _controls = new Controls (_overall_panel, _viewer, false, false, false);
_viewer->set_dcp_decode_reduction (Config::instance()->decode_reduction ());
_viewer->PlaybackPermitted.connect (bind(&DOMFrame::playback_permitted, this));
- _viewer->Started.connect (bind(&DOMFrame::playback_started, this));
- _viewer->Stopped.connect (bind(&DOMFrame::playback_stopped, this));
+ _viewer->Started.connect (bind(&DOMFrame::playback_started, this, _1));
+ _viewer->Seeked.connect (bind(&DOMFrame::playback_seeked, this, _1));
+ _viewer->Stopped.connect (bind(&DOMFrame::playback_stopped, this, _1));
_info = new PlayerInformation (_overall_panel, _viewer);
setup_main_sizer (true);
#ifdef __WXOSX__
return ok;
}
- void playback_started ()
+ void playback_started (DCPTime time)
{
optional<boost::filesystem::path> log = Config::instance()->player_log_file();
if (!log) {
FILE* f = fopen_boost(*log, "a");
fprintf (
f,
- "%s playback-started %s %s\n",
+ "%s playback-started %s %s %s\n",
dcp::LocalTime().as_string().c_str(),
+ time.timecode(_film->video_frame_rate()).c_str(),
dcp->directories().front().string().c_str(),
playing_cpl->annotation_text().c_str()
);
fclose (f);
}
- void playback_stopped ()
+ void playback_seeked (DCPTime time)
{
optional<boost::filesystem::path> log = Config::instance()->player_log_file();
if (!log) {
}
FILE* f = fopen_boost(*log, "a");
- fprintf (f, "%s playback-stopped\n", dcp::LocalTime().as_string().c_str());
+ fprintf (f, "%s playback-seeked %s\n", dcp::LocalTime().as_string().c_str(), time.timecode(_film->video_frame_rate()).c_str());
+ fclose (f);
+ }
+
+ void playback_stopped (DCPTime time)
+ {
+ optional<boost::filesystem::path> log = Config::instance()->player_log_file();
+ if (!log) {
+ return;
+ }
+
+ FILE* f = fopen_boost(*log, "a");
+ fprintf (f, "%s playback-stopped %s\n", dcp::LocalTime().as_string().c_str(), time.timecode(_film->video_frame_rate()).c_str());
fclose (f);
}
optional<int> c = Config::instance()->decode_reduction();
_view_cpl = view->Append(ID_view_cpl, _("CPL"), _cpl_menu);
view->AppendSeparator();
+#ifndef DCPOMATIC_VARIANT_SWAROOP
_view_full_screen = view->AppendCheckItem(ID_view_full_screen, _("Full screen\tF11"));
_view_dual_screen = view->AppendCheckItem(ID_view_dual_screen, _("Dual screen\tShift+F11"));
+#endif
setup_menu ();
view->AppendSeparator();
view->Append(ID_view_closed_captions, _("Closed captions..."));
void setup_menu ()
{
- _view_full_screen->Check (_mode == Config::PLAYER_MODE_FULL);
- _view_dual_screen->Check (_mode == Config::PLAYER_MODE_DUAL);
+ if (_view_full_screen) {
+ _view_full_screen->Check (_mode == Config::PLAYER_MODE_FULL);
+ }
+ if (_view_dual_screen) {
+ _view_dual_screen->Check (_mode == Config::PLAYER_MODE_DUAL);
+ }
}
void setup_screen ()