summaryrefslogtreecommitdiff
path: root/src/lib/audio_content.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2021-06-01 11:28:48 +0200
committerCarl Hetherington <cth@carlh.net>2021-06-01 14:25:17 +0200
commitddd767fd647b2fd585d75ada000d3d01c4c43cb2 (patch)
treea8807a0e60aac0cf39adee3a7a2d7c5c37cb94ad /src/lib/audio_content.cc
parent8a0ab373363c34daf5d926e951ee79fc422fdb3d (diff)
Put audio language back in the Film.
It feels neat to have audio language in the audio tab, to match the subtitle language in the subtitle tab. It also avoids the potential confusion of there being an audio language setting in the DCP metadata but no subtitle language setting. However: - I am yet to find a need to describe multiple audio languages in the same DCP (all previous users of Film::audio_languages() were just taking the first language off the list). - As Carsten points out it's fiddly to have to set the audio language for 5 separate-channel WAV files, for example (you wouldn't actually have had to do this, but it would have felt like you did). I think subtitle language remains neater where it is (per-content) as there is this additional subtitle language metadata and it makes much more sense (and is much more likely) that there are multiple subtitle languages in a DCP than it does multiple audio languages.
Diffstat (limited to 'src/lib/audio_content.cc')
-rw-r--r--src/lib/audio_content.cc20
1 files changed, 0 insertions, 20 deletions
diff --git a/src/lib/audio_content.cc b/src/lib/audio_content.cc
index 3d9f6ac05..748cbb7d0 100644
--- a/src/lib/audio_content.cc
+++ b/src/lib/audio_content.cc
@@ -52,7 +52,6 @@ using namespace dcpomatic;
int const AudioContentProperty::STREAMS = 200;
int const AudioContentProperty::GAIN = 201;
int const AudioContentProperty::DELAY = 202;
-int const AudioContentProperty::LANGUAGE = 203;
AudioContent::AudioContent (Content* parent)
@@ -90,10 +89,6 @@ AudioContent::AudioContent (Content* parent, cxml::ConstNodePtr node)
{
_gain = node->number_child<double> ("AudioGain");
_delay = node->number_child<int> ("AudioDelay");
- auto lang = node->optional_node_child ("Language");
- if (lang) {
- _language = dcp::LanguageTag (lang->content());
- }
/* Backwards compatibility */
auto r = node->optional_number_child<double>("AudioVideoFrameRate");
@@ -117,16 +112,11 @@ AudioContent::AudioContent (Content* parent, vector<shared_ptr<Content> > c)
if (c[i]->audio->delay() != ref->delay()) {
throw JoinError (_("Content to be joined must have the same audio delay."));
}
-
- if (c[i]->audio->language() != ref->language()) {
- throw JoinError (_("Content to be joined must have the same audio language."));
- }
}
_gain = ref->gain ();
_delay = ref->delay ();
_streams = ref->streams ();
- _language = ref->language ();
}
@@ -136,9 +126,6 @@ AudioContent::as_xml (xmlpp::Node* node) const
boost::mutex::scoped_lock lm (_mutex);
node->add_child("AudioGain")->add_child_text(raw_convert<string>(_gain));
node->add_child("AudioDelay")->add_child_text(raw_convert<string>(_delay));
- if (_language) {
- node->add_child("Language")->add_child_text(_language->to_string());
- }
}
@@ -156,13 +143,6 @@ AudioContent::set_delay (int d)
}
-void
-AudioContent::set_language (optional<dcp::LanguageTag> language)
-{
- maybe_set (_language, language, AudioContentProperty::LANGUAGE);
-}
-
-
string
AudioContent::technical_summary () const
{