+ _overall_panel = new wxPanel (this, wxID_ANY);
+
+ _viewer = make_shared<FilmViewer>(_overall_panel);
+ if (Config::instance()->player_mode() == Config::PLAYER_MODE_DUAL) {
+ auto pc = new PlaylistControls (_overall_panel, _viewer);
+ _controls = pc;
+ pc->ResetFilm.connect (bind(&DOMFrame::reset_film_weak, this, _1));
+ } else {
+ _controls = new StandardControls (_overall_panel, _viewer, false);
+ }
+ _viewer->set_dcp_decode_reduction (Config::instance()->decode_reduction ());
+ _viewer->set_optimise_for_j2k (true);
+ _viewer->PlaybackPermitted.connect (bind(&DOMFrame::playback_permitted, this));
+ _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__
+ int accelerators = 12;
+#else
+ int accelerators = 11;
+#endif
+
+ _stress.setup (this, _controls);
+
+ wxAcceleratorEntry* accel = new wxAcceleratorEntry[accelerators];
+ accel[0].Set(wxACCEL_NORMAL, WXK_SPACE, ID_start_stop);
+ accel[1].Set(wxACCEL_NORMAL, WXK_LEFT, ID_go_back_frame);
+ accel[2].Set(wxACCEL_NORMAL, WXK_RIGHT, ID_go_forward_frame);
+ accel[3].Set(wxACCEL_SHIFT, WXK_LEFT, ID_go_back_small_amount);
+ accel[4].Set(wxACCEL_SHIFT, WXK_RIGHT, ID_go_forward_small_amount);
+ accel[5].Set(wxACCEL_CTRL, WXK_LEFT, ID_go_back_medium_amount);
+ accel[6].Set(wxACCEL_CTRL, WXK_RIGHT, ID_go_forward_medium_amount);
+ accel[7].Set(wxACCEL_SHIFT | wxACCEL_CTRL, WXK_LEFT, ID_go_back_large_amount);
+ accel[8].Set(wxACCEL_SHIFT | wxACCEL_CTRL, WXK_RIGHT, ID_go_forward_large_amount);
+ accel[9].Set(wxACCEL_NORMAL, WXK_HOME, ID_go_to_start);
+ accel[10].Set(wxACCEL_NORMAL, WXK_END, ID_go_to_end);
+#ifdef __WXOSX__
+ accel[11].Set(wxACCEL_CTRL, static_cast<int>('W'), ID_file_close);
+#endif
+ wxAcceleratorTable accel_table (accelerators, accel);
+ SetAcceleratorTable (accel_table);
+ delete[] accel;
+
+ Bind (wxEVT_MENU, boost::bind(&DOMFrame::start_stop_pressed, this), ID_start_stop);
+ Bind (wxEVT_MENU, boost::bind(&DOMFrame::go_back_frame, this), ID_go_back_frame);
+ Bind (wxEVT_MENU, boost::bind(&DOMFrame::go_forward_frame, this), ID_go_forward_frame);
+ Bind (wxEVT_MENU, boost::bind(&DOMFrame::go_seconds, this, -60), ID_go_back_small_amount);
+ Bind (wxEVT_MENU, boost::bind(&DOMFrame::go_seconds, this, 60), ID_go_forward_small_amount);
+ Bind (wxEVT_MENU, boost::bind(&DOMFrame::go_seconds, this, -600), ID_go_back_medium_amount);
+ Bind (wxEVT_MENU, boost::bind(&DOMFrame::go_seconds, this, 600), ID_go_forward_medium_amount);
+ Bind (wxEVT_MENU, boost::bind(&DOMFrame::go_seconds, this, -3600), ID_go_back_large_amount);
+ Bind (wxEVT_MENU, boost::bind(&DOMFrame::go_seconds, this, 3600), ID_go_forward_large_amount);
+ Bind (wxEVT_MENU, boost::bind(&DOMFrame::go_to_start, this), ID_go_to_start);
+ Bind (wxEVT_MENU, boost::bind(&DOMFrame::go_to_end, this), ID_go_to_end);
+
+ reset_film ();
+
+ UpdateChecker::instance()->StateChanged.connect (boost::bind(&DOMFrame::update_checker_state_changed, this));
+ setup_screen ();
+
+ _stress.LoadDCP.connect (boost::bind(&DOMFrame::load_dcp, this, _1));
+ }