+ bool same_type = false;
+
+ {
+ auto interop = dynamic_pointer_cast<ReelInteropSubtitleAsset>(_main_subtitle);
+ auto interop_other = dynamic_pointer_cast<ReelInteropSubtitleAsset>(other->_main_subtitle);
+ if (interop && interop_other) {
+ same_type = true;
+ if (!interop->equals(interop_other, opt, note)) {
+ return false;
+ }
+ }
+ }
+
+ {
+ auto smpte = dynamic_pointer_cast<ReelSMPTESubtitleAsset>(_main_subtitle);
+ auto smpte_other = dynamic_pointer_cast<ReelSMPTESubtitleAsset>(other->_main_subtitle);
+ if (smpte && smpte_other) {
+ same_type = true;
+ if (!smpte->equals(smpte_other, opt, note)) {
+ return false;
+ }
+ }
+ }
+
+ if ((_main_subtitle || other->_main_subtitle) && !same_type) {
+ return false;
+ }
+
+ if ((_main_markers && !other->_main_markers) || (!_main_markers && other->_main_markers)) {
+ note (NoteType::ERROR, "Reel: one has markers and the other does not");
+ return false;
+ }
+
+ if (_main_markers && !_main_markers->equals(other->_main_markers, opt, note)) {
+ note (NoteType::ERROR, "Reel: marker assets differ");
+ return false;
+ }
+
+ if (_closed_captions.size() != other->_closed_captions.size()) {
+ return false;
+ }
+
+ auto i = _closed_captions.begin();
+ auto j = other->_closed_captions.begin();
+ while (i != _closed_captions.end()) {
+ if (!(*i)->equals(*j, opt, note)) {
+ return false;
+ }
+ ++i;
+ ++j;
+ }
+
+ if ((_atmos && !other->_atmos) || (!_atmos && other->_atmos)) {
+ note (NoteType::ERROR, "Reel: atmos assets differ");
+ return false;
+ }
+
+ if (_atmos && !_atmos->equals (other->_atmos, opt, note)) {