X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fmono_picture_asset.cc;h=a72fd7d47b3487065f0165391fd51cb21da16053;hb=8ca7ea422970b7a300399f274c68ac56e914bdcc;hp=cdfcb0df543efef7b762f8e82bf9af73ab2a2f4e;hpb=20e3e4c2a7a91e45740987a702f5d4c1ea2f9030;p=libdcp.git diff --git a/src/mono_picture_asset.cc b/src/mono_picture_asset.cc index cdfcb0df..a72fd7d4 100644 --- a/src/mono_picture_asset.cc +++ b/src/mono_picture_asset.cc @@ -37,24 +37,26 @@ */ +#include "compose.hpp" +#include "dcp_assert.h" +#include "equality_options.h" +#include "exceptions.h" +#include "filesystem.h" #include "mono_picture_asset.h" -#include "mono_picture_asset_writer.h" #include "mono_picture_asset_reader.h" -#include "exceptions.h" -#include "dcp_assert.h" +#include "mono_picture_asset_writer.h" #include "mono_picture_frame.h" -#include "compose.hpp" #include #include -using std::string; -using std::vector; +using std::dynamic_pointer_cast; using std::list; +using std::make_shared; using std::pair; using std::shared_ptr; -using std::dynamic_pointer_cast; -using std::make_shared; +using std::string; +using std::vector; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif @@ -65,7 +67,7 @@ MonoPictureAsset::MonoPictureAsset (boost::filesystem::path file) : PictureAsset (file) { ASDCP::JP2K::MXFReader reader; - auto r = reader.OpenRead (file.string().c_str()); + 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,7 +103,7 @@ storing_note_handler (list>& notes, NoteType t, string s) bool -MonoPictureAsset::equals (shared_ptr other, EqualityOptions opt, NoteHandler note) const +MonoPictureAsset::equals(shared_ptr other, EqualityOptions const& opt, NoteHandler note) const { if (!dynamic_pointer_cast(other)) { return false; @@ -109,14 +111,14 @@ MonoPictureAsset::equals (shared_ptr other, EqualityOptions opt, No ASDCP::JP2K::MXFReader reader_A; 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::MXFReader reader_B; 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)); }