summaryrefslogtreecommitdiff
path: root/src/reel_sound_asset.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-06-05 01:51:24 +0100
committerCarl Hetherington <cth@carlh.net>2015-06-05 01:51:24 +0100
commitb038dc192bdac76da3b1bebdd6b448e8be830814 (patch)
treea21f6ab4fce16b514c97c41039733d81175020cd /src/reel_sound_asset.cc
parente6913e8eb44e1dc990ef89f19ab64792880898a5 (diff)
Fix ordering of KeyId tag in SMPTE CPLs.
Diffstat (limited to 'src/reel_sound_asset.cc')
-rw-r--r--src/reel_sound_asset.cc17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/reel_sound_asset.cc b/src/reel_sound_asset.cc
index 55167d82..a5e32b02 100644
--- a/src/reel_sound_asset.cc
+++ b/src/reel_sound_asset.cc
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2015 Carl Hetherington <cth@carlh.net>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -22,6 +22,7 @@
*/
#include "reel_sound_asset.h"
+#include "dcp_assert.h"
#include <libcxml/cxml.h>
using std::string;
@@ -52,3 +53,17 @@ ReelSoundAsset::key_type () const
{
return "MDAK";
}
+
+void
+ReelSoundAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
+{
+ ReelAsset::write_to_cpl (node, standard);
+
+ if (!key_id ().empty ()) {
+ /* Find <MainSound> */
+ xmlpp::Node* ms = find_child (node, cpl_node_name ());
+ /* Find <Hash> */
+ xmlpp::Node* hash = find_child (ms, "Hash");
+ ms->add_child_before (hash, "KeyId")->add_child_text ("urn:uuid:" + key_id ());
+ }
+}