X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Ftools%2Fdcpomatic_player.cc;h=8422df28e78ff24dcf7666a5b5b757870a05d629;hb=eb2ea2746ac25ede54a04b46b26e1ebc088357b7;hp=a1a5a59eb99db36a5190ff83076268692582bd8f;hpb=86bbc0981a60ad9ba7b7bdbf28a34f197f83f6cb;p=dcpomatic.git diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index a1a5a59eb..8422df28e 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2017-2018 Carl Hetherington + Copyright (C) 2017-2019 Carl Hetherington This file is part of DCP-o-matic. @@ -29,6 +29,7 @@ #include "wx/verify_dcp_dialog.h" #include "wx/standard_controls.h" #include "wx/swaroop_controls.h" +#include "wx/timer_display.h" #include "lib/cross.h" #include "lib/config.h" #include "lib/util.h" @@ -108,6 +109,7 @@ enum { ID_help_report_a_problem, ID_tools_verify, ID_tools_check_for_updates, + ID_tools_timing, /* IDs for shortcuts (with no associated menu item) */ ID_start_stop, ID_back_frame, @@ -168,6 +170,7 @@ public: Bind (wxEVT_MENU, boost::bind (&DOMFrame::help_report_a_problem, this), ID_help_report_a_problem); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_verify, this), ID_tools_verify); Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_check_for_updates, this), ID_tools_check_for_updates); + Bind (wxEVT_MENU, boost::bind (&DOMFrame::tools_timing, this), ID_tools_timing); /* Use a panel as the only child of the Frame so that we avoid the dark-grey background on Windows. @@ -289,6 +292,9 @@ public: void playback_started (DCPTime time) { /* XXX: this only logs the first piece of content; probably should be each piece? */ + if (_film->content().empty()) { + return; + } shared_ptr dcp = dynamic_pointer_cast(_film->content().front()); if (dcp) { @@ -495,6 +501,7 @@ private: _tools_verify = tools->Append (ID_tools_verify, _("Verify DCP")); tools->AppendSeparator (); tools->Append (ID_tools_check_for_updates, _("Check for updates")); + tools->Append (ID_tools_timing, _("Timing...")); wxMenu* help = new wxMenu; #ifdef __WXOSX__ @@ -765,6 +772,13 @@ private: _update_news_requested = true; } + void tools_timing () + { + TimerDisplay* d = new TimerDisplay (this, _viewer->state_timer(), _viewer->gets()); + d->ShowModal (); + d->Destroy (); + } + void help_about () { AboutDialog* d = new AboutDialog (this);