Basic and rather clumsy option to respect KDM validity windows.
[dcpomatic.git] / src / lib / dcp_content.cc
index a2874a6044811a0524e3f8adf6fd080420443ca1..3498cc96119940bbd2a25a4546c0c1fc0bc56662 100644 (file)
@@ -657,3 +657,14 @@ DCPContent::set_cpl (string id)
                _cpl = id;
        }
 }
+
+bool
+DCPContent::kdm_timing_window_valid () const
+{
+       if (!_kdm) {
+               return true;
+       }
+
+       dcp::LocalTime now;
+       return _kdm->not_valid_before() < now && now < _kdm->not_valid_after();
+}