#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"
_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__
_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);
}
_video_view->Sized.connect (boost::bind(&FilmViewer::video_view_sized, this));
- _video_view->TooManyDropped.connect (boost::bind(&FilmViewer::too_many_frames_dropped, this));
+ _video_view->TooManyDropped.connect (boost::bind(boost::ref(TooManyDropped)));
set_film (shared_ptr<Film>());
{
emit (boost::bind(boost::ref(ImageChanged), pv));
}
-
-
-void
-FilmViewer::too_many_frames_dropped ()
-{
- if (!Config::instance()->nagged(Config::NAG_TOO_MANY_DROPPED_FRAMES)) {
- stop ();
- }
-
- NagDialog::maybe_nag (
- panel(),
- 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"
- )
- );
-}
boost::signals2::signal<void (dcpomatic::DCPTime)> Stopped;
/** While playing back we reached the end of the film (emitted from GUI thread) */
boost::signals2::signal<void ()> Finished;
+ /** Emitted from the GUI thread when a lot of frames are being dropped */
+ boost::signals2::signal<void()> TooManyDropped;
boost::signals2::signal<bool ()> PlaybackPermitted;
void config_changed (Config::Property);
void film_length_change ();
void ui_finished ();
- void too_many_frames_dropped ();
dcpomatic::DCPTime uncorrected_time () const;
Frame average_latency () const;