summaryrefslogtreecommitdiff
path: root/src/lib/config.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2018-02-10 22:43:09 +0000
committerCarl Hetherington <cth@carlh.net>2018-02-10 23:00:15 +0000
commit0af38a850f967fd1848850a18432abc6314e9cc4 (patch)
tree0796f547efd4174b5f8fdb1c9b0bf0fa88c9be49 /src/lib/config.cc
parent17f9254f68fabfe5d8136d256b69a65fc58724ee (diff)
Save decoding resolution reduction between launches (#1195).
Diffstat (limited to 'src/lib/config.cc')
-rw-r--r--src/lib/config.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/config.cc b/src/lib/config.cc
index a54858cdb..16df3779f 100644
--- a/src/lib/config.cc
+++ b/src/lib/config.cc
@@ -144,6 +144,7 @@ Config::set_defaults ()
use about 240Mb with 72 encoding threads.
*/
_frames_in_memory_multiplier = 3;
+ _decode_reduction = optional<int>();
_allowed_dcp_frame_rates.clear ();
_allowed_dcp_frame_rates.push_back (24);
@@ -392,6 +393,7 @@ try
}
}
_frames_in_memory_multiplier = f.optional_number_child<int>("FramesInMemoryMultiplier").get_value_or(3);
+ _decode_reduction = f.optional_number_child<int>("DecodeReduction");
/* Replace any cinemas from config.xml with those from the configured file */
if (boost::filesystem::exists (_cinemas_file)) {
@@ -714,6 +716,11 @@ Config::write_config () const
*/
root->add_child("FramesInMemoryMultiplier")->add_child_text(raw_convert<string>(_frames_in_memory_multiplier));
+ /* [XML] DecodeReduction power of 2 to reduce DCP images by before decoding in the player */
+ if (_decode_reduction) {
+ root->add_child("DecodeReduction")->add_child_text(raw_convert<string>(_decode_reduction.get()));
+ }
+
try {
doc.write_to_file_formatted(config_file().string());
} catch (xmlpp::exception& e) {