-list<ContentTimePeriod>
-DCPSubtitleDecoder::subtitles_during (ContentTimePeriod p, bool starting) const
-{
- /* XXX: inefficient */
-
- list<ContentTimePeriod> d;
-
- for (list<dcp::SubtitleString>::const_iterator i = _subtitles.begin(); i != _subtitles.end(); ++i) {
- ContentTimePeriod period (
- ContentTime::from_seconds (i->in().to_seconds ()),
- ContentTime::from_seconds (i->out().to_seconds ())
- );
-
- if ((starting && p.contains (period.from)) || (!starting && p.overlaps (period))) {
- d.push_back (period);
- }