diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-05-17 15:52:39 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-05-19 23:07:52 +0200 |
| commit | a6a6d8a7a1c4c59bac9de6fa8f4cd879ebeef55d (patch) | |
| tree | ce23c7951554df079f09259dd1a33f1c0c210151 /src/wx | |
| parent | e9627c2ac61551e3598601805d12938479ad3dff (diff) | |
Generalise SMPTE Bv2.0 limitation to also support SMPTE A.smpte-a
Diffstat (limited to 'src/wx')
| -rw-r--r-- | src/wx/dcp_panel.cc | 40 | ||||
| -rw-r--r-- | src/wx/full_config_dialog.cc | 12 |
2 files changed, 34 insertions, 18 deletions
diff --git a/src/wx/dcp_panel.cc b/src/wx/dcp_panel.cc index f4ba74cde..7cd04f367 100644 --- a/src/wx/dcp_panel.cc +++ b/src/wx/dcp_panel.cc @@ -167,9 +167,12 @@ void DCPPanel::add_standards() { _standard->add(_("SMPTE"), N_("smpte")); - if (Config::instance()->allow_smpte_bv20() || (_film && _film->limit_to_smpte_bv20())) { + if (Config::instance()->allow_smpte_flavours() || (_film && _film->smpte_flavour() == dcp::SMPTEFlavour::BV20)) { _standard->add(_("SMPTE (Bv2.0 only)"), N_("smpte-bv20")); } + if (Config::instance()->allow_smpte_flavours() || (_film && _film->smpte_flavour() == dcp::SMPTEFlavour::A)) { + _standard->add(_("SMPTE (A only)"), N_("smpte-a")); + } _standard->add(_("Interop"), N_("interop")); _sizer->Layout(); } @@ -179,12 +182,21 @@ void DCPPanel::set_standard() { DCPOMATIC_ASSERT(_film); - DCPOMATIC_ASSERT(!_film->limit_to_smpte_bv20() || _standard->GetCount() == 3); if (_film->interop()) { checked_set(_standard, "interop"); } else { - checked_set(_standard, _film->limit_to_smpte_bv20() ? "smpte-bv20" : "smpte"); + switch (_film->smpte_flavour()) { + case dcp::SMPTEFlavour::A: + checked_set(_standard, "smpte-a"); + break; + case dcp::SMPTEFlavour::BV20: + checked_set(_standard, "smpte-bv20"); + break; + case dcp::SMPTEFlavour::BV21: + checked_set(_standard, "smpte"); + break; + } } } @@ -203,13 +215,16 @@ DCPPanel::standard_changed () if (*data == N_("interop")) { _film->set_interop(true); - _film->set_limit_to_smpte_bv20(false); + _film->set_smpte_flavour(dcp::SMPTEFlavour::BV21); } else if (*data == N_("smpte")) { _film->set_interop(false); - _film->set_limit_to_smpte_bv20(false); + _film->set_smpte_flavour(dcp::SMPTEFlavour::BV21); } else if (*data == N_("smpte-bv20")) { _film->set_interop(false); - _film->set_limit_to_smpte_bv20(true); + _film->set_smpte_flavour(dcp::SMPTEFlavour::BV20); + } else if (*data == N_("smpte-a")) { + _film->set_interop(false); + _film->set_smpte_flavour(dcp::SMPTEFlavour::A); } } @@ -476,10 +491,11 @@ DCPPanel::film_changed(FilmProperty p) case FilmProperty::INTEROP: set_standard(); setup_dcp_name (); - _markers->Enable (!_film->interop()); + setup_sensitivity(); break; - case FilmProperty::LIMIT_TO_SMPTE_BV20: + case FilmProperty::SMPTE_FLAVOUR: set_standard(); + setup_sensitivity(); break; case FilmProperty::AUDIO_PROCESSOR: if (_film->audio_processor()) { @@ -656,7 +672,7 @@ DCPPanel::set_film (shared_ptr<Film> film) film_changed(FilmProperty::REENCODE_J2K); film_changed(FilmProperty::AUDIO_LANGUAGE); film_changed(FilmProperty::AUDIO_FRAME_RATE); - film_changed(FilmProperty::LIMIT_TO_SMPTE_BV20); + film_changed(FilmProperty::SMPTE_FLAVOUR); set_general_sensitivity(static_cast<bool>(_film)); } @@ -683,7 +699,7 @@ DCPPanel::setup_sensitivity () _encrypted->Enable (_generally_sensitive); _reel_type->Enable (_generally_sensitive && _film && !_film->references_dcp_video() && !_film->references_dcp_audio()); _reel_length->Enable (_generally_sensitive && _film && _film->reel_type() == ReelType::BY_LENGTH); - _markers->Enable (_generally_sensitive && _film && !_film->interop()); + _markers->Enable (_generally_sensitive && _film && !_film->interop() && _film->smpte_flavour() != dcp::SMPTEFlavour::A); _metadata->Enable (_generally_sensitive); _frame_rate_choice->Enable (_generally_sensitive && _film && !_film->references_dcp_video() && !_film->contains_atmos_content()); _frame_rate_spin->Enable (_generally_sensitive && _film && !_film->references_dcp_video() && !_film->contains_atmos_content()); @@ -781,12 +797,12 @@ DCPPanel::config_changed (Config::Property p) if (_film) { film_changed(FilmProperty::AUDIO_PROCESSOR); } - } else if (p == Config::ALLOW_SMPTE_BV20) { + } else if (p == Config::ALLOW_SMPTE_FLAVOURS) { _standard->Clear(); add_standards(); if (_film) { film_changed(FilmProperty::INTEROP); - film_changed(FilmProperty::LIMIT_TO_SMPTE_BV20); + film_changed(FilmProperty::SMPTE_FLAVOUR); } } else if (p == Config::ISDCF_NAME_PART_LENGTH) { setup_dcp_name(); diff --git a/src/wx/full_config_dialog.cc b/src/wx/full_config_dialog.cc index c1c36c4a4..8ded16226 100644 --- a/src/wx/full_config_dialog.cc +++ b/src/wx/full_config_dialog.cc @@ -1547,7 +1547,7 @@ private: 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); + checkbox(_("Allow use of SMPTE flavours"), _allow_smpte_flavours); { add_label_to_sizer(table, _panel, _("ISDCF name part length"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL); @@ -1563,7 +1563,7 @@ private: _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); + _allow_smpte_flavours->bind(&NonStandardPage::allow_smpte_flavours_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)); } @@ -1577,7 +1577,7 @@ private: 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(_allow_smpte_flavours, config->allow_smpte_flavours()); checked_set(_isdcf_name_part_length, config->isdcf_name_part_length()); } @@ -1606,9 +1606,9 @@ private: Config::instance()->set_use_all_audio_channels(_use_all_audio_channels->GetValue()); } - void allow_smpte_bv20_changed() + void allow_smpte_flavours_changed() { - Config::instance()->set_allow_smpte_bv20(_allow_smpte_bv20->GetValue()); + Config::instance()->set_allow_smpte_flavours(_allow_smpte_flavours->GetValue()); } void isdcf_name_part_length_changed() @@ -1621,7 +1621,7 @@ private: CheckBox* _allow_any_container = nullptr; CheckBox* _allow_96khz_audio = nullptr; CheckBox* _use_all_audio_channels = nullptr; - CheckBox* _allow_smpte_bv20 = nullptr; + CheckBox* _allow_smpte_flavours = nullptr; wxSpinCtrl* _isdcf_name_part_length = nullptr; }; |
