X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Freel_atmos_asset.cc;h=dca434d2c0e143c89e40206a0a009e7bf91ab665;hb=093525165f6397ba9eaffd19833dc978bcb32d55;hp=9dccbbcb6cfdf28e0ee84b080050e93e8a0a9b9c;hpb=d39880eef211a296fa8ef4712cdef5945d08527c;p=libdcp.git diff --git a/src/reel_atmos_asset.cc b/src/reel_atmos_asset.cc index 9dccbbcb..dca434d2 100644 --- a/src/reel_atmos_asset.cc +++ b/src/reel_atmos_asset.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2016-2017 Carl Hetherington + Copyright (C) 2016-2021 Carl Hetherington This file is part of libdcp. @@ -31,69 +31,80 @@ 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 #include + using std::string; using std::pair; using std::make_pair; using std::shared_ptr; using namespace dcp; + ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr asset, int64_t entry_point) : ReelAsset (asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) - , ReelMXF (asset, asset->key_id()) + , ReelEncryptableAsset (asset, asset->key_id()) { } + ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr node) : ReelAsset (node) - , ReelMXF (node) + , ReelEncryptableAsset (node) { node->ignore_child ("DataType"); node->done (); } + string 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"); + 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::Node* asset = write_to_cpl_asset (node, standard, hash()); + 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"); return asset; } + bool ReelAtmosAsset::equals (shared_ptr other, EqualityOptions opt, NoteHandler note) const { if (!asset_equals (other, opt, note)) { return false; } + if (!mxf_equals (other, opt, note)) { return false; }