X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ftext_decoder.h;h=1a7632fd82b8448366dddc0676531c8b04fd9a27;hb=HEAD;hp=39d6e828d97864552e5833b9dad9bae3028aa363;hpb=b915348a8288d68e2ff114fb3dd89ad22e699969;p=dcpomatic.git diff --git a/src/lib/text_decoder.h b/src/lib/text_decoder.h index 39d6e828d..1a7632fd8 100644 --- a/src/lib/text_decoder.h +++ b/src/lib/text_decoder.h @@ -23,11 +23,13 @@ #define DCPOMATIC_CAPTION_DECODER_H +#include "content_text.h" #include "decoder.h" +#include "decoder_part.h" #include "rect.h" -#include "types.h" #include "content_text.h" -#include "decoder_part.h" +#include "types.h" +#include #include #include @@ -42,30 +44,30 @@ class Image; class TextDecoder : public DecoderPart { public: - TextDecoder ( - Decoder* parent, - std::shared_ptr, - dcpomatic::ContentTime first - ); + TextDecoder (Decoder* parent, std::shared_ptr); boost::optional position (std::shared_ptr) const override { return _position; } - void emit_bitmap_start (dcpomatic::ContentTime from, std::shared_ptr image, dcpomatic::Rect rect); + void emit_bitmap_start (ContentBitmapText const& bitmap); void emit_bitmap (dcpomatic::ContentTimePeriod period, std::shared_ptr image, dcpomatic::Rect rect); - void emit_plain_start (dcpomatic::ContentTime from, std::list s); + void emit_plain_start(dcpomatic::ContentTime from, std::vector s, dcp::SubtitleStandard valign_standard); void emit_plain_start (dcpomatic::ContentTime from, sub::Subtitle const & subtitle); - void emit_plain (dcpomatic::ContentTimePeriod period, std::list s); + void emit_plain(dcpomatic::ContentTimePeriod period, std::vector s, dcp::SubtitleStandard valign_standard); void emit_plain (dcpomatic::ContentTimePeriod period, sub::Subtitle const & subtitle); void emit_stop (dcpomatic::ContentTime to); + void maybe_set_position (dcpomatic::ContentTime position); + void seek () override; std::shared_ptr content () const { return _content; } + static std::string remove_invalid_characters_for_xml(std::string text); + boost::signals2::signal BitmapStart; boost::signals2::signal PlainStart; boost::signals2::signal Stop;