+ _container_label = create_label (panel, _("Container"), true);
+ _container = new wxChoice (panel, wxID_ANY);
+ _container_size = new StaticText (panel, wxT (""));
+
+ _resolution_label = create_label (panel, _("Resolution"), true);
+ _resolution = new wxChoice (panel, wxID_ANY);
+
+ _frame_rate_label = create_label (panel, _("Frame Rate"), true);
+ _frame_rate_choice = new wxChoice (panel, wxID_ANY);
+ _frame_rate_spin = new wxSpinCtrl (panel, wxID_ANY);
+ setup_frame_rate_widget ();
+ _best_frame_rate = new Button (panel, _("Use best"));
+
+ _three_d = new CheckBox (panel, _("3D"));
+
+ _j2k_bandwidth_label = create_label (panel, _("JPEG2000 bandwidth\nfor newly-encoded data"), true);
+ _j2k_bandwidth = new wxSpinCtrl (panel, wxID_ANY);
+ _mbits_label = create_label (panel, _("Mbit/s"), false);
+
+ _reencode_j2k = new CheckBox (panel, _("Re-encode JPEG2000 data from input"));
+
+ _container->Bind (wxEVT_CHOICE, boost::bind(&DCPPanel::container_changed, this));
+ _frame_rate_choice->Bind (wxEVT_CHOICE, boost::bind(&DCPPanel::frame_rate_choice_changed, this));
+ _frame_rate_spin->Bind (wxEVT_SPINCTRL, boost::bind(&DCPPanel::frame_rate_spin_changed, this));
+ _best_frame_rate->Bind (wxEVT_BUTTON, boost::bind(&DCPPanel::best_frame_rate_clicked, this));
+ _j2k_bandwidth->Bind (wxEVT_SPINCTRL, boost::bind(&DCPPanel::j2k_bandwidth_changed, this));
+ /* Also listen to wxEVT_TEXT so that typing numbers directly in is always noticed */
+ _j2k_bandwidth->Bind (wxEVT_TEXT, boost::bind(&DCPPanel::j2k_bandwidth_changed, this));
+ _resolution->Bind (wxEVT_CHOICE, boost::bind(&DCPPanel::resolution_changed, this));
+ _three_d->Bind (wxEVT_CHECKBOX, boost::bind(&DCPPanel::three_d_changed, this));
+ _reencode_j2k->Bind (wxEVT_CHECKBOX, boost::bind(&DCPPanel::reencode_j2k_changed, this));
+
+ for (auto i: Ratio::containers()) {
+ _container->Append (std_to_wx(i->container_nickname()));
+ }
+
+ for (auto i: Config::instance()->allowed_dcp_frame_rates()) {
+ _frame_rate_choice->Append (std_to_wx (boost::lexical_cast<string> (i)));
+ }
+
+ _j2k_bandwidth->SetRange (1, Config::instance()->maximum_j2k_bandwidth() / 1000000);
+ _frame_rate_spin->SetRange (1, 480);
+
+ _resolution->Append (_("2K"));
+ _resolution->Append (_("4K"));
+
+ add_video_panel_to_grid ();
+
+ return panel;
+}
+
+void
+DCPPanel::add_video_panel_to_grid ()
+{