summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-08-13 14:52:08 +0100
committerCarl Hetherington <cth@carlh.net>2012-08-13 14:52:08 +0100
commit7146798d8638cddfe4b3773fb295b6c31c57c826 (patch)
tree41ed07d49fe298f96eaba8275beba9e01839ab9b /src
parent51575fe3c3419d1d65f472b2edc7071b98d9bcae (diff)
Various subtitle bits.
Diffstat (limited to 'src')
-rw-r--r--src/dcp.cc14
-rw-r--r--src/dcp.h2
-rw-r--r--src/wscript3
3 files changed, 19 insertions, 0 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index b478f18d..4112d3b6 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -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> ();
+}
diff --git a/src/dcp.h b/src/dcp.h
index 7f62acd1..60135c2e 100644
--- a/src/dcp.h
+++ b/src/dcp.h
@@ -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