+
+
+bool
+ReelAsset::asset_equals (shared_ptr<const ReelAsset> other, EqualityOptions opt, NoteHandler note) const
+{
+ if (_annotation_text != other->_annotation_text) {
+ string const s = "Reel: annotation texts differ (" + _annotation_text + " vs " + other->_annotation_text + ")\n";
+ if (!opt.reel_annotation_texts_can_differ) {
+ note (NoteType::ERROR, s);
+ return false;
+ } else {
+ note (NoteType::NOTE, s);
+ }
+ }
+
+ if (_edit_rate != other->_edit_rate) {
+ note (NoteType::ERROR, "Reel: edit rates differ");
+ return false;
+ }
+
+ if (_intrinsic_duration != other->_intrinsic_duration) {
+ note (NoteType::ERROR, String::compose ("Reel: intrinsic durations differ (%1 vs %2)", _intrinsic_duration, other->_intrinsic_duration));
+ return false;
+ }
+
+ if (_entry_point != other->_entry_point) {
+ note (NoteType::ERROR, "Reel: entry points differ");
+ return false;
+ }
+
+ if (_duration != other->_duration) {
+ note (NoteType::ERROR, "Reel: durations differ");
+ return false;
+ }
+
+ return true;
+}
+
+
+int64_t
+ReelAsset::actual_duration () const
+{
+ if (_duration) {
+ return *_duration;
+ }
+
+ return _intrinsic_duration - _entry_point.get_value_or(0);
+}