*/
+#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 <asdcp/AS_DCP.h>
#include <asdcp/KM_fileio.h>
: 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));
}
bool
-MonoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
+MonoPictureAsset::equals(shared_ptr<const Asset> other, EqualityOptions const& opt, NoteHandler note) const
{
if (!dynamic_pointer_cast<const MonoPictureAsset>(other)) {
return false;
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));
}
shared_ptr<PictureAssetWriter>
-MonoPictureAsset::start_write (boost::filesystem::path file, bool overwrite)
+MonoPictureAsset::start_write(boost::filesystem::path file, Behaviour behaviour)
{
/* Can't use make_shared here as the MonoPictureAssetWriter constructor is private */
- return shared_ptr<MonoPictureAssetWriter>(new MonoPictureAssetWriter(this, file, overwrite));
+ return shared_ptr<MonoPictureAssetWriter>(new MonoPictureAssetWriter(this, file, behaviour == Behaviour::OVERWRITE_EXISTING));
}
shared_ptr<MonoPictureAssetReader>