summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cpl.cc4
-rw-r--r--src/cpl.h3
-rw-r--r--src/dcp.cc4
-rw-r--r--src/dcp.h3
4 files changed, 8 insertions, 6 deletions
diff --git a/src/cpl.cc b/src/cpl.cc
index ee1817fc..5404acd9 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -181,7 +181,7 @@ CPL::set (std::vector<std::shared_ptr<Reel>> reels)
void
-CPL::write_xml (boost::filesystem::path file, shared_ptr<const CertificateChain> signer) const
+CPL::write_xml(boost::filesystem::path file, shared_ptr<const CertificateChain> signer, bool write_cpl_metadata) const
{
xmlpp::Document doc;
xmlpp::Element* root;
@@ -225,7 +225,7 @@ CPL::write_xml (boost::filesystem::path file, shared_ptr<const CertificateChain>
bool first = true;
for (auto i: _reels) {
auto asset_list = i->write_to_cpl (reel_list, _standard);
- if (first && _standard == Standard::SMPTE) {
+ if (first && _standard == Standard::SMPTE && write_cpl_metadata) {
maybe_write_composition_metadata_asset (asset_list);
first = false;
}
diff --git a/src/cpl.h b/src/cpl.h
index c1489a2c..aaa82740 100644
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -126,7 +126,8 @@ public:
*/
void write_xml (
boost::filesystem::path file,
- std::shared_ptr<const CertificateChain>
+ std::shared_ptr<const CertificateChain>,
+ bool write_cpl_metadata = true
) const;
void resolve_refs (std::vector<std::shared_ptr<Asset>>);
diff --git a/src/dcp.cc b/src/dcp.cc
index df5c89b4..d507e951 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -400,7 +400,7 @@ DCP::write_volindex (Standard standard) const
void
-DCP::write_xml (shared_ptr<const CertificateChain> signer, NameFormat name_format)
+DCP::write_xml(shared_ptr<const CertificateChain> signer, NameFormat name_format, bool write_cpl_metadata)
{
if (_cpls.empty()) {
throw MiscError ("Cannot write DCP with no CPLs.");
@@ -419,7 +419,7 @@ DCP::write_xml (shared_ptr<const CertificateChain> signer, NameFormat name_forma
for (auto i: cpls()) {
NameFormat::Map values;
values['t'] = "cpl";
- i->write_xml (_directory / (name_format.get(values, "_" + i->id() + ".xml")), signer);
+ i->write_xml(_directory / (name_format.get(values, "_" + i->id() + ".xml")), signer, write_cpl_metadata);
}
if (_pkls.empty()) {
diff --git a/src/dcp.h b/src/dcp.h
index 35e2edf8..6a8eef15 100644
--- a/src/dcp.h
+++ b/src/dcp.h
@@ -157,7 +157,8 @@ public:
*/
void write_xml (
std::shared_ptr<const CertificateChain> signer = std::shared_ptr<const CertificateChain>(),
- NameFormat name_format = NameFormat("%t")
+ NameFormat name_format = NameFormat("%t"),
+ bool write_cpl_metadata = true
);
void resolve_refs (std::vector<std::shared_ptr<Asset>> assets);