diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-08-09 23:27:15 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-08-09 23:27:15 +0100 |
| commit | f6ee90107839e0d750d8678b67c9d6d1d596d739 (patch) | |
| tree | 27c500a6e1c0c56e3fa54dff2c2a401c6f06e114 /src/dcp.cc | |
| parent | c2c7b454d8ca179880942e3341dd8b17c084f5a3 (diff) | |
Add picture frame extraction.
Diffstat (limited to 'src/dcp.cc')
| -rw-r--r-- | src/dcp.cc | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -369,3 +369,16 @@ DCP::equals (DCP const & other, EqualityOptions opt) const 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> (); +} |
