summaryrefslogtreecommitdiff
path: root/src/lib/film.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2019-10-18 17:48:13 +0200
committerCarl Hetherington <cth@carlh.net>2019-10-18 17:48:13 +0200
commit6dc179f7d08477ecc7bac1257b47dda048a1b878 (patch)
treee04a594ce45cd2388cfc9d92f4cbe792847b7a53 /src/lib/film.cc
parent2c096eb293cf84044e3b2ea31ab0831921ec1848 (diff)
ISDCF name fixes with > 6 channels and HI/VI (#1633).
Diffstat (limited to 'src/lib/film.cc')
-rw-r--r--src/lib/film.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/lib/film.cc b/src/lib/film.cc
index 93459661b..701eecc39 100644
--- a/src/lib/film.cc
+++ b/src/lib/film.cc
@@ -813,14 +813,21 @@ Film::isdcf_name (bool if_created_now) const
/* Count mapped audio channels */
- pair<int, int> ch = audio_channel_types (mapped_audio_channels(), audio_channels());
+ list<int> mapped = mapped_audio_channels ();
+
+ pair<int, int> ch = audio_channel_types (mapped, audio_channels());
if (!ch.first && !ch.second) {
d += "_MOS";
} else if (ch.first) {
d += String::compose("_%1%2", ch.first, ch.second);
}
- /* XXX: HI/VI */
+ if (audio_channels() > static_cast<int>(dcp::HI) && find(mapped.begin(), mapped.end(), dcp::HI) != mapped.end()) {
+ d += "-HI";
+ }
+ if (audio_channels() > static_cast<int>(dcp::VI) && find(mapped.begin(), mapped.end(), dcp::VI) != mapped.end()) {
+ d += "-VI";
+ }
d += "_" + resolution_to_string (_resolution);