summaryrefslogtreecommitdiff
path: root/src/cpl.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-12-16 21:39:01 +0000
committerCarl Hetherington <cth@carlh.net>2015-12-16 21:39:01 +0000
commite330669de0f5d7d9d922dc69945cca74ac9800d9 (patch)
treec70a8486ef31d69187b3e18bb4c65917e60bc3fc /src/cpl.cc
parent05c5ef180e7a54e0b6790b2bd8c334e48f1f069a (diff)
Add duration() methods to CPL and Reel.
Diffstat (limited to 'src/cpl.cc')
-rw-r--r--src/cpl.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index 24c8a18a..9633abc4 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -255,3 +255,13 @@ CPL::pkl_type (Standard standard) const
DCP_ASSERT (false);
}
}
+
+int64_t
+CPL::duration () const
+{
+ int64_t d = 0;
+ BOOST_FOREACH (shared_ptr<Reel> i, _reels) {
+ d += i->duration ();
+ }
+ return d;
+}