xmlpp::Node *
ReelClosedCaptionAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
{
-
- if (key_id()) {
- /* Find <Hash> */
- xmlpp::Node* hash = find_child (asset, "Hash");
- asset->add_child_before(hash, "KeyId")->add_child_text("urn:uuid:" + key_id().get());
- }
xmlpp::Node* asset = write_to_cpl_asset (node, standard, hash());
+ write_to_cpl_mxf (asset);
if (_language) {
asset->add_child("Language")->add_child_text(*_language);
return true;
}
+
+
+void
+ReelMXF::write_to_cpl_mxf (xmlpp::Node* node) const
+{
+ if (key_id ()) {
+ xmlpp::Node* hash = find_child (node, "Hash");
+ node->add_child_before(hash, "KeyId")->add_child_text("urn:uuid:" + key_id().get());
+ }
+}
return boost::dynamic_pointer_cast<T> (_asset_ref.asset ());
}
+ void write_to_cpl_mxf (xmlpp::Node* node) const;
+
/** Reference to the asset (MXF or XML file) that this reel entry
* applies to.
*/
);
}
- if (key_id ()) {
- /* Find <Hash> */
- xmlpp::Node* hash = find_child (asset, "Hash");
- asset->add_child_before(hash, "KeyId")->add_child_text("urn:uuid:" + key_id().get());
- }
+ write_to_cpl_mxf (asset);
return asset;
}
xmlpp::Node *
ReelSoundAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
{
-
- if (key_id ()) {
- /* Find <Hash> */
- xmlpp::Node* hash = find_child (asset, "Hash");
- asset->add_child_before(hash, "KeyId")->add_child_text("urn:uuid:" + key_id().get());
- }
-
xmlpp::Node* asset = write_to_cpl_asset (node, standard, hash());
+ write_to_cpl_mxf (asset);
return asset;
}
xmlpp::Node *
ReelSubtitleAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
{
-
- if (key_id ()) {
- /* Find <Hash> */
- xmlpp::Node* hash = find_child (asset, "Hash");
- asset->add_child_before(hash, "KeyId")->add_child_text("urn:uuid:" + key_id().get());
- }
-
xmlpp::Node* asset = write_to_cpl_asset (node, standard, hash());
+ write_to_cpl_mxf (asset);
return asset;
}