X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Ftext_decoder.cc;h=4eaaf37af7cbd50b86ad2fdce8bfbc17253c88c3;hb=d386392e79d59f0c5647b0d778348b72d7cd7069;hp=a7271601df19e19f83c58b490c4209e8294bb283;hpb=491176352b80bea000564e6662738722185be721;p=dcpomatic.git diff --git a/src/lib/text_decoder.cc b/src/lib/text_decoder.cc index a7271601d..4eaaf37af 100644 --- a/src/lib/text_decoder.cc +++ b/src/lib/text_decoder.cc @@ -36,14 +36,14 @@ using std::min; using boost::shared_ptr; using boost::optional; using boost::function; +using namespace dcpomatic; TextDecoder::TextDecoder ( Decoder* parent, shared_ptr c, - shared_ptr log, ContentTime first ) - : DecoderPart (parent, log) + : DecoderPart (parent) , _content (c) , _position (first) { @@ -94,7 +94,7 @@ TextDecoder::emit_plain_start (ContentTime from, list s) } } - PlainStart (ContentPlainText (from, s)); + PlainStart (ContentStringText (from, s)); _position = from; } @@ -250,6 +250,17 @@ TextDecoder::emit_plain (ContentTimePeriod period, sub::Subtitle const & s) emit_stop (period.to); } +/* @param rect Area expressed as a fraction of the video frame that this subtitle + * is for (e.g. a width of 0.5 means the width of the subtitle is half the width + * of the video frame) + */ +void +TextDecoder::emit_bitmap (ContentTimePeriod period, shared_ptr image, dcpomatic::Rect rect) +{ + emit_bitmap_start (period.from, image, rect); + emit_stop (period.to); +} + void TextDecoder::seek () {