{
return !c->text.empty();
}
+
bool
DCPContent::can_reference_text (TextType type, string& why_not) const
{
why_not = _("it does not have open subtitles in all its reels.");
return false;
}
- if (type == TEXT_CLOSED_CAPTION && !i->closed_caption()) {
+ if (type == TEXT_CLOSED_CAPTION && i->closed_captions().empty()) {
/// TRANSLATORS: this string will follow "Cannot reference this DCP: "
why_not = _("it does not have closed captions in all its reels.");
return false;
}
if (j->reference_text (TEXT_CLOSED_CAPTION)) {
- shared_ptr<dcp::ReelAsset> ra = k->closed_caption ();
- DCPOMATIC_ASSERT (ra);
- ra->set_entry_point (ra->entry_point() + trim_start);
- ra->set_duration (ra->duration() - trim_start - trim_end);
- a.push_back (
- ReferencedReelAsset (ra, DCPTimePeriod (from, from + DCPTime::from_frames (ra->duration(), ffr)))
- );
+ BOOST_FOREACH (shared_ptr<dcp::ReelClosedCaptionAsset> l, k->closed_captions()) {
+ DCPOMATIC_ASSERT (l);
+ l->set_entry_point (l->entry_point() + trim_start);
+ l->set_duration (l->duration() - trim_start - trim_end);
+ a.push_back (
+ ReferencedReelAsset (l, DCPTimePeriod (from, from + DCPTime::from_frames (l->duration(), ffr)))
+ );
+ }
}
/* Assume that main picture duration is the length of the reel */