diff options
| author | Carl Hetherington <cth@carlh.net> | 2026-03-02 23:21:42 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2026-03-02 23:21:42 +0100 |
| commit | 5f589c6d951a5fc549dc652a7839c257d9bc6782 (patch) | |
| tree | 5c19cc79c8c0c37f0c10e8ac240fbb2325d513ca /src/lib | |
| parent | 8ed27c4278bc147b99602f59ede8639bbc8d00e6 (diff) | |
wip: srt export.3142-export-srt
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/subtitle_film_encoder.cc | 13 | ||||
| -rw-r--r-- | src/lib/subtitle_format.h | 3 |
2 files changed, 14 insertions, 2 deletions
diff --git a/src/lib/subtitle_film_encoder.cc b/src/lib/subtitle_film_encoder.cc index feca363eb..e759264f8 100644 --- a/src/lib/subtitle_film_encoder.cc +++ b/src/lib/subtitle_film_encoder.cc @@ -70,7 +70,18 @@ SubtitleFilmEncoder::SubtitleFilmEncoder( _player.set_ignore_audio(); _player.Text.connect(boost::bind(&SubtitleFilmEncoder::text, this, _1, _2, _3, _4)); - string const extension = format == SubtitleFormat::XML ? ".xml" : ".mxf"; + string extension; + switch (format) { + case SubtitleFormat::XML: + extension = ".xml"; + break; + case SubtitleFormat::MXF: + extension = ".mxf"; + break; + case SubtitleFormat::SRT: + extension = ".srt"; + break; + } int const files = split_reels ? film->reels().size() : 1; for (int i = 0; i < files; ++i) { diff --git a/src/lib/subtitle_format.h b/src/lib/subtitle_format.h index dbcbf6d17..5832e0cd2 100644 --- a/src/lib/subtitle_format.h +++ b/src/lib/subtitle_format.h @@ -25,7 +25,8 @@ enum class SubtitleFormat { XML, - MXF + MXF, + SRT }; |
