}
list<string>
-DCP::equals (DCP const & other, EqualityFlags flags) const
+DCP::equals (DCP const & other, EqualityOptions opt) const
{
list<string> notes;
- if (flags & LIBDCP_METADATA) {
+ if (opt.flags & LIBDCP_METADATA) {
if (_name != other._name) {
notes.push_back ("names differ");
}
list<shared_ptr<Asset> >::const_iterator b = other._assets.begin ();
while (a != _assets.end ()) {
- list<string> n = (*a)->equals (*b, flags);
+ list<string> n = (*a)->equals (*b, opt);
notes.merge (n);
++a;
++b;
return notes;
}
+
+shared_ptr<const PictureAsset>
+DCP::picture_asset () const
+{
+ for (list<shared_ptr<Asset> >::const_iterator i = _assets.begin(); i != _assets.end(); ++i) {
+ shared_ptr<PictureAsset> p = dynamic_pointer_cast<PictureAsset> (*i);
+ if (p) {
+ return p;
+ }
+ }
+
+ return shared_ptr<const PictureAsset> ();
+}