/*
- Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2020-2021 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
+
#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 <iostream>
#include "i18n.h"
+
using std::make_shared;
using std::shared_ptr;
using std::string;
using namespace boost::placeholders;
#endif
+
AnalyseSubtitlesJob::AnalyseSubtitlesJob (shared_ptr<const Film> film, shared_ptr<Content> content)
: Job (film)
, _content (content)
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<double> 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