summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2024-03-20 23:21:25 +0100
committerCarl Hetherington <cth@carlh.net>2024-03-22 15:18:55 +0100
commitcb4759c178e3229796e8139f3f21a230532a7499 (patch)
tree7f830bb20a41a24ec0bc85e1775569dbc98402aa /src
parentd27d0f88a526cfe55e6018f9f32d54d5b61fc634 (diff)
Bump asdcplib to dcpomatic-2.13.0 branch.v1.9.4
Diffstat (limited to 'src')
-rw-r--r--src/asset_factory.cc3
-rw-r--r--src/asset_reader.h3
-rw-r--r--src/atmos_asset.cc4
-rw-r--r--src/mono_picture_asset.cc8
-rw-r--r--src/smpte_subtitle_asset.cc9
-rw-r--r--src/sound_asset.cc11
-rw-r--r--src/stereo_picture_asset.cc8
-rw-r--r--src/wscript4
8 files changed, 32 insertions, 18 deletions
diff --git a/src/asset_factory.cc b/src/asset_factory.cc
index be4f6b49..9eb42c8b 100644
--- a/src/asset_factory.cc
+++ b/src/asset_factory.cc
@@ -61,7 +61,8 @@ dcp::asset_factory (boost::filesystem::path path, bool ignore_incorrect_picture_
*/
ASDCP::EssenceType_t type;
- auto const result = ASDCP::EssenceType(dcp::filesystem::fix_long_path(path).string().c_str(), type);
+ Kumu::FileReaderFactory factory;
+ auto const result = ASDCP::EssenceType(dcp::filesystem::fix_long_path(path).string().c_str(), type, factory);
if (!ASDCP_SUCCESS(result)) {
throw ReadError(String::compose("Could not find essence type (%1)", result.Message()), path.string());
}
diff --git a/src/asset_reader.h b/src/asset_reader.h
index c8953e09..aa815745 100644
--- a/src/asset_reader.h
+++ b/src/asset_reader.h
@@ -97,7 +97,8 @@ private:
explicit AssetReader (Asset const * asset, boost::optional<Key> key, Standard standard)
: _crypto_context (new DecryptionContext(key, standard))
{
- _reader = new R ();
+ Kumu::FileReaderFactory factory;
+ _reader = new R(factory);
DCP_ASSERT (asset->file());
auto const r = _reader->OpenRead(dcp::filesystem::fix_long_path(*asset->file()).string().c_str());
if (ASDCP_FAILURE(r)) {
diff --git a/src/atmos_asset.cc b/src/atmos_asset.cc
index 42a0774e..09a22c1e 100644
--- a/src/atmos_asset.cc
+++ b/src/atmos_asset.cc
@@ -42,6 +42,7 @@
#include "atmos_asset_writer.h"
#include "exceptions.h"
#include <asdcp/AS_DCP.h>
+#include <asdcp/KM_fileio.h>
using std::string;
@@ -67,7 +68,8 @@ AtmosAsset::AtmosAsset (boost::filesystem::path file)
: Asset (file)
, MXF (Standard::SMPTE)
{
- ASDCP::ATMOS::MXFReader reader;
+ Kumu::FileReaderFactory factory;
+ ASDCP::ATMOS::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));
diff --git a/src/mono_picture_asset.cc b/src/mono_picture_asset.cc
index a72fd7d4..9a0beb42 100644
--- a/src/mono_picture_asset.cc
+++ b/src/mono_picture_asset.cc
@@ -66,7 +66,8 @@ using namespace dcp;
MonoPictureAsset::MonoPictureAsset (boost::filesystem::path file)
: PictureAsset (file)
{
- ASDCP::JP2K::MXFReader reader;
+ Kumu::FileReaderFactory factory;
+ ASDCP::JP2K::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));
@@ -109,14 +110,15 @@ MonoPictureAsset::equals(shared_ptr<const Asset> other, EqualityOptions const& o
return false;
}
- ASDCP::JP2K::MXFReader reader_A;
+ Kumu::FileReaderFactory factory;
+ ASDCP::JP2K::MXFReader reader_A(factory);
DCP_ASSERT (_file);
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;
+ ASDCP::JP2K::MXFReader reader_B(factory);
DCP_ASSERT (other->file ());
r = reader_B.OpenRead(dcp::filesystem::fix_long_path(*other->file()).string().c_str());
if (ASDCP_FAILURE (r)) {
diff --git a/src/smpte_subtitle_asset.cc b/src/smpte_subtitle_asset.cc
index 06c91c0b..4f611583 100644
--- a/src/smpte_subtitle_asset.cc
+++ b/src/smpte_subtitle_asset.cc
@@ -95,7 +95,8 @@ SMPTESubtitleAsset::SMPTESubtitleAsset (boost::filesystem::path file)
{
auto xml = make_shared<cxml::Document>("SubtitleReel");
- auto reader = make_shared<ASDCP::TimedText::MXFReader>();
+ Kumu::FileReaderFactory factory;
+ auto reader = make_shared<ASDCP::TimedText::MXFReader>(factory);
auto r = Kumu::RESULT_OK;
{
ASDCPErrorSuspender sus;
@@ -320,7 +321,8 @@ SMPTESubtitleAsset::set_key (Key key)
/* Our data was encrypted; now we can decrypt it */
- auto reader = make_shared<ASDCP::TimedText::MXFReader>();
+ Kumu::FileReaderFactory factory;
+ auto reader = make_shared<ASDCP::TimedText::MXFReader>(factory);
auto r = reader->OpenRead(dcp::filesystem::fix_long_path(*_file).string().c_str());
if (ASDCP_FAILURE (r)) {
boost::throw_exception (
@@ -354,7 +356,8 @@ SMPTESubtitleAsset::load_font_nodes () const
bool
SMPTESubtitleAsset::valid_mxf (boost::filesystem::path file)
{
- ASDCP::TimedText::MXFReader reader;
+ Kumu::FileReaderFactory factory;
+ ASDCP::TimedText::MXFReader reader(factory);
Kumu::DefaultLogSink().UnsetFilterFlag(Kumu::LOG_ALLOW_ALL);
auto r = reader.OpenRead(dcp::filesystem::fix_long_path(file).string().c_str());
Kumu::DefaultLogSink().SetFilterFlag(Kumu::LOG_ALLOW_ALL);
diff --git a/src/sound_asset.cc b/src/sound_asset.cc
index 0ceba53d..90075278 100644
--- a/src/sound_asset.cc
+++ b/src/sound_asset.cc
@@ -70,7 +70,8 @@ using namespace dcp;
SoundAsset::SoundAsset (boost::filesystem::path file)
: Asset (file)
{
- ASDCP::PCM::MXFReader reader;
+ 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));
@@ -138,14 +139,15 @@ SoundAsset::equals(shared_ptr<const Asset> other, EqualityOptions const& opt, No
return true;
}
- ASDCP::PCM::MXFReader reader_A;
+ Kumu::FileReaderFactory factory;
+ ASDCP::PCM::MXFReader reader_A(factory);
DCP_ASSERT (file());
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;
+ 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));
@@ -278,7 +280,8 @@ SoundAsset::static_pkl_type (Standard standard)
bool
SoundAsset::valid_mxf (boost::filesystem::path file)
{
- ASDCP::PCM::MXFReader reader;
+ 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);
}
diff --git a/src/stereo_picture_asset.cc b/src/stereo_picture_asset.cc
index 2ce3cdc9..687d8572 100644
--- a/src/stereo_picture_asset.cc
+++ b/src/stereo_picture_asset.cc
@@ -59,7 +59,8 @@ using namespace dcp;
StereoPictureAsset::StereoPictureAsset (boost::filesystem::path file)
: PictureAsset (file)
{
- ASDCP::JP2K::MXFSReader reader;
+ 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));
@@ -105,14 +106,15 @@ StereoPictureAsset::start_read () const
bool
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(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(dcp::filesystem::fix_long_path(*other->file()).string().c_str());
if (ASDCP_FAILURE (r)) {
diff --git a/src/wscript b/src/wscript
index c2d499c8..29eb37ab 100644
--- a/src/wscript
+++ b/src/wscript
@@ -244,7 +244,7 @@ def build(bld):
obj.name = 'libdcp%s' % bld.env.API_VERSION
obj.target = 'dcp%s' % bld.env.API_VERSION
obj.export_includes = ['.']
- obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_CTH XERCES'
+ obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_DCPOMATIC XERCES'
obj.source = source
# Library for gcov
@@ -256,7 +256,7 @@ def build(bld):
obj.name = 'libdcp%s_gcov' % bld.env.API_VERSION
obj.target = 'dcp%s_gcov' % bld.env.API_VERSION
obj.export_includes = ['.']
- obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_CTH XERCES'
+ obj.uselib = 'BOOST_FILESYSTEM BOOST_SIGNALS2 BOOST_DATETIME OPENSSL SIGC++ LIBXML++ OPENJPEG CXML XMLSEC1 ASDCPLIB_DCPOMATIC XERCES'
obj.use = 'libkumu-libdcp%s libasdcp-libdcp%s' % (bld.env.API_VERSION, bld.env.API_VERSION)
obj.source = source
obj.cppflags = ['-fprofile-arcs', '-ftest-coverage', '-fno-inline', '-fno-default-inline', '-fno-elide-constructors', '-g', '-O0']