X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fsubtitle_decoder.h;h=904aaed7823a4e778d10af9be8e442b93f80a83a;hb=de2af791bdfdcd653752cba970e59efc7bf810c7;hp=e5e9316693514e33fead9841e544ffed28e2432c;hpb=06152300e69e8faca44ff8d7f12a6fd354848b9a;p=dcpomatic.git diff --git a/src/lib/subtitle_decoder.h b/src/lib/subtitle_decoder.h index e5e931669..904aaed78 100644 --- a/src/lib/subtitle_decoder.h +++ b/src/lib/subtitle_decoder.h @@ -27,6 +27,7 @@ #include "content_subtitle.h" #include "decoder_part.h" #include +#include namespace sub { class Subtitle; @@ -44,46 +45,22 @@ public: SubtitleDecoder ( Decoder* parent, boost::shared_ptr, - boost::shared_ptr log, - boost::function (ContentTimePeriod, bool)> image_during, - boost::function (ContentTimePeriod, bool)> text_during + boost::shared_ptr log ); - std::list get_image (ContentTimePeriod period, bool starting, bool accurate); - std::list get_text (ContentTimePeriod period, bool starting, bool accurate); - - void seek (ContentTime, bool); - void reset (); - - void give_image (ContentTimePeriod period, boost::shared_ptr, dcpomatic::Rect); - void give_text (ContentTimePeriod period, std::list); - void give_text (ContentTimePeriod period, sub::Subtitle const & subtitle); + void emit_image (ContentTimePeriod period, boost::shared_ptr, dcpomatic::Rect); + void emit_text (ContentTimePeriod period, std::list); + void emit_text (ContentTimePeriod period, sub::Subtitle const & subtitle); boost::shared_ptr content () const { return _content; } - boost::optional position () const { - return _position; - } - - void reset_position () { - _position.reset (); - } + boost::signals2::signal ImageData; + boost::signals2::signal TextData; private: - - std::list _decoded_image; - std::list _decoded_text; boost::shared_ptr _content; - - template - std::list get (std::list const & subs, std::list const & sp, ContentTimePeriod period, bool accurate); - - boost::function (ContentTimePeriod, bool)> _image_during; - boost::function (ContentTimePeriod, bool)> _text_during; - - boost::optional _position; }; #endif