#include "dcpomatic_time.h"
+using std::ostream;
+
ContentTime::ContentTime (DCPTime d, FrameRateChange f)
: Time (rint (d.get() * f.speed_up))
{
return b;
}
+
+ostream &
+operator<< (ostream& s, ContentTime t)
+{
+ s << "[CONT " << t.get() << " " << t.seconds() << "s]";
+ return s;
+}
+
+ostream &
+operator<< (ostream& s, DCPTime t)
+{
+ s << "[DCP " << t.get() << " " << t.seconds() << "s]";
+ return s;
+}
+
+bool
+ContentTimePeriod::overlaps (ContentTimePeriod const & other) const
+{
+ return (from < other.to && to >= other.from);
+}
+
+bool
+ContentTimePeriod::contains (ContentTime const & other) const
+{
+ return (from <= other && other < to);
+}