- void image_subtitle (boost::shared_ptr<Image>, dcpomatic::Rect<double>, ContentTime, ContentTime);
- void text_subtitle (std::list<dcp::SubtitleString>);
+ void seek (ContentTime, bool);
+
+ void image_subtitle (ContentTimePeriod period, boost::shared_ptr<Image>, dcpomatic::Rect<double>);
+ void text_subtitle (ContentTimePeriod period, std::list<dcp::SubtitleString>);
+
+ std::list<ContentImageSubtitle> _decoded_image_subtitles;
+ std::list<ContentTextSubtitle> _decoded_text_subtitles;
+
+private:
+ template <class T>
+ std::list<T> get (std::list<T> const & subs, std::list<ContentTimePeriod> const & sp, ContentTimePeriod period, bool starting);
+
+ /** @param starting true if we want only subtitles that start during the period, otherwise
+ * we want subtitles that overlap the period.
+ */
+ virtual std::list<ContentTimePeriod> image_subtitles_during (ContentTimePeriod period, bool starting) const = 0;
+ virtual std::list<ContentTimePeriod> text_subtitles_during (ContentTimePeriod period, bool starting) const = 0;
+
+ boost::shared_ptr<const SubtitleContent> _subtitle_content;