diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-01-01 21:20:51 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-04-29 01:44:15 +0200 |
| commit | d5c059a2ff9bab5c2973db6bc4860591679dd42b (patch) | |
| tree | c8ec57cdeae4c3746f6ff7abd28816310540604b /src/lib/config.cc | |
| parent | 5b2b8279d8eb33d31166027d876b4c9f86087bfd (diff) | |
Primitive auto-crop (#1477).
Diffstat (limited to 'src/lib/config.cc')
| -rw-r--r-- | src/lib/config.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc index 36aae76de..d11a60c94 100644 --- a/src/lib/config.cc +++ b/src/lib/config.cc @@ -188,6 +188,7 @@ Config::set_defaults () _write_kdms_to_disk = true; _email_kdms = false; _default_kdm_type = dcp::Formulation::MODIFIED_TRANSITIONAL_1; + _auto_crop_threshold = 0.1; _allowed_dcp_frame_rates.clear (); _allowed_dcp_frame_rates.push_back (24); @@ -579,6 +580,7 @@ try _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")); + _auto_crop_threshold = f.optional_number_child<double>("AutoCropThreshold").get_value_or(0.1); if (boost::filesystem::exists (_cinemas_file)) { cxml::Document f ("Cinemas"); @@ -1014,6 +1016,7 @@ Config::write_config () const 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)); + root->add_child("AutoCropThreshold")->add_child_text(raw_convert<string>(_auto_crop_threshold)); auto target = config_write_file(); |
