+
+ for (auto ccap: reel->closed_captions()) {
+ if (!ccap->asset_ref().resolved()) {
+ /* We are missing this asset so we can't continue; examination will be repeated later */
+ _needs_assets = true;
+ LOG_GENERAL("Closed caption %1 of reel %2 is missing", ccap->id(), reel->id());
+ return;
+ }
+
+ LOG_GENERAL("Closed caption %1 of reel %2 found", ccap->id(), reel->id());
+
+ _text_count[TextType::CLOSED_CAPTION]++;
+ _dcp_text_tracks.push_back(DCPTextTrack(ccap->annotation_text().get_value_or(""), try_to_parse_language(ccap->language())));
+ }
+
+ if (reel->main_markers ()) {
+ auto rm = reel->main_markers()->get();
+ _markers.insert (rm.begin(), rm.end());
+ }
+
+ if (reel->atmos()) {
+ _has_atmos = true;
+ _atmos_length += reel->atmos()->actual_duration();
+ if (_atmos_edit_rate != dcp::Fraction()) {
+ DCPOMATIC_ASSERT(reel->atmos()->edit_rate() == _atmos_edit_rate);
+ }
+ _atmos_edit_rate = reel->atmos()->edit_rate();
+ }
+
+ if (reel->main_picture()) {
+ _reel_lengths.push_back(reel->main_picture()->actual_duration());
+ } else if (reel->main_sound()) {
+ _reel_lengths.push_back(reel->main_sound()->actual_duration());
+ } else if (reel->main_subtitle()) {
+ _reel_lengths.push_back(reel->main_subtitle()->actual_duration());
+ } else if (!reel->closed_captions().empty()) {
+ _reel_lengths.push_back(reel->closed_captions().front()->actual_duration());
+ } else if (!reel->atmos()) {
+ _reel_lengths.push_back(reel->atmos()->actual_duration());
+ }
+
+ if (reel_fonts.empty()) {
+ reel_fonts.push_back(make_shared<dcpomatic::Font>(""));
+ }
+
+ _fonts.push_back(reel_fonts);