From: Carl Hetherington Date: Sun, 13 Nov 2022 23:26:48 +0000 (+0100) Subject: Basic WebVTT subtitle support (#1361). X-Git-Tag: v2.16.33~8 X-Git-Url: https://main.carlh.net/gitweb/?p=dcpomatic.git;a=commitdiff_plain;h=e82c83b35e7638957f3d80b12d4c59c17436473a Basic WebVTT subtitle support (#1361). --- diff --git a/cscript b/cscript index b4de45028..a3fcc8c53 100644 --- a/cscript +++ b/cscript @@ -452,7 +452,7 @@ def dependencies(target, options): deps = [] deps.append(('libdcp', 'v1.8.33')) - deps.append(('libsub', 'v1.6.37')) + deps.append(('libsub', 'v1.6.39')) deps.append(('leqm-nrt', '93ae9e6')) deps.append(('rtaudio', 'f619b76')) # We get our OpenSSL libraries from the environment, but we diff --git a/src/lib/content_factory.cc b/src/lib/content_factory.cc index 135f3fe5f..5f1e6c9b7 100644 --- a/src/lib/content_factory.cc +++ b/src/lib/content_factory.cc @@ -167,7 +167,7 @@ content_factory (boost::filesystem::path path) if (valid_image_file (path)) { single = make_shared(path); - } else if (ext == ".srt" || ext == ".ssa" || ext == ".ass" || ext == ".stl") { + } else if (ext == ".srt" || ext == ".ssa" || ext == ".ass" || ext == ".stl" || ext == ".vtt") { single = make_shared(path); } else if (ext == ".xml") { cxml::Document doc; diff --git a/src/lib/string_text_file.cc b/src/lib/string_text_file.cc index 76abe547f..869a2c96a 100644 --- a/src/lib/string_text_file.cc +++ b/src/lib/string_text_file.cc @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -105,6 +106,8 @@ StringTextFile::StringTextFile (shared_ptr content) reader.reset(new sub::SubripReader(utf8.get())); } else if (ext == ".ssa" || ext == ".ass") { reader.reset(new sub::SSAReader(utf8.get())); + } else if (ext == ".vtt") { + reader.reset(new sub::WebVTTReader(utf8.get())); } }