Untested watermarking.
[dcpomatic.git] / src / lib / config.cc
index b61b1d054db99b9badb5299d4fb2449750399fa1..d7fd74449e4ab59430cd68793b832b5f29ddcfd4 100644 (file)
@@ -171,6 +171,8 @@ Config::set_defaults ()
        _player_kdm_directory = boost::none;
 #ifdef DCPOMATIC_VARIANT_SWAROOP
        _player_background_image = boost::none;
+       _kdm_server_url = "http://localhost:8000/{CPL}";
+       _player_watermark = boost::none;
 #endif
 
        _allowed_dcp_frame_rates.clear ();
@@ -506,6 +508,8 @@ try
        _player_kdm_directory = f.optional_string_child("PlayerKDMDirectory");
 #ifdef DCPOMATIC_VARIANT_SWAROOP
        _player_background_image = f.optional_string_child("PlayerBackgroundImage");
+       _kdm_server_url = f.optional_string_child("KDMServerURL").get_value_or("http://localhost:8000/{CPL}");
+       _player_watermark = f.optional_string_child("PlayerWatermark");
 #endif
 
        /* Replace any cinemas from config.xml with those from the configured file */
@@ -908,6 +912,10 @@ Config::write_config () const
        if (_player_background_image) {
                root->add_child("PlayerBackgroundImage")->add_child_text(_player_background_image->string());
        }
+       root->add_child("KDMServerURL")->add_child_text(_kdm_server_url);
+       if (_player_watermark) {
+               root->add_child("PlayerWatermark")->add_child_text(_player_watermark->string());
+       }
 #endif
 
        try {