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 include_mca_subdescriptors) const
{
xmlpp::Document doc;
xmlpp::Element* root;
for (auto i: _reels) {
auto asset_list = i->write_to_cpl (reel_list, _standard);
if (first && _standard == Standard::SMPTE) {
- maybe_write_composition_metadata_asset (asset_list);
+ maybe_write_composition_metadata_asset(asset_list, include_mca_subdescriptors);
first = false;
}
}
* is missing this method will do nothing.
*/
void
-CPL::maybe_write_composition_metadata_asset (xmlpp::Element* node) const
+CPL::maybe_write_composition_metadata_asset(xmlpp::Element* node, bool include_mca_subdescriptors) const
{
if (
!_main_sound_configuration ||
if (_reels.front()->main_sound()) {
auto asset = _reels.front()->main_sound()->asset();
- if (asset) {
+ if (asset && include_mca_subdescriptors) {
write_mca_subdescriptors(meta, asset);
}
}
*
* @param file Filename to write
* @param signer Signer to sign the CPL, or 0 to add no signature
+ * @param include_mca_subdescriptors true to add a MCASubDescriptors tag to metadata,
+ * false to omit it.
*/
void write_xml (
boost::filesystem::path file,
- std::shared_ptr<const CertificateChain>
+ std::shared_ptr<const CertificateChain>,
+ bool include_mca_subdescriptors = true
) const;
void resolve_refs (std::vector<std::shared_ptr<Asset>>);
private:
friend struct ::verify_invalid_language3;
- void maybe_write_composition_metadata_asset (xmlpp::Element* node) const;
+ void maybe_write_composition_metadata_asset(xmlpp::Element* node, bool include_mca_subdescriptors) const;
void read_composition_metadata_asset (cxml::ConstNodePtr node);
void write_mca_subdescriptors(xmlpp::Element* parent, std::shared_ptr<const SoundAsset> asset) const;