X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Freel.h;h=278a0f916a23000c78e423c6a5a13b9909148af4;hb=67a414dc3826761c8933640e85560644f5f02310;hp=b4a69f78b74bfa2f23c01a03e31d17535b43466d;hpb=87f3008ab782543c7423f61e220b706cbb39327a;p=libdcp.git diff --git a/src/reel.h b/src/reel.h index b4a69f78..278a0f91 100644 --- a/src/reel.h +++ b/src/reel.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2012 Carl Hetherington + Copyright (C) 2012-2014 Carl Hetherington 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 @@ -20,61 +20,73 @@ #ifndef LIBDCP_REEL_H #define LIBDCP_REEL_H -#include +#include "key.h" +#include "types.h" +#include "ref.h" +#include #include #include -#include -#include "types.h" +#include -namespace xmlpp { +namespace cxml { class Node; } -namespace libdcp { +namespace dcp { -class PictureAsset; -class SoundAsset; -class SubtitleAsset; -class KDM; +class DecryptedKDM; +class ReelAsset; +class ReelPictureAsset; +class ReelSoundAsset; +class ReelSubtitleAsset; +class Content; -/** @brief A reel within a DCP; the part which actually contains picture, sound and subtitle data */ -class Reel +/** @brief A reel within a DCP; the part which actually refers to picture, sound and subtitle data */ +class Reel : public Object { public: + Reel () {} + Reel ( - boost::shared_ptr picture, - boost::shared_ptr sound, - boost::shared_ptr subtitle + boost::shared_ptr picture, + boost::shared_ptr sound, + boost::shared_ptr subtitle ) : _main_picture (picture) , _main_sound (sound) , _main_subtitle (subtitle) {} + + Reel (boost::shared_ptr); - boost::shared_ptr main_picture () const { + boost::shared_ptr main_picture () const { return _main_picture; } - boost::shared_ptr main_sound () const { + boost::shared_ptr main_sound () const { return _main_sound; } - boost::shared_ptr main_subtitle () const { + boost::shared_ptr main_subtitle () const { return _main_subtitle; } - void write_to_cpl (xmlpp::Node *) const; + void add (boost::shared_ptr asset); + + void write_to_cpl (xmlpp::Element* node, Standard standard) const; bool encrypted () const; - - bool equals (boost::shared_ptr other, EqualityOptions opt, boost::function notes) const; - void add_kdm (KDM const &); + bool equals (boost::shared_ptr other, EqualityOptions opt, NoteHandler notes) const; + + void add (DecryptedKDM const &); + + void resolve_refs (std::list >); private: - boost::shared_ptr _main_picture; - boost::shared_ptr _main_sound; - boost::shared_ptr _main_subtitle; + boost::shared_ptr _main_picture; + boost::shared_ptr _main_sound; + boost::shared_ptr _main_subtitle; }; }