summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/asset.cc2
-rw-r--r--src/asset.h2
-rw-r--r--src/cpl.cc2
-rw-r--r--src/cpl.h2
-rw-r--r--src/dcp.cc2
-rw-r--r--src/dcp.h2
-rw-r--r--src/interop_subtitle_content.cc3
-rw-r--r--src/interop_subtitle_content.h2
-rw-r--r--src/mono_picture_mxf.cc2
-rw-r--r--src/mono_picture_mxf.h2
-rw-r--r--src/mxf.cc2
-rw-r--r--src/mxf.h2
-rw-r--r--src/picture_mxf.cc4
-rw-r--r--src/picture_mxf.h4
-rw-r--r--src/reel.cc2
-rw-r--r--src/reel.h2
-rw-r--r--src/reel_asset.cc2
-rw-r--r--src/reel_asset.h2
-rw-r--r--src/reel_picture_asset.cc2
-rw-r--r--src/reel_picture_asset.h2
-rw-r--r--src/sound_mxf.cc2
-rw-r--r--src/sound_mxf.h2
-rw-r--r--src/stereo_picture_mxf.cc2
-rw-r--r--src/stereo_picture_mxf.h2
-rw-r--r--src/subtitle_content.cc3
-rw-r--r--src/subtitle_content.h2
-rw-r--r--src/types.h4
27 files changed, 32 insertions, 30 deletions
diff --git a/src/asset.cc b/src/asset.cc
index e2dcc0f6..7e60ecc5 100644
--- a/src/asset.cc
+++ b/src/asset.cc
@@ -94,7 +94,7 @@ Asset::hash (function<void (float)> progress) const
}
bool
-Asset::equals (boost::shared_ptr<const Asset> other, EqualityOptions, function<void (NoteType, string)> note) const
+Asset::equals (boost::shared_ptr<const Asset> other, EqualityOptions, NoteHandler note) const
{
if (_hash != other->_hash) {
note (DCP_ERROR, "Asset: hashes differ");
diff --git a/src/asset.h b/src/asset.h
index ea0efe49..2712dcb8 100644
--- a/src/asset.h
+++ b/src/asset.h
@@ -51,7 +51,7 @@ public:
virtual bool equals (
boost::shared_ptr<const Asset> other,
EqualityOptions opt,
- boost::function<void (NoteType, std::string)> note
+ NoteHandler note
) const;
/** Write details of the asset to a ASSETMAP.
diff --git a/src/cpl.cc b/src/cpl.cc
index b5b4d715..b0fc8d77 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -171,7 +171,7 @@ CPL::reel_assets () const
}
bool
-CPL::equals (shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+CPL::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
{
shared_ptr<const CPL> other_cpl = dynamic_pointer_cast<const CPL> (other);
if (!other_cpl) {
diff --git a/src/cpl.h b/src/cpl.h
index b85b0395..4993bcd5 100644
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -57,7 +57,7 @@ public:
bool equals (
boost::shared_ptr<const Asset> other,
EqualityOptions options,
- boost::function<void (NoteType, std::string)> note
+ NoteHandler note
) const;
void add (boost::shared_ptr<Reel> reel);
diff --git a/src/dcp.cc b/src/dcp.cc
index 589e3b3b..dd360edd 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -173,7 +173,7 @@ DCP::read (bool keep_going, ReadErrors* errors)
}
bool
-DCP::equals (DCP const & other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+DCP::equals (DCP const & other, EqualityOptions opt, NoteHandler note) const
{
list<shared_ptr<CPL> > a = cpls ();
list<shared_ptr<CPL> > b = other.cpls ();
diff --git a/src/dcp.h b/src/dcp.h
index a7dbf5eb..effadfa3 100644
--- a/src/dcp.h
+++ b/src/dcp.h
@@ -84,7 +84,7 @@ public:
* @param note Functor to handle notes made by the equality operation.
* @return true if the DCPs are equal according to EqualityOptions, otherwise false.
*/
- bool equals (DCP const & other, EqualityOptions options, boost::function<void (NoteType, std::string)> note) const;
+ bool equals (DCP const & other, EqualityOptions options, NoteHandler note) const;
void add (boost::shared_ptr<Asset> asset);
diff --git a/src/interop_subtitle_content.cc b/src/interop_subtitle_content.cc
index 45977d67..218dbaea 100644
--- a/src/interop_subtitle_content.cc
+++ b/src/interop_subtitle_content.cc
@@ -26,7 +26,6 @@
using std::list;
using std::string;
using boost::shared_ptr;
-using boost::function;
using boost::optional;
using boost::dynamic_pointer_cast;
using namespace dcp;
@@ -174,7 +173,7 @@ InteropSubtitleContent::add_font (string id, string uri)
}
bool
-InteropSubtitleContent::equals (shared_ptr<const Asset> other_asset, EqualityOptions options, function<void (NoteType, std::string)> note) const
+InteropSubtitleContent::equals (shared_ptr<const Asset> other_asset, EqualityOptions options, NoteHandler note) const
{
if (!SubtitleContent::equals (other_asset, options, note)) {
return false;
diff --git a/src/interop_subtitle_content.h b/src/interop_subtitle_content.h
index adb45c6b..98a4b599 100644
--- a/src/interop_subtitle_content.h
+++ b/src/interop_subtitle_content.h
@@ -33,7 +33,7 @@ public:
bool equals (
boost::shared_ptr<const Asset>,
EqualityOptions,
- boost::function<void (NoteType, std::string)> note
+ NoteHandler note
) const;
std::list<boost::shared_ptr<LoadFont> > load_font_nodes () const;
diff --git a/src/mono_picture_mxf.cc b/src/mono_picture_mxf.cc
index 57a0d0a9..4114f5ad 100644
--- a/src/mono_picture_mxf.cc
+++ b/src/mono_picture_mxf.cc
@@ -70,7 +70,7 @@ MonoPictureMXF::get_frame (int n) const
}
bool
-MonoPictureMXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+MonoPictureMXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
{
if (!dynamic_pointer_cast<const MonoPictureMXF> (other)) {
return false;
diff --git a/src/mono_picture_mxf.h b/src/mono_picture_mxf.h
index 01a6de3f..4e5211ca 100644
--- a/src/mono_picture_mxf.h
+++ b/src/mono_picture_mxf.h
@@ -48,7 +48,7 @@ public:
bool equals (
boost::shared_ptr<const Asset> other,
EqualityOptions opt,
- boost::function<void (NoteType, std::string)> note
+ NoteHandler note
) const;
boost::shared_ptr<const MonoPictureFrame> get_frame (int n) const;
diff --git a/src/mxf.cc b/src/mxf.cc
index 6707b638..442eb696 100644
--- a/src/mxf.cc
+++ b/src/mxf.cc
@@ -93,7 +93,7 @@ MXF::fill_writer_info (ASDCP::WriterInfo* writer_info, Standard standard)
}
bool
-MXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+MXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
{
if (!Content::equals (other, opt, note)) {
return false;
diff --git a/src/mxf.h b/src/mxf.h
index f7b94bd2..f0ad4bd8 100644
--- a/src/mxf.h
+++ b/src/mxf.h
@@ -52,7 +52,7 @@ public:
bool equals (
boost::shared_ptr<const Asset> other,
EqualityOptions opt,
- boost::function<void (NoteType, std::string)> note
+ NoteHandler note
) const;
/** Fill in a ADSCP::WriteInfo struct.
diff --git a/src/picture_mxf.cc b/src/picture_mxf.cc
index 1f863eb1..0991cd50 100644
--- a/src/picture_mxf.cc
+++ b/src/picture_mxf.cc
@@ -71,7 +71,7 @@ PictureMXF::read_picture_descriptor (ASDCP::JP2K::PictureDescriptor const & desc
bool
PictureMXF::descriptor_equals (
- ASDCP::JP2K::PictureDescriptor const & a, ASDCP::JP2K::PictureDescriptor const & b, boost::function<void (NoteType, string)> note
+ ASDCP::JP2K::PictureDescriptor const & a, ASDCP::JP2K::PictureDescriptor const & b, NoteHandler note
) const
{
if (
@@ -113,7 +113,7 @@ PictureMXF::descriptor_equals (
bool
PictureMXF::frame_buffer_equals (
- int frame, EqualityOptions opt, boost::function<void (NoteType, string)> note,
+ int frame, EqualityOptions opt, NoteHandler note,
uint8_t const * data_A, unsigned int size_A, uint8_t const * data_B, unsigned int size_B
) const
{
diff --git a/src/picture_mxf.h b/src/picture_mxf.h
index bf8fcf76..75119367 100644
--- a/src/picture_mxf.h
+++ b/src/picture_mxf.h
@@ -84,14 +84,14 @@ public:
protected:
bool frame_buffer_equals (
- int frame, EqualityOptions opt, boost::function<void (NoteType, std::string)> note,
+ int frame, EqualityOptions opt, NoteHandler note,
uint8_t const * data_A, unsigned int size_A, uint8_t const * data_B, unsigned int size_B
) const;
bool descriptor_equals (
ASDCP::JP2K::PictureDescriptor const & a,
ASDCP::JP2K::PictureDescriptor const & b,
- boost::function<void (NoteType, std::string)>
+ NoteHandler note
) const;
void read_picture_descriptor (ASDCP::JP2K::PictureDescriptor const &);
diff --git a/src/reel.cc b/src/reel.cc
index 0071de86..9e6e0ca7 100644
--- a/src/reel.cc
+++ b/src/reel.cc
@@ -95,7 +95,7 @@ Reel::write_to_cpl (xmlpp::Element* node, Standard standard) const
}
bool
-Reel::equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+Reel::equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, NoteHandler note) const
{
if ((_main_picture && !other->_main_picture) || (!_main_picture && other->_main_picture)) {
note (DCP_ERROR, "Reel: assets differ");
diff --git a/src/reel.h b/src/reel.h
index 584ba597..278a0f91 100644
--- a/src/reel.h
+++ b/src/reel.h
@@ -77,7 +77,7 @@ public:
bool encrypted () const;
- bool equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> notes) const;
+ bool equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, NoteHandler notes) const;
void add (DecryptedKDM const &);
diff --git a/src/reel_asset.cc b/src/reel_asset.cc
index 31422173..037a3978 100644
--- a/src/reel_asset.cc
+++ b/src/reel_asset.cc
@@ -100,7 +100,7 @@ ReelAsset::cpl_node_attribute (Standard) const
}
bool
-ReelAsset::equals (shared_ptr<const ReelAsset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> note) const
+ReelAsset::equals (shared_ptr<const ReelAsset> other, EqualityOptions opt, NoteHandler note) const
{
if (_annotation_text != other->_annotation_text) {
stringstream s;
diff --git a/src/reel_asset.h b/src/reel_asset.h
index 61d2b48f..6db621cc 100644
--- a/src/reel_asset.h
+++ b/src/reel_asset.h
@@ -52,7 +52,7 @@ public:
ReelAsset (boost::shared_ptr<const cxml::Node>);
virtual void write_to_cpl (xmlpp::Node* node, Standard standard) const;
- virtual bool equals (boost::shared_ptr<const ReelAsset>, EqualityOptions, boost::function<void (NoteType, std::string)>) const;
+ virtual bool equals (boost::shared_ptr<const ReelAsset>, EqualityOptions, NoteHandler) const;
/** @return a Ref to our actual content */
Ref<Content>& content () {
diff --git a/src/reel_picture_asset.cc b/src/reel_picture_asset.cc
index 5cf2b858..6bac3bce 100644
--- a/src/reel_picture_asset.cc
+++ b/src/reel_picture_asset.cc
@@ -100,7 +100,7 @@ ReelPictureAsset::key_type () const
}
bool
-ReelPictureAsset::equals (shared_ptr<const ReelAsset> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> note) const
+ReelPictureAsset::equals (shared_ptr<const ReelAsset> other, EqualityOptions opt, NoteHandler note) const
{
if (!ReelAsset::equals (other, opt, note)) {
return false;
diff --git a/src/reel_picture_asset.h b/src/reel_picture_asset.h
index 76ba22c9..96c4b63b 100644
--- a/src/reel_picture_asset.h
+++ b/src/reel_picture_asset.h
@@ -40,7 +40,7 @@ public:
ReelPictureAsset (boost::shared_ptr<const cxml::Node>);
virtual void write_to_cpl (xmlpp::Node* node, Standard standard) const;
- virtual bool equals (boost::shared_ptr<const ReelAsset>, EqualityOptions, boost::function<void (NoteType, std::string)>) const;
+ virtual bool equals (boost::shared_ptr<const ReelAsset>, EqualityOptions, NoteHandler) const;
boost::shared_ptr<PictureMXF> mxf () {
return boost::dynamic_pointer_cast<PictureMXF> (_content.object ());
diff --git a/src/sound_mxf.cc b/src/sound_mxf.cc
index 05dac418..e338c161 100644
--- a/src/sound_mxf.cc
+++ b/src/sound_mxf.cc
@@ -82,7 +82,7 @@ SoundMXF::SoundMXF (Fraction edit_rate, int sampling_rate, int channels)
}
bool
-SoundMXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+SoundMXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
{
if (!MXF::equals (other, opt, note)) {
return false;
diff --git a/src/sound_mxf.h b/src/sound_mxf.h
index d6978953..80585055 100644
--- a/src/sound_mxf.h
+++ b/src/sound_mxf.h
@@ -48,7 +48,7 @@ public:
bool equals (
boost::shared_ptr<const Asset> other,
EqualityOptions opt,
- boost::function<void (NoteType, std::string)> note
+ NoteHandler note
) const;
boost::shared_ptr<const SoundFrame> get_frame (int n) const;
diff --git a/src/stereo_picture_mxf.cc b/src/stereo_picture_mxf.cc
index 1c8fa618..e68921e3 100644
--- a/src/stereo_picture_mxf.cc
+++ b/src/stereo_picture_mxf.cc
@@ -75,7 +75,7 @@ StereoPictureMXF::start_write (boost::filesystem::path file, Standard standard,
}
bool
-StereoPictureMXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
+StereoPictureMXF::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
{
if (!MXF::equals (other, opt, note)) {
return false;
diff --git a/src/stereo_picture_mxf.h b/src/stereo_picture_mxf.h
index 9592653e..9a094d19 100644
--- a/src/stereo_picture_mxf.h
+++ b/src/stereo_picture_mxf.h
@@ -37,7 +37,7 @@ public:
bool equals (
boost::shared_ptr<const Asset> other,
EqualityOptions opt,
- boost::function<void (NoteType, std::string)> note
+ NoteHandler note
) const;
boost::shared_ptr<const StereoPictureFrame> get_frame (int n) const;
diff --git a/src/subtitle_content.cc b/src/subtitle_content.cc
index 5e7c5b25..07fd90f0 100644
--- a/src/subtitle_content.cc
+++ b/src/subtitle_content.cc
@@ -39,7 +39,6 @@ using std::stringstream;
using std::cout;
using boost::shared_ptr;
using boost::optional;
-using boost::function;
using boost::dynamic_pointer_cast;
using namespace dcp;
@@ -196,7 +195,7 @@ SubtitleContent::latest_subtitle_out () const
}
bool
-SubtitleContent::equals (shared_ptr<const Asset> other_asset, EqualityOptions options, function<void (NoteType, std::string)> note) const
+SubtitleContent::equals (shared_ptr<const Asset> other_asset, EqualityOptions options, NoteHandler note) const
{
if (!Asset::equals (other_asset, options, note)) {
return false;
diff --git a/src/subtitle_content.h b/src/subtitle_content.h
index 7121387a..0ef7b19d 100644
--- a/src/subtitle_content.h
+++ b/src/subtitle_content.h
@@ -46,7 +46,7 @@ public:
bool equals (
boost::shared_ptr<const Asset>,
EqualityOptions,
- boost::function<void (NoteType, std::string)> note
+ NoteHandler note
) const;
std::string language () const {
diff --git a/src/types.h b/src/types.h
index f685806f..08613c79 100644
--- a/src/types.h
+++ b/src/types.h
@@ -25,6 +25,7 @@
#define LIBDCP_TYPES_H
#include <boost/shared_ptr.hpp>
+#include <boost/function.hpp>
#include <string>
namespace dcp
@@ -187,6 +188,9 @@ extern std::ostream & operator<< (std::ostream & s, Colour const & c);
typedef std::pair<std::string, boost::shared_ptr<const parse::AssetMap> > PathAssetMap;
+typedef boost::function<void (NoteType, std::string)> NoteHandler;
+
+
}
#endif