+ return _cpls;
+}
+
+/** @param ignore_unresolved true to silently ignore unresolved assets, otherwise
+ * an exception is thrown if they are found.
+ * @return All assets (including CPLs).
+ */
+list<shared_ptr<Asset> >
+DCP::assets (bool ignore_unresolved) const
+{
+ list<shared_ptr<Asset> > assets;
+ BOOST_FOREACH (shared_ptr<CPL> i, cpls ()) {
+ assets.push_back (i);
+ BOOST_FOREACH (shared_ptr<const ReelAsset> j, i->reel_assets ()) {
+ if (ignore_unresolved && !j->asset_ref().resolved()) {
+ continue;
+ }
+ shared_ptr<Asset> o = j->asset_ref().asset ();
+ assets.push_back (o);
+ /* More Interop special-casing */
+ shared_ptr<InteropSubtitleAsset> sub = dynamic_pointer_cast<InteropSubtitleAsset> (o);
+ if (sub) {
+ sub->add_font_assets (assets);
+ }
+ }
+ }
+
+ return assets;
+}
+
+/** Given a list of files that make up 1 or more DCPs, return the DCP directories */
+vector<boost::filesystem::path>
+DCP::directories_from_files (vector<boost::filesystem::path> files)
+{
+ vector<boost::filesystem::path> d;
+ BOOST_FOREACH (boost::filesystem::path i, files) {
+ if (i.filename() == "ASSETMAP" || i.filename() == "ASSETMAP.xml") {
+ d.push_back (i.parent_path ());
+ }
+ }
+ return d;