Include trimming.
[libdcp.git] / src / reel.h
index fdbe473a64739de24ee35065579fcd1cef447b07..52f41bfaa5c670c83565650c1e98057587dce37f 100644 (file)
 */
 
 
+/** @file  src/reel.cc
+ *  @brief Reel class
+ */
+
+
 #ifndef LIBDCP_REEL_H
 #define LIBDCP_REEL_H
 
 
+#include "decrypted_kdm.h"
 #include "key.h"
-#include "types.h"
 #include "ref.h"
-#include <memory>
 #include <boost/function.hpp>
+#include <memory>
 
 
 namespace cxml {
@@ -53,6 +58,9 @@ namespace xmlpp {
 }
 
 
+struct dcp_add_kdm_test;
+
+
 namespace dcp {
 
 
@@ -87,7 +95,7 @@ public:
                , _atmos (atmos)
        {}
 
-       explicit Reel (std::shared_ptr<const cxml::Node>);
+       explicit Reel (std::shared_ptr<const cxml::Node>, dcp::Standard standard);
 
        std::shared_ptr<ReelPictureAsset> main_picture () const {
                return _main_picture;
@@ -124,19 +132,25 @@ public:
        bool any_encrypted () const;
        bool all_encrypted () const;
 
-       bool equals (std::shared_ptr<const Reel> other, EqualityOptions opt, NoteHandler notes) const;
+       bool equals(std::shared_ptr<const Reel> other, EqualityOptions const& opt, NoteHandler notes) const;
 
        void add (DecryptedKDM const &);
 
        void resolve_refs (std::vector<std::shared_ptr<Asset>>);
 
 private:
+       friend struct ::dcp_add_kdm_test;
+
+       void give_kdm_to_assets (dcp::DecryptedKDM const& kdm);
+
        std::shared_ptr<ReelPictureAsset> _main_picture;
        std::shared_ptr<ReelSoundAsset> _main_sound;
        std::shared_ptr<ReelSubtitleAsset> _main_subtitle;
        std::shared_ptr<ReelMarkersAsset> _main_markers;
        std::vector<std::shared_ptr<ReelClosedCaptionAsset>> _closed_captions;
        std::shared_ptr<ReelAtmosAsset> _atmos;
+
+       std::vector<dcp::DecryptedKDM> _kdms;
 };
 
 }