Bump asdcplib to dcpomatic-2.13.0 branch.
[libdcp.git] / src / stereo_picture_asset.cc
index cf07c6be6eaed472972177eb8da8a4d6ce5a3b5f..687d8572aab3dfddedfd7d3f22a16be59d1d993f 100644 (file)
  */
 
 
-#include "stereo_picture_asset.h"
-#include "stereo_picture_frame.h"
+#include "dcp_assert.h"
+#include "equality_options.h"
 #include "exceptions.h"
-#include "stereo_picture_asset_writer.h"
+#include "filesystem.h"
+#include "stereo_picture_asset.h"
 #include "stereo_picture_asset_reader.h"
-#include "dcp_assert.h"
+#include "stereo_picture_asset_writer.h"
+#include "stereo_picture_frame.h"
 #include <asdcp/AS_DCP.h>
 
 
@@ -57,8 +59,9 @@ using namespace dcp;
 StereoPictureAsset::StereoPictureAsset (boost::filesystem::path file)
        : PictureAsset (file)
 {
-       ASDCP::JP2K::MXFSReader reader;
-       auto r = reader.OpenRead (file.string().c_str());
+       Kumu::FileReaderFactory factory;
+       ASDCP::JP2K::MXFSReader reader(factory);
+       auto r = reader.OpenRead(dcp::filesystem::fix_long_path(file).string().c_str());
        if (ASDCP_FAILURE(r)) {
                boost::throw_exception (MXFFileError("could not open MXF file for reading", file.string(), r));
        }
@@ -101,18 +104,19 @@ StereoPictureAsset::start_read () const
 
 
 bool
-StereoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
+StereoPictureAsset::equals(shared_ptr<const Asset> other, EqualityOptions const& opt, NoteHandler note) const
 {
-       ASDCP::JP2K::MXFSReader reader_A;
+       Kumu::FileReaderFactory factory;
+       ASDCP::JP2K::MXFSReader reader_A(factory);
        DCP_ASSERT (file());
-       auto r = reader_A.OpenRead (file()->string().c_str());
+       auto r = reader_A.OpenRead(dcp::filesystem::fix_long_path(*file()).string().c_str());
        if (ASDCP_FAILURE (r)) {
                boost::throw_exception (MXFFileError ("could not open MXF file for reading", file()->string(), r));
        }
 
-       ASDCP::JP2K::MXFSReader reader_B;
+       ASDCP::JP2K::MXFSReader reader_B(factory);
        DCP_ASSERT (other->file());
-       r = reader_B.OpenRead (other->file()->string().c_str());
+       r = reader_B.OpenRead(dcp::filesystem::fix_long_path(*other->file()).string().c_str());
        if (ASDCP_FAILURE (r)) {
                boost::throw_exception (MXFFileError ("could not open MXF file for reading", other->file()->string(), r));
        }