Header guards.
[libdcp.git] / src / picture_asset.h
index 2041abb3f2d00141562fbb650e853c103b944b77..cc99ddbcbe0ea592d89000fee51a7958c44114c5 100644 (file)
@@ -57,19 +57,16 @@ public:
         *  @param intrinsic_duration Duration of all the frames in the asset.
         *  @param size Size of video frame images in pixels.
         */
-       PictureAsset (std::string directory, std::string mxf_name, boost::signals2::signal<void (float)>* progress, int fps, int intrinsic_duration, Size size);
+       PictureAsset (std::string directory, std::string mxf_name, boost::signals2::signal<void (float)>* progress, int fps, int intrinsic_duration, bool encrypted, Size);
        
-       /** Write details of this asset to a CPL stream.
-        *  @param s Stream.
-        */
-       void write_to_cpl (std::ostream& s) const;
-
        bool equals (boost::shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> note) const;
 
        Size size () const {
                return _size;
        }
 
+       void write_to_cpl (xmlpp::Node *) const;
+
 protected:     
 
        bool frame_buffer_equals (
@@ -79,6 +76,10 @@ protected:
 
        /** picture size in pixels */
        Size _size;
+
+private:
+       std::string key_type () const;
+       std::string cpl_node_name () const;
 };
 
 class MonoPictureAsset;
@@ -158,6 +159,7 @@ public:
         *  @param fps Video frames per second.
         *  @param intrinsic_duration Length of the whole asset in frames.
         *  @param size Size of images in pixels.
+        *  @param encrypted true if asset should be encrypted.
         */
        MonoPictureAsset (
                std::vector<std::string> const & files,
@@ -166,6 +168,7 @@ public:
                boost::signals2::signal<void (float)>* progress,
                int fps,
                int intrinsic_duration,
+               bool encrypted,
                Size size,
                MXFMetadata const & metadata = MXFMetadata ()
                );
@@ -180,6 +183,7 @@ public:
         *  @param fps Video frames per second.
         *  @param intrinsic_duration Length of the whole asset in frames.
         *  @param size Size of images in pixels.
+        *  @param encrypted true if asset should be encrypted.
         */
        MonoPictureAsset (
                boost::function<std::string (int)> get_path,
@@ -188,6 +192,7 @@ public:
                boost::signals2::signal<void (float)>* progress,
                int fps,
                int intrinsic_duration,
+               bool encrypted,
                Size size,
                MXFMetadata const & metadata = MXFMetadata ()
                );