Try to add basic decryption support to dcpdiff.
[libdcp.git] / src / stereo_picture_mxf.cc
index 6bcd75c89ad38e485d2341f06d7d6d476d528210..e68921e3f9e9a605b80011deab3104fd5b9b610a 100644 (file)
@@ -22,6 +22,7 @@
 #include "stereo_picture_frame.h"
 #include "exceptions.h"
 #include "stereo_picture_mxf_writer.h"
+#include "dcp_assert.h"
 
 using std::string;
 using std::pair;
@@ -45,6 +46,13 @@ StereoPictureMXF::StereoPictureMXF (boost::filesystem::path file)
        }
 
        read_picture_descriptor (desc);
+
+       ASDCP::WriterInfo info;
+       if (ASDCP_FAILURE (reader.FillWriterInfo (info))) {
+               boost::throw_exception (DCPReadError ("could not read video MXF information"));
+       }
+
+       read_writer_info (info);
 }
 
 StereoPictureMXF::StereoPictureMXF (Fraction edit_rate)
@@ -67,7 +75,7 @@ StereoPictureMXF::start_write (boost::filesystem::path file, Standard standard,
 }
 
 bool
-StereoPictureMXF::equals (shared_ptr<const Content> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+StereoPictureMXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
 {
        if (!MXF::equals (other, opt, note)) {
                return false;
@@ -99,7 +107,7 @@ StereoPictureMXF::equals (shared_ptr<const Content> other, EqualityOptions opt,
        }
        
        shared_ptr<const StereoPictureMXF> other_picture = dynamic_pointer_cast<const StereoPictureMXF> (other);
-       assert (other_picture);
+       DCP_ASSERT (other_picture);
 
        for (int i = 0; i < _intrinsic_duration; ++i) {
                shared_ptr<const StereoPictureFrame> frame_A = get_frame (i);