From 259da4fa739f6f8a551a20e6285b2966a5d1e8c0 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 3 Oct 2013 13:37:29 +0100 Subject: Try to fix build on windows. --- src/certificates.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/certificates.cc b/src/certificates.cc index f23dbc5d..818d5f72 100644 --- a/src/certificates.cc +++ b/src/certificates.cc @@ -49,7 +49,7 @@ Certificate::Certificate (boost::filesystem::path filename) : _certificate (0) , _public_key (0) { - FILE* f = fopen (filename.c_str(), "r"); + FILE* f = fopen (filename.string().c_str(), "r"); if (!f) { throw FileError ("could not open file", filename); } -- cgit v1.2.3 From 36b2009f89fdde05d2c9b8b44aa2bf8fe3b555cb Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 4 Oct 2013 11:01:35 +0100 Subject: More boost::filesystem jibber jabber. --- src/mono_picture_asset.cc | 6 +++--- src/mono_picture_frame.cc | 4 ++-- src/mono_picture_frame.h | 2 +- src/stereo_picture_frame.cc | 4 ++-- src/stereo_picture_frame.h | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src') diff --git a/src/mono_picture_asset.cc b/src/mono_picture_asset.cc index 7830d829..81508065 100644 --- a/src/mono_picture_asset.cc +++ b/src/mono_picture_asset.cc @@ -48,7 +48,7 @@ MonoPictureAsset::create (boost::function get_pat { ASDCP::JP2K::CodestreamParser j2k_parser; ASDCP::JP2K::FrameBuffer frame_buffer (4 * Kumu::Megabyte); - if (ASDCP_FAILURE (j2k_parser.OpenReadFrame (get_path(0).c_str(), frame_buffer))) { + if (ASDCP_FAILURE (j2k_parser.OpenReadFrame (get_path(0).string().c_str(), frame_buffer))) { boost::throw_exception (FileError ("could not open JPEG2000 file for reading", get_path (0))); } @@ -68,7 +68,7 @@ MonoPictureAsset::create (boost::function get_pat boost::filesystem::path const path = get_path (i); - if (ASDCP_FAILURE (j2k_parser.OpenReadFrame (path.c_str(), frame_buffer))) { + if (ASDCP_FAILURE (j2k_parser.OpenReadFrame (path.string().c_str(), frame_buffer))) { boost::throw_exception (FileError ("could not open JPEG2000 file for reading", path)); } @@ -115,7 +115,7 @@ MonoPictureAsset::path_from_list (int f, vector const & shared_ptr MonoPictureAsset::get_frame (int n) const { - return shared_ptr (new MonoPictureFrame (path().string(), n, _decryption_context)); + return shared_ptr (new MonoPictureFrame (path(), n, _decryption_context)); } bool diff --git a/src/mono_picture_frame.cc b/src/mono_picture_frame.cc index 474b0715..04f2efd7 100644 --- a/src/mono_picture_frame.cc +++ b/src/mono_picture_frame.cc @@ -38,10 +38,10 @@ using namespace libdcp; * @param mxf_path Path to the asset's MXF file. * @param n Frame within the asset, not taking EntryPoint into account. */ -MonoPictureFrame::MonoPictureFrame (string mxf_path, int n, ASDCP::AESDecContext* c) +MonoPictureFrame::MonoPictureFrame (boost::filesystem::path mxf_path, int n, ASDCP::AESDecContext* c) { ASDCP::JP2K::MXFReader reader; - if (ASDCP_FAILURE (reader.OpenRead (mxf_path.c_str()))) { + if (ASDCP_FAILURE (reader.OpenRead (mxf_path.string().c_str()))) { boost::throw_exception (FileError ("could not open MXF file for reading", mxf_path)); } diff --git a/src/mono_picture_frame.h b/src/mono_picture_frame.h index 83b80c5c..0eedfb95 100644 --- a/src/mono_picture_frame.h +++ b/src/mono_picture_frame.h @@ -37,7 +37,7 @@ class ARGBFrame; class MonoPictureFrame { public: - MonoPictureFrame (std::string mxf_path, int n, ASDCP::AESDecContext *); + MonoPictureFrame (boost::filesystem::path mxf_path, int n, ASDCP::AESDecContext *); ~MonoPictureFrame (); boost::shared_ptr argb_frame (int reduce = 0, float srgb_gamma = 2.4) const; diff --git a/src/stereo_picture_frame.cc b/src/stereo_picture_frame.cc index 279fe7a0..6af79033 100644 --- a/src/stereo_picture_frame.cc +++ b/src/stereo_picture_frame.cc @@ -38,10 +38,10 @@ using namespace libdcp; * @param mxf_path Path to the asset's MXF file. * @param n Frame within the asset, not taking EntryPoint into account. */ -StereoPictureFrame::StereoPictureFrame (string mxf_path, int n) +StereoPictureFrame::StereoPictureFrame (boost::filesystem::path mxf_path, int n) { ASDCP::JP2K::MXFSReader reader; - if (ASDCP_FAILURE (reader.OpenRead (mxf_path.c_str()))) { + if (ASDCP_FAILURE (reader.OpenRead (mxf_path.string().c_str()))) { boost::throw_exception (FileError ("could not open MXF file for reading", mxf_path)); } diff --git a/src/stereo_picture_frame.h b/src/stereo_picture_frame.h index b72eabc9..ab99ceac 100644 --- a/src/stereo_picture_frame.h +++ b/src/stereo_picture_frame.h @@ -37,7 +37,7 @@ class ARGBFrame; class StereoPictureFrame { public: - StereoPictureFrame (std::string mxf_path, int n); + StereoPictureFrame (boost::filesystem::path mxf_path, int n); ~StereoPictureFrame (); boost::shared_ptr argb_frame (Eye eye, int reduce = 0, float srgb_gamma = 2.4) const; -- cgit v1.2.3 From cb27a92a9c63f8782e8c3bfd4084cebcf58ababe Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 4 Oct 2013 11:10:15 +0100 Subject: filesystem::path. --- src/signer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/signer.cc b/src/signer.cc index f15f5325..e144edf3 100644 --- a/src/signer.cc +++ b/src/signer.cc @@ -97,7 +97,7 @@ Signer::add_signature_value (xmlpp::Node* parent, string ns) const throw MiscError ("could not create signature context"); } - signature_context->signKey = xmlSecCryptoAppKeyLoad (_key.c_str(), xmlSecKeyDataFormatPem, 0, 0, 0); + signature_context->signKey = xmlSecCryptoAppKeyLoad (_key.string().c_str(), xmlSecKeyDataFormatPem, 0, 0, 0); if (signature_context->signKey == 0) { throw FileError ("could not load private key file", _key); } -- cgit v1.2.3 From 8a1887908c66d7d8f7107e5d2f26019548aa1fd3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 4 Oct 2013 11:20:48 +0100 Subject: boost::filesystem. --- src/sound_asset.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sound_asset.cc b/src/sound_asset.cc index ec82752c..88f9a0fb 100644 --- a/src/sound_asset.cc +++ b/src/sound_asset.cc @@ -123,7 +123,7 @@ SoundAsset::create (boost::function get_path) boost::filesystem::path const path = get_path (channels[i]); - if (ASDCP_FAILURE (pcm_parser_channel[i].OpenRead (path.c_str(), asdcp_edit_rate))) { + if (ASDCP_FAILURE (pcm_parser_channel[i].OpenRead (path.string().c_str(), asdcp_edit_rate))) { boost::throw_exception (FileError ("could not open WAV file for reading", path)); } -- cgit v1.2.3 From d5447f49de58b5ec8b97d09d10aa3a1ac8470ec8 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 4 Oct 2013 11:31:21 +0100 Subject: boost::filesystem. --- src/sound_asset.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/sound_asset.cc b/src/sound_asset.cc index 88f9a0fb..8f666ee6 100644 --- a/src/sound_asset.cc +++ b/src/sound_asset.cc @@ -91,7 +91,7 @@ SoundAsset::create (boost::function get_path) assert (_channels > 0); ASDCP::PCM::WAVParser pcm_parser_channel[_channels]; - if (pcm_parser_channel[0].OpenRead (get_path(LEFT).c_str(), asdcp_edit_rate)) { + if (pcm_parser_channel[0].OpenRead (get_path(LEFT).string().c_str(), asdcp_edit_rate)) { boost::throw_exception (FileError ("could not open WAV file for reading", get_path(LEFT))); } -- cgit v1.2.3 From e80df6ca95b57a45ec912b36425f282058cf3ce6 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 4 Oct 2013 11:44:36 +0100 Subject: Missing include. --- src/dcp_time.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src') diff --git a/src/dcp_time.h b/src/dcp_time.h index 1b73e3e8..c36d174c 100644 --- a/src/dcp_time.h +++ b/src/dcp_time.h @@ -24,6 +24,8 @@ #ifndef LIBDCP_TIME_H #define LIBDCP_TIME_H +#include + namespace libdcp { /** @class Time -- cgit v1.2.3