diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/cpl.cc | 8 | ||||
| -rw-r--r-- | src/cpl.h | 8 | ||||
| -rw-r--r-- | src/decrypted_kdm.cc | 6 | ||||
| -rw-r--r-- | src/decrypted_kdm.h | 4 | ||||
| -rw-r--r-- | src/reel_atmos_asset.cc | 4 | ||||
| -rw-r--r-- | src/reel_atmos_asset.h | 4 | ||||
| -rw-r--r-- | src/reel_closed_caption_asset.cc | 4 | ||||
| -rw-r--r-- | src/reel_closed_caption_asset.h | 4 | ||||
| -rw-r--r-- | src/reel_encryptable_asset.cc (renamed from src/reel_file_asset.cc) | 14 | ||||
| -rw-r--r-- | src/reel_encryptable_asset.h (renamed from src/reel_file_asset.h) | 22 | ||||
| -rw-r--r-- | src/reel_picture_asset.cc | 4 | ||||
| -rw-r--r-- | src/reel_picture_asset.h | 4 | ||||
| -rw-r--r-- | src/reel_sound_asset.cc | 4 | ||||
| -rw-r--r-- | src/reel_sound_asset.h | 4 | ||||
| -rw-r--r-- | src/reel_subtitle_asset.cc | 4 | ||||
| -rw-r--r-- | src/reel_subtitle_asset.h | 4 | ||||
| -rw-r--r-- | src/verify.cc | 10 | ||||
| -rw-r--r-- | src/wscript | 4 |
18 files changed, 58 insertions, 58 deletions
@@ -515,18 +515,18 @@ add_file_assets (vector<shared_ptr<T>>& assets, vector<shared_ptr<Reel>> reels) } -vector<shared_ptr<ReelFileAsset>> +vector<shared_ptr<ReelEncryptableAsset>> CPL::reel_file_assets () { - vector<shared_ptr<ReelFileAsset>> c; + vector<shared_ptr<ReelEncryptableAsset>> c; add_file_assets (c, _reels); return c; } -vector<shared_ptr<const ReelFileAsset>> +vector<shared_ptr<const ReelEncryptableAsset>> CPL::reel_file_assets () const { - vector<shared_ptr<const ReelFileAsset>> c; + vector<shared_ptr<const ReelEncryptableAsset>> c; add_file_assets (c, _reels); return c; } @@ -59,7 +59,7 @@ struct verify_invalid_language3; namespace dcp { -class ReelFileAsset; +class ReelEncryptableAsset; class Reel; class MXFMetadata; class CertificateChain; @@ -99,9 +99,9 @@ public: return _reels; } - /** @return the ReelFileAssets in this CPL in all reels */ - std::vector<std::shared_ptr<const ReelFileAsset>> reel_file_assets () const; - std::vector<std::shared_ptr<ReelFileAsset>> reel_file_assets (); + /** @return the ReelEncryptableAssets in this CPL in all reels */ + std::vector<std::shared_ptr<const ReelEncryptableAsset>> reel_file_assets () const; + std::vector<std::shared_ptr<ReelEncryptableAsset>> reel_file_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 e734d407..9a9f2c22 100644 --- a/src/decrypted_kdm.cc +++ b/src/decrypted_kdm.cc @@ -40,7 +40,7 @@ #include "decrypted_kdm.h" #include "decrypted_kdm_key.h" #include "encrypted_kdm.h" -#include "reel_file_asset.h" +#include "reel_encryptable_asset.h" #include "reel_asset.h" #include "util.h" #include "exceptions.h" @@ -251,7 +251,7 @@ DecryptedKDM::DecryptedKDM ( DecryptedKDM::DecryptedKDM ( string cpl_id, - map<shared_ptr<const ReelFileAsset>, Key> keys, + map<shared_ptr<const ReelEncryptableAsset>, Key> keys, LocalTime not_valid_before, LocalTime not_valid_after, string annotation_text, @@ -264,7 +264,7 @@ DecryptedKDM::DecryptedKDM ( , _content_title_text (content_title_text) , _issue_date (issue_date) { - for (map<shared_ptr<const ReelFileAsset>, Key>::const_iterator i = keys.begin(); i != keys.end(); ++i) { + for (map<shared_ptr<const ReelEncryptableAsset>, Key>::const_iterator i = keys.begin(); i != keys.end(); ++i) { add_key (i->first->key_type(), i->first->key_id().get(), i->second, cpl_id, Standard::SMPTE); } } diff --git a/src/decrypted_kdm.h b/src/decrypted_kdm.h index 6bdd9fcd..16b0acba 100644 --- a/src/decrypted_kdm.h +++ b/src/decrypted_kdm.h @@ -60,7 +60,7 @@ class DecryptedKDMKey; class EncryptedKDM; class CertificateChain; class CPL; -class ReelFileAsset; +class ReelEncryptableAsset; /** @class DecryptedKDM @@ -99,7 +99,7 @@ public: */ DecryptedKDM ( std::string cpl_id, - std::map<std::shared_ptr<const ReelFileAsset>, Key> keys, + std::map<std::shared_ptr<const ReelEncryptableAsset>, Key> keys, LocalTime not_valid_before, LocalTime not_valid_after, std::string annotation_text, diff --git a/src/reel_atmos_asset.cc b/src/reel_atmos_asset.cc index 760e4211..dca434d2 100644 --- a/src/reel_atmos_asset.cc +++ b/src/reel_atmos_asset.cc @@ -52,7 +52,7 @@ 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()) + , ReelEncryptableAsset (asset, asset->key_id()) { } @@ -60,7 +60,7 @@ ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr<AtmosAsset> asset, int64_t entry ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr<const cxml::Node> node) : ReelAsset (node) - , ReelFileAsset (node) + , ReelEncryptableAsset (node) { node->ignore_child ("DataType"); node->done (); diff --git a/src/reel_atmos_asset.h b/src/reel_atmos_asset.h index d9f4a8e3..51af48fd 100644 --- a/src/reel_atmos_asset.h +++ b/src/reel_atmos_asset.h @@ -43,7 +43,7 @@ #include "reel_asset.h" #include "atmos_asset.h" -#include "reel_file_asset.h" +#include "reel_encryptable_asset.h" namespace dcp { @@ -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 ReelFileAsset +class ReelAtmosAsset : public ReelAsset, public ReelEncryptableAsset { public: ReelAtmosAsset (std::shared_ptr<AtmosAsset> asset, int64_t entry_point); diff --git a/src/reel_closed_caption_asset.cc b/src/reel_closed_caption_asset.cc index 1cb97cb0..2bc5f3e0 100644 --- a/src/reel_closed_caption_asset.cc +++ b/src/reel_closed_caption_asset.cc @@ -55,7 +55,7 @@ using namespace dcp; ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) : ReelAsset (asset->id(), edit_rate, intrinsic_duration, entry_point) - , ReelFileAsset (asset, dynamic_pointer_cast<SMPTESubtitleAsset>(asset) ? dynamic_pointer_cast<SMPTESubtitleAsset>(asset)->key_id() : optional<string>()) + , ReelEncryptableAsset (asset, dynamic_pointer_cast<SMPTESubtitleAsset>(asset) ? dynamic_pointer_cast<SMPTESubtitleAsset>(asset)->key_id() : optional<string>()) { } @@ -63,7 +63,7 @@ ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr<SubtitleAsset> a ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr<const cxml::Node> node) : ReelAsset (node) - , ReelFileAsset (node) + , ReelEncryptableAsset (node) { _language = node->optional_string_child ("Language"); node->done (); diff --git a/src/reel_closed_caption_asset.h b/src/reel_closed_caption_asset.h index 12fc5e66..2c943f7f 100644 --- a/src/reel_closed_caption_asset.h +++ b/src/reel_closed_caption_asset.h @@ -44,7 +44,7 @@ #include "language_tag.h" #include "subtitle_asset.h" #include "reel_asset.h" -#include "reel_file_asset.h" +#include "reel_encryptable_asset.h" struct verify_invalid_language2; @@ -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 ReelFileAsset +class ReelClosedCaptionAsset : public ReelAsset, public ReelEncryptableAsset { public: ReelClosedCaptionAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t instrinsic_duration, int64_t entry_point); diff --git a/src/reel_file_asset.cc b/src/reel_encryptable_asset.cc index 40cff83f..73f589d7 100644 --- a/src/reel_file_asset.cc +++ b/src/reel_encryptable_asset.cc @@ -32,12 +32,12 @@ */ -/** @file src/reel_mxf.cc - * @brief ReelFileAsset class +/** @file src/reel_encryptable_asset.cc + * @brief ReelEncryptableAsset class */ -#include "reel_file_asset.h" +#include "reel_encryptable_asset.h" #include "util.h" #include "mxf.h" #include "dcp_assert.h" @@ -51,7 +51,7 @@ using boost::optional; using namespace dcp; -ReelFileAsset::ReelFileAsset (shared_ptr<Asset> asset, optional<string> key_id) +ReelEncryptableAsset::ReelEncryptableAsset (shared_ptr<Asset> asset, optional<string> key_id) : _asset_ref (asset) , _key_id (key_id) , _hash (asset->hash()) @@ -60,7 +60,7 @@ ReelFileAsset::ReelFileAsset (shared_ptr<Asset> asset, optional<string> key_id) } -ReelFileAsset::ReelFileAsset (shared_ptr<const cxml::Node> node) +ReelEncryptableAsset::ReelEncryptableAsset (shared_ptr<const cxml::Node> node) : _asset_ref (remove_urn_uuid(node->string_child("Id"))) , _key_id (node->optional_string_child ("KeyId")) , _hash (node->optional_string_child ("Hash")) @@ -72,7 +72,7 @@ ReelFileAsset::ReelFileAsset (shared_ptr<const cxml::Node> node) bool -ReelFileAsset::mxf_equals (shared_ptr<const ReelFileAsset> other, EqualityOptions opt, NoteHandler note) const +ReelEncryptableAsset::mxf_equals (shared_ptr<const ReelEncryptableAsset> other, EqualityOptions opt, NoteHandler note) const { if (_hash != other->_hash) { if (!opt.reel_hashes_can_differ) { @@ -92,7 +92,7 @@ ReelFileAsset::mxf_equals (shared_ptr<const ReelFileAsset> other, EqualityOption void -ReelFileAsset::write_to_cpl_mxf (xmlpp::Node* node) const +ReelEncryptableAsset::write_to_cpl_mxf (xmlpp::Node* node) const { if (key_id ()) { auto hash = find_child (node, "Hash"); diff --git a/src/reel_file_asset.h b/src/reel_encryptable_asset.h index 9cf02e21..56a697cc 100644 --- a/src/reel_file_asset.h +++ b/src/reel_encryptable_asset.h @@ -32,13 +32,13 @@ */ -/** @file src/reel_file_asset.h - * @brief ReelFileAsset class +/** @file src/reel_encryptable_asset.h + * @brief ReelEncryptableAsset class */ -#ifndef LIBDCP_REEL_MXF_H -#define LIBDCP_REEL_MXF_H +#ifndef LIBDCP_REEL_ENCRYPTABLE_ASSET_H +#define LIBDCP_REEL_ENCRYPTABLE_ASSET_H #include "ref.h" @@ -55,15 +55,15 @@ namespace cxml { namespace dcp { -/** @class ReelFileAsset +/** @class ReelEncryptableAsset * @brief Part of a Reel's description which refers to an asset which can be encrypted */ -class ReelFileAsset +class ReelEncryptableAsset { public: - explicit ReelFileAsset (std::shared_ptr<Asset> asset, boost::optional<std::string> key_id); - explicit ReelFileAsset (std::shared_ptr<const cxml::Node>); - virtual ~ReelFileAsset () {} + explicit ReelEncryptableAsset (std::shared_ptr<Asset> asset, boost::optional<std::string> key_id); + explicit ReelEncryptableAsset (std::shared_ptr<const cxml::Node>); + virtual ~ReelEncryptableAsset () {} /** @return the 4-character key type for this MXF (MDIK, MDAK, etc.) */ virtual std::string key_type () const = 0; @@ -78,7 +78,7 @@ public: return _asset_ref; } - /** @return the asset's hash, if this ReelFileAsset has been created from one, + /** @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<std::string> hash () const { @@ -103,7 +103,7 @@ public: return _key_id; } - bool mxf_equals (std::shared_ptr<const ReelFileAsset> other, EqualityOptions opt, NoteHandler note) const; + bool mxf_equals (std::shared_ptr<const ReelEncryptableAsset> other, EqualityOptions opt, NoteHandler note) const; protected: diff --git a/src/reel_picture_asset.cc b/src/reel_picture_asset.cc index 6e1c5311..8a8b5219 100644 --- a/src/reel_picture_asset.cc +++ b/src/reel_picture_asset.cc @@ -58,7 +58,7 @@ using namespace dcp; ReelPictureAsset::ReelPictureAsset (shared_ptr<PictureAsset> asset, int64_t entry_point) : ReelAsset (asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) - , ReelFileAsset (asset, asset->key_id()) + , ReelEncryptableAsset (asset, asset->key_id()) , _frame_rate (asset->frame_rate ()) , _screen_aspect_ratio (asset->screen_aspect_ratio ()) { @@ -68,7 +68,7 @@ ReelPictureAsset::ReelPictureAsset (shared_ptr<PictureAsset> asset, int64_t entr ReelPictureAsset::ReelPictureAsset (shared_ptr<const cxml::Node> node) : ReelAsset (node) - , ReelFileAsset (node) + , ReelEncryptableAsset (node) { _frame_rate = Fraction (node->string_child ("FrameRate")); try { diff --git a/src/reel_picture_asset.h b/src/reel_picture_asset.h index 961cde9c..3b65abd2 100644 --- a/src/reel_picture_asset.h +++ b/src/reel_picture_asset.h @@ -41,7 +41,7 @@ #define LIBDCP_REEL_PICTURE_ASSET_H -#include "reel_file_asset.h" +#include "reel_encryptable_asset.h" #include "reel_asset.h" #include "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 ReelFileAsset +class ReelPictureAsset : public ReelAsset, public ReelEncryptableAsset { public: ReelPictureAsset (std::shared_ptr<PictureAsset> asset, int64_t entry_point); diff --git a/src/reel_sound_asset.cc b/src/reel_sound_asset.cc index 539ce7b7..73fc7f4e 100644 --- a/src/reel_sound_asset.cc +++ b/src/reel_sound_asset.cc @@ -50,7 +50,7 @@ using namespace dcp; ReelSoundAsset::ReelSoundAsset (shared_ptr<SoundAsset> asset, int64_t entry_point) : ReelAsset (asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) - , ReelFileAsset (asset, asset->key_id()) + , ReelEncryptableAsset (asset, asset->key_id()) { } @@ -58,7 +58,7 @@ ReelSoundAsset::ReelSoundAsset (shared_ptr<SoundAsset> asset, int64_t entry_poin ReelSoundAsset::ReelSoundAsset (shared_ptr<const cxml::Node> node) : ReelAsset (node) - , ReelFileAsset (node) + , ReelEncryptableAsset (node) { node->ignore_child ("Language"); node->done (); diff --git a/src/reel_sound_asset.h b/src/reel_sound_asset.h index e6143f11..3048fd03 100644 --- a/src/reel_sound_asset.h +++ b/src/reel_sound_asset.h @@ -37,7 +37,7 @@ */ -#include "reel_file_asset.h" +#include "reel_encryptable_asset.h" #include "reel_asset.h" #include "sound_asset.h" #include <memory> @@ -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 ReelFileAsset +class ReelSoundAsset : public ReelAsset, public ReelEncryptableAsset { public: ReelSoundAsset (std::shared_ptr<dcp::SoundAsset> content, int64_t entry_point); diff --git a/src/reel_subtitle_asset.cc b/src/reel_subtitle_asset.cc index e75b918a..7636782f 100644 --- a/src/reel_subtitle_asset.cc +++ b/src/reel_subtitle_asset.cc @@ -53,7 +53,7 @@ using namespace dcp; ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) : ReelAsset (asset->id(), edit_rate, intrinsic_duration, entry_point) - , ReelFileAsset (asset, dynamic_pointer_cast<SMPTESubtitleAsset>(asset) ? dynamic_pointer_cast<SMPTESubtitleAsset>(asset)->key_id() : optional<string>()) + , ReelEncryptableAsset (asset, dynamic_pointer_cast<SMPTESubtitleAsset>(asset) ? dynamic_pointer_cast<SMPTESubtitleAsset>(asset)->key_id() : optional<string>()) { } @@ -61,7 +61,7 @@ ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr<SubtitleAsset> asset, Frac ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr<const cxml::Node> node) : ReelAsset (node) - , ReelFileAsset (node) + , ReelEncryptableAsset (node) { _language = node->optional_string_child("Language"); node->done (); diff --git a/src/reel_subtitle_asset.h b/src/reel_subtitle_asset.h index 67b0f844..81265477 100644 --- a/src/reel_subtitle_asset.h +++ b/src/reel_subtitle_asset.h @@ -43,7 +43,7 @@ #include "language_tag.h" #include "reel_asset.h" -#include "reel_file_asset.h" +#include "reel_encryptable_asset.h" #include "subtitle_asset.h" @@ -59,7 +59,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 ReelFileAsset +class ReelSubtitleAsset : public ReelAsset, public ReelEncryptableAsset { public: ReelSubtitleAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); diff --git a/src/verify.cc b/src/verify.cc index ce79bc2e..e27f6f36 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -377,7 +377,7 @@ enum class VerifyAssetResult { static VerifyAssetResult -verify_asset (shared_ptr<const DCP> dcp, shared_ptr<const ReelFileAsset> reel_file_asset, function<void (float)> progress) +verify_asset (shared_ptr<const DCP> dcp, shared_ptr<const ReelEncryptableAsset> reel_file_asset, function<void (float)> progress) { auto const actual_hash = reel_file_asset->asset_ref()->hash(progress); @@ -422,7 +422,7 @@ verify_language_tag (string tag, vector<VerificationNote>& notes) static void -verify_picture_asset (shared_ptr<const ReelFileAsset> reel_file_asset, boost::filesystem::path file, vector<VerificationNote>& notes, function<void (float)> progress) +verify_picture_asset (shared_ptr<const ReelEncryptableAsset> reel_file_asset, boost::filesystem::path file, vector<VerificationNote>& notes, function<void (float)> progress) { int biggest_frame = 0; auto asset = dynamic_pointer_cast<PictureAsset>(reel_file_asset->asset_ref().asset()); @@ -1081,8 +1081,8 @@ pkl_has_encrypted_assets (shared_ptr<DCP> dcp, shared_ptr<PKL> pkl) for (auto j: i->reel_file_assets()) { if (j->asset_ref().resolved()) { /* It's a bit surprising / broken but Interop subtitle assets are represented - * in reels by ReelSubtitleAsset which inherits ReelFileAsset, so it's possible for - * ReelFileAssets to have assets which are not MXFs. + * in reels by ReelSubtitleAsset which inherits ReelEncryptableAsset, so it's possible for + * ReelEncryptableAssets to have assets which are not MXFs. */ if (auto asset = dynamic_pointer_cast<MXF>(j->asset_ref().asset())) { if (asset->encrypted()) { @@ -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<ReelFileAsset>(i); + auto file_asset = dynamic_pointer_cast<ReelEncryptableAsset>(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 c5729b93..0143667d 100644 --- a/src/wscript +++ b/src/wscript @@ -82,7 +82,7 @@ def build(bld): reel_asset.cc reel_atmos_asset.cc reel_closed_caption_asset.cc - reel_file_asset.cc + reel_encryptable_asset.cc reel_mono_picture_asset.cc reel_picture_asset.cc reel_markers_asset.cc @@ -169,7 +169,7 @@ def build(bld): reel_asset.h reel_atmos_asset.h reel_closed_caption_asset.h - reel_file_asset.h + reel_encryptable_asset.h reel_markers_asset.h reel_mono_picture_asset.h reel_picture_asset.h |
