X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ftext_decoder.cc;h=d6cf517c2e04393706ffcf81593c24fc91598dda;hb=75538d19688ad8c29c5949de9bff9f044c713936;hp=3b6a06ea1744a2a5a4b0763c251a0aff94fbba35;hpb=df17bbd25da69fc38eb2dcd8b4a2531cf0bab0bc;p=dcpomatic.git diff --git a/src/lib/text_decoder.cc b/src/lib/text_decoder.cc index 3b6a06ea1..d6cf517c2 100644 --- a/src/lib/text_decoder.cc +++ b/src/lib/text_decoder.cc @@ -60,7 +60,7 @@ TextDecoder::TextDecoder ( void TextDecoder::emit_bitmap_start (ContentTime from, shared_ptr image, dcpomatic::Rect rect) { - BitmapStart (ContentBitmapText (from, _content->type(), image, rect)); + BitmapStart (ContentBitmapText (from, image, rect)); _position = from; } @@ -94,7 +94,7 @@ TextDecoder::emit_plain_start (ContentTime from, list s) } } - PlainStart (ContentStringText (from, _content->type(), s)); + PlainStart (ContentStringText (from, s)); _position = from; } @@ -233,7 +233,7 @@ TextDecoder::emit_plain_start (ContentTime from, sub::Subtitle const & subtitle) void TextDecoder::emit_stop (ContentTime to) { - Stop (to, _content->type()); + Stop (to); } void @@ -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 () {