X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ftext_decoder.h;h=1a7632fd82b8448366dddc0676531c8b04fd9a27;hb=3144a348751dc0c91ba1d1c7fe6c90127de9ef21;hp=d1355afb02c4b7eaf135917e5dccc487641d7947;hpb=c59981ce92898f6be6987f10ebb29161e36e6766;p=dcpomatic.git diff --git a/src/lib/text_decoder.h b/src/lib/text_decoder.h index d1355afb0..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 { + 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 seek (); + 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;