diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-08-13 14:52:08 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-08-13 14:52:08 +0100 |
| commit | 7146798d8638cddfe4b3773fb295b6c31c57c826 (patch) | |
| tree | 41ed07d49fe298f96eaba8275beba9e01839ab9b /src/dcp.cc | |
| parent | 51575fe3c3419d1d65f472b2edc7071b98d9bcae (diff) | |
Various subtitle bits.
Diffstat (limited to 'src/dcp.cc')
| -rw-r--r-- | src/dcp.cc | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -32,6 +32,7 @@ #include "asset.h" #include "sound_asset.h" #include "picture_asset.h" +#include "subtitle_asset.h" #include "util.h" #include "metadata.h" #include "exceptions.h" @@ -442,3 +443,16 @@ DCP::sound_asset () const return shared_ptr<const SoundAsset> (); } + +shared_ptr<const SubtitleAsset> +DCP::subtitle_asset () const +{ + for (list<shared_ptr<Asset> >::const_iterator i = _assets.begin(); i != _assets.end(); ++i) { + shared_ptr<SubtitleAsset> s = dynamic_pointer_cast<SubtitleAsset> (*i); + if (s) { + return s; + } + } + + return shared_ptr<const SubtitleAsset> (); +} |
