#include <iostream>
#include <fstream>
#include <boost/filesystem.hpp>
-#include <boost/function.hpp>
#include <boost/lexical_cast.hpp>
+#include <boost/function.hpp>
+#include <libxml++/nodes/element.h>
#include "AS_DCP.h"
#include "KM_util.h"
#include "asset.h"
Asset::digest () const
{
if (_digest.empty ()) {
- _digest = make_digest (path().string());
+ _digest = make_digest (path().string(), 0);
}
return _digest;
}
+void
+Asset::compute_digest (boost::function<void (float)> progress)
+{
+ if (!_digest.empty ()) {
+ return;
+ }
+
+ _digest = make_digest (path().string(), &progress);
+}
bool
Asset::equals (shared_ptr<const Asset> other, EqualityOptions, boost::function<void (NoteType, string)> note) const
{
if (_edit_rate != other->_edit_rate) {
- note (ERROR, "MXF edit rates differ");
+ note (ERROR, "asset edit rates differ");
return false;
}
if (_intrinsic_duration != other->_intrinsic_duration) {
- note (ERROR, "MXF intrinsic durations differ");
- return false;
+ note (ERROR, "asset intrinsic durations differ");
}
if (_duration != other->_duration) {
- note (ERROR, "MXF durations differ");
- return false;
+ note (ERROR, "asset durations differ");
}
return true;