*/
-#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>
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));
}
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));
}