+ /* The variable was renamed but not the XML tag */
+ _sound = f.optional_bool_child("PreviewSound").get_value_or (true);
+ _sound_output = f.optional_string_child("PreviewSoundOutput");
+ if (f.optional_string_child("CoverSheet")) {
+ _cover_sheet = f.optional_string_child("CoverSheet").get();
+ }
+ _last_player_load_directory = f.optional_string_child("LastPlayerLoadDirectory");
+ if (f.optional_string_child("LastKDMWriteType")) {
+ if (f.optional_string_child("LastKDMWriteType").get() == "flat") {
+ _last_kdm_write_type = KDM_WRITE_FLAT;
+ } else if (f.optional_string_child("LastKDMWriteType").get() == "folder") {
+ _last_kdm_write_type = KDM_WRITE_FOLDER;
+ } else if (f.optional_string_child("LastKDMWriteType").get() == "zip") {
+ _last_kdm_write_type = KDM_WRITE_ZIP;
+ }
+ }
+ if (f.optional_string_child("LastDKDMWriteType")) {
+ if (f.optional_string_child("LastDKDMWriteType").get() == "internal") {
+ _last_dkdm_write_type = DKDM_WRITE_INTERNAL;
+ } else if (f.optional_string_child("LastDKDMWriteType").get() == "file") {
+ _last_dkdm_write_type = DKDM_WRITE_FILE;
+ }
+ }
+ _frames_in_memory_multiplier = f.optional_number_child<int>("FramesInMemoryMultiplier").get_value_or(3);
+ _decode_reduction = f.optional_number_child<int>("DecodeReduction");
+ _default_notify = f.optional_bool_child("DefaultNotify").get_value_or(false);
+
+ for (auto i: f.node_children("Notification")) {
+ int const id = i->number_attribute<int>("Id");
+ if (id >= 0 && id < NOTIFICATION_COUNT) {
+ _notification[id] = raw_convert<int>(i->content());
+ }
+ }
+
+ _barco_username = f.optional_string_child("BarcoUsername");
+ _barco_password = f.optional_string_child("BarcoPassword");
+ _christie_username = f.optional_string_child("ChristieUsername");
+ _christie_password = f.optional_string_child("ChristiePassword");
+ _gdc_username = f.optional_string_child("GDCUsername");
+ _gdc_password = f.optional_string_child("GDCPassword");
+
+ auto pm = f.optional_string_child("PlayerMode");
+ if (pm && *pm == "window") {
+ _player_mode = PLAYER_MODE_WINDOW;
+ } else if (pm && *pm == "full") {
+ _player_mode = PLAYER_MODE_FULL;
+ } else if (pm && *pm == "dual") {
+ _player_mode = PLAYER_MODE_DUAL;
+ }
+
+ _image_display = f.optional_number_child<int>("ImageDisplay").get_value_or(0);
+ auto vc = f.optional_string_child("VideoViewType");
+ if (vc && *vc == "opengl") {
+ _video_view_type = VIDEO_VIEW_OPENGL;
+ } else if (vc && *vc == "simple") {
+ _video_view_type = VIDEO_VIEW_SIMPLE;
+ }
+ _respect_kdm_validity_periods = f.optional_bool_child("RespectKDMValidityPeriods").get_value_or(true);
+ _player_debug_log_file = f.optional_string_child("PlayerDebugLogFile");
+ _player_content_directory = f.optional_string_child("PlayerContentDirectory");
+ _player_playlist_directory = f.optional_string_child("PlayerPlaylistDirectory");
+ _player_kdm_directory = f.optional_string_child("PlayerKDMDirectory");
+
+ if (f.optional_node_child("AudioMapping")) {
+ _audio_mapping = AudioMapping (f.node_child("AudioMapping"), Film::current_state_version);
+ }
+
+ for (auto i: f.node_children("CustomLanguage")) {
+ try {
+ /* This will fail if it's called before dcp::init() as it won't recognise the
+ * tag. That's OK because the Config will be reloaded again later.
+ */
+ _custom_languages.push_back (dcp::LanguageTag(i->content()));
+ } catch (std::runtime_error& e) {}
+ }
+
+ _add_files_path = f.optional_string_child("AddFilesPath");
+ _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 (auto duration = f.optional_node_child("DefaultKDMDuration")) {
+ _default_kdm_duration = RoughDuration(duration);
+ } else {
+ _default_kdm_duration = RoughDuration(1, RoughDuration::Unit::WEEKS);
+ }
+ _auto_crop_threshold = f.optional_number_child<double>("AutoCropThreshold").get_value_or(0.1);
+ _last_release_notes_version = f.optional_string_child("LastReleaseNotesVersion");
+
+ _export.read(f.optional_node_child("Export"));