diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-07-31 00:32:58 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-07-31 00:32:58 +0100 |
| commit | 4678bf06d71c8a18c489912dabf8aca312ab8b6b (patch) | |
| tree | 00ad12122fa34cb38182091f0e853761d104a902 /src | |
| parent | fe3476307bead95b72efc7d47a2ce3da31c35d88 (diff) | |
Barely-functional dcpdiff.
Diffstat (limited to 'src')
| -rw-r--r-- | src/dcp.cc | 27 | ||||
| -rw-r--r-- | src/dcp.h | 2 | ||||
| -rw-r--r-- | src/types.h | 4 |
3 files changed, 33 insertions, 0 deletions
@@ -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; +} @@ -106,6 +106,8 @@ public: return _length; } + std::list<std::string> equals (DCP const & other, EqualityType type) const; + /** Emitted with a parameter between 0 and 1 to indicate progress * for long jobs. */ diff --git a/src/types.h b/src/types.h index b8f7805a..5cd76ff4 100644 --- a/src/types.h +++ b/src/types.h @@ -62,6 +62,10 @@ public: int denominator; }; +enum EqualityType { + LIBDCP_METADATA +}; + } #endif |
