using std::string;
using std::list;
+using std::pair;
using boost::shared_ptr;
using boost::lexical_cast;
using boost::dynamic_pointer_cast;
}
void
-MXFAsset::fill_writer_info (ASDCP::WriterInfo* writer_info, string uuid, MXFMetadata const & metadata)
+MXFAsset::fill_writer_info (ASDCP::WriterInfo* writer_info, string uuid, bool interop, MXFMetadata const & metadata)
{
writer_info->ProductVersion = metadata.product_version;
writer_info->CompanyName = metadata.company_name;
writer_info->ProductName = metadata.product_name.c_str();
- writer_info->LabelSetType = ASDCP::LS_MXF_SMPTE;
+ if (interop) {
+ writer_info->LabelSetType = ASDCP::LS_MXF_INTEROP;
+ } else {
+ writer_info->LabelSetType = ASDCP::LS_MXF_SMPTE;
+ }
unsigned int c;
Kumu::hex2bin (uuid.c_str(), writer_info->AssetUUID, Kumu::UUID_Length, &c);
assert (c == Kumu::UUID_Length);
}
void
-MXFAsset::write_to_cpl (xmlpp::Node* node) const
+MXFAsset::write_to_cpl (xmlpp::Element* node, bool interop) const
{
- xmlpp::Node* a = node->add_child (cpl_node_name ());
+ pair<string, string> const attr = cpl_node_attribute (interop);
+ 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:" + _uuid);
a->add_child ("AnnotationText")->add_child_text (_file_name);
a->add_child ("EditRate")->add_child_text (lexical_cast<string> (_edit_rate) + " 1");