Forward-port raw_convert precision parameter from v0.
[libdcp.git] / src / mono_picture_mxf.cc
index e33454dc0cdd5045d5caaca5a4ff6bfadc9e6fb0..815d88207c34022fa1f25460aef1cf23049e8963 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 2012-2013 Carl Hetherington <cth@carlh.net>
+    Copyright (C) 2012-2014 Carl Hetherington <cth@carlh.net>
 
     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
 #include "KM_fileio.h"
 #include "exceptions.h"
 #include "mono_picture_frame.h"
+#include "compose.hpp"
 
 using std::string;
 using std::vector;
 using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
-using boost::lexical_cast;
 using namespace dcp;
 
 MonoPictureMXF::MonoPictureMXF (boost::filesystem::path file)
@@ -46,6 +46,13 @@ MonoPictureMXF::MonoPictureMXF (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);
 }
 
 MonoPictureMXF::MonoPictureMXF (Fraction edit_rate)
@@ -100,7 +107,7 @@ MonoPictureMXF::equals (shared_ptr<const Content> other, EqualityOptions opt, bo
                        return false;
                }
                
-               note (PROGRESS, "Comparing video frame " + lexical_cast<string> (i) + " of " + lexical_cast<string> (_intrinsic_duration));
+               note (DCP_PROGRESS, String::compose ("Comparing video frame %1 of %2", i, _intrinsic_duration));
                shared_ptr<const MonoPictureFrame> frame_A = get_frame (i);
                shared_ptr<const MonoPictureFrame> frame_B = other_picture->get_frame (i);
                
@@ -128,9 +135,3 @@ MonoPictureMXF::cpl_node_name () const
 {
        return "MainPicture";
 }
-
-int
-MonoPictureMXF::edit_rate_factor () const
-{
-       return 1;
-}