diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-10-09 14:13:39 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-10-09 14:14:31 +0200 |
| commit | c1229ba3e750fa0c877ef8444da82e8ea4a9638f (patch) | |
| tree | 8d0d7727639dd2d1bbcbe840e27f31c7f4365fb5 /src | |
| parent | 3005571cd08c3bdd233fd073b6ae956b9d98b570 (diff) | |
Make CPL metadata writing optional.optional-cpl-metadata
Diffstat (limited to 'src')
| -rw-r--r-- | src/cpl.cc | 4 | ||||
| -rw-r--r-- | src/cpl.h | 3 | ||||
| -rw-r--r-- | src/dcp.cc | 4 | ||||
| -rw-r--r-- | src/dcp.h | 3 |
4 files changed, 8 insertions, 6 deletions
@@ -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; } @@ -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>>); @@ -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()) { @@ -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); |
