summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-03-15 17:49:40 +0000
committerCarl Hetherington <cth@carlh.net>2014-03-15 17:49:40 +0000
commit6e72e1d36f23a4236c4677f22792a6a4590943a3 (patch)
tree7a205cfb00d3c9bd0f74cd8003aaef19bdd558fc /src
parent57d6bed6141838329b1039ab52c66cc98273af91 (diff)
Clean up OS X build slightly. Better error on failure of xmlSecDSigCtxSign.
Diffstat (limited to 'src')
-rw-r--r--src/asset.cc13
-rw-r--r--src/asset.h2
-rw-r--r--src/picture_asset.h2
-rw-r--r--src/signer.cc6
-rw-r--r--src/stereo_picture_frame.h2
5 files changed, 14 insertions, 11 deletions
diff --git a/src/asset.cc b/src/asset.cc
index d51b78fd..4ad29dde 100644
--- a/src/asset.cc
+++ b/src/asset.cc
@@ -33,8 +33,9 @@
#include "metadata.h"
#include "compose.hpp"
-using namespace std;
-using namespace boost;
+using std::string;
+using boost::shared_ptr;
+using boost::lexical_cast;
using namespace libdcp;
Asset::Asset (boost::filesystem::path directory, boost::filesystem::path file_name)
@@ -58,7 +59,7 @@ Asset::write_to_pkl (xmlpp::Node* node, bool interop) const
asset->add_child("Id")->add_child_text ("urn:uuid:" + _uuid);
asset->add_child("AnnotationText")->add_child_text (_file_name.string ());
asset->add_child("Hash")->add_child_text (digest ());
- asset->add_child("Size")->add_child_text (lexical_cast<string> (filesystem::file_size(path())));
+ asset->add_child("Size")->add_child_text (lexical_cast<string> (boost::filesystem::file_size(path())));
if (interop) {
asset->add_child("Type")->add_child_text (String::compose ("application/x-smpte-mxf;asdcpKind=%1", asdcp_kind ()));
} else {
@@ -76,13 +77,13 @@ Asset::write_to_assetmap (xmlpp::Node* node) const
chunk->add_child("Path")->add_child_text (_file_name.string ());
chunk->add_child("VolumeIndex")->add_child_text ("1");
chunk->add_child("Offset")->add_child_text ("0");
- chunk->add_child("Length")->add_child_text (lexical_cast<string> (filesystem::file_size(path())));
+ chunk->add_child("Length")->add_child_text (lexical_cast<string> (boost::filesystem::file_size(path())));
}
-filesystem::path
+boost::filesystem::path
Asset::path () const
{
- filesystem::path p;
+ boost::filesystem::path p;
p /= _directory;
p /= _file_name;
return p;
diff --git a/src/asset.h b/src/asset.h
index 773e3d48..6db8e5c2 100644
--- a/src/asset.h
+++ b/src/asset.h
@@ -32,7 +32,7 @@
#include "types.h"
namespace ASDCP {
- class WriterInfo;
+ struct WriterInfo;
}
namespace xmlpp {
diff --git a/src/picture_asset.h b/src/picture_asset.h
index c09808e2..b404abd2 100644
--- a/src/picture_asset.h
+++ b/src/picture_asset.h
@@ -31,7 +31,7 @@
namespace ASDCP {
namespace JP2K {
- class PictureDescriptor;
+ struct PictureDescriptor;
}
}
diff --git a/src/signer.cc b/src/signer.cc
index 63da8d8e..11cf5eb8 100644
--- a/src/signer.cc
+++ b/src/signer.cc
@@ -25,6 +25,7 @@
#include <libcxml/cxml.h>
#include "signer.h"
#include "exceptions.h"
+#include "compose.hpp"
using std::string;
using std::list;
@@ -107,8 +108,9 @@ Signer::add_signature_value (xmlpp::Node* parent, string ns) const
throw MiscError ("could not set key name");
}
- if (xmlSecDSigCtxSign (signature_context, parent->cobj ()) < 0) {
- throw MiscError ("could not sign");
+ int const r = xmlSecDSigCtxSign (signature_context, parent->cobj ());
+ if (r < 0) {
+ throw MiscError (String::compose ("could not sign (%1)", r));
}
xmlSecDSigCtxDestroy (signature_context);
diff --git a/src/stereo_picture_frame.h b/src/stereo_picture_frame.h
index ab99ceac..878f6ab4 100644
--- a/src/stereo_picture_frame.h
+++ b/src/stereo_picture_frame.h
@@ -24,7 +24,7 @@
namespace ASDCP {
namespace JP2K {
- class SFrameBuffer;
+ struct SFrameBuffer;
}
class AESDecContext;
}