From 23b69b228ed5b34b59e1789de4bff052bc905ae4 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 14 Jul 2015 14:23:50 +0100 Subject: Express trims using ContentTime so that they do not change when DCP frame rate is changed (#637). --- src/lib/dcpomatic_time.cc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/lib/dcpomatic_time.cc') diff --git a/src/lib/dcpomatic_time.cc b/src/lib/dcpomatic_time.cc index 4541ced7d..3d4ed1139 100644 --- a/src/lib/dcpomatic_time.cc +++ b/src/lib/dcpomatic_time.cc @@ -45,6 +45,36 @@ min (DCPTime a, DCPTime b) return b; } +DCPTime +max (DCPTime a, DCPTime b) +{ + if (a > b) { + return a; + } + + return b; +} + +ContentTime +min (ContentTime a, ContentTime b) +{ + if (a < b) { + return a; + } + + return b; +} + +ContentTime +max (ContentTime a, ContentTime b) +{ + if (a > b) { + return a; + } + + return b; +} + ostream & operator<< (ostream& s, ContentTime t) { -- cgit v1.2.3