#include "dcp_assert.h"
#include "equality_options.h"
#include "exceptions.h"
+#include "filesystem.h"
#include "sound_asset.h"
#include "sound_asset_reader.h"
#include "sound_asset_writer.h"
SoundAsset::SoundAsset (boost::filesystem::path file)
: Asset (file)
{
- ASDCP::PCM::MXFReader reader;
- auto r = reader.OpenRead (file.string().c_str());
+ Kumu::FileReaderFactory factory;
+ ASDCP::PCM::MXFReader 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));
}
return true;
}
- ASDCP::PCM::MXFReader reader_A;
+ Kumu::FileReaderFactory factory;
+ ASDCP::PCM::MXFReader 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::PCM::MXFReader reader_B;
- r = reader_B.OpenRead (other->file()->string().c_str());
+ ASDCP::PCM::MXFReader reader_B(factory);
+ 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));
}
bool
SoundAsset::valid_mxf (boost::filesystem::path file)
{
- ASDCP::PCM::MXFReader reader;
- Kumu::Result_t r = reader.OpenRead (file.string().c_str());
+ Kumu::FileReaderFactory factory;
+ ASDCP::PCM::MXFReader reader(factory);
+ Kumu::Result_t r = reader.OpenRead(dcp::filesystem::fix_long_path(file).string().c_str());
return !ASDCP_FAILURE (r);
}