/*
- Copyright (C) 2016 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2016-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
You should have received a copy of the GNU General Public License
along with libdcp. If not, see <http://www.gnu.org/licenses/>.
+
+ In addition, as a special exception, the copyright holders give
+ permission to link the code of portions of this program with the
+ OpenSSL library under certain conditions as described in each
+ individual source file, and distribute linked combinations
+ including the two.
+
+ You must obey the GNU General Public License in all respects
+ for all of the code used other than OpenSSL. If you modify
+ file(s) with this exception, you may extend this exception to your
+ version of the file(s), but you are not obligated to do so. If you
+ do not wish to do so, delete this exception statement from your
+ version. If you delete this exception statement from all source
+ files in the program, then also delete it here.
*/
+
/** @file src/reel_atmos_asset.cc
- * @brief ReelAtmosAsset class.
+ * @brief ReelAtmosAsset class
*/
+
#include "atmos_asset.h"
#include "reel_atmos_asset.h"
#include <libcxml/cxml.h>
#include <libxml++/libxml++.h>
+
using std::string;
-using boost::shared_ptr;
+using std::pair;
+using std::make_pair;
+using std::shared_ptr;
using namespace dcp;
-ReelAtmosAsset::ReelAtmosAsset (boost::shared_ptr<AtmosAsset> asset, int64_t entry_point)
- : ReelAsset (asset, asset->edit_rate(), asset->intrinsic_duration(), entry_point)
+
+ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr<AtmosAsset> asset, int64_t entry_point)
+ : ReelFileAsset (asset, asset->key_id(), asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point)
{
}
-ReelAtmosAsset::ReelAtmosAsset (boost::shared_ptr<const cxml::Node> node)
- : ReelAsset (node)
+
+ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr<const cxml::Node> node)
+ : ReelFileAsset (node)
{
+ node->ignore_child ("DataType");
node->done ();
}
+
string
-ReelAtmosAsset::cpl_node_name () const
+ReelAtmosAsset::cpl_node_name (Standard) const
{
return "axd:AuxData";
}
-string
-ReelAtmosAsset::key_type () const
+
+pair<string, string>
+ReelAtmosAsset::cpl_node_namespace () const
{
- return "MDEK";
+ return { "http://www.dolby.com/schemas/2012/AD", "axd" };
}
-void
+
+xmlpp::Node *
ReelAtmosAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
{
- ReelAsset::write_to_cpl (node, standard);
+ auto asset = ReelFileAsset::write_to_cpl (node, standard);
+ asset->add_child("axd:DataType")->add_child_text("urn:smpte:ul:060e2b34.04010105.0e090604.00000000");
+ return asset;
+}
+
+
+bool
+ReelAtmosAsset::equals (shared_ptr<const ReelAtmosAsset> other, EqualityOptions opt, NoteHandler note) const
+{
+ if (!asset_equals (other, opt, note)) {
+ return false;
+ }
+
+ if (!file_asset_equals (other, opt, note)) {
+ return false;
+ }
- /* Find <axd:AuxData> */
- xmlpp::Node* mp = find_child (node, cpl_node_name ());
- mp->add_child("axd:DataType")->add_child_text ("urn:smpte:ul:060e2b34.04010105.0e090604.00000000");
+ return true;
}