list<dcp::SubtitleString> s;
s.push_back (*_next);
- text_subtitle (s);
+ text_subtitle (content_time_period (*_next), s);
++_next;
return false;
list<ContentTimePeriod> d;
for (list<dcp::SubtitleString>::const_iterator i = _subtitles.begin(); i != _subtitles.end(); ++i) {
- ContentTimePeriod period (
- ContentTime::from_seconds (i->in().as_seconds ()),
- ContentTime::from_seconds (i->out().as_seconds ())
- );
-
+ ContentTimePeriod period = content_time_period (*i);
if ((starting && p.contains (period.from)) || (!starting && p.overlaps (period))) {
d.push_back (period);
}
return d;
}
+ContentTimePeriod
+DCPSubtitleDecoder::content_time_period (dcp::SubtitleString s) const
+{
+ return ContentTimePeriod (
+ ContentTime::from_seconds (s.in().as_seconds ()),
+ ContentTime::from_seconds (s.out().as_seconds ())
+ );
+}