diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-08-17 00:25:09 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-08-17 00:25:09 +0200 |
| commit | 6b50d63a76999bb5c443b69e7ec68b4607ab9b4e (patch) | |
| tree | fe2041174491531b8bbd8dd395d67f88e1b8f191 /src/tools | |
| parent | b5632b00565286feed6b3efa1c1b4b19b1b0f164 (diff) | |
Only warn about lots of frame drops in the player (#2069).
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic_player.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/tools/dcpomatic_player.cc b/src/tools/dcpomatic_player.cc index 112f2c065..7ffb107bf 100644 --- a/src/tools/dcpomatic_player.cc +++ b/src/tools/dcpomatic_player.cc @@ -33,6 +33,7 @@ #include "wx/system_information_dialog.h" #include "wx/player_stress_tester.h" #include "wx/verify_dcp_progress_dialog.h" +#include "wx/nag_dialog.h" #include "lib/cross.h" #include "lib/config.h" #include "lib/util.h" @@ -210,6 +211,7 @@ public: _viewer->PlaybackPermitted.connect (bind(&DOMFrame::playback_permitted, this)); _viewer->Started.connect (bind(&DOMFrame::playback_started, this, _1)); _viewer->Stopped.connect (bind(&DOMFrame::playback_stopped, this, _1)); + _viewer->TooManyDropped.connect (bind(&DOMFrame::too_many_frames_dropped, this)); _info = new PlayerInformation (_overall_panel, _viewer); setup_main_sizer (Config::instance()->player_mode()); #ifdef __WXOSX__ @@ -347,6 +349,25 @@ public: _controls->log (wxString::Format("playback-stopped %s", time.timecode(_film->video_frame_rate()).c_str())); } + + void too_many_frames_dropped () + { + if (!Config::instance()->nagged(Config::NAG_TOO_MANY_DROPPED_FRAMES)) { + _viewer->stop (); + } + + NagDialog::maybe_nag ( + this, + Config::NAG_TOO_MANY_DROPPED_FRAMES, + _("The player is dropping a lot of frames, so playback may not be accurate.\n\n" + "<b>This does not necessarily mean that the DCP you are playing is defective!</b>\n\n" + "You may be able to improve player performance by:\n" + "• choosing 'decode at half resolution' or 'decode at quarter resolution' from the View menu\n" + "• using a more powerful computer.\n" + ) + ); + } + void set_decode_reduction (optional<int> reduction) { _viewer->set_dcp_decode_reduction (reduction); |
