+ if (i->main_subtitle ()) {
+ if (!i->main_subtitle()->asset_ref().resolved()) {
+ /* We are missing this asset so we can't continue; examination will be repeated later */
+ _needs_assets = true;
+ return;
+ }
+
+ _text_count[TEXT_OPEN_SUBTITLE] = 1;
+ }
+
+ BOOST_FOREACH (shared_ptr<dcp::ReelClosedCaptionAsset> j, i->closed_captions()) {
+ if (!j->asset_ref().resolved()) {
+ /* We are missing this asset so we can't continue; examination will be repeated later */
+ _needs_assets = true;
+ return;
+ }
+
+ _text_count[TEXT_CLOSED_CAPTION]++;
+ _dcp_text_tracks.push_back (DCPTextTrack(j->annotation_text(), j->language().get_value_or(_("Unknown"))));
+ }
+
+ if (i->main_markers ()) {
+ map<dcp::Marker, dcp::Time> rm = i->main_markers()->get();
+ _markers.insert (rm.begin(), rm.end());
+ }
+
+ if (i->atmos()) {
+ _has_atmos = true;
+ _atmos_length += i->atmos()->actual_duration();
+ if (_atmos_edit_rate != dcp::Fraction()) {
+ DCPOMATIC_ASSERT (i->atmos()->edit_rate() == _atmos_edit_rate);
+ }
+ _atmos_edit_rate = i->atmos()->edit_rate();
+ }
+
+ if (i->main_picture()) {
+ _reel_lengths.push_back (i->main_picture()->actual_duration());
+ } else if (i->main_sound()) {
+ _reel_lengths.push_back (i->main_sound()->actual_duration());
+ } else if (i->main_subtitle()) {
+ _reel_lengths.push_back (i->main_subtitle()->actual_duration());
+ } else if (!i->closed_captions().empty()) {
+ _reel_lengths.push_back (i->closed_captions().front()->actual_duration());
+ } else if (!i->atmos()) {
+ _reel_lengths.push_back (i->atmos()->actual_duration());