From de2af791bdfdcd653752cba970e59efc7bf810c7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 21 Nov 2016 16:57:15 +0000 Subject: Basic grunt-work, untested and unfinished, but it compiles. --- src/lib/subtitle_decoder.h | 37 +++++++------------------------------ 1 file changed, 7 insertions(+), 30 deletions(-) (limited to 'src/lib/subtitle_decoder.h') 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 -- cgit v1.2.3