- SubtitleDecoder (boost::shared_ptr<const SubtitleContent>);
-
- std::list<ContentImageSubtitle> get_image_subtitles (ContentTimePeriod period, bool starting);
- std::list<ContentTextSubtitle> get_text_subtitles (ContentTimePeriod period, bool starting);
-
-protected:
- 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;
+ SubtitleDecoder (
+ Decoder* parent,
+ boost::shared_ptr<const SubtitleContent>,
+ boost::shared_ptr<Log> log,
+ ContentTime first
+ );
+
+ ContentTime position () const {
+ return _position;
+ }
+
+ void emit_image_start (ContentTime from, boost::shared_ptr<Image> image, dcpomatic::Rect<double> rect);
+ void emit_text_start (ContentTime from, std::list<dcp::SubtitleString> s);
+ void emit_text_start (ContentTime from, sub::Subtitle const & subtitle);
+ void emit_text (ContentTimePeriod period, std::list<dcp::SubtitleString> s);
+ void emit_text (ContentTimePeriod period, sub::Subtitle const & subtitle);
+ void emit_stop (ContentTime to);
+
+ void seek ();
+
+ boost::shared_ptr<const SubtitleContent> content () const {
+ return _content;
+ }
+
+ boost::signals2::signal<void (ContentImageSubtitle)> ImageStart;
+ boost::signals2::signal<void (ContentTextSubtitle)> TextStart;
+ boost::signals2::signal<void (ContentTime)> Stop;