#include "reel_smpte_closed_caption_asset.h"
+#include "warnings.h"
+LIBDCP_DISABLE_WARNINGS
#include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
using std::make_pair;
ReelSMPTEClosedCaptionAsset::ReelSMPTEClosedCaptionAsset (shared_ptr<SMPTESubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point)
: ReelClosedCaptionAsset (asset, edit_rate, intrinsic_duration, entry_point)
- , ReelEncryptableAsset (asset->key_id())
{
}
ReelSMPTEClosedCaptionAsset::ReelSMPTEClosedCaptionAsset (shared_ptr<const cxml::Node> node)
: ReelClosedCaptionAsset (node)
- , ReelEncryptableAsset (node)
{
node->done ();
}
-xmlpp::Node *
-ReelSMPTEClosedCaptionAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
+xmlpp::Element*
+ReelSMPTEClosedCaptionAsset::write_to_cpl(xmlpp::Element* node, Standard standard) const
{
- auto asset = write_to_cpl_asset (node, standard, hash());
- write_to_cpl_encryptable (asset);
-
+ auto asset = ReelClosedCaptionAsset::write_to_cpl (node, standard);
if (_language) {
- asset->add_child("Language", "tt")->add_child_text(*_language);
+ cxml::add_child(asset, "Language", string("tt"))->add_child_text(*_language);
}
-
return asset;
}