From ff27a57f028b0ab967e38c555fbfcdca560f15fd Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 28 Apr 2022 09:47:22 +0200 Subject: [PATCH] Make emit_bitmap_start take a ContentBitmapText. --- src/lib/ffmpeg_decoder.cc | 2 +- src/lib/text_decoder.cc | 8 ++++---- src/lib/text_decoder.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/ffmpeg_decoder.cc b/src/lib/ffmpeg_decoder.cc index 30a4b1823..f76c7699e 100644 --- a/src/lib/ffmpeg_decoder.cc +++ b/src/lib/ffmpeg_decoder.cc @@ -754,7 +754,7 @@ FFmpegDecoder::process_bitmap_subtitle (AVSubtitleRect const * rect, ContentTime static_cast(rect->h) / target_height ); - only_text()->emit_bitmap_start (from, image, scaled_rect); + only_text()->emit_bitmap_start ({ from, image, scaled_rect }); } diff --git a/src/lib/text_decoder.cc b/src/lib/text_decoder.cc index 99b68faba..d5afb555d 100644 --- a/src/lib/text_decoder.cc +++ b/src/lib/text_decoder.cc @@ -60,10 +60,10 @@ TextDecoder::TextDecoder ( * of the video frame) */ void -TextDecoder::emit_bitmap_start (ContentTime from, shared_ptr image, dcpomatic::Rect rect) +TextDecoder::emit_bitmap_start (ContentBitmapText const& bitmap) { - BitmapStart (ContentBitmapText (from, image, rect)); - _position = from; + BitmapStart (bitmap); + _position = bitmap.from(); } @@ -288,7 +288,7 @@ TextDecoder::emit_plain (ContentTimePeriod period, sub::Subtitle const & s) void TextDecoder::emit_bitmap (ContentTimePeriod period, shared_ptr image, dcpomatic::Rect rect) { - emit_bitmap_start (period.from, image, rect); + emit_bitmap_start ({ period.from, image, rect }); emit_stop (period.to); } diff --git a/src/lib/text_decoder.h b/src/lib/text_decoder.h index 39d6e828d..96b335de1 100644 --- a/src/lib/text_decoder.h +++ b/src/lib/text_decoder.h @@ -52,7 +52,7 @@ public: 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, sub::Subtitle const & subtitle); -- 2.30.2