/** @file src/cpl.h
- * @brief CPL class.
+ * @brief CPL class
*/
#include <vector>
-struct verify_various_invalid_languages;
+struct verify_invalid_language3;
namespace dcp {
-class ReelMXF;
+class ReelFileAsset;
class Reel;
class MXFMetadata;
class CertificateChain;
/** @class CPL
- * @brief A Composition Playlist.
+ * @brief A Composition Playlist
*/
class CPL : public Asset
{
public:
CPL (std::string annotation_text, ContentKind content_kind);
+
+ /** Construct a CPL object from a XML file */
explicit CPL (boost::filesystem::path file);
bool equals (
NoteHandler note
) const;
+ /** Add a reel to this CPL
+ * @param reel Reel to add
+ */
void add (std::shared_ptr<Reel> reel);
+
+ /** Add a KDM to this CPL. If the KDM is for any of this CPLs assets it will be used
+ * to decrypt those assets.
+ * @param kdm KDM.
+ */
void add (DecryptedKDM const &);
/** @return the reels in this CPL */
return _reels;
}
- /** @return the ReelMXFs in this CPL in all reels */
- std::vector<std::shared_ptr<const ReelMXF>> reel_mxfs () const;
- std::vector<std::shared_ptr<ReelMXF>> reel_mxfs ();
+ /** @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 ();
- bool encrypted () const;
+ /** @return true if we have any encrypted content */
+ bool any_encrypted () const;
+ /** @return true if we have all our encryptable content is encrypted */
+ bool all_encrypted () const;
+
+ /** Write an CompositonPlaylist XML file
+ *
+ * @param file Filename to write
+ * @param standard INTEROP or SMPTE
+ * @param signer Signer to sign the CPL, or 0 to add no signature
+ */
void write_xml (
boost::filesystem::path file,
Standard standard,
void set_version_number (int v);
+ void unset_version_number ();
+
boost::optional<Status> status () const {
return _status;
}
std::string pkl_type (Standard standard) const;
private:
- friend struct ::verify_various_invalid_languages;
+ friend struct ::verify_invalid_language3;
void maybe_write_composition_metadata_asset (xmlpp::Element* node) const;
void read_composition_metadata_asset (cxml::ConstNodePtr node);