X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fsubtitle_encoder.cc;h=3721ee02b5835c9d8021fbb5aa500dc48ddf821a;hb=8fedaaa75c4586a4cc7ffb393bd71d1fdb091dc8;hp=cc42f1204e78c860b21e0ba623b494def2ed3124;hpb=4985d87750c87019dfe5dc7ef44e12c45326dd0e;p=dcpomatic.git diff --git a/src/lib/subtitle_encoder.cc b/src/lib/subtitle_encoder.cc index cc42f1204..3721ee02b 100644 --- a/src/lib/subtitle_encoder.cc +++ b/src/lib/subtitle_encoder.cc @@ -31,11 +31,12 @@ #include "i18n.h" -using std::string; using std::make_pair; +using std::make_shared; using std::pair; -using std::vector; using std::shared_ptr; +using std::string; +using std::vector; using boost::optional; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; @@ -128,7 +129,7 @@ SubtitleEncoder::go () void SubtitleEncoder::text (PlayerText subs, TextType type, optional track, dcpomatic::DCPTimePeriod period) { - if (type != TEXT_OPEN_SUBTITLE) { + if (type != TextType::OPEN_SUBTITLE) { return; } @@ -136,7 +137,7 @@ SubtitleEncoder::text (PlayerText subs, TextType type, optional tr shared_ptr asset; vector lang = _film->subtitle_languages (); if (_film->interop ()) { - shared_ptr s (new dcp::InteropSubtitleAsset()); + auto s = make_shared(); s->set_movie_title (_film->name()); if (!lang.empty()) { s->set_language (lang.front().to_string()); @@ -144,7 +145,7 @@ SubtitleEncoder::text (PlayerText subs, TextType type, optional tr s->set_reel_number (raw_convert(_reel_index + 1)); _assets[_reel_index].first = s; } else { - shared_ptr s (new dcp::SMPTESubtitleAsset()); + auto s = make_shared(); s->set_content_title_text (_film->name()); if (!lang.empty()) { s->set_language (lang.front());