}
-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;
}
namespace dcp {
-class ReelFileAsset;
+class ReelEncryptableAsset;
class Reel;
class MXFMetadata;
class CertificateChain;
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;
#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"
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,
, _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);
}
}
class EncryptedKDM;
class CertificateChain;
class CPL;
-class ReelFileAsset;
+class ReelEncryptableAsset;
/** @class DecryptedKDM
*/
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,
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())
{
}
ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr<const cxml::Node> node)
: ReelAsset (node)
- , ReelFileAsset (node)
+ , ReelEncryptableAsset (node)
{
node->ignore_child ("DataType");
node->done ();
#include "reel_asset.h"
#include "atmos_asset.h"
-#include "reel_file_asset.h"
+#include "reel_encryptable_asset.h"
namespace dcp {
/** @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);
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>())
{
}
ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr<const cxml::Node> node)
: ReelAsset (node)
- , ReelFileAsset (node)
+ , ReelEncryptableAsset (node)
{
_language = node->optional_string_child ("Language");
node->done ();
#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;
/** @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);
--- /dev/null
+/*
+ Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
+
+ 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 <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_encryptable_asset.cc
+ * @brief ReelEncryptableAsset class
+ */
+
+
+#include "reel_encryptable_asset.h"
+#include "util.h"
+#include "mxf.h"
+#include "dcp_assert.h"
+#include <libcxml/cxml.h>
+#include <libxml++/libxml++.h>
+
+
+using std::string;
+using std::shared_ptr;
+using boost::optional;
+using namespace dcp;
+
+
+ReelEncryptableAsset::ReelEncryptableAsset (shared_ptr<Asset> asset, optional<string> key_id)
+ : _asset_ref (asset)
+ , _key_id (key_id)
+ , _hash (asset->hash())
+{
+
+}
+
+
+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"))
+{
+ if (_key_id) {
+ _key_id = remove_urn_uuid (*_key_id);
+ }
+}
+
+
+bool
+ReelEncryptableAsset::mxf_equals (shared_ptr<const ReelEncryptableAsset> 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 ()) {
+ auto hash = find_child (node, "Hash");
+ node->add_child_before(hash, "KeyId")->add_child_text("urn:uuid:" + key_id().get());
+ }
+}
--- /dev/null
+/*
+ Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
+
+ 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 <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_encryptable_asset.h
+ * @brief ReelEncryptableAsset class
+ */
+
+
+#ifndef LIBDCP_REEL_ENCRYPTABLE_ASSET_H
+#define LIBDCP_REEL_ENCRYPTABLE_ASSET_H
+
+
+#include "ref.h"
+#include <boost/optional.hpp>
+#include <memory>
+#include <string>
+
+
+namespace cxml {
+ class Node;
+}
+
+
+namespace dcp {
+
+
+/** @class ReelEncryptableAsset
+ * @brief Part of a Reel's description which refers to an asset which can be encrypted
+ */
+class ReelEncryptableAsset
+{
+public:
+ 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;
+
+ /** @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<std::string> 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.
+ */
+ bool encrypted () const {
+ return static_cast<bool>(_key_id);
+ }
+
+ /** @return Key ID to describe the key that encrypts this asset's
+ * content, if there is one.
+ */
+ boost::optional<std::string> key_id () const {
+ return _key_id;
+ }
+
+ bool mxf_equals (std::shared_ptr<const ReelEncryptableAsset> other, EqualityOptions opt, NoteHandler note) const;
+
+protected:
+
+ template <class T>
+ std::shared_ptr<T> asset_of_type () const {
+ return std::dynamic_pointer_cast<T> (_asset_ref.asset ());
+ }
+
+ template <class T>
+ std::shared_ptr<T> asset_of_type () {
+ return std::dynamic_pointer_cast<T> (_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<std::string> _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<std::string> _hash;
+};
+
+
+}
+
+
+#endif
+++ /dev/null
-/*
- Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
-
- 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 <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_mxf.cc
- * @brief ReelFileAsset class
- */
-
-
-#include "reel_file_asset.h"
-#include "util.h"
-#include "mxf.h"
-#include "dcp_assert.h"
-#include <libcxml/cxml.h>
-#include <libxml++/libxml++.h>
-
-
-using std::string;
-using std::shared_ptr;
-using boost::optional;
-using namespace dcp;
-
-
-ReelFileAsset::ReelFileAsset (shared_ptr<Asset> asset, optional<string> key_id)
- : _asset_ref (asset)
- , _key_id (key_id)
- , _hash (asset->hash())
-{
-
-}
-
-
-ReelFileAsset::ReelFileAsset (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"))
-{
- if (_key_id) {
- _key_id = remove_urn_uuid (*_key_id);
- }
-}
-
-
-bool
-ReelFileAsset::mxf_equals (shared_ptr<const ReelFileAsset> 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
-ReelFileAsset::write_to_cpl_mxf (xmlpp::Node* node) const
-{
- if (key_id ()) {
- auto hash = find_child (node, "Hash");
- node->add_child_before(hash, "KeyId")->add_child_text("urn:uuid:" + key_id().get());
- }
-}
+++ /dev/null
-/*
- Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
-
- 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 <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_file_asset.h
- * @brief ReelFileAsset class
- */
-
-
-#ifndef LIBDCP_REEL_MXF_H
-#define LIBDCP_REEL_MXF_H
-
-
-#include "ref.h"
-#include <boost/optional.hpp>
-#include <memory>
-#include <string>
-
-
-namespace cxml {
- class Node;
-}
-
-
-namespace dcp {
-
-
-/** @class ReelFileAsset
- * @brief Part of a Reel's description which refers to an asset which can be encrypted
- */
-class ReelFileAsset
-{
-public:
- explicit ReelFileAsset (std::shared_ptr<Asset> asset, boost::optional<std::string> key_id);
- explicit ReelFileAsset (std::shared_ptr<const cxml::Node>);
- virtual ~ReelFileAsset () {}
-
- /** @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 ReelFileAsset has been created from one,
- * otherwise the hash written to the CPL for this asset (if present).
- */
- boost::optional<std::string> 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.
- */
- bool encrypted () const {
- return static_cast<bool>(_key_id);
- }
-
- /** @return Key ID to describe the key that encrypts this asset's
- * content, if there is one.
- */
- boost::optional<std::string> key_id () const {
- return _key_id;
- }
-
- bool mxf_equals (std::shared_ptr<const ReelFileAsset> other, EqualityOptions opt, NoteHandler note) const;
-
-protected:
-
- template <class T>
- std::shared_ptr<T> asset_of_type () const {
- return std::dynamic_pointer_cast<T> (_asset_ref.asset ());
- }
-
- template <class T>
- std::shared_ptr<T> asset_of_type () {
- return std::dynamic_pointer_cast<T> (_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<std::string> _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<std::string> _hash;
-};
-
-
-}
-
-
-#endif
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 ())
{
ReelPictureAsset::ReelPictureAsset (shared_ptr<const cxml::Node> node)
: ReelAsset (node)
- , ReelFileAsset (node)
+ , ReelEncryptableAsset (node)
{
_frame_rate = Fraction (node->string_child ("FrameRate"));
try {
#define LIBDCP_REEL_PICTURE_ASSET_H
-#include "reel_file_asset.h"
+#include "reel_encryptable_asset.h"
#include "reel_asset.h"
#include "picture_asset.h"
/** @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);
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())
{
}
ReelSoundAsset::ReelSoundAsset (shared_ptr<const cxml::Node> node)
: ReelAsset (node)
- , ReelFileAsset (node)
+ , ReelEncryptableAsset (node)
{
node->ignore_child ("Language");
node->done ();
*/
-#include "reel_file_asset.h"
+#include "reel_encryptable_asset.h"
#include "reel_asset.h"
#include "sound_asset.h"
#include <memory>
/** @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);
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>())
{
}
ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr<const cxml::Node> node)
: ReelAsset (node)
- , ReelFileAsset (node)
+ , ReelEncryptableAsset (node)
{
_language = node->optional_string_child("Language");
node->done ();
#include "language_tag.h"
#include "reel_asset.h"
-#include "reel_file_asset.h"
+#include "reel_encryptable_asset.h"
#include "subtitle_asset.h"
/** @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);
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);
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());
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()) {
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()});
}
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
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