Asset -> MXF in some cases.
[libdcp.git] / src / reel.h
index 58caed31c2b17972ad28224777fb6bf01720ab5c..41e811e44966d7b31500bce6a0bbeeaf9a924f94 100644 (file)
 
 */
 
+#ifndef LIBDCP_REEL_H
+#define LIBDCP_REEL_H
+
 #include <list>
 #include <boost/shared_ptr.hpp>
+#include <boost/function.hpp>
+#include <libxml++/libxml++.h>
+#include "key.h"
 #include "types.h"
 
-namespace libdcp {
+namespace xmlpp {
+       class Node;
+}
+
+namespace dcp {
 
-class PictureAsset;
-class SoundAsset;      
-class SubtitleAsset;   
+class PictureMXF;
+class SoundMXF;
+class SubtitleAsset;
+class KDM;     
 
+/** @brief A reel within a DCP; the part which actually contains picture, sound and subtitle data */   
 class Reel
 {
 public:
        Reel (
-               boost::shared_ptr<const PictureAsset> picture,
-               boost::shared_ptr<const SoundAsset> sound,
-               boost::shared_ptr<const SubtitleAsset> subtitle
+               boost::shared_ptr<PictureMXF> picture,
+               boost::shared_ptr<SoundMXF> sound,
+               boost::shared_ptr<SubtitleAsset> subtitle
                )
                : _main_picture (picture)
                , _main_sound (sound)
                , _main_subtitle (subtitle)
        {}
        
-       boost::shared_ptr<const PictureAsset> main_picture () const {
+       boost::shared_ptr<const PictureMXF> main_picture () const {
                return _main_picture;
        }
 
-       boost::shared_ptr<const SoundAsset> main_sound () const {
+       boost::shared_ptr<const SoundMXF> main_sound () const {
                return _main_sound;
        }
        
@@ -52,14 +64,22 @@ public:
                return _main_subtitle;
        }
 
-       void write_to_cpl (std::ostream & s) const;
+       void write_to_cpl (xmlpp::Element *) const;
 
-       std::list<std::string> equals (boost::shared_ptr<const Reel> other, EqualityOptions opt) const;
+       bool encrypted () const;
+
+       void set_mxf_keys (dcp::Key);
+       
+       bool equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> notes) const;
+
+       void add_kdm (KDM const &);
 
 private:
-       boost::shared_ptr<const PictureAsset> _main_picture;
-       boost::shared_ptr<const SoundAsset> _main_sound;
-       boost::shared_ptr<const SubtitleAsset> _main_subtitle;
+       boost::shared_ptr<PictureMXF> _main_picture;
+       boost::shared_ptr<SoundMXF> _main_sound;
+       boost::shared_ptr<SubtitleAsset> _main_subtitle;
 };
 
 }
+
+#endif