X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fanalyse_subtitles_job.cc;h=7f1b8ad04d9fe50cfe3ea6c041b89a7b95643407;hb=0664b92293ec8dd4fec4015981af7610a9e1984c;hp=d95e859db8b44aedebb8de4668e1d9eb1c8c6361;hpb=8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8;p=dcpomatic.git diff --git a/src/lib/analyse_subtitles_job.cc b/src/lib/analyse_subtitles_job.cc index d95e859db..7f1b8ad04 100644 --- a/src/lib/analyse_subtitles_job.cc +++ b/src/lib/analyse_subtitles_job.cc @@ -1,5 +1,5 @@ /* - Copyright (C) 2020 Carl Hetherington + Copyright (C) 2020-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,18 +18,20 @@ */ + #include "analyse_subtitles_job.h" -#include "playlist.h" -#include "player.h" -#include "subtitle_analysis.h" #include "bitmap_text.h" +#include "image.h" +#include "player.h" +#include "playlist.h" #include "render_text.h" +#include "subtitle_analysis.h" #include "text_content.h" -#include "image.h" #include #include "i18n.h" + using std::make_shared; using std::shared_ptr; using std::string; @@ -38,6 +40,7 @@ using std::weak_ptr; using namespace boost::placeholders; #endif + AnalyseSubtitlesJob::AnalyseSubtitlesJob (shared_ptr film, shared_ptr content) : Job (film) , _content (content) @@ -106,7 +109,7 @@ AnalyseSubtitlesJob::analyse (PlayerText text, TextType type) if (!text.string.empty()) { /* We can provide dummy values for time and frame rate here as they are only used to calculate fades */ dcp::Size const frame = _film->frame_size(); - for (auto i: render_text(text.string, text.fonts, frame, dcpomatic::DCPTime(), 24)) { + for (auto i: render_text(text.string, frame, dcpomatic::DCPTime(), 24)) { dcpomatic::Rect rect ( double(i.position.x) / frame.width, double(i.position.y) / frame.height, double(i.image->size().width) / frame.width, double(i.image->size().height) / frame.height