Allow specification of video bit rate separately for J2K and MPEG2.
[dcpomatic.git] / src / wx / full_config_dialog.cc
index b7f87fe7a27a579b23a2462ef96cfca8ffab3d08..00e5575b180c156ba83b3f344cdcc7ef8b58e3b1 100644 (file)
 #include "send_test_email_dialog.h"
 #include "server_dialog.h"
 #include "static_text.h"
+#ifdef DCPOMATIC_GROK
+#include "grok/gpu_config_panel.h"
+#endif
 #include "wx_util.h"
+#include "wx_variant.h"
 #include "lib/config.h"
 #include "lib/cross.h"
 #include "lib/dcp_content_type.h"
-#include "lib/emailer.h"
+#include "lib/email.h"
 #include "lib/exceptions.h"
 #include "lib/filter.h"
 #include "lib/log.h"
@@ -57,6 +61,7 @@
 #include "lib/util.h"
 #include <dcp/certificate_chain.h>
 #include <dcp/exceptions.h>
+#include <dcp/filesystem.h>
 #include <dcp/locale_convert.h>
 #include <dcp/warnings.h>
 LIBDCP_DISABLE_WARNINGS
@@ -103,23 +108,23 @@ private:
                int r = 0;
                add_language_controls (table, r);
 
-               add_label_to_sizer (table, _panel, _("Number of threads DCP-o-matic should use"), true, wxGBPosition (r, 0));
+               add_label_to_sizer(table, _panel, variant::wx::insert_dcpomatic(_("Number of threads %s should use")), true, wxGBPosition(r, 0));
                _master_encoding_threads = new wxSpinCtrl (_panel);
                table->Add (_master_encoding_threads, wxGBPosition (r, 1));
                ++r;
 
-               add_label_to_sizer (table, _panel, _("Number of threads DCP-o-matic encode server should use"), true, wxGBPosition (r, 0));
+               add_label_to_sizer(table, _panel, variant::wx::insert_dcpomatic_encode_server(_("Number of threads %s should use")), true, wxGBPosition(r, 0));
                _server_encoding_threads = new wxSpinCtrl (_panel);
                table->Add (_server_encoding_threads, wxGBPosition (r, 1));
                ++r;
 
                add_label_to_sizer (table, _panel, _("Configuration file"), true, wxGBPosition (r, 0));
-               _config_file = new FilePickerCtrl (_panel, _("Select configuration file"), "*.xml", true, false);
+               _config_file = new FilePickerCtrl(_panel, _("Select configuration file"), "*.xml", true, false, "ConfigFilePath");
                table->Add (_config_file, wxGBPosition (r, 1));
                ++r;
 
                add_label_to_sizer (table, _panel, _("Cinema and screen database file"), true, wxGBPosition (r, 0));
-               _cinemas_file = new FilePickerCtrl (_panel, _("Select cinema and screen database file"), "*.xml", true, false);
+               _cinemas_file = new FilePickerCtrl(_panel, _("Select cinema and screen database file"), "*.xml", true, false, "CinemaDatabasePath");
                table->Add (_cinemas_file, wxGBPosition (r, 1));
                auto export_cinemas = new Button (_panel, _("Export..."));
                table->Add (export_cinemas, wxGBPosition (r, 2));
@@ -142,8 +147,8 @@ private:
 
                add_update_controls (table, r);
 
-               _default_add_file_location->add(_("Same place as last time"));
-               _default_add_file_location->add(_("Same place as project"));
+               _default_add_file_location->add_entry(_("Same place as last time"));
+               _default_add_file_location->add_entry(_("Same place as project"));
                _default_add_file_location->bind(&FullGeneralPage::default_add_file_location_changed, this);
 
                _config_file->Bind  (wxEVT_FILEPICKER_CHANGED, boost::bind(&FullGeneralPage::config_file_changed,  this));
@@ -186,7 +191,7 @@ private:
                 );
 
                if (dialog.ShowModal() == wxID_OK) {
-                       boost::filesystem::copy_file(Config::instance()->cinemas_file(), wx_to_std(dialog.GetPath()), boost::filesystem::copy_option::overwrite_if_exists);
+                       dcp::filesystem::copy_file(Config::instance()->cinemas_file(), wx_to_std(dialog.GetPath()), boost::filesystem::copy_option::overwrite_if_exists);
                }
        }
 
@@ -215,13 +220,13 @@ private:
        void config_file_changed ()
        {
                auto config = Config::instance();
-               boost::filesystem::path new_file = wx_to_std(_config_file->GetPath());
-               if (new_file == config->config_read_file()) {
+               auto const new_file = _config_file->path();
+               if (!new_file || *new_file == config->config_read_file()) {
                        return;
                }
                bool copy_and_link = true;
-               if (boost::filesystem::exists(new_file)) {
-                       ConfigMoveDialog dialog(_panel, new_file);
+               if (dcp::filesystem::exists(*new_file)) {
+                       ConfigMoveDialog dialog(_panel, *new_file);
                        if (dialog.ShowModal() == wxID_OK) {
                                copy_and_link = false;
                        }
@@ -230,16 +235,18 @@ private:
                if (copy_and_link) {
                        config->write ();
                        if (new_file != config->config_read_file()) {
-                               config->copy_and_link (new_file);
+                               config->copy_and_link(*new_file);
                        }
                } else {
-                       config->link (new_file);
+                       config->link(*new_file);
                }
        }
 
        void cinemas_file_changed ()
        {
-               Config::instance()->set_cinemas_file (wx_to_std (_cinemas_file->GetPath ()));
+               if (auto path = _cinemas_file->path()) {
+                       Config::instance()->set_cinemas_file(*path);
+               }
        }
 
        void default_add_file_location_changed()
@@ -313,10 +320,19 @@ private:
                table->Add (_dcp_audio_channels);
 
                {
-                       add_label_to_sizer (table, _panel, _("Default JPEG2000 bandwidth"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+                       add_label_to_sizer(table, _panel, _("Default JPEG2000 bit rate"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+                       auto s = new wxBoxSizer (wxHORIZONTAL);
+                       _j2k_video_bit_rate = new wxSpinCtrl(_panel);
+                       s->Add(_j2k_video_bit_rate);
+                       add_label_to_sizer (s, _panel, _("Mbit/s"), false, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+                       table->Add (s, 1);
+               }
+
+               {
+                       add_label_to_sizer(table, _panel, _("Default MPEG2 bit rate"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
                        auto s = new wxBoxSizer (wxHORIZONTAL);
-                       _j2k_bandwidth = new wxSpinCtrl (_panel);
-                       s->Add (_j2k_bandwidth);
+                       _mpeg2_video_bit_rate = new wxSpinCtrl(_panel);
+                       s->Add(_mpeg2_video_bit_rate);
                        add_label_to_sizer (s, _panel, _("Mbit/s"), false, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
                        table->Add (s, 1);
                }
@@ -403,8 +419,10 @@ private:
                _dcp_content_type->Bind (wxEVT_CHOICE, boost::bind (&DefaultsPage::dcp_content_type_changed, this));
                _dcp_audio_channels->Bind (wxEVT_CHOICE, boost::bind (&DefaultsPage::dcp_audio_channels_changed, this));
 
-               _j2k_bandwidth->SetRange (50, 250);
-               _j2k_bandwidth->Bind (wxEVT_SPINCTRL, boost::bind (&DefaultsPage::j2k_bandwidth_changed, this));
+               _j2k_video_bit_rate->SetRange(50, 250);
+               _j2k_video_bit_rate->Bind(wxEVT_SPINCTRL, boost::bind(&DefaultsPage::j2k_video_bit_rate_changed, this));
+               _mpeg2_video_bit_rate->SetRange(1, 50);
+               _mpeg2_video_bit_rate->Bind(wxEVT_SPINCTRL, boost::bind(&DefaultsPage::mpeg2_video_bit_rate_changed, this));
 
                _audio_delay->SetRange (-1000, 1000);
                _audio_delay->Bind (wxEVT_SPINCTRL, boost::bind (&DefaultsPage::audio_delay_changed, this));
@@ -444,8 +462,10 @@ private:
                _kdm_directory->SetPath (std_to_wx (config->default_kdm_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ()));
                _kdm_type->set (config->default_kdm_type());
                checked_set (_use_isdcf_name_by_default, config->use_isdcf_name_by_default());
-               checked_set (_j2k_bandwidth, config->default_j2k_bandwidth() / 1000000);
-               _j2k_bandwidth->SetRange (50, config->maximum_j2k_bandwidth() / 1000000);
+               checked_set(_j2k_video_bit_rate, config->default_video_bit_rate(VideoEncoding::JPEG2000) / 1000000);
+               _j2k_video_bit_rate->SetRange(50, config->maximum_video_bit_rate(VideoEncoding::JPEG2000) / 1000000);
+               checked_set(_mpeg2_video_bit_rate, config->default_video_bit_rate(VideoEncoding::MPEG2) / 1000000);
+               _mpeg2_video_bit_rate->SetRange(1, config->maximum_video_bit_rate(VideoEncoding::MPEG2) / 1000000);
                checked_set (_dcp_audio_channels, locale_convert<string> (config->default_dcp_audio_channels()));
                checked_set (_audio_delay, config->default_audio_delay ());
                checked_set (_standard, config->default_interop() ? 1 : 0);
@@ -520,9 +540,14 @@ private:
                config->set_default_kdm_duration (RoughDuration(duration, unit));
        }
 
-       void j2k_bandwidth_changed ()
+       void j2k_video_bit_rate_changed()
        {
-               Config::instance()->set_default_j2k_bandwidth (_j2k_bandwidth->GetValue() * 1000000);
+               Config::instance()->set_default_video_bit_rate(VideoEncoding::JPEG2000, _j2k_video_bit_rate->GetValue() * 1000000);
+       }
+
+       void mpeg2_video_bit_rate_changed()
+       {
+               Config::instance()->set_default_video_bit_rate(VideoEncoding::MPEG2, _mpeg2_video_bit_rate->GetValue() * 1000000);
        }
 
        void audio_delay_changed ()
@@ -627,7 +652,8 @@ private:
                }
        }
 
-       wxSpinCtrl* _j2k_bandwidth;
+       wxSpinCtrl* _j2k_video_bit_rate;
+       wxSpinCtrl* _mpeg2_video_bit_rate;
        wxSpinCtrl* _audio_delay;
        wxSpinCtrl* _still_length;
 #ifdef DCPOMATIC_USE_OWN_PICKER
@@ -977,15 +1003,15 @@ private:
                        return;
                }
 
-               Emailer emailer(
+               Email email(
                        wx_to_std(dialog.from()),
                        { wx_to_std(dialog.to()) },
-                       wx_to_std(_("DCP-o-matic test email")),
-                       wx_to_std(_("This is a test email from DCP-o-matic."))
+                       wx_to_std(variant::wx::insert_dcpomatic(_("%s test email"))),
+                       wx_to_std(variant::wx::insert_dcpomatic(_("This is a test email from %s.")))
                        );
                auto config = Config::instance();
                try {
-                       emailer.send(config->mail_server(), config->mail_port(), config->mail_protocol(), config->mail_user(), config->mail_password());
+                       email.send(config->mail_server(), config->mail_port(), config->mail_protocol(), config->mail_user(), config->mail_password());
                } catch (NetworkError& e) {
                        error_dialog(_panel, std_to_wx(e.summary()), std_to_wx(e.detail().get_value_or("")));
                        return;
@@ -1401,32 +1427,50 @@ private:
 
                add_label_to_sizer (table, _panel, _("Issuer"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
                _issuer = new wxTextCtrl (_panel, wxID_ANY);
-               _issuer->SetToolTip (_("This will be written to the DCP's XML files as the <Issuer>.  If it is blank, a default value mentioning DCP-o-matic will be used."));
+               _issuer->SetToolTip(
+                       variant::wx::insert_dcpomatic(
+                               _("This will be written to the DCP's XML files as the <Issuer>.  If it is blank, a default value mentioning %s will be used.")
+                               ));
                table->Add (_issuer, 1, wxALL | wxEXPAND);
 
                add_label_to_sizer (table, _panel, _("Creator"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
                _creator = new wxTextCtrl (_panel, wxID_ANY);
-               _creator->SetToolTip (_("This will be written to the DCP's XML files as the <Creator>.  If it is blank, a default value mentioning DCP-o-matic will be used."));
+               _creator->SetToolTip(
+                       variant::wx::insert_dcpomatic(
+                               _("This will be written to the DCP's XML files as the <Creator>.  If it is blank, a default value mentioning %s will be used.")
+                               ));
                table->Add (_creator, 1, wxALL | wxEXPAND);
 
                add_label_to_sizer (table, _panel, _("Company name"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
                _company_name = new wxTextCtrl (_panel, wxID_ANY);
-               _company_name->SetToolTip (_("This will be written to the DCP's MXF files as the 'company name'.  If it is blank, a default value mentioning libdcp (an internal DCP-o-matic library) will be used."));
+               _company_name->SetToolTip(
+                       variant::wx::insert_dcpomatic(
+                               _("This will be written to the DCP's MXF files as the 'company name'.  If it is blank, a default value mentioning libdcp (an internal %s library) will be used.")
+                               ));
                table->Add (_company_name, 1, wxALL | wxEXPAND);
 
                add_label_to_sizer (table, _panel, _("Product name"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
                _product_name = new wxTextCtrl (_panel, wxID_ANY);
-               _product_name->SetToolTip (_("This will be written to the DCP's MXF files as the 'product name'.  If it is blank, a default value mentioning libdcp (an internal DCP-o-matic library) will be used."));
+               _product_name->SetToolTip(
+                       variant::wx::insert_dcpomatic(
+                               _("This will be written to the DCP's MXF files as the 'product name'.  If it is blank, a default value mentioning libdcp (an internal %s library) will be used.")
+                               ));
                table->Add (_product_name, 1, wxALL | wxEXPAND);
 
                add_label_to_sizer (table, _panel, _("Product version"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
                _product_version = new wxTextCtrl (_panel, wxID_ANY);
-               _product_version->SetToolTip (_("This will be written to the DCP's MXF files as the 'product version'.  If it is blank, a default value mentioning libdcp (an internal DCP-o-matic library) will be used."));
+               _product_version->SetToolTip(
+                       variant::wx::insert_dcpomatic(
+                               _("This will be written to the DCP's MXF files as the 'product version'.  If it is blank, a default value mentioning libdcp (an internal %s library) will be used.")
+                               ));
                table->Add (_product_version, 1, wxALL | wxEXPAND);
 
                add_label_to_sizer (table, _panel, _("JPEG2000 comment"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
                _j2k_comment = new wxTextCtrl (_panel, wxID_ANY);
-               _j2k_comment->SetToolTip (_("This will be written to the DCP's JPEG2000 data as a comment.  If it is blank, a default value mentioning libdcp (an internal DCP-o-matic library) will be used."));
+               _j2k_comment->SetToolTip(
+                       variant::wx::insert_dcpomatic(
+                               _("This will be written to the DCP's JPEG2000 data as a comment.  If it is blank, a default value mentioning libdcp (an internal %s library) will be used.")
+                               ));
                table->Add (_j2k_comment, 1, wxALL | wxEXPAND);
 
                _panel->GetSizer()->Add (table, 0, wxEXPAND | wxALL, _border);
@@ -1489,6 +1533,153 @@ private:
 };
 
 
+class NonStandardPage : public Page
+{
+public:
+       NonStandardPage(wxSize panel_size, int border)
+               : Page(panel_size, border)
+       {}
+
+       wxString GetName() const override
+       {
+               return _("Non-standard");
+       }
+
+#ifdef DCPOMATIC_OSX
+       wxBitmap GetLargeIcon() const override
+       {
+               return wxBitmap(icon_path("non_standard"), wxBITMAP_TYPE_PNG);
+       }
+#endif
+
+private:
+       void setup() override
+       {
+               auto table = new wxFlexGridSizer(2, DCPOMATIC_SIZER_X_GAP, DCPOMATIC_SIZER_Y_GAP);
+               table->AddGrowableCol(1, 1);
+               _panel->GetSizer()->Add(table, 1, wxALL | wxEXPAND, _border);
+
+               {
+                       add_label_to_sizer(table, _panel, _("Maximum JPEG2000 bit rate"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+                       auto s = new wxBoxSizer(wxHORIZONTAL);
+                       _maximum_j2k_video_bit_rate = new wxSpinCtrl(_panel);
+                       s->Add(_maximum_j2k_video_bit_rate, 1);
+                       add_label_to_sizer(s, _panel, _("Mbit/s"), false, 0, wxLEFT | wxALIGN_CENTRE_VERTICAL);
+                       table->Add(s, 1);
+               }
+
+               {
+                       add_label_to_sizer(table, _panel, _("Maximum MPEG2 bit rate"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+                       auto s = new wxBoxSizer(wxHORIZONTAL);
+                       _maximum_mpeg2_video_bit_rate = new wxSpinCtrl(_panel);
+                       s->Add(_maximum_mpeg2_video_bit_rate, 1);
+                       add_label_to_sizer(s, _panel, _("Mbit/s"), false, 0, wxLEFT | wxALIGN_CENTRE_VERTICAL);
+                       table->Add(s, 1);
+               }
+
+               auto checkbox = [this, table](wxString name, CheckBox*& variable) {
+                       variable = new CheckBox(_panel, name);
+                       table->Add(variable, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
+                       table->AddSpacer(0);
+               };
+
+               checkbox(_("Allow any DCP frame rate"),  _allow_any_dcp_frame_rate);
+
+               _allow_any_container = new CheckBox(_panel, _("Allow full-frame and non-standard container ratios"));
+               table->Add(_allow_any_container, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
+               table->AddSpacer(0);
+
+               checkbox(_("Allow creation of DCPs with 96kHz audio"), _allow_96khz_audio);
+               checkbox(_("Allow mapping to all audio channels"), _use_all_audio_channels);
+               checkbox(_("Allow use of SMPTE Bv2.0"), _allow_smpte_bv20);
+
+               {
+                       add_label_to_sizer(table, _panel, _("ISDCF name part length"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+                       auto s = new wxBoxSizer(wxHORIZONTAL);
+                       _isdcf_name_part_length = new wxSpinCtrl(_panel);
+                       s->Add(_isdcf_name_part_length, 1);
+                       table->Add(s, 1);
+               }
+
+               _maximum_j2k_video_bit_rate->SetRange(1, 1000);
+               _maximum_j2k_video_bit_rate->Bind(wxEVT_SPINCTRL, boost::bind(&NonStandardPage::maximum_j2k_video_bit_rate_changed, this));
+               _maximum_mpeg2_video_bit_rate->SetRange(1, 100);
+               _maximum_mpeg2_video_bit_rate->Bind(wxEVT_SPINCTRL, boost::bind(&NonStandardPage::maximum_mpeg2_video_bit_rate_changed, this));
+               _allow_any_dcp_frame_rate->bind(&NonStandardPage::allow_any_dcp_frame_rate_changed, this);
+               _allow_any_container->bind(&NonStandardPage::allow_any_container_changed, this);
+               _allow_96khz_audio->bind(&NonStandardPage::allow_96khz_audio_changed, this);
+               _use_all_audio_channels->bind(&NonStandardPage::use_all_channels_changed, this);
+               _allow_smpte_bv20->bind(&NonStandardPage::allow_smpte_bv20_changed, this);
+               _isdcf_name_part_length->SetRange(1, 256);
+               _isdcf_name_part_length->Bind(wxEVT_SPINCTRL, boost::bind(&NonStandardPage::isdcf_name_part_length_changed, this));
+       }
+
+       void config_changed() override
+       {
+               auto config = Config::instance();
+
+               checked_set(_maximum_j2k_video_bit_rate, config->maximum_video_bit_rate(VideoEncoding::JPEG2000) / 1000000);
+               checked_set(_maximum_mpeg2_video_bit_rate, config->maximum_video_bit_rate(VideoEncoding::MPEG2) / 1000000);
+               checked_set(_allow_any_dcp_frame_rate, config->allow_any_dcp_frame_rate());
+               checked_set(_allow_any_container, config->allow_any_container());
+               checked_set(_allow_96khz_audio, config->allow_96khz_audio());
+               checked_set(_use_all_audio_channels, config->use_all_audio_channels());
+               checked_set(_allow_smpte_bv20, config->allow_smpte_bv20());
+               checked_set(_isdcf_name_part_length, config->isdcf_name_part_length());
+       }
+
+       void maximum_j2k_video_bit_rate_changed()
+       {
+               Config::instance()->set_maximum_video_bit_rate(VideoEncoding::JPEG2000, _maximum_j2k_video_bit_rate->GetValue() * 1000000);
+       }
+
+       void maximum_mpeg2_video_bit_rate_changed()
+       {
+               Config::instance()->set_maximum_video_bit_rate(VideoEncoding::MPEG2, _maximum_mpeg2_video_bit_rate->GetValue() * 1000000);
+       }
+
+       void allow_any_dcp_frame_rate_changed()
+       {
+               Config::instance()->set_allow_any_dcp_frame_rate(_allow_any_dcp_frame_rate->GetValue());
+       }
+
+       void allow_any_container_changed()
+       {
+               Config::instance()->set_allow_any_container(_allow_any_container->GetValue());
+       }
+
+       void allow_96khz_audio_changed()
+       {
+               Config::instance()->set_allow_96hhz_audio(_allow_96khz_audio->GetValue());
+       }
+
+       void use_all_channels_changed()
+       {
+               Config::instance()->set_use_all_audio_channels(_use_all_audio_channels->GetValue());
+       }
+
+       void allow_smpte_bv20_changed()
+       {
+               Config::instance()->set_allow_smpte_bv20(_allow_smpte_bv20->GetValue());
+       }
+
+       void isdcf_name_part_length_changed()
+       {
+               Config::instance()->set_isdcf_name_part_length(_isdcf_name_part_length->GetValue());
+       }
+
+       wxSpinCtrl* _maximum_j2k_video_bit_rate = nullptr;
+       wxSpinCtrl* _maximum_mpeg2_video_bit_rate = nullptr;
+       CheckBox* _allow_any_dcp_frame_rate = nullptr;
+       CheckBox* _allow_any_container = nullptr;
+       CheckBox* _allow_96khz_audio = nullptr;
+       CheckBox* _use_all_audio_channels = nullptr;
+       CheckBox* _allow_smpte_bv20 = nullptr;
+       wxSpinCtrl* _isdcf_name_part_length = nullptr;
+};
+
+
+
 /** @class AdvancedPage
  *  @brief Advanced page of the preferences dialog.
  */
@@ -1529,44 +1720,17 @@ private:
                table->AddGrowableCol (1, 1);
                _panel->GetSizer()->Add (table, 1, wxALL | wxEXPAND, _border);
 
-               {
-                       add_label_to_sizer (table, _panel, _("Maximum JPEG2000 bandwidth"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
-                       wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
-                       _maximum_j2k_bandwidth = new wxSpinCtrl (_panel);
-                       s->Add (_maximum_j2k_bandwidth, 1);
-                       add_label_to_sizer (s, _panel, _("Mbit/s"), false, 0, wxLEFT | wxALIGN_CENTRE_VERTICAL);
-                       table->Add (s, 1);
-               }
-
                add_label_to_sizer (table, _panel, _("Video display mode"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
                _video_display_mode = new wxChoice (_panel, wxID_ANY);
                table->Add (_video_display_mode);
 
-               auto restart = add_label_to_sizer (table, _panel, _("(restart DCP-o-matic to change display mode)"), false);
+               auto restart = add_label_to_sizer(table, _panel, variant::wx::insert_dcpomatic(_("(restart %s to change display mode)")), false);
                auto font = restart->GetFont();
                font.SetStyle (wxFONTSTYLE_ITALIC);
                font.SetPointSize (font.GetPointSize() - 1);
                restart->SetFont (font);
                table->AddSpacer (0);
 
-               _allow_any_dcp_frame_rate = new CheckBox (_panel, _("Allow any DCP frame rate"));
-               table->Add (_allow_any_dcp_frame_rate, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
-               table->AddSpacer (0);
-
-               _allow_any_container = new CheckBox (_panel, _("Allow full-frame and non-standard container ratios"));
-               table->Add (_allow_any_container, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
-               restart = new StaticText (_panel, _("(restart DCP-o-matic to see all ratios)"));
-               table->Add(restart, 1, wxALIGN_CENTRE_VERTICAL | wxBOTTOM, DCPOMATIC_CHECKBOX_BOTTOM_PAD);
-               restart->SetFont (font);
-
-               _allow_96khz_audio = new CheckBox (_panel, _("Allow creation of DCPs with 96kHz audio"));
-               table->Add (_allow_96khz_audio, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
-               table->AddSpacer (0);
-
-               _use_all_audio_channels = new CheckBox(_panel, _("Allow mapping to all audio channels"));
-               table->Add(_use_all_audio_channels, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
-               table->AddSpacer(0);
-
                _show_experimental_audio_processors = new CheckBox (_panel, _("Show experimental audio processors"));
                table->Add (_show_experimental_audio_processors, 1, wxEXPAND | wxLEFT, DCPOMATIC_SIZER_GAP);
                table->AddSpacer (0);
@@ -1660,17 +1824,11 @@ private:
                table->AddSpacer (0);
 #endif
 
-               _maximum_j2k_bandwidth->SetRange (1, 1000);
-               _maximum_j2k_bandwidth->Bind (wxEVT_SPINCTRL, boost::bind (&AdvancedPage::maximum_j2k_bandwidth_changed, this));
                _video_display_mode->Append (_("Simple (safer)"));
 #if wxCHECK_VERSION(3, 1, 0)
                _video_display_mode->Append (_("OpenGL (faster)"));
 #endif
                _video_display_mode->Bind (wxEVT_CHOICE, boost::bind(&AdvancedPage::video_display_mode_changed, this));
-               _allow_any_dcp_frame_rate->bind(&AdvancedPage::allow_any_dcp_frame_rate_changed, this);
-               _allow_any_container->bind(&AdvancedPage::allow_any_container_changed, this);
-               _allow_96khz_audio->bind(&AdvancedPage::allow_96khz_audio_changed, this);
-               _use_all_audio_channels->bind(&AdvancedPage::use_all_channels_changed, this);
                _show_experimental_audio_processors->bind(&AdvancedPage::show_experimental_audio_processors_changed, this);
                _only_servers_encode->bind(&AdvancedPage::only_servers_encode_changed, this);
                _frames_in_memory_multiplier->Bind (wxEVT_SPINCTRL, boost::bind(&AdvancedPage::frames_in_memory_multiplier_changed, this));
@@ -1695,7 +1853,6 @@ private:
        {
                auto config = Config::instance ();
 
-               checked_set (_maximum_j2k_bandwidth, config->maximum_j2k_bandwidth() / 1000000);
                switch (config->video_view_type()) {
                case Config::VIDEO_VIEW_SIMPLE:
                        checked_set (_video_display_mode, 0);
@@ -1704,10 +1861,6 @@ private:
                        checked_set (_video_display_mode, 1);
                        break;
                }
-               checked_set (_allow_any_dcp_frame_rate, config->allow_any_dcp_frame_rate ());
-               checked_set (_allow_any_container, config->allow_any_container ());
-               checked_set (_allow_96khz_audio, config->allow_96khz_audio());
-               checked_set (_use_all_audio_channels, config->use_all_audio_channels());
                checked_set (_show_experimental_audio_processors, config->show_experimental_audio_processors ());
                checked_set (_only_servers_encode, config->only_servers_encode ());
                checked_set (_log_general, config->log_types() & LogEntry::TYPE_GENERAL);
@@ -1726,11 +1879,6 @@ private:
 #endif
        }
 
-       void maximum_j2k_bandwidth_changed ()
-       {
-               Config::instance()->set_maximum_j2k_bandwidth(_maximum_j2k_bandwidth->GetValue() * 1000000);
-       }
-
        void video_display_mode_changed ()
        {
                if (_video_display_mode->GetSelection() == 0) {
@@ -1745,26 +1893,6 @@ private:
                Config::instance()->set_frames_in_memory_multiplier(_frames_in_memory_multiplier->GetValue());
        }
 
-       void allow_any_dcp_frame_rate_changed ()
-       {
-               Config::instance()->set_allow_any_dcp_frame_rate(_allow_any_dcp_frame_rate->GetValue());
-       }
-
-       void allow_any_container_changed ()
-       {
-               Config::instance()->set_allow_any_container(_allow_any_container->GetValue());
-       }
-
-       void allow_96khz_audio_changed ()
-       {
-               Config::instance()->set_allow_96hhz_audio(_allow_96khz_audio->GetValue());
-       }
-
-       void use_all_channels_changed ()
-       {
-               Config::instance()->set_use_all_audio_channels(_use_all_audio_channels->GetValue());
-       }
-
        void show_experimental_audio_processors_changed ()
        {
                Config::instance()->set_show_experimental_audio_processors(_show_experimental_audio_processors->GetValue());
@@ -1828,13 +1956,8 @@ private:
        }
 #endif
 
-       wxSpinCtrl* _maximum_j2k_bandwidth = nullptr;
        wxChoice* _video_display_mode = nullptr;
        wxSpinCtrl* _frames_in_memory_multiplier = nullptr;
-       CheckBox* _allow_any_dcp_frame_rate = nullptr;
-       CheckBox* _allow_any_container = nullptr;
-       CheckBox* _allow_96khz_audio = nullptr;
-       CheckBox* _use_all_audio_channels = nullptr;
        CheckBox* _show_experimental_audio_processors = nullptr;
        CheckBox* _only_servers_encode = nullptr;
        NameFormatEditor* _dcp_metadata_filename_format = nullptr;
@@ -1865,7 +1988,7 @@ create_full_config_dialog ()
           the containing window doesn't shrink too much when we select those panels.
           This is obviously an unpleasant hack.
        */
-       wxSize ps = wxSize (750, -1);
+       wxSize ps = wxSize(900, -1);
        int const border = 16;
 #else
        wxSize ps = wxSize (-1, -1);
@@ -1876,6 +1999,9 @@ create_full_config_dialog ()
        e->AddPage (new SoundPage          (ps, border));
        e->AddPage (new DefaultsPage       (ps, border));
        e->AddPage (new EncodingServersPage(ps, border));
+#ifdef DCPOMATIC_GROK
+       e->AddPage (new GPUPage            (ps, border));
+#endif
        e->AddPage (new KeysPage           (ps, border));
        e->AddPage (new TMSPage            (ps, border));
        e->AddPage (new EmailPage          (ps, border));
@@ -1883,6 +2009,7 @@ create_full_config_dialog ()
        e->AddPage (new NotificationsPage  (ps, border));
        e->AddPage (new CoverSheetPage     (ps, border));
        e->AddPage (new IdentifiersPage    (ps, border));
+       e->AddPage (new NonStandardPage    (ps, border));
        e->AddPage (new AdvancedPage       (ps, border));
        return e;
 }