# Use distro-provided FFmpeg on Arch
deps = []
- deps.append(('libdcp', 'v1.8.10'))
- deps.append(('libsub', 'v1.6.10'))
+ deps.append(('libdcp', 'v1.8.11'))
+ deps.append(('libsub', 'v1.6.11'))
deps.append(('leqm-nrt', '93ae9e6'))
deps.append(('rtaudio', 'f619b76'))
# We get our OpenSSL libraries from the environment, but we
/*
- Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2022 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
_use_isdcf_name_by_default = true;
_write_kdms_to_disk = true;
_email_kdms = false;
+ _default_kdm_type = dcp::Formulation::MODIFIED_TRANSITIONAL_1;
_allowed_dcp_frame_rates.clear ();
_allowed_dcp_frame_rates.push_back (24);
_use_isdcf_name_by_default = f.optional_bool_child("UseISDCFNameByDefault").get_value_or(true);
_write_kdms_to_disk = f.optional_bool_child("WriteKDMsToDisk").get_value_or(true);
_email_kdms = f.optional_bool_child("EmailKDMs").get_value_or(false);
+ _default_kdm_type = dcp::string_to_formulation(f.optional_string_child("DefaultKDMType").get_value_or("modified-transitional-1"));
if (boost::filesystem::exists (_cinemas_file)) {
cxml::Document f ("Cinemas");
root->add_child("UseISDCFNameByDefault")->add_child_text(_use_isdcf_name_by_default ? "1" : "0");
root->add_child("WriteKDMsToDisk")->add_child_text(_write_kdms_to_disk ? "1" : "0");
root->add_child("EmailKDMs")->add_child_text(_email_kdms ? "1" : "0");
+ root->add_child("DefaultKDMType")->add_child_text(dcp::formulation_to_string(_default_kdm_type));
auto target = config_write_file();
return _email_kdms;
}
+ dcp::Formulation default_kdm_type () const {
+ return _default_kdm_type;
+ }
+
+
/* SET (mostly) */
void set_master_encoding_threads (int n) {
maybe_set (_email_kdms, email);
}
+ void set_default_kdm_type (dcp::Formulation type) {
+ maybe_set (_default_kdm_type, type);
+ }
+
void changed (Property p = OTHER);
boost::signals2::signal<void (Property)> Changed;
/** Emitted if read() failed on an existing Config file. There is nothing
bool _use_isdcf_name_by_default;
bool _write_kdms_to_disk;
bool _email_kdms;
+ dcp::Formulation _default_kdm_type;
static int const _current_version;
#include "file_picker_ctrl.h"
#include "filter_dialog.h"
#include "full_config_dialog.h"
+#include "kdm_choice.h"
#include "make_chain_dialog.h"
#include "nag_dialog.h"
#include "name_format_editor.h"
#else
_kdm_directory = new wxDirPickerCtrl (_panel, wxDD_DIR_MUST_EXIST);
#endif
-
table->Add (_kdm_directory, 1, wxEXPAND);
+ add_label_to_sizer (table, _panel, _("Default KDM type"), true, 0, wxLEFT | wxRIGHT | wxALIGN_CENTRE_VERTICAL);
+ _kdm_type = new KDMChoice (_panel);
+ table->Add (_kdm_type, 1, wxEXPAND);
+
table->Add (_use_isdcf_name_by_default = new CheckBox(_panel, _("Use ISDCF name by default")), 0, wxALIGN_CENTRE_VERTICAL);
_still_length->SetRange (1, 3600);
_directory->Bind (wxEVT_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::directory_changed, this));
_kdm_directory->Bind (wxEVT_DIRPICKER_CHANGED, boost::bind (&DefaultsPage::kdm_directory_changed, this));
+ _kdm_type->Bind (wxEVT_CHOICE, boost::bind(&DefaultsPage::kdm_type_changed, this));
_use_isdcf_name_by_default->Bind (wxEVT_CHECKBOX, boost::bind(&DefaultsPage::use_isdcf_name_by_default_changed, this));
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 ()));
+ _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);
Config::instance()->set_default_kdm_directory (wx_to_std (_kdm_directory->GetPath ()));
}
+ void kdm_type_changed ()
+ {
+ Config::instance()->set_default_kdm_type(_kdm_type->get());
+ }
+
void use_isdcf_name_by_default_changed ()
{
Config::instance()->set_use_isdcf_name_by_default (_use_isdcf_name_by_default->GetValue());
wxDirPickerCtrl* _directory;
wxDirPickerCtrl* _kdm_directory;
#endif
+ KDMChoice* _kdm_type;
wxCheckBox* _use_isdcf_name_by_default;
wxChoice* _container;
wxChoice* _dcp_content_type;
}
+dcp::Formulation
+KDMChoice::get_formulation (unsigned int n) const
+{
+ return static_cast<dcp::Formulation>(reinterpret_cast<intptr_t>(GetClientData(n)));
+}
+
+
dcp::Formulation
KDMChoice::get () const
{
- return static_cast<dcp::Formulation>(reinterpret_cast<intptr_t>(GetClientData(GetSelection())));
+ return get_formulation(GetSelection());
+}
+
+
+void
+KDMChoice::set (dcp::Formulation type)
+{
+ for (unsigned int i = 0; i < GetCount(); ++i) {
+ if (get_formulation(i) == type) {
+ SetSelection(i);
+ return;
+ }
+ }
}
+
+
+
KDMChoice (wxWindow* parent);
dcp::Formulation get () const;
+ void set (dcp::Formulation type);
+
+private:
+ dcp::Formulation get_formulation (unsigned int n) const;
};
auto type = new wxBoxSizer (wxHORIZONTAL);
_type = new KDMChoice (this);
type->Add (_type, 1, wxTOP, DCPOMATIC_CHOICE_TOP_PAD);
- _type->SetSelection (0);
+ _type->set(Config::instance()->default_kdm_type());
auto advanced = new Button (this, _("Advanced..."));
type->Add (advanced, 0, wxLEFT | wxALIGN_CENTER_VERTICAL, DCPOMATIC_SIZER_X_GAP);
table->Add (type, 1, wxTOP, DCPOMATIC_CHOICE_TOP_PAD);