X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Freel_atmos_asset.cc;h=636a7a79641a0ab47a47d1e3c44908ab0aa8e2aa;hb=f5dd8fb0d86bd56d637f6a1921591044a5ef2a03;hp=6c49ff299601397149e5a600e8825984bbcaf699;hpb=f9cba324c8160a70b108d9e5b60a4ccad6ee9be2;p=libdcp.git diff --git a/src/reel_atmos_asset.cc b/src/reel_atmos_asset.cc index 6c49ff29..636a7a79 100644 --- a/src/reel_atmos_asset.cc +++ b/src/reel_atmos_asset.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2016 Carl Hetherington + Copyright (C) 2016-2017 Carl Hetherington This file is part of libdcp. @@ -16,6 +16,19 @@ You should have received a copy of the GNU General Public License along with libdcp. If not, see . + 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 @@ -28,6 +41,8 @@ #include using std::string; +using std::pair; +using std::make_pair; using boost::shared_ptr; using namespace dcp; @@ -39,28 +54,34 @@ ReelAtmosAsset::ReelAtmosAsset (boost::shared_ptr asset, int64_t ent ReelAtmosAsset::ReelAtmosAsset (boost::shared_ptr node) : ReelAsset (node) + , ReelMXF (node) { + node->ignore_child ("DataType"); node->done (); } string -ReelAtmosAsset::cpl_node_name () const +ReelAtmosAsset::cpl_node_name (Standard) const { return "axd:AuxData"; } +pair +ReelAtmosAsset::cpl_node_namespace (Standard) const +{ + return make_pair ("http://www.dolby.com/schemas/2012/AD", "axd"); +} + string ReelAtmosAsset::key_type () const { return "MDEK"; } -void +xmlpp::Node * ReelAtmosAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const { - ReelAsset::write_to_cpl (node, standard); - - /* Find */ - xmlpp::Node* mp = find_child (node, cpl_node_name ()); - mp->add_child("axd:DataType")->add_child_text ("urn:smpte:ul:060e2b34.04010105.0e090604.00000000"); + xmlpp::Node* asset = ReelAsset::write_to_cpl (node, standard); + asset->add_child("axd:DataType")->add_child_text("urn:smpte:ul:060e2b34.04010105.0e090604.00000000"); + return asset; }