diff options
| author | Carl Hetherington <cth@carlh.net> | 2019-08-31 02:03:01 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2019-08-31 02:03:01 +0100 |
| commit | 2cdf3d9f461b12d0925cc54368105bbd177bbbb3 (patch) | |
| tree | e250a7fd753a4a10a47c9d0a8a67f2c6c36c1112 /src/tools | |
| parent | 1f88a38a2a607c21988a403e76f315444c4be36b (diff) | |
Primitive subtitle export feature.v2.15.16
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/dcpomatic.cc | 19 |
1 files changed, 13 insertions, 6 deletions
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 <dcp/exceptions.h> #include <dcp/raw_convert.h> #include <wx/generic/aboutdlgg.h> @@ -911,15 +912,21 @@ private: ExportDialog* d = new ExportDialog (this, _film->isdcf_name(true)); if (d->ShowModal() == wxID_OK) { shared_ptr<TranscodeJob> job (new TranscodeJob (_film)); - job->set_encoder ( - shared_ptr<FFmpegEncoder> ( - 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<SubtitleEncoder>(new SubtitleEncoder(_film, job, d->path(), d->split_reels())) + ); + } else { + job->set_encoder ( + shared_ptr<FFmpegEncoder> ( + new FFmpegEncoder (_film, job, d->path(), d->format(), d->mixdown_to_stereo(), d->split_reels(), d->x264_crf() #ifdef DCPOMATIC_VARIANT_SWAROOP - , optional<dcp::Key>(), optional<string>() + , optional<dcp::Key>(), optional<string>() #endif + ) ) - ) - ); + ); + } JobManager::instance()->add (job); } d->Destroy (); |
