- Kumu::hex2bin (_key_id.c_str(), writer_info->CryptographicKeyID, Kumu::UUID_Length, &c);
- assert (c == Kumu::UUID_Length);
- }
-}
-
-bool
-MXF::equals (shared_ptr<const Content> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
-{
- if (!Content::equals (other, opt, note)) {
- return false;
- }
-
- shared_ptr<const MXF> other_mxf = dynamic_pointer_cast<const MXF> (other);
- if (!other_mxf) {
- note (ERROR, "comparing an MXF asset with a non-MXF asset");
- return false;
- }
-
- if (_file != other_mxf->file ()) {
- note (ERROR, "MXF names differ");
- if (!opt.mxf_names_can_differ) {
- return false;
- }
- }
-
- return true;
-}
-
-void
-MXF::write_to_cpl (xmlpp::Element* node) const
-{
- pair<string, string> const attr = cpl_node_attribute ();
- xmlpp::Element* a = node->add_child (cpl_node_name ());
- if (!attr.first.empty ()) {
- a->set_attribute (attr.first, attr.second);
- }
- a->add_child ("Id")->add_child_text ("urn:uuid:" + _id);
- a->add_child ("AnnotationText")->add_child_text (_file.string ());
- a->add_child ("EditRate")->add_child_text (lexical_cast<string> (_edit_rate) + " 1");
- a->add_child ("IntrinsicDuration")->add_child_text (lexical_cast<string> (_intrinsic_duration));
- a->add_child ("EntryPoint")->add_child_text (lexical_cast<string> (_entry_point));
- a->add_child ("Duration")->add_child_text (lexical_cast<string> (_duration));
- if (!_key_id.empty ()) {
- a->add_child("KeyId")->add_child_text ("urn:uuid:" + _key_id);