From 1a284b7c409567b6ecb223adece779487f70ac92 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 11 Apr 2021 00:10:30 +0200 Subject: [PATCH] Extract some parts of ReelEncryptableAsset into ReelFileAsset --- src/cpl.cc | 51 +++++++++++++-- src/cpl.h | 9 ++- src/decrypted_kdm.cc | 2 +- src/reel_atmos_asset.cc | 6 +- src/reel_atmos_asset.h | 2 +- src/reel_closed_caption_asset.cc | 6 +- src/reel_closed_caption_asset.h | 2 +- src/reel_encryptable_asset.cc | 32 ++------- src/reel_encryptable_asset.h | 44 +------------ src/reel_file_asset.cc | 82 +++++++++++++++++++++++ src/reel_file_asset.h | 107 +++++++++++++++++++++++++++++++ src/reel_picture_asset.cc | 6 +- src/reel_picture_asset.h | 2 +- src/reel_sound_asset.cc | 6 +- src/reel_sound_asset.h | 2 +- src/reel_subtitle_asset.cc | 6 +- src/reel_subtitle_asset.h | 3 +- src/verify.cc | 6 +- src/wscript | 2 + 19 files changed, 281 insertions(+), 95 deletions(-) create mode 100644 src/reel_file_asset.cc create mode 100644 src/reel_file_asset.h diff --git a/src/cpl.cc b/src/cpl.cc index b1819755..8766cf76 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -515,23 +515,66 @@ add_file_assets (vector>& assets, vector> reels) } -vector> +vector> CPL::reel_file_assets () { - vector> c; + vector> c; add_file_assets (c, _reels); return c; } -vector> + +vector> CPL::reel_file_assets () const { - vector> c; + vector> c; add_file_assets (c, _reels); return c; } +template +void +add_encryptable_assets (vector>& assets, vector> reels) +{ + for (auto i: reels) { + if (i->main_picture ()) { + assets.push_back (i->main_picture()); + } + if (i->main_sound ()) { + assets.push_back (i->main_sound()); + } + if (i->main_subtitle ()) { + assets.push_back (i->main_subtitle()); + } + for (auto j: i->closed_captions()) { + assets.push_back (j); + } + if (i->atmos ()) { + assets.push_back (i->atmos()); + } + } +} + + +vector> +CPL::reel_encryptable_assets () +{ + vector> c; + add_encryptable_assets (c, _reels); + return c; +} + + +vector> +CPL::reel_encryptable_assets () const +{ + vector> c; + add_encryptable_assets (c, _reels); + return c; +} + + bool CPL::equals (shared_ptr other, EqualityOptions opt, NoteHandler note) const { diff --git a/src/cpl.h b/src/cpl.h index 586beb81..84dbd9ff 100644 --- a/src/cpl.h +++ b/src/cpl.h @@ -60,6 +60,7 @@ namespace dcp { class ReelEncryptableAsset; +class ReelFileAsset; class Reel; class MXFMetadata; class CertificateChain; @@ -99,9 +100,13 @@ public: return _reels; } + /** @return the ReelFileAssets in this CPL in all reels */ + std::vector> reel_file_assets () const; + std::vector> reel_file_assets (); + /** @return the ReelEncryptableAssets in this CPL in all reels */ - std::vector> reel_file_assets () const; - std::vector> reel_file_assets (); + std::vector> reel_encryptable_assets () const; + std::vector> reel_encryptable_assets (); /** @return true if we have any encrypted content */ bool any_encrypted () const; diff --git a/src/decrypted_kdm.cc b/src/decrypted_kdm.cc index 9a9f2c22..447a0a12 100644 --- a/src/decrypted_kdm.cc +++ b/src/decrypted_kdm.cc @@ -287,7 +287,7 @@ DecryptedKDM::DecryptedKDM ( { /* Create DecryptedKDMKey objects for each encryptable asset */ bool did_one = false; - for (auto i: cpl->reel_file_assets()) { + for (auto i: cpl->reel_encryptable_assets()) { if (i->key_id()) { add_key (i->key_type(), i->key_id().get(), key, cpl->id(), Standard::SMPTE); did_one = true; diff --git a/src/reel_atmos_asset.cc b/src/reel_atmos_asset.cc index dca434d2..50581aff 100644 --- a/src/reel_atmos_asset.cc +++ b/src/reel_atmos_asset.cc @@ -52,7 +52,8 @@ using namespace dcp; ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr asset, int64_t entry_point) : ReelAsset (asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) - , ReelEncryptableAsset (asset, asset->key_id()) + , ReelFileAsset (asset) + , ReelEncryptableAsset (asset->key_id()) { } @@ -60,6 +61,7 @@ ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr asset, int64_t entry ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr node) : ReelAsset (node) + , ReelFileAsset (node) , ReelEncryptableAsset (node) { node->ignore_child ("DataType"); @@ -105,7 +107,7 @@ ReelAtmosAsset::equals (shared_ptr other, EqualityOptions return false; } - if (!mxf_equals (other, opt, note)) { + if (!file_asset_equals (other, opt, note)) { return false; } diff --git a/src/reel_atmos_asset.h b/src/reel_atmos_asset.h index 51af48fd..1fd6ce49 100644 --- a/src/reel_atmos_asset.h +++ b/src/reel_atmos_asset.h @@ -55,7 +55,7 @@ class AtmosAsset; /** @class ReelAtmosAsset * @brief Part of a Reel's description which refers to a Atmos MXF */ -class ReelAtmosAsset : public ReelAsset, public ReelEncryptableAsset +class ReelAtmosAsset : public ReelAsset, public ReelFileAsset, public ReelEncryptableAsset { public: ReelAtmosAsset (std::shared_ptr asset, int64_t entry_point); diff --git a/src/reel_closed_caption_asset.cc b/src/reel_closed_caption_asset.cc index 2bc5f3e0..fe0945e3 100644 --- a/src/reel_closed_caption_asset.cc +++ b/src/reel_closed_caption_asset.cc @@ -55,7 +55,8 @@ using namespace dcp; ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) : ReelAsset (asset->id(), edit_rate, intrinsic_duration, entry_point) - , ReelEncryptableAsset (asset, dynamic_pointer_cast(asset) ? dynamic_pointer_cast(asset)->key_id() : optional()) + , ReelFileAsset (asset) + , ReelEncryptableAsset (dynamic_pointer_cast(asset) ? dynamic_pointer_cast(asset)->key_id() : optional()) { } @@ -63,6 +64,7 @@ ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr a ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr node) : ReelAsset (node) + , ReelFileAsset (node) , ReelEncryptableAsset (node) { _language = node->optional_string_child ("Language"); @@ -132,7 +134,7 @@ ReelClosedCaptionAsset::equals (shared_ptr other, if (!asset_equals (other, opt, note)) { return false; } - if (!mxf_equals (other, opt, note)) { + if (!file_asset_equals (other, opt, note)) { return false; } diff --git a/src/reel_closed_caption_asset.h b/src/reel_closed_caption_asset.h index 2c943f7f..80421ca2 100644 --- a/src/reel_closed_caption_asset.h +++ b/src/reel_closed_caption_asset.h @@ -59,7 +59,7 @@ class SubtitleAsset; /** @class ReelClosedCaptionAsset * @brief Part of a Reel's description which refers to a closed caption XML/MXF file */ -class ReelClosedCaptionAsset : public ReelAsset, public ReelEncryptableAsset +class ReelClosedCaptionAsset : public ReelAsset, public ReelFileAsset, public ReelEncryptableAsset { public: ReelClosedCaptionAsset (std::shared_ptr asset, Fraction edit_rate, int64_t instrinsic_duration, int64_t entry_point); diff --git a/src/reel_encryptable_asset.cc b/src/reel_encryptable_asset.cc index 73f589d7..feb71b59 100644 --- a/src/reel_encryptable_asset.cc +++ b/src/reel_encryptable_asset.cc @@ -51,19 +51,15 @@ using boost::optional; using namespace dcp; -ReelEncryptableAsset::ReelEncryptableAsset (shared_ptr asset, optional key_id) - : _asset_ref (asset) - , _key_id (key_id) - , _hash (asset->hash()) +ReelEncryptableAsset::ReelEncryptableAsset (optional key_id) + : _key_id (key_id) { } ReelEncryptableAsset::ReelEncryptableAsset (shared_ptr node) - : _asset_ref (remove_urn_uuid(node->string_child("Id"))) - , _key_id (node->optional_string_child ("KeyId")) - , _hash (node->optional_string_child ("Hash")) + : _key_id (node->optional_string_child ("KeyId")) { if (_key_id) { _key_id = remove_urn_uuid (*_key_id); @@ -71,30 +67,10 @@ ReelEncryptableAsset::ReelEncryptableAsset (shared_ptr node) } -bool -ReelEncryptableAsset::mxf_equals (shared_ptr other, EqualityOptions opt, NoteHandler note) const -{ - if (_hash != other->_hash) { - if (!opt.reel_hashes_can_differ) { - note (NoteType::ERROR, "Reel: hashes differ"); - return false; - } else { - note (NoteType::NOTE, "Reel: hashes differ"); - } - } - - if (_asset_ref.resolved() && other->_asset_ref.resolved()) { - return _asset_ref->equals (other->_asset_ref.asset(), opt, note); - } - - return true; -} - - void ReelEncryptableAsset::write_to_cpl_mxf (xmlpp::Node* node) const { - if (key_id ()) { + if (key_id()) { auto hash = find_child (node, "Hash"); node->add_child_before(hash, "KeyId")->add_child_text("urn:uuid:" + key_id().get()); } diff --git a/src/reel_encryptable_asset.h b/src/reel_encryptable_asset.h index 56a697cc..978b2255 100644 --- a/src/reel_encryptable_asset.h +++ b/src/reel_encryptable_asset.h @@ -41,6 +41,7 @@ #define LIBDCP_REEL_ENCRYPTABLE_ASSET_H +#include "reel_file_asset.h" #include "ref.h" #include #include @@ -61,34 +62,13 @@ namespace dcp { class ReelEncryptableAsset { public: - explicit ReelEncryptableAsset (std::shared_ptr asset, boost::optional key_id); + explicit ReelEncryptableAsset (boost::optional key_id); explicit ReelEncryptableAsset (std::shared_ptr); virtual ~ReelEncryptableAsset () {} /** @return the 4-character key type for this MXF (MDIK, MDAK, etc.) */ virtual std::string key_type () const = 0; - /** @return a Ref to our actual asset */ - Ref const & asset_ref () const { - return _asset_ref; - } - - /** @return a Ref to our actual asset */ - Ref & asset_ref () { - return _asset_ref; - } - - /** @return the asset's hash, if this ReelEncryptableAsset has been created from one, - * otherwise the hash written to the CPL for this asset (if present). - */ - boost::optional hash () const { - return _hash; - } - - void set_hash (std::string h) { - _hash = h; - } - /** @return true if a KeyId is specified for this asset, implying * that its content is encrypted. */ @@ -103,31 +83,11 @@ public: return _key_id; } - bool mxf_equals (std::shared_ptr other, EqualityOptions opt, NoteHandler note) const; - protected: - - template - std::shared_ptr asset_of_type () const { - return std::dynamic_pointer_cast (_asset_ref.asset ()); - } - - template - std::shared_ptr asset_of_type () { - return std::dynamic_pointer_cast (_asset_ref.asset ()); - } - void write_to_cpl_mxf (xmlpp::Node* node) const; - /** Reference to the asset (MXF or XML file) that this reel entry - * applies to. - */ - Ref _asset_ref; - private: boost::optional _key_id; ///< The <KeyId> from the reel's entry for this asset, if there is one - /** Either our asset's computed hash or the hash read in from the CPL, if it's present */ - boost::optional _hash; }; diff --git a/src/reel_file_asset.cc b/src/reel_file_asset.cc new file mode 100644 index 00000000..a55e084e --- /dev/null +++ b/src/reel_file_asset.cc @@ -0,0 +1,82 @@ +/* + Copyright (C) 2012-2021 Carl Hetherington + + This file is part of libdcp. + + libdcp is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libdcp is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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_file_asset.cc + * @brief ReelFileAsset class + */ + + +#include "asset.h" +#include "reel_file_asset.h" + + +using std::shared_ptr; +using namespace dcp; + + +ReelFileAsset::ReelFileAsset (shared_ptr asset) + : _asset_ref (asset) + , _hash (asset->hash()) +{ + +} + + +ReelFileAsset::ReelFileAsset (shared_ptr node) + : _asset_ref (remove_urn_uuid(node->string_child("Id"))) + , _hash (node->optional_string_child ("Hash")) +{ + +} + + +bool +ReelFileAsset::file_asset_equals (shared_ptr other, EqualityOptions opt, NoteHandler note) const +{ + if (_hash != other->_hash) { + if (!opt.reel_hashes_can_differ) { + note (NoteType::ERROR, "Reel: hashes differ"); + return false; + } else { + note (NoteType::NOTE, "Reel: hashes differ"); + } + } + + if (_asset_ref.resolved() && other->_asset_ref.resolved()) { + return _asset_ref->equals (other->_asset_ref.asset(), opt, note); + } + + return true; +} + diff --git a/src/reel_file_asset.h b/src/reel_file_asset.h new file mode 100644 index 00000000..de9921d5 --- /dev/null +++ b/src/reel_file_asset.h @@ -0,0 +1,107 @@ +/* + Copyright (C) 2012-2021 Carl Hetherington + + This file is part of libdcp. + + libdcp is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + libdcp is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + 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_file_asset.h + * @brief ReelFileAsset class + */ + + +#ifndef LIBDCP_REEL_FILE_ASSET_H +#define LIBDCP_REEL_FILE_ASSET_H + + +#include "ref.h" +#include +#include + + +namespace dcp { + + +class ReelFileAsset +{ +public: + explicit ReelFileAsset (std::shared_ptr asset); + explicit ReelFileAsset (std::shared_ptr node); + + /** @return a Ref to our actual asset */ + Ref const & asset_ref () const { + return _asset_ref; + } + + /** @return a Ref to our actual asset */ + Ref & asset_ref () { + return _asset_ref; + } + + /** @return the asset's hash, if this ReelFileAsset has been created from one, + * otherwise the hash written to the CPL for this asset (if present). + */ + boost::optional hash () const { + return _hash; + } + + void set_hash (std::string h) { + _hash = h; + } + + bool file_asset_equals (std::shared_ptr other, EqualityOptions opt, NoteHandler note) const; + +protected: + + template + std::shared_ptr asset_of_type () const { + return std::dynamic_pointer_cast (_asset_ref.asset ()); + } + + template + std::shared_ptr asset_of_type () { + return std::dynamic_pointer_cast (_asset_ref.asset ()); + } + + /** Reference to the asset (MXF or XML file) that this reel entry + * applies to. + */ + Ref _asset_ref; + +private: + /** Either our asset's computed hash or the hash read in from the CPL, if it's present */ + boost::optional _hash; +}; + + +} + + +#endif diff --git a/src/reel_picture_asset.cc b/src/reel_picture_asset.cc index 8a8b5219..cc5e2399 100644 --- a/src/reel_picture_asset.cc +++ b/src/reel_picture_asset.cc @@ -58,7 +58,8 @@ using namespace dcp; ReelPictureAsset::ReelPictureAsset (shared_ptr asset, int64_t entry_point) : ReelAsset (asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) - , ReelEncryptableAsset (asset, asset->key_id()) + , ReelFileAsset (asset) + , ReelEncryptableAsset (asset->key_id()) , _frame_rate (asset->frame_rate ()) , _screen_aspect_ratio (asset->screen_aspect_ratio ()) { @@ -68,6 +69,7 @@ ReelPictureAsset::ReelPictureAsset (shared_ptr asset, int64_t entr ReelPictureAsset::ReelPictureAsset (shared_ptr node) : ReelAsset (node) + , ReelFileAsset (node) , ReelEncryptableAsset (node) { _frame_rate = Fraction (node->string_child ("FrameRate")); @@ -137,7 +139,7 @@ ReelPictureAsset::equals (shared_ptr other, EqualityOpti if (!asset_equals (other, opt, note)) { return false; } - if (!mxf_equals (other, opt, note)) { + if (!file_asset_equals (other, opt, note)) { return false; } diff --git a/src/reel_picture_asset.h b/src/reel_picture_asset.h index 3b65abd2..3d98b09d 100644 --- a/src/reel_picture_asset.h +++ b/src/reel_picture_asset.h @@ -52,7 +52,7 @@ namespace dcp { /** @class ReelPictureAsset * @brief Part of a Reel's description which refers to a picture asset */ -class ReelPictureAsset : public ReelAsset, public ReelEncryptableAsset +class ReelPictureAsset : public ReelAsset, public ReelFileAsset, public ReelEncryptableAsset { public: ReelPictureAsset (std::shared_ptr asset, int64_t entry_point); diff --git a/src/reel_sound_asset.cc b/src/reel_sound_asset.cc index 73fc7f4e..216eb1f7 100644 --- a/src/reel_sound_asset.cc +++ b/src/reel_sound_asset.cc @@ -50,7 +50,8 @@ using namespace dcp; ReelSoundAsset::ReelSoundAsset (shared_ptr asset, int64_t entry_point) : ReelAsset (asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) - , ReelEncryptableAsset (asset, asset->key_id()) + , ReelFileAsset (asset) + , ReelEncryptableAsset (asset->key_id()) { } @@ -58,6 +59,7 @@ ReelSoundAsset::ReelSoundAsset (shared_ptr asset, int64_t entry_poin ReelSoundAsset::ReelSoundAsset (shared_ptr node) : ReelAsset (node) + , ReelFileAsset (node) , ReelEncryptableAsset (node) { node->ignore_child ("Language"); @@ -94,7 +96,7 @@ ReelSoundAsset::equals (shared_ptr other, EqualityOptions if (!asset_equals (other, opt, note)) { return false; } - if (!mxf_equals (other, opt, note)) { + if (!file_asset_equals (other, opt, note)) { return false; } diff --git a/src/reel_sound_asset.h b/src/reel_sound_asset.h index 3048fd03..c5619ad9 100644 --- a/src/reel_sound_asset.h +++ b/src/reel_sound_asset.h @@ -50,7 +50,7 @@ namespace dcp { /** @class ReelSoundAsset * @brief Part of a Reel's description which refers to a sound asset */ -class ReelSoundAsset : public ReelAsset, public ReelEncryptableAsset +class ReelSoundAsset : public ReelAsset, public ReelFileAsset, public ReelEncryptableAsset { public: ReelSoundAsset (std::shared_ptr content, int64_t entry_point); diff --git a/src/reel_subtitle_asset.cc b/src/reel_subtitle_asset.cc index 7636782f..cccda50a 100644 --- a/src/reel_subtitle_asset.cc +++ b/src/reel_subtitle_asset.cc @@ -53,7 +53,8 @@ using namespace dcp; ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) : ReelAsset (asset->id(), edit_rate, intrinsic_duration, entry_point) - , ReelEncryptableAsset (asset, dynamic_pointer_cast(asset) ? dynamic_pointer_cast(asset)->key_id() : optional()) + , ReelFileAsset (asset) + , ReelEncryptableAsset (dynamic_pointer_cast(asset) ? dynamic_pointer_cast(asset)->key_id() : optional()) { } @@ -61,6 +62,7 @@ ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr asset, Frac ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr node) : ReelAsset (node) + , ReelFileAsset (node) , ReelEncryptableAsset (node) { _language = node->optional_string_child("Language"); @@ -100,7 +102,7 @@ ReelSubtitleAsset::equals (shared_ptr other, EqualityOp if (!asset_equals (other, opt, note)) { return false; } - if (!mxf_equals (other, opt, note)) { + if (!file_asset_equals (other, opt, note)) { return false; } diff --git a/src/reel_subtitle_asset.h b/src/reel_subtitle_asset.h index 81265477..b8dcf6d7 100644 --- a/src/reel_subtitle_asset.h +++ b/src/reel_subtitle_asset.h @@ -44,6 +44,7 @@ #include "language_tag.h" #include "reel_asset.h" #include "reel_encryptable_asset.h" +#include "reel_file_asset.h" #include "subtitle_asset.h" @@ -59,7 +60,7 @@ class SubtitleAsset; /** @class ReelSubtitleAsset * @brief Part of a Reel's description which refers to a subtitle XML/MXF file */ -class ReelSubtitleAsset : public ReelAsset, public ReelEncryptableAsset +class ReelSubtitleAsset : public ReelAsset, public ReelFileAsset, public ReelEncryptableAsset { public: ReelSubtitleAsset (std::shared_ptr asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); diff --git a/src/verify.cc b/src/verify.cc index e27f6f36..6adab99d 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -377,7 +377,7 @@ enum class VerifyAssetResult { static VerifyAssetResult -verify_asset (shared_ptr dcp, shared_ptr reel_file_asset, function progress) +verify_asset (shared_ptr dcp, shared_ptr reel_file_asset, function progress) { auto const actual_hash = reel_file_asset->asset_ref()->hash(progress); @@ -422,7 +422,7 @@ verify_language_tag (string tag, vector& notes) static void -verify_picture_asset (shared_ptr reel_file_asset, boost::filesystem::path file, vector& notes, function progress) +verify_picture_asset (shared_ptr reel_file_asset, boost::filesystem::path file, vector& notes, function progress) { int biggest_frame = 0; auto asset = dynamic_pointer_cast(reel_file_asset->asset_ref().asset()); @@ -1233,7 +1233,7 @@ dcp::verify ( if ((i->intrinsic_duration() * i->edit_rate().denominator / i->edit_rate().numerator) < 1) { notes.push_back ({VerificationNote::Type::ERROR, VerificationNote::Code::INVALID_INTRINSIC_DURATION, i->id()}); } - auto file_asset = dynamic_pointer_cast(i); + auto file_asset = dynamic_pointer_cast(i); if (file_asset && !file_asset->hash()) { notes.push_back ({VerificationNote::Type::BV21_ERROR, VerificationNote::Code::MISSING_HASH, i->id()}); } diff --git a/src/wscript b/src/wscript index 0143667d..25a4dadb 100644 --- a/src/wscript +++ b/src/wscript @@ -83,6 +83,7 @@ def build(bld): reel_atmos_asset.cc reel_closed_caption_asset.cc reel_encryptable_asset.cc + reel_file_asset.cc reel_mono_picture_asset.cc reel_picture_asset.cc reel_markers_asset.cc @@ -170,6 +171,7 @@ def build(bld): reel_atmos_asset.h reel_closed_caption_asset.h reel_encryptable_asset.h + reel_file_asset.h reel_markers_asset.h reel_mono_picture_asset.h reel_picture_asset.h -- 2.30.2