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 | |
| parent | 51575fe3c3419d1d65f472b2edc7071b98d9bcae (diff) | |
Various subtitle bits.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dcp.cc | 14 | ||||
| -rw-r--r-- | src/dcp.h | 2 | ||||
| -rw-r--r-- | src/wscript | 3 |
3 files changed, 19 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> (); +} @@ -41,6 +41,7 @@ namespace libdcp class Asset; class PictureAsset; class SoundAsset; +class SubtitleAsset; /** @class DCP dcp.h libdcp/dcp.h * @brief A class to create or read a DCP. @@ -110,6 +111,7 @@ public: boost::shared_ptr<const PictureAsset> picture_asset () const; boost::shared_ptr<const SoundAsset> sound_asset () const; + boost::shared_ptr<const SubtitleAsset> subtitle_asset () const; std::list<std::string> equals (DCP const & other, EqualityOptions options) const; diff --git a/src/wscript b/src/wscript index ab8ea49b..89823c57 100644 --- a/src/wscript +++ b/src/wscript @@ -36,6 +36,9 @@ def build(bld): picture_asset.h sound_asset.h subtitle_asset.h + mxf_asset.h + xml.h + dcp_time.h asset.h picture_frame.h sound_frame.h |
