int const AudioContentProperty::STREAMS = 200;
int const AudioContentProperty::GAIN = 201;
int const AudioContentProperty::DELAY = 202;
-int const AudioContentProperty::LANGUAGE = 203;
AudioContent::AudioContent (Content* parent)
{
_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");
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 ();
}
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());
- }
}
}
-void
-AudioContent::set_language (optional<dcp::LanguageTag> language)
-{
- maybe_set (_language, language, AudioContentProperty::LANGUAGE);
-}
-
-
string
AudioContent::technical_summary () const
{