Add comment.
[libdcp.git] / src / dcp.cc
index cf37579f716382d916857199249e97da053197f8..b6014941b823c03b3f37eb257e452a6473791342 100644 (file)
@@ -334,11 +334,11 @@ DCP::DCP (string directory)
 }
 
 list<string>
-DCP::equals (DCP const & other, EqualityFlags flags, double max_mean, double max_std_dev) 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");
                }
@@ -361,7 +361,7 @@ DCP::equals (DCP const & other, EqualityFlags flags, double max_mean, double max
        list<shared_ptr<Asset> >::const_iterator b = other._assets.begin ();
        
        while (a != _assets.end ()) {
-               list<string> n = (*a)->equals (*b, flags, max_mean, max_std_dev);
+               list<string> n = (*a)->equals (*b, opt);
                notes.merge (n);
                ++a;
                ++b;
@@ -369,3 +369,16 @@ DCP::equals (DCP const & other, EqualityFlags flags, double max_mean, double max
 
        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> ();
+}