From 2cdf3d9f461b12d0925cc54368105bbd177bbbb3 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sat, 31 Aug 2019 02:03:01 +0100 Subject: Primitive subtitle export feature. --- src/tools/dcpomatic.cc | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'src/tools') diff --git a/src/tools/dcpomatic.cc b/src/tools/dcpomatic.cc index 331e2995a..a9c93e9ac 100644 --- a/src/tools/dcpomatic.cc +++ b/src/tools/dcpomatic.cc @@ -83,6 +83,7 @@ #include "lib/check_content_change_job.h" #include "lib/text_content.h" #include "lib/dcpomatic_log.h" +#include "lib/subtitle_encoder.h" #include #include #include @@ -911,15 +912,21 @@ private: ExportDialog* d = new ExportDialog (this, _film->isdcf_name(true)); if (d->ShowModal() == wxID_OK) { shared_ptr job (new TranscodeJob (_film)); - job->set_encoder ( - shared_ptr ( - new FFmpegEncoder (_film, job, d->path(), d->format(), d->mixdown_to_stereo(), d->split_reels(), d->x264_crf() + if (d->format() == EXPORT_FORMAT_SUBTITLES_DCP) { + job->set_encoder ( + shared_ptr(new SubtitleEncoder(_film, job, d->path(), d->split_reels())) + ); + } else { + job->set_encoder ( + shared_ptr ( + new FFmpegEncoder (_film, job, d->path(), d->format(), d->mixdown_to_stereo(), d->split_reels(), d->x264_crf() #ifdef DCPOMATIC_VARIANT_SWAROOP - , optional(), optional() + , optional(), optional() #endif + ) ) - ) - ); + ); + } JobManager::instance()->add (job); } d->Destroy (); -- cgit v1.2.3