+
+void
+FFmpegContent::take_settings_from (shared_ptr<const Content> c)
+{
+ shared_ptr<const FFmpegContent> fc = dynamic_pointer_cast<const FFmpegContent> (c);
+ if (!fc) {
+ return;
+ }
+
+ Content::take_settings_from (c);
+ _filters = fc->_filters;
+}
+
+#ifdef DCPOMATIC_VARIANT_SWAROOP
+void
+FFmpegContent::add_kdm (EncryptedECinemaKDM kdm)
+{
+ ChangeSignaller<Content> cc (this, FFmpegContentProperty::KDM);
+ boost::mutex::scoped_lock lm (_mutex);
+ _kdm = kdm;
+
+}
+
+bool
+FFmpegContent::kdm_timing_window_valid () const
+{
+ if (!_kdm) {
+ return true;
+ }
+
+ DCPOMATIC_ASSERT (Config::instance()->decryption_chain()->key());
+
+ DecryptedECinemaKDM decrypted (*_kdm, *Config::instance()->decryption_chain()->key());
+
+ dcp::LocalTime now;
+ return (!decrypted.not_valid_before() || *decrypted.not_valid_before() < now) &&
+ (!decrypted.not_valid_after() || now < *decrypted.not_valid_after());
+}
+
+#endif