Add OK note when PKL and CPL annotation texts match.
[libdcp.git] / src / reel_atmos_asset.cc
index 760e4211f6e3ca00307359564e1c1640be73c460..c2cdb7f30d4bdb6d07f9a880bfa1114285085c29 100644 (file)
 
 #include "atmos_asset.h"
 #include "reel_atmos_asset.h"
+#include "warnings.h"
 #include <libcxml/cxml.h>
+LIBDCP_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+LIBDCP_ENABLE_WARNINGS
 
 
 using std::string;
@@ -51,16 +54,14 @@ using namespace dcp;
 
 
 ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr<AtmosAsset> asset, int64_t entry_point)
-       : ReelAsset (asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point)
-       , ReelFileAsset (asset, asset->key_id())
+       : ReelFileAsset (asset, asset->key_id(), asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point)
 {
 
 }
 
 
 ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr<const cxml::Node> node)
-       : ReelAsset (node)
-       , ReelFileAsset (node)
+       : ReelFileAsset (node)
 {
        node->ignore_child ("DataType");
        node->done ();
@@ -75,37 +76,29 @@ ReelAtmosAsset::cpl_node_name (Standard) const
 
 
 pair<string, string>
-ReelAtmosAsset::cpl_node_namespace (Standard) const
+ReelAtmosAsset::cpl_node_namespace () const
 {
        return { "http://www.dolby.com/schemas/2012/AD", "axd" };
 }
 
 
-string
-ReelAtmosAsset::key_type () const
-{
-       return "MDEK";
-}
-
-
-xmlpp::Node *
-ReelAtmosAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
+xmlpp::Element*
+ReelAtmosAsset::write_to_cpl(xmlpp::Element* node, Standard standard) const
 {
-       auto asset = write_to_cpl_asset (node, standard, hash());
-       write_to_cpl_mxf (asset);
-       asset->add_child("axd:DataType")->add_child_text("urn:smpte:ul:060e2b34.04010105.0e090604.00000000");
+       auto asset = ReelFileAsset::write_to_cpl (node, standard);
+       cxml::add_text_child(asset, "axd:DataType", "urn:smpte:ul:060e2b34.04010105.0e090604.00000000");
        return asset;
 }
 
 
 bool
-ReelAtmosAsset::equals (shared_ptr<const ReelAtmosAsset> other, EqualityOptions opt, NoteHandler note) const
+ReelAtmosAsset::equals(shared_ptr<const ReelAtmosAsset> other, EqualityOptions const& opt, NoteHandler note) const
 {
        if (!asset_equals (other, opt, note)) {
                return false;
        }
 
-       if (!mxf_equals (other, opt, note)) {
+       if (!file_asset_equals (other, opt, note)) {
                return false;
        }