/*
- Copyright (C) 2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2019-2020 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
*/
-#include "font.h"
+#include "font_data.h"
#include "subtitle_encoder.h"
#include "player.h"
#include "compose.hpp"
#include <dcp/interop_subtitle_asset.h>
#include <dcp/raw_convert.h>
#include <dcp/smpte_subtitle_asset.h>
-#include <boost/shared_ptr.hpp>
#include <boost/filesystem.hpp>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
#include "i18n.h"
using std::make_pair;
using std::pair;
using std::vector;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
+#if BOOST_VERSION >= 106100
+using namespace boost::placeholders;
+#endif
using dcp::raw_convert;
/** @param output Directory, if there will be multiple output files, or a filename.
_assets.push_back (make_pair(shared_ptr<dcp::SubtitleAsset>(), boost::filesystem::change_extension(filename, extension)));
}
- BOOST_FOREACH (dcpomatic::DCPTimePeriod i, film->reels()) {
+ for (auto i: film->reels()) {
_reels.push_back (i);
}
+
+ _default_font = dcp::ArrayData (default_font_file());
}
void
}
if (!_film->interop() || _include_font) {
- BOOST_FOREACH (shared_ptr<dcpomatic::Font> j, _player->get_subtitle_fonts()) {
- i->first->add_font (j->id(), default_font_file());
+ for (auto j: _player->get_subtitle_fonts()) {
+ i->first->add_font (j.id, _default_font);
}
}
}
}
- BOOST_FOREACH (StringText i, subs.string) {
+ for (auto i: subs.string) {
/* XXX: couldn't / shouldn't we use period here rather than getting time from the subtitle? */
i.set_in (i.in());
i.set_out (i.out());