summaryrefslogtreecommitdiff
path: root/src/lib/hints.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-06-01 17:10:16 +0200
committerCarl Hetherington <cth@carlh.net>2021-06-01 17:10:16 +0200
commit4d5d4d96ef3314d3242807c4e610565b769414ee (patch)
treebcec645f1970c9959134902df41e75f5b2a8d334 /src/lib/hints.cc
parent1b348977ecc0a8fa31135bf2d554c3d25bafaa2f (diff)
Add hint when no audio language is set (#2033).
Diffstat (limited to 'src/lib/hints.cc')
-rw-r--r--src/lib/hints.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/hints.cc b/src/lib/hints.cc
index fe2e5889c..64122db8d 100644
--- a/src/lib/hints.cc
+++ b/src/lib/hints.cc
@@ -400,6 +400,7 @@ try
check_ffec_and_ffmc_in_smpte_feature ();
check_out_of_range_markers ();
check_text_languages ();
+ check_audio_language ();
if (check_loudness_done) {
emit (bind(boost::ref(Progress), _("Examining subtitles and closed captions")));
@@ -637,3 +638,20 @@ Hints::check_text_languages ()
}
}
}
+
+
+void
+Hints::check_audio_language ()
+{
+ auto content = film()->content();
+ auto mapped_audio =
+ std::find_if(content.begin(), content.end(), [](shared_ptr<const Content> c) {
+ return c->audio && !c->audio->mapping().mapped_output_channels().empty();
+ });
+
+ if (mapped_audio != content.end() && !film()->audio_language()) {
+ hint (_("Some of your content has audio but you have not set the audio language. It is advisable to set the audio language "
+ "in the \"DCP\" tab unless your audio has no spoken parts."));
+ }
+}
+