summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-09-06 21:58:15 +0100
committerCarl Hetherington <cth@carlh.net>2017-09-06 21:58:15 +0100
commit0c82e61b2c6177c91a1a80caf6819e36728c004f (patch)
tree55bf5c71321bd465c8cfe524d27b11711fcf3b6a
parent926aff7db1e5ad6c02743608e3792fdca39eea4a (diff)
CCAP fixes.
-rw-r--r--src/cpl.cc4
-rw-r--r--src/reel.cc8
-rw-r--r--src/reel.h4
3 files changed, 12 insertions, 4 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index c53b8e95..f807bc61 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -40,6 +40,7 @@
#include "reel_picture_asset.h"
#include "reel_sound_asset.h"
#include "reel_subtitle_asset.h"
+#include "reel_closed_caption_asset.h"
#include "reel_atmos_asset.h"
#include "local_time.h"
#include "dcp_assert.h"
@@ -188,6 +189,9 @@ CPL::reel_assets () const
if (i->main_subtitle ()) {
c.push_back (i->main_subtitle());
}
+ if (i->closed_caption ()) {
+ c.push_back (i->closed_caption());
+ }
if (i->atmos ()) {
c.push_back (i->atmos());
}
diff --git a/src/reel.cc b/src/reel.cc
index 1804f3dc..a159ce74 100644
--- a/src/reel.cc
+++ b/src/reel.cc
@@ -49,6 +49,7 @@
#include "reel_atmos_asset.h"
#include "reel_closed_caption_asset.h"
#include <libxml++/nodes/element.h>
+#include <boost/foreach.hpp>
using std::string;
using std::list;
@@ -84,11 +85,10 @@ Reel::Reel (boost::shared_ptr<const cxml::Node> node)
}
/* XXX: it's not ideal that we silently tolerate Interop or SMPTE nodes here */
- shared_ptr<cxml::Node> closed_caption = asset_list->optional_node_child ("cc-cpl:MainClosedCaption");
- if (closed_caption) {
- _closed_caption.reset (new ReelClosedCaptionAsset (closed_caption));
+ shared_ptr<cxml::Node> closed_caption = asset_list->optional_node_child ("MainClosedCaption");
+ if (!closed_caption) {
+ closed_caption = asset_list->optional_node_child ("ClosedCaption");
}
- closed_caption = asset_list->optional_node_child ("tt:ClosedCaption");
if (closed_caption) {
_closed_caption.reset (new ReelClosedCaptionAsset (closed_caption));
}
diff --git a/src/reel.h b/src/reel.h
index 193da52f..238ec3e0 100644
--- a/src/reel.h
+++ b/src/reel.h
@@ -92,6 +92,10 @@ public:
return _main_subtitle;
}
+ boost::shared_ptr<ReelClosedCaptionAsset> closed_caption () const {
+ return _closed_caption;
+ }
+
boost::shared_ptr<ReelAtmosAsset> atmos () const {
return _atmos;
}