Rename write_to_cpl_base -> write_to_cpl_asset.
authorCarl Hetherington <cth@carlh.net>
Fri, 19 Jun 2020 11:14:03 +0000 (13:14 +0200)
committerCarl Hetherington <cth@carlh.net>
Fri, 19 Jun 2020 11:15:34 +0000 (13:15 +0200)
src/reel_asset.cc
src/reel_asset.h
src/reel_atmos_asset.cc
src/reel_closed_caption_asset.cc
src/reel_markers_asset.cc
src/reel_picture_asset.cc
src/reel_sound_asset.cc
src/reel_subtitle_asset.cc

index 2457c079c19effde03e2bfcb9263154cb88d0984..8cac7403f5d5608bfe761eaa729f6b7924eff9ae 100644 (file)
@@ -77,7 +77,7 @@ ReelAsset::ReelAsset (shared_ptr<const cxml::Node> node)
 }
 
 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);
index 072d55fd4edf8654d031d5b7fc913be8706e4586..07ddcc188a2faeab79d58068da40fd8738b85909 100644 (file)
@@ -119,7 +119,7 @@ protected:
        /** @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 &lt;IntrinsicDuration&gt; from the reel's entry for this asset
        boost::optional<int64_t> _duration;    ///< The &lt;Duration&gt; from the reel's entry for this asset, if present
index 1ce8b6eabd3e6e8522195d00eb1a35b1e0c5c5b3..637f188d81ce0b40c10eb8830fa672c0a0bc445d 100644 (file)
@@ -82,7 +82,7 @@ ReelAtmosAsset::key_type () const
 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;
 }
index 435c3438c0cb3e45fff5fab6d3515b8719a3b43f..c9162a48cd8abe4d4e0aa5eb2b6d0ff879bb89d7 100644 (file)
@@ -99,13 +99,13 @@ ReelClosedCaptionAsset::key_type () const
 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);
index 8c5f66ddce432da10f959cb372cc67e4103a5d30..9b6d69cf08e962f311c58b13c203876e310fa34b 100644 (file)
@@ -105,7 +105,7 @@ xmlpp::Node*
 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");
index 5b4ced6735cf15037f68ae1f8b620f973a21429a..8c82e01bb6acafa61bd68f229ab90f0689635c45 100644 (file)
@@ -82,7 +82,7 @@ ReelPictureAsset::ReelPictureAsset (shared_ptr<const cxml::Node> node)
 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) {
index 25259f427c6c596d6e974857826a05e2b9871907..4073472e5ff4dff8d671361dc7007f927dcc0589 100644 (file)
@@ -74,7 +74,6 @@ ReelSoundAsset::key_type () const
 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> */
@@ -82,6 +81,7 @@ ReelSoundAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
                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;
 }
 
index a90513d5c1fed7aede33b306526a85bb181aa735..49ac033ca6167a32fbf1170d47cdeb55fd3e6fec 100644 (file)
@@ -76,7 +76,6 @@ ReelSubtitleAsset::key_type () const
 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> */
@@ -84,6 +83,7 @@ ReelSubtitleAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
                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;
 }