Remove configuration option for minimum frame size.
authorCarl Hetherington <cth@carlh.net>
Thu, 22 Apr 2021 13:54:25 +0000 (15:54 +0200)
committerCarl Hetherington <cth@carlh.net>
Thu, 22 Apr 2021 19:52:56 +0000 (21:52 +0200)
Replace it with a fixed 16KB as per #1902.

src/lib/config.cc
src/lib/config.h
src/lib/dcp_video.cc
src/wx/full_config_dialog.cc

index 4404c83144d23dceb143ea016ec509144d0050d0..ce02b046e4e91635857ec0a2daee5df1535097dc 100644 (file)
@@ -175,7 +175,6 @@ Config::set_defaults ()
        _player_playlist_directory = boost::none;
        _player_kdm_directory = boost::none;
        _audio_mapping = boost::none;
-       _minimum_frame_size = 65536;
        _custom_languages.clear ();
 
        _allowed_dcp_frame_rates.clear ();
@@ -545,8 +544,6 @@ try
                _audio_mapping = AudioMapping (f.node_child("AudioMapping"), Film::current_state_version);
        }
 
-       _minimum_frame_size = f.optional_number_child<int>("MinimumFrameSize").get_value_or(65536);
-
        for (auto i: f.node_children("CustomLanguage")) {
                try {
                        /* This will fail if it's called before dcp::init() as it won't recognise the
@@ -976,7 +973,6 @@ Config::write_config () const
        if (_audio_mapping) {
                _audio_mapping->as_xml (root->add_child("AudioMapping"));
        }
-       root->add_child("MinimumFrameSize")->add_child_text(raw_convert<string>(_minimum_frame_size));
        for (auto const& i: _custom_languages) {
                root->add_child("CustomLanguage")->add_child_text(i.to_string());
        }
index eb8f88da9566f061e70ccf5e87ebbcfd11ab5279..da29a8955d68f2b9a4eda4d151621345ebe51fa0 100644 (file)
@@ -536,10 +536,6 @@ public:
 
        AudioMapping audio_mapping (int output_channels);
 
-       int minimum_frame_size () const {
-               return _minimum_frame_size;
-       }
-
        std::vector<dcp::LanguageTag> custom_languages () const {
                return _custom_languages;
        }
@@ -1051,10 +1047,6 @@ public:
        void set_audio_mapping (AudioMapping m);
        void set_audio_mapping_to_default ();
 
-       void set_minimum_frame_size (int size) {
-               maybe_set (_minimum_frame_size, size);
-       }
-
        void add_custom_language (dcp::LanguageTag tag);
 
        void changed (Property p = OTHER);
@@ -1268,7 +1260,6 @@ private:
        boost::optional<boost::filesystem::path> _player_playlist_directory;
        boost::optional<boost::filesystem::path> _player_kdm_directory;
        boost::optional<AudioMapping> _audio_mapping;
-       int _minimum_frame_size;
        std::vector<dcp::LanguageTag> _custom_languages;
 
        static int const _current_version;
index ed68299bb45319d611606fb8a5b6451558be06e4..4a505a7e18e65996b4666d59f541e67b0f993c06 100644 (file)
@@ -128,7 +128,8 @@ DCPVideo::encode_locally ()
        auto const comment = Config::instance()->dcp_j2k_comment();
 
        ArrayData enc = {};
-       int const minimum_size = Config::instance()->minimum_frame_size();
+       /* This was empirically derived by a user: see #1902 */
+       int const minimum_size = 16384;
        LOG_GENERAL ("Using minimum frame size %1", minimum_size);
 
        auto xyz = convert_to_xyz (_frame, boost::bind(&Log::dcp_log, dcpomatic_log.get(), _1, _2));
index 9622955282725648e2e346ef78e77f59876df11d..155472a38edd82f5f0c3e019533aaef67d16fe65 100644 (file)
@@ -1325,14 +1325,6 @@ private:
                        table->Add (s, 1);
                }
 
-               {
-                       add_label_to_sizer (table, _panel, _("Minimum size of frame (KB)"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
-                       wxBoxSizer* s = new wxBoxSizer (wxHORIZONTAL);
-                       _minimum_frame_size = new wxSpinCtrl (_panel);
-                       s->Add (_minimum_frame_size, 1);
-                       table->Add (s, 1);
-               }
-
                {
                        add_top_aligned_label_to_sizer (table, _panel, _("DCP metadata filename format"));
                        dcp::NameFormat::Map titles;
@@ -1406,7 +1398,6 @@ private:
                _show_experimental_audio_processors->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::show_experimental_audio_processors_changed, this));
                _only_servers_encode->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::only_servers_encode_changed, this));
                _frames_in_memory_multiplier->Bind (wxEVT_SPINCTRL, boost::bind(&AdvancedPage::frames_in_memory_multiplier_changed, this));
-               _minimum_frame_size->Bind (wxEVT_SPINCTRL, boost::bind(&AdvancedPage::minimum_frame_size_changed, this));
                _dcp_metadata_filename_format->Changed.connect (boost::bind (&AdvancedPage::dcp_metadata_filename_format_changed, this));
                _dcp_asset_filename_format->Changed.connect (boost::bind (&AdvancedPage::dcp_asset_filename_format_changed, this));
                _log_general->Bind (wxEVT_CHECKBOX, boost::bind (&AdvancedPage::log_changed, this));
@@ -1452,7 +1443,6 @@ private:
                checked_set (_log_debug_player, config->log_types() & LogEntry::TYPE_DEBUG_PLAYER);
                checked_set (_log_debug_audio_analysis, config->log_types() & LogEntry::TYPE_DEBUG_AUDIO_ANALYSIS);
                checked_set (_frames_in_memory_multiplier, config->frames_in_memory_multiplier());
-               checked_set (_minimum_frame_size, config->minimum_frame_size() / 1024);
 #ifdef DCPOMATIC_WINDOWS
                checked_set (_win32_console, config->win32_console());
 #endif
@@ -1477,11 +1467,6 @@ private:
                Config::instance()->set_frames_in_memory_multiplier (_frames_in_memory_multiplier->GetValue());
        }
 
-       void minimum_frame_size_changed ()
-       {
-               Config::instance()->set_minimum_frame_size (_minimum_frame_size->GetValue() * 1024);
-       }
-
        void allow_any_dcp_frame_rate_changed ()
        {
                Config::instance()->set_allow_any_dcp_frame_rate (_allow_any_dcp_frame_rate->GetValue ());
@@ -1558,7 +1543,6 @@ private:
        wxSpinCtrl* _maximum_j2k_bandwidth;
        wxChoice* _video_display_mode;
        wxSpinCtrl* _frames_in_memory_multiplier;
-       wxSpinCtrl* _minimum_frame_size;
        wxCheckBox* _allow_any_dcp_frame_rate;
        wxCheckBox* _allow_any_container;
        wxCheckBox* _show_experimental_audio_processors;