}
xmlpp::Node*
-ReelAsset::write_to_cpl_base (xmlpp::Node* node, Standard standard, optional<string> hash) const
+ReelAsset::write_to_cpl_asset (xmlpp::Node* node, Standard standard, optional<string> hash) const
{
xmlpp::Element* a = node->add_child (cpl_node_name (standard));
pair<string, string> const attr = cpl_node_attribute (standard);
/** @return Any namespace that should be used on the asset's node in the CPL */
virtual std::pair<std::string, std::string> cpl_node_namespace (Standard) const;
- xmlpp::Node* write_to_cpl_base (xmlpp::Node* node, Standard standard, boost::optional<std::string> hash) const;
+ xmlpp::Node* write_to_cpl_asset (xmlpp::Node* node, Standard standard, boost::optional<std::string> hash) const;
int64_t _intrinsic_duration; ///< The <IntrinsicDuration> from the reel's entry for this asset
boost::optional<int64_t> _duration; ///< The <Duration> from the reel's entry for this asset, if present
xmlpp::Node *
ReelAtmosAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
{
- xmlpp::Node* asset = write_to_cpl_base (node, standard, hash());
+ xmlpp::Node* asset = write_to_cpl_asset (node, standard, hash());
asset->add_child("axd:DataType")->add_child_text("urn:smpte:ul:060e2b34.04010105.0e090604.00000000");
return asset;
}
xmlpp::Node *
ReelClosedCaptionAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
{
- xmlpp::Node* asset = write_to_cpl_base (node, standard, hash());
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());
if (_language) {
asset->add_child("Language")->add_child_text(*_language);
ReelMarkersAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
{
int const tcr = edit_rate().numerator / edit_rate().denominator;
- xmlpp::Node* asset = write_to_cpl_base (node, standard, optional<string>());
+ xmlpp::Node* asset = write_to_cpl_asset (node, standard, optional<string>());
xmlpp::Node* ml = asset->add_child("MarkerList");
for (map<Marker, Time>::const_iterator i = _markers.begin(); i != _markers.end(); ++i) {
xmlpp::Node* m = ml->add_child("Marker");
xmlpp::Node*
ReelPictureAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
{
- xmlpp::Node* asset = write_to_cpl_base (node, standard, hash());
+ xmlpp::Node* asset = write_to_cpl_asset (node, standard, hash());
asset->add_child("FrameRate")->add_child_text(String::compose("%1 %2", _frame_rate.numerator, _frame_rate.denominator));
if (standard == INTEROP) {
xmlpp::Node *
ReelSoundAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
{
- xmlpp::Node* asset = write_to_cpl_base (node, standard, hash());
if (key_id ()) {
/* Find <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());
return asset;
}
xmlpp::Node *
ReelSubtitleAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
{
- xmlpp::Node* asset = write_to_cpl_base (node, standard, hash());
if (key_id ()) {
/* Find <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());
return asset;
}