diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-04-28 09:47:22 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-04-28 09:47:22 +0200 |
| commit | ff27a57f028b0ab967e38c555fbfcdca560f15fd (patch) | |
| tree | c8f394e5654601071b9b917c90891b29010156d4 /src | |
| parent | 8de886e26ba382f5593069386e3c7d1ff35d4192 (diff) | |
Make emit_bitmap_start take a ContentBitmapText.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/ffmpeg_decoder.cc | 2 | ||||
| -rw-r--r-- | src/lib/text_decoder.cc | 8 | ||||
| -rw-r--r-- | 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<double>(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<const Image> image, dcpomatic::Rect<double> 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<const Image> image, dcpomatic::Rect<double> 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<const Image> image, dcpomatic::Rect<double> rect); + void emit_bitmap_start (ContentBitmapText const& bitmap); void emit_bitmap (dcpomatic::ContentTimePeriod period, std::shared_ptr<const Image> image, dcpomatic::Rect<double> rect); void emit_plain_start (dcpomatic::ContentTime from, std::list<dcp::SubtitleString> s); void emit_plain_start (dcpomatic::ContentTime from, sub::Subtitle const & subtitle); |
