summaryrefslogtreecommitdiff
path: root/src/dcp.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-01-14 20:15:43 +0000
committerCarl Hetherington <cth@carlh.net>2013-01-14 20:15:43 +0000
commited6a471b61d36a3ba7e8696fa3e5606406c5cf62 (patch)
tree3ca098925eb269c4cd41ff22124773ba7d36c14b /src/dcp.cc
parent67cf9c95d190b1f2a67d73c0a7f712e213b6e71a (diff)
parent62ee85a258aa9329544d8542dfbcc40ce8177a7a (diff)
Merge master
Diffstat (limited to 'src/dcp.cc')
-rw-r--r--src/dcp.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index 54ab6660..b3048bae 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -28,6 +28,7 @@
#include <iostream>
#include <boost/filesystem.hpp>
#include <boost/lexical_cast.hpp>
+#include <boost/algorithm/string.hpp>
#include <libxml++/libxml++.h>
#include <xmlsec/xmldsig.h>
#include <xmlsec/app.h>
@@ -208,7 +209,7 @@ DCP::read (bool require_mxfs)
boost::filesystem::path t = _directory;
t /= (*i)->chunks.front()->path;
- if (ends_with (t.string(), ".mxf") || ends_with (t.string(), ".ttf")) {
+ if (boost::algorithm::ends_with (t.string(), ".mxf") || boost::algorithm::ends_with (t.string(), ".ttf")) {
continue;
}
@@ -318,6 +319,12 @@ CPL::CPL (string directory, string name, ContentKind content_kind, int length, i
_uuid = make_uuid ();
}
+/** Construct a CPL object from a XML file.
+ * @param directory The directory containing this CPL's DCP.
+ * @param file The CPL XML filename.
+ * @param asset_map The corresponding asset map.
+ * @param require_mxfs true to throw an exception if a required MXF file does not exist.
+ */
CPL::CPL (string directory, string file, shared_ptr<const AssetMap> asset_map, bool require_mxfs)
: _directory (directory)
, _content_kind (FEATURE)
@@ -475,7 +482,7 @@ CPL::write_xml (shared_ptr<Encryption> crypt) const
doc.write_to_file_formatted (p.string(), "UTF-8");
- _digest = make_digest (p.string (), 0);
+ _digest = make_digest (p.string ());
_length = boost::filesystem::file_size (p.string ());
}