diff options
| author | Carl Hetherington <cth@carlh.net> | 2024-03-04 00:42:59 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-03-04 00:43:03 +0100 |
| commit | 34bfe29024dd7926db8289781fa70c5e408263e5 (patch) | |
| tree | 2dfde98bfe948e18535a8b7bb2524a63264446f3 /src | |
| parent | 7c00e7a8c5f0e543000dd62ce8c66fdb8da6ee34 (diff) | |
Rename size -> parent_size.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/util.cc | 8 | ||||
| -rw-r--r-- | src/lib/util.h | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index 7f6e9da5a..e74655773 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -908,15 +908,15 @@ utf8_strlen (string s) } -/** @param size Size of picture that the subtitle will be overlaid onto */ +/** @param parent_size Size of picture that the subtitle will be overlaid onto */ void -emit_subtitle_image (ContentTimePeriod period, dcp::SubtitleImage sub, dcp::Size size, shared_ptr<TextDecoder> decoder) +emit_subtitle_image(ContentTimePeriod period, dcp::SubtitleImage sub, dcp::Size parent_size, shared_ptr<TextDecoder> decoder) { /* XXX: this is rather inefficient; decoding the image just to get its size */ FFmpegImageProxy proxy (sub.png_image()); auto image = proxy.image(Image::Alignment::PADDED).image; /* set up rect with height and width */ - dcpomatic::Rect<double> rect(0, 0, image->size().width / double(size.width), image->size().height / double(size.height)); + dcpomatic::Rect<double> rect(0, 0, image->size().width / double(parent_size.width), image->size().height / double(parent_size.height)); /* add in position */ @@ -944,7 +944,7 @@ emit_subtitle_image (ContentTimePeriod period, dcp::SubtitleImage sub, dcp::Size break; } - decoder->emit_bitmap (period, image, rect); + decoder->emit_bitmap(period, parent_size, image, rect); } diff --git a/src/lib/util.h b/src/lib/util.h index b92869b25..c6b6324f7 100644 --- a/src/lib/util.h +++ b/src/lib/util.h @@ -87,7 +87,7 @@ extern std::string careful_string_filter (std::string); extern std::pair<int, int> audio_channel_types (std::list<int> mapped, int channels); extern std::shared_ptr<AudioBuffers> remap (std::shared_ptr<const AudioBuffers> input, int output_channels, AudioMapping map); extern size_t utf8_strlen (std::string s); -extern void emit_subtitle_image (dcpomatic::ContentTimePeriod period, dcp::SubtitleImage sub, dcp::Size size, std::shared_ptr<TextDecoder> decoder); +extern void emit_subtitle_image(dcpomatic::ContentTimePeriod period, dcp::SubtitleImage sub, dcp::Size parent_size, std::shared_ptr<TextDecoder> decoder); extern void copy_in_bits (boost::filesystem::path from, boost::filesystem::path to, std::function<void (float)>); extern dcp::Size scale_for_display (dcp::Size s, dcp::Size display_container, dcp::Size film_container, PixelQuanta quanta); extern dcp::DecryptedKDM decrypt_kdm_with_helpful_error (dcp::EncryptedKDM kdm); |
