summaryrefslogtreecommitdiff
path: root/src/dcp.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-07-31 00:32:58 +0100
committerCarl Hetherington <cth@carlh.net>2012-07-31 00:32:58 +0100
commit4678bf06d71c8a18c489912dabf8aca312ab8b6b (patch)
tree00ad12122fa34cb38182091f0e853761d104a902 /src/dcp.cc
parentfe3476307bead95b72efc7d47a2ce3da31c35d88 (diff)
Barely-functional dcpdiff.
Diffstat (limited to 'src/dcp.cc')
-rw-r--r--src/dcp.cc27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/dcp.cc b/src/dcp.cc
index 8f7a73bc..dc895e11 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -304,3 +304,30 @@ DCP::DCP (string directory)
}
}
+list<string>
+DCP::equals (DCP const & other, EqualityType type) const
+{
+ list<string> notes;
+
+ switch (type) {
+ case LIBDCP_METADATA:
+ if (_name != other._name) {
+ notes.push_back ("names differ");
+ }
+ if (_content_kind != other._content_kind) {
+ notes.push_back ("content kinds differ");
+ }
+ if (_fps != other._fps) {
+ notes.push_back ("frames per second differ");
+ }
+ if (_length != other._length) {
+ notes.push_back ("lengths differ");
+ }
+ if (_assets.size() != other._assets.size()) {
+ notes.push_back ("asset counts differ");
+ }
+ break;
+ }
+
+ return notes;
+}