DCP_ASSERT (false);
}
}
+
+int64_t
+CPL::duration () const
+{
+ int64_t d = 0;
+ BOOST_FOREACH (shared_ptr<Reel> i, _reels) {
+ d += i->duration ();
+ }
+ return d;
+}
void resolve_refs (std::list<boost::shared_ptr<Asset> >);
+ int64_t duration () const;
+
protected:
/** @return type string for PKLs for this asset */
std::string pkl_type (Standard standard) const;
using std::string;
using std::list;
using std::cout;
+using std::max;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using namespace dcp;
}
}
}
+
+int64_t
+Reel::duration () const
+{
+ int64_t d = 0;
+
+ if (_main_picture) {
+ d = max (d, _main_picture->duration ());
+ }
+ if (_main_sound) {
+ d = max (d, _main_sound->duration ());
+ }
+ if (_main_subtitle) {
+ d = max (d, _main_subtitle->duration ());
+ }
+
+ return d;
+}
return _main_subtitle;
}
+ int64_t duration () const;
+
void add (boost::shared_ptr<ReelAsset> asset);
void write_to_cpl (xmlpp::Element* node, Standard standard) const;