summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-10-08 22:29:16 +0100
committerCarl Hetherington <cth@carlh.net>2013-10-08 22:29:16 +0100
commit259113a96dc9dfbef0b26ff2e142ee673abcd53d (patch)
tree8d96acab6c55a33d58d70d83bf45cbaad4d6ee78
parente5151fad94eb86a6aa1d408e2e5eb2706ff41884 (diff)
parentcccca6f650b4f5dc61a3c992c9c515b064e0704c (diff)
Merge branch 'master' of ssh://carlh.dyndns.org/home/carl/git/libdcp
-rw-r--r--src/certificates.cc2
-rw-r--r--src/dcp_time.h2
-rw-r--r--src/mono_picture_asset.cc6
-rw-r--r--src/mono_picture_frame.cc4
-rw-r--r--src/mono_picture_frame.h2
-rw-r--r--src/signer.cc2
-rw-r--r--src/sound_asset.cc4
-rw-r--r--src/stereo_picture_frame.cc4
-rw-r--r--src/stereo_picture_frame.h2
-rw-r--r--test/kdm_test.cc4
10 files changed, 19 insertions, 13 deletions
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);
}
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 <stdint.h>
+
namespace libdcp {
/** @class Time
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<boost::filesystem::path (int)> 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<boost::filesystem::path (int)> 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<boost::filesystem::path> const &
shared_ptr<const MonoPictureFrame>
MonoPictureAsset::get_frame (int n) const
{
- return shared_ptr<const MonoPictureFrame> (new MonoPictureFrame (path().string(), n, _decryption_context));
+ return shared_ptr<const MonoPictureFrame> (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<ARGBFrame> argb_frame (int reduce = 0, float srgb_gamma = 2.4) const;
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);
}
diff --git a/src/sound_asset.cc b/src/sound_asset.cc
index ec82752c..8f666ee6 100644
--- a/src/sound_asset.cc
+++ b/src/sound_asset.cc
@@ -91,7 +91,7 @@ SoundAsset::create (boost::function<boost::filesystem::path (Channel)> 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)));
}
@@ -123,7 +123,7 @@ SoundAsset::create (boost::function<boost::filesystem::path (Channel)> 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));
}
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<ARGBFrame> argb_frame (Eye eye, int reduce = 0, float srgb_gamma = 2.4) const;
diff --git a/test/kdm_test.cc b/test/kdm_test.cc
index a1ea0ec4..0f0db031 100644
--- a/test/kdm_test.cc
+++ b/test/kdm_test.cc
@@ -61,5 +61,9 @@ BOOST_AUTO_TEST_CASE (kdm_passthrough_test)
"xmldiff -c test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml build/kdm.xml"
);
+#ifdef LIBDCP_WINDOWS
+ BOOST_CHECK_EQUAL (r, 0);
+#else
BOOST_CHECK_EQUAL (WEXITSTATUS (r), 0);
+#endif
}