#include "decrypted_kdm.h"
#include "decrypted_kdm_key.h"
#include "encrypted_kdm.h"
-#include "reel_encryptable_asset.h"
+#include "reel_mxf.h"
#include "reel_asset.h"
#include "util.h"
#include "exceptions.h"
{
/* Create DecryptedKDMKey objects for each encryptable asset */
BOOST_FOREACH(shared_ptr<const ReelAsset> i, cpl->reel_assets ()) {
- shared_ptr<const ReelEncryptableAsset> mxf = boost::dynamic_pointer_cast<const ReelEncryptableAsset> (i);
+ shared_ptr<const ReelMXF> mxf = boost::dynamic_pointer_cast<const ReelMXF> (i);
shared_ptr<const ReelAsset> asset = boost::dynamic_pointer_cast<const ReelAsset> (i);
if (asset && mxf) {
if (!mxf->key_id ()) {
+++ /dev/null
-/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
-
- This program 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.
-
- This program 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 this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-#include "reel_encryptable_asset.h"
-#include "mxf.h"
-#include "dcp_assert.h"
-#include <libcxml/cxml.h>
-#include <libxml++/libxml++.h>
-
-using std::string;
-using boost::shared_ptr;
-using boost::optional;
-using namespace dcp;
-
-ReelEncryptableAsset::ReelEncryptableAsset (optional<string> key_id)
- : _key_id (key_id)
-{
-
-}
-
-ReelEncryptableAsset::ReelEncryptableAsset (shared_ptr<const cxml::Node> node)
- : _key_id (node->optional_string_child ("KeyId"))
-{
- if (_key_id && _key_id.get().length() > 9) {
- _key_id = _key_id.get().substr (9);
- }
-}
+++ /dev/null
-/*
- Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
-
- This program 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.
-
- This program 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 this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-*/
-
-/** @file src/reel_encryptable_asset.h
- * @brief ReelEncryptableAsset
- */
-
-#ifndef LIBDCP_REEL_ENCRYPTABLE_ASSET_H
-#define LIBDCP_REEL_ENCRYPTABLE_ASSET_H
-
-#include <boost/optional.hpp>
-#include <boost/shared_ptr.hpp>
-#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:
- ReelEncryptableAsset () {}
- ReelEncryptableAsset (boost::optional<std::string> key_id);
- ReelEncryptableAsset (boost::shared_ptr<const cxml::Node>);
-
- /** @return the 4-character key type for this MXF (MDIK, MDAK, etc.) */
- virtual std::string key_type () const = 0;
-
- /** @return true if a KeyId is specified for this asset, implying
- * that its content is encrypted.
- */
- bool encrypted () const {
- return _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;
- }
-
-private:
- boost::optional<std::string> _key_id; ///< The <KeyId> from the reel's entry for this asset, if there is one
-};
-
-}
-
-#endif
--- /dev/null
+/*
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+
+ This program 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.
+
+ This program 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 this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include "reel_mxf.h"
+#include "mxf.h"
+#include "dcp_assert.h"
+#include <libcxml/cxml.h>
+#include <libxml++/libxml++.h>
+
+using std::string;
+using boost::shared_ptr;
+using boost::optional;
+using namespace dcp;
+
+ReelMXF::ReelMXF (optional<string> key_id)
+ : _key_id (key_id)
+{
+
+}
+
+ReelMXF::ReelMXF (shared_ptr<const cxml::Node> node)
+ : _key_id (node->optional_string_child ("KeyId"))
+{
+ if (_key_id && _key_id.get().length() > 9) {
+ _key_id = _key_id.get().substr (9);
+ }
+}
--- /dev/null
+/*
+ Copyright (C) 2012-2015 Carl Hetherington <cth@carlh.net>
+
+ This program 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.
+
+ This program 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 this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+/** @file src/reel_mxf.h
+ * @brief ReelMXF
+ */
+
+#ifndef LIBDCP_REEL_ENCRYPTABLE_ASSET_H
+#define LIBDCP_REEL_ENCRYPTABLE_ASSET_H
+
+#include <boost/optional.hpp>
+#include <boost/shared_ptr.hpp>
+#include <string>
+
+namespace cxml {
+ class Node;
+}
+
+namespace dcp {
+
+/** @class ReelMXF
+ * @brief Part of a Reel's description which refers to an asset which can be encrypted.
+ */
+class ReelMXF
+{
+public:
+ ReelMXF () {}
+ ReelMXF (boost::optional<std::string> key_id);
+ ReelMXF (boost::shared_ptr<const cxml::Node>);
+
+ /** @return the 4-character key type for this MXF (MDIK, MDAK, etc.) */
+ virtual std::string key_type () const = 0;
+
+ /** @return true if a KeyId is specified for this asset, implying
+ * that its content is encrypted.
+ */
+ bool encrypted () const {
+ return _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;
+ }
+
+private:
+ boost::optional<std::string> _key_id; ///< The <KeyId> from the reel's entry for this asset, if there is one
+};
+
+}
+
+#endif
ReelPictureAsset::ReelPictureAsset (shared_ptr<PictureAsset> asset, int64_t entry_point)
: ReelAsset (asset, asset->edit_rate(), asset->intrinsic_duration(), entry_point)
- , ReelEncryptableAsset (asset->key_id())
+ , ReelMXF (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)
- , ReelEncryptableAsset (node)
+ , ReelMXF (node)
{
_frame_rate = Fraction (node->string_child ("FrameRate"));
try {
#ifndef LIBDCP_REEL_PICTURE_ASSET_H
#define LIBDCP_REEL_PICTURE_ASSET_H
-#include "reel_encryptable_asset.h"
+#include "reel_mxf.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 ReelEncryptableAsset
+class ReelPictureAsset : public ReelAsset, public ReelMXF
{
public:
ReelPictureAsset ();
ReelSoundAsset::ReelSoundAsset (shared_ptr<SoundAsset> asset, int64_t entry_point)
: ReelAsset (asset, asset->edit_rate(), asset->intrinsic_duration(), entry_point)
- , ReelEncryptableAsset (asset->key_id())
+ , ReelMXF (asset->key_id())
{
}
ReelSoundAsset::ReelSoundAsset (shared_ptr<const cxml::Node> node)
: ReelAsset (node)
- , ReelEncryptableAsset (node)
+ , ReelMXF (node)
{
node->ignore_child ("Language");
node->done ();
* @brief ReelSoundAsset class.
*/
-#include "reel_encryptable_asset.h"
+#include "reel_mxf.h"
#include "reel_asset.h"
#include "sound_asset.h"
#include <boost/shared_ptr.hpp>
/** @class ReelSoundAsset
* @brief Part of a Reel's description which refers to a sound MXF.
*/
-class ReelSoundAsset : public ReelAsset, public ReelEncryptableAsset
+class ReelSoundAsset : public ReelAsset, public ReelMXF
{
public:
ReelSoundAsset (boost::shared_ptr<dcp::SoundAsset> content, int64_t entry_point);
picture_asset_writer.cc
reel.cc
reel_asset.cc
- reel_encryptable_asset.cc
reel_mono_picture_asset.cc
+ reel_mxf.cc
reel_picture_asset.cc
reel_sound_asset.cc
reel_stereo_picture_asset.cc
rgb_xyz.h
reel.h
reel_asset.h
- reel_encryptable_asset.h
reel_mono_picture_asset.h
+ reel_mxf.h
reel_picture_asset.h
reel_sound_asset.h
reel_stereo_picture_asset.h