From f3ab77e34a41ad4d8f5156e9d6598314975b9565 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Tue, 6 Aug 2024 23:57:22 +0200 Subject: Adapt to some libdcp class renaming to allow open captions/closed subtitles. --- src/lib/dcp_decoder.cc | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'src/lib/dcp_decoder.cc') diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc index abbaaf15d..cd792c0b7 100644 --- a/src/lib/dcp_decoder.cc +++ b/src/lib/dcp_decoder.cc @@ -45,17 +45,16 @@ #include #include #include -#include #include #include -#include +#include #include #include #include #include #include #include -#include +#include #include #include "i18n.h" @@ -318,7 +317,7 @@ DCPDecoder::pass_texts (ContentTime next, dcp::Size size) void DCPDecoder::pass_texts ( - ContentTime next, shared_ptr asset, bool reference, int64_t entry_point, shared_ptr decoder, dcp::Size size + ContentTime next, shared_ptr asset, bool reference, int64_t entry_point, shared_ptr decoder, dcp::Size size ) { auto const vfr = _dcp_content->active_video_frame_rate (film()); @@ -326,16 +325,16 @@ DCPDecoder::pass_texts ( auto const frame = next.frames_round (vfr); if (_decode_referenced || !reference) { - auto subs = asset->subtitles_during ( + auto subs = asset->texts_during( dcp::Time (entry_point + frame, vfr, vfr), dcp::Time (entry_point + frame + 1, vfr, vfr), true ); - vector strings; + vector strings; for (auto i: subs) { - auto is = dynamic_pointer_cast(i); + auto is = dynamic_pointer_cast(i); if (is) { if (!strings.empty() && (strings.back().in() != is->in() || strings.back().out() != is->out())) { auto b = strings.back(); @@ -350,7 +349,7 @@ DCPDecoder::pass_texts ( strings.clear (); } - dcp::SubtitleString is_copy = *is; + auto is_copy = *is; if (is_copy.font()) { is_copy.set_font(_font_id_allocator.font_id(_reel - _reels.begin(), asset->id(), is_copy.font().get())); } else { @@ -363,7 +362,7 @@ DCPDecoder::pass_texts ( this would need to be done both here and in DCPSubtitleDecoder. */ - auto ii = dynamic_pointer_cast(i); + auto ii = dynamic_pointer_cast(i); if (ii) { emit_subtitle_image ( ContentTimePeriod ( -- cgit v1.2.3