Add NamedChannel and use it to hide the never-used channels
[dcpomatic.git] / src / lib / audio_content.cc
index 014221f2e892afc95ef5f31d57aa3f4e44bea997..22521c9e9b8be6ab6a263ef44b62b7ed22302e5f 100644 (file)
@@ -265,17 +265,18 @@ AudioContent::processing_description (shared_ptr<const Film> film) const
 }
 
 /** @return User-visible names of each of our audio channels */
-vector<string>
+vector<NamedChannel>
 AudioContent::channel_names () const
 {
-       vector<string> n;
+       vector<NamedChannel> n;
 
-       int t = 1;
+       int index = 0;
+       int stream = 1;
        BOOST_FOREACH (AudioStreamPtr i, streams ()) {
                for (int j = 0; j < i->channels(); ++j) {
-                       n.push_back (String::compose ("%1:%2", t, j + 1));
+                       n.push_back (NamedChannel(String::compose ("%1:%2", stream, j + 1), index++));
                }
-               ++t;
+               ++stream;
        }
 
        return n;