diff options
| author | Carl Hetherington <cth@carlh.net> | 2021-03-23 00:50:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-03-31 22:48:53 +0200 |
| commit | e0a70cd5cfb11fc2de167f3146acdd437a6faa82 (patch) | |
| tree | 022ceef78d7daa12bccf519ebab0db5e23a3feb6 /test/subtitle_language_test.cc | |
| parent | 8640da877450479a85c73b2a921897d83b478c84 (diff) | |
Put subtitle language back into content from the film (#1930).
This also adds the main/additional language flag.
Of all the considerations about how to specify subtitle language,
the most important seems to be that the language specification happens
for the content where the language is; i.e. in the content text tab.
Diffstat (limited to 'test/subtitle_language_test.cc')
| -rw-r--r-- | test/subtitle_language_test.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/test/subtitle_language_test.cc b/test/subtitle_language_test.cc index f0f2ad162..af5dee001 100644 --- a/test/subtitle_language_test.cc +++ b/test/subtitle_language_test.cc @@ -18,13 +18,16 @@ */ + /** @file test/subtitle_language_test.cc * @brief Test that subtitle language information is correctly written to DCPs. */ +#include "lib/content.h" #include "lib/content_factory.h" #include "lib/film.h" +#include "lib/text_content.h" #include "test.h" #include <dcp/language_tag.h> #include <boost/test/unit_test.hpp> @@ -39,12 +42,10 @@ using std::shared_ptr; BOOST_AUTO_TEST_CASE (subtitle_language_interop_test) { string const name = "subtitle_language_interop_test"; - auto film = new_test_film2 (name, { content_factory("test/data/frames.srt").front() }); + auto fr = content_factory("test/data/frames.srt").front(); + auto film = new_test_film2 (name, { fr }); - vector<dcp::LanguageTag> langs = { - dcp::LanguageTag("fr-FR"), dcp::LanguageTag("de-DE") - }; - film->set_subtitle_languages(langs); + fr->only_text()->set_language (dcp::LanguageTag("fr-FR")); film->set_interop (true); make_and_verify_dcp ( @@ -62,12 +63,10 @@ BOOST_AUTO_TEST_CASE (subtitle_language_interop_test) BOOST_AUTO_TEST_CASE (subtitle_language_smpte_test) { string const name = "subtitle_language_smpte_test"; - auto film = new_test_film2 (name, { content_factory("test/data/frames.srt").front() }); + auto fr = content_factory("test/data/frames.srt").front(); + auto film = new_test_film2 (name, { fr }); - vector<dcp::LanguageTag> langs = { - dcp::LanguageTag("fr-FR"), dcp::LanguageTag("de-DE") - }; - film->set_subtitle_languages (langs); + fr->only_text()->set_language (dcp::LanguageTag("fr-FR")); film->set_interop (false); make_and_verify_dcp ( |
