projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch '2.0' of ssh://git.carlh.net/home/carl/git/dcpomatic2 into 2.0
[dcpomatic.git]
/
src
/
lib
/
dcpomatic_time.cc
diff --git
a/src/lib/dcpomatic_time.cc
b/src/lib/dcpomatic_time.cc
index fa6271354bdd4013ded09ae3ff365160c4b0b04b..4541ced7dc504db73621e9db29e23bbe4b2750d5 100644
(file)
--- a/
src/lib/dcpomatic_time.cc
+++ b/
src/lib/dcpomatic_time.cc
@@
-21,13
+21,22
@@
using std::ostream;
using std::ostream;
-ContentTime::ContentTime (DCPTime d, FrameRateChange f)
- : Time (rint (d.get() * f.speed_up))
+template <>
+Time<ContentTimeDifferentiator, DCPTimeDifferentiator>::Time (DCPTime d, FrameRateChange f)
+ : _t (rint (d.get() * f.speed_up))
{
}
{
}
-DCPTime min (DCPTime a, DCPTime b)
+template <>
+Time<DCPTimeDifferentiator, ContentTimeDifferentiator>::Time (ContentTime d, FrameRateChange f)
+ : _t (rint (d.get() / f.speed_up))
+{
+
+}
+
+DCPTime
+min (DCPTime a, DCPTime b)
{
if (a < b) {
return a;
{
if (a < b) {
return a;
@@
-59,5
+68,5
@@
ContentTimePeriod::overlaps (ContentTimePeriod const & other) const
bool
ContentTimePeriod::contains (ContentTime const & other) const
{
bool
ContentTimePeriod::contains (ContentTime const & other) const
{
- return (from
>= other && to < other
);
+ return (from
<= other && other < to
);
}
}