More debugging of batch converter startup.
[dcpomatic.git] / src / lib / dcpomatic_time.cc
index 3d4ed11398d67d5f4c034c18406561f75fa694d5..1d965993598c20d6b573ca653d92692b374ff472 100644 (file)
@@ -23,14 +23,14 @@ using std::ostream;
 
 template <>
 Time<ContentTimeDifferentiator, DCPTimeDifferentiator>::Time (DCPTime d, FrameRateChange f)
-       : _t (rint (d.get() * f.speed_up))
+       : _t (llrint (d.get() * f.speed_up))
 {
 
 }
 
 template <>
 Time<DCPTimeDifferentiator, ContentTimeDifferentiator>::Time (ContentTime d, FrameRateChange f)
-       : _t (rint (d.get() / f.speed_up))
+       : _t (llrint (d.get() / f.speed_up))
 {
 
 }
@@ -89,14 +89,9 @@ operator<< (ostream& s, DCPTime t)
        return s;
 }
 
-bool
-ContentTimePeriod::overlaps (ContentTimePeriod const & other) const
-{
-       return (from < other.to && to >= other.from);
-}
-
-bool
-ContentTimePeriod::contains (ContentTime const & other) const
+ostream &
+operator<< (ostream& s, DCPTimePeriod p)
 {
-       return (from <= other && other < to);
+       s << "[DCP " << p.from.get() << " " << p.from.seconds() << "s -> " << p.to.get() << " " << p.to.seconds() << "s]";
+       return s;
 }