- ReelAsset::write_to_cpl (node, standard);
-
- /* XXX: couldn't this stuff be in the parent class? All child
- classes seem to do the same thing...?
- */
- if (key_id ()) {
- /* Find <MainSubtitle> */
- xmlpp::Node* ms = find_child (node, cpl_node_name (standard));
- /* Find <Hash> */
- xmlpp::Node* hash = find_child (ms, "Hash");
- ms->add_child_before (hash, "KeyId")->add_child_text ("urn:uuid:" + key_id().get ());
+ auto asset = write_to_cpl_asset (node, standard, hash());
+ write_to_cpl_mxf (asset);
+ if (_language) {
+ asset->add_child("Language")->add_child_text(*_language);
+ }
+ return asset;
+}
+
+
+bool
+ReelSubtitleAsset::equals (shared_ptr<const ReelSubtitleAsset> other, EqualityOptions opt, NoteHandler note) const
+{
+ if (!asset_equals (other, opt, note)) {
+ return false;