diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-09-17 23:22:10 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-09-17 23:22:10 +0200 |
| commit | 45f029ce9688a38b8271aa3d23abde1c4d3a31d2 (patch) | |
| tree | 5981c80e3a1f3e7861f4948992464439856daa2f | |
| parent | 35ba1f7a97d3173bd3846cb48de1542fff1d8b5a (diff) | |
Remove default DCP content type setting (already taken from template).
| -rw-r--r-- | src/lib/config.cc | 8 | ||||
| -rw-r--r-- | src/lib/config.h | 9 | ||||
| -rw-r--r-- | src/lib/film.cc | 2 | ||||
| -rw-r--r-- | src/wx/full_config_dialog.cc | 23 | ||||
| -rw-r--r-- | test/test.cc | 1 |
5 files changed, 1 insertions, 42 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index 042dc9994..923116f3a 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -105,7 +105,6 @@ Config::set_defaults () _show_experimental_audio_processors = false; _language = optional<string> (); _default_still_length = 10; - _default_dcp_content_type = DCPContentType::from_isdcf_name ("FTR"); _default_dcp_audio_channels = 8; _default_j2k_bandwidth = 150000000; _default_audio_delay = 0; @@ -339,7 +338,6 @@ try _language = f.optional_string_child ("Language"); - _default_dcp_content_type = DCPContentType::from_isdcf_name(f.optional_string_child("DefaultDCPContentType").get_value_or("FTR")); _default_dcp_audio_channels = f.optional_number_child<int>("DefaultDCPAudioChannels").get_value_or (6); if (f.optional_string_child ("DCPMetadataIssuer")) { @@ -757,12 +755,6 @@ Config::write_config () const /* [XML:opt] Language Language to use in the GUI e.g. <code>fr_FR</code>. */ root->add_child("Language")->add_child_text (_language.get()); } - if (_default_dcp_content_type) { - /* [XML:opt] DefaultDCPContentType Default content type to use when creating new films (<code>FTR</code>, <code>SHR</code>, - <code>TLR</code>, <code>TST</code>, <code>XSN</code>, <code>RTG</code>, <code>TSR</code>, <code>POL</code>, - <code>PSA</code> or <code>ADV</code>). */ - root->add_child("DefaultDCPContentType")->add_child_text (_default_dcp_content_type->isdcf_name ()); - } /* [XML] DefaultDCPAudioChannels Default number of audio channels to use when creating new films. */ root->add_child("DefaultDCPAudioChannels")->add_child_text (raw_convert<string> (_default_dcp_audio_channels)); /* [XML] DCPIssuer Issuer text to write into CPL files. */ diff --git a/src/lib/config.h b/src/lib/config.h index 94f616812..57de737e3 100644 --- a/src/lib/config.h +++ b/src/lib/config.h @@ -195,10 +195,6 @@ public: return _default_still_length; } - DCPContentType const * default_dcp_content_type () const { - return _default_dcp_content_type; - } - int default_dcp_audio_channels () const { return _default_dcp_audio_channels; } @@ -742,10 +738,6 @@ public: maybe_set (_default_still_length, s); } - void set_default_dcp_content_type (DCPContentType const * t) { - maybe_set (_default_dcp_content_type, t); - } - void set_default_dcp_audio_channels (int c) { maybe_set (_default_dcp_audio_channels, c); } @@ -1330,7 +1322,6 @@ private: boost::optional<std::string> _language; /** Default length of still image content (seconds) */ int _default_still_length; - DCPContentType const * _default_dcp_content_type; int _default_dcp_audio_channels; std::string _dcp_issuer; std::string _dcp_creator; diff --git a/src/lib/film.cc b/src/lib/film.cc index 02fcfe923..f807619f3 100644 --- a/src/lib/film.cc +++ b/src/lib/film.cc @@ -155,7 +155,7 @@ int const Film::current_state_version = 38; Film::Film (optional<boost::filesystem::path> dir) : _playlist (new Playlist) , _use_isdcf_name (Config::instance()->use_isdcf_name_by_default()) - , _dcp_content_type (Config::instance()->default_dcp_content_type ()) + , _dcp_content_type(DCPContentType::from_isdcf_name("FTR")) , _container(Ratio::from_id("185")) , _resolution (Resolution::TWO_K) , _encrypted (false) diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index c61c75ece..6280f18f5 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -304,10 +304,6 @@ private: #endif table->Add (_directory, 1, wxEXPAND); - add_label_to_sizer (table, _panel, _("Default content type"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); - _dcp_content_type = new wxChoice (_panel, wxID_ANY); - table->Add (_dcp_content_type); - add_label_to_sizer (table, _panel, _("Default DCP audio channels"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); _dcp_audio_channels = new wxChoice (_panel, wxID_ANY); table->Add (_dcp_audio_channels); @@ -394,13 +390,8 @@ private: _use_isdcf_name_by_default->bind(&DefaultsPage::use_isdcf_name_by_default_changed, this); - for (auto i: DCPContentType::all()) { - _dcp_content_type->Append (std_to_wx (i->pretty_name ())); - } - setup_audio_channels_choice (_dcp_audio_channels, 2); - _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); @@ -432,13 +423,6 @@ private: { auto config = Config::instance (); - auto const ct = DCPContentType::all (); - for (size_t i = 0; i < ct.size(); ++i) { - if (ct[i] == config->default_dcp_content_type()) { - _dcp_content_type->SetSelection (i); - } - } - checked_set (_still_length, config->default_still_length ()); _directory->SetPath (std_to_wx (config->default_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ())); _kdm_directory->SetPath (std_to_wx (config->default_kdm_directory_or (wx_to_std (wxStandardPaths::Get().GetDocumentsDir())).string ())); @@ -565,12 +549,6 @@ private: Config::instance()->set_default_still_length (_still_length->GetValue ()); } - void dcp_content_type_changed () - { - auto ct = DCPContentType::all (); - Config::instance()->set_default_dcp_content_type (ct[_dcp_content_type->GetSelection()]); - } - void standard_changed () { Config::instance()->set_default_interop (_standard->GetSelection() == 1); @@ -641,7 +619,6 @@ private: wxSpinCtrl* _kdm_duration; wxChoice* _kdm_duration_unit; CheckBox* _use_isdcf_name_by_default; - wxChoice* _dcp_content_type; wxChoice* _dcp_audio_channels; wxChoice* _standard; CheckBox* _enable_audio_language; diff --git a/test/test.cc b/test/test.cc index 175fc09fb..7abdc7dd4 100644 --- a/test/test.cc +++ b/test/test.cc @@ -117,7 +117,6 @@ setup_test_config () Config::instance()->set_master_encoding_threads (boost::thread::hardware_concurrency() / 2); Config::instance()->set_server_encoding_threads (1); Config::instance()->set_server_port_base (61921); - Config::instance()->set_default_dcp_content_type (static_cast<DCPContentType*> (0)); Config::instance()->set_default_audio_delay (0); Config::instance()->set_default_j2k_bandwidth (100000000); Config::instance()->set_default_interop (false); |
