summaryrefslogtreecommitdiff
path: root/src/wx/audio_panel.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-01 12:28:00 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-01 12:28:00 +0100
commit9dd35cac8c6ca8198eb858891dfb0a0d9cdede4c (patch)
tree99fb4bc83158d384eb91e3c7c29b97239e81a3cc /src/wx/audio_panel.cc
parent4cbf56d2cfd8a78a7274fd69b4aaf1394bb4e801 (diff)
Basics of better audio stream labelling in the audio mapping view (#849).
Diffstat (limited to 'src/wx/audio_panel.cc')
-rw-r--r--src/wx/audio_panel.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/wx/audio_panel.cc b/src/wx/audio_panel.cc
index df8c7871e..fa086b8e3 100644
--- a/src/wx/audio_panel.cc
+++ b/src/wx/audio_panel.cc
@@ -25,6 +25,7 @@
#include "content_panel.h"
#include "audio_dialog.h"
#include "lib/config.h"
+#include "lib/ffmpeg_audio_stream.h"
#include "lib/ffmpeg_content.h"
#include "lib/cinema_sound_processor.h"
#include "lib/job_manager.h"
@@ -154,6 +155,16 @@ AudioPanel::film_content_changed (int property)
if (ac.size() == 1) {
_mapping->set (ac.front()->audio->mapping());
_mapping->set_input_channels (ac.front()->audio->channel_names ());
+
+ vector<AudioMappingView::Group> groups;
+ int c = 0;
+ BOOST_FOREACH (shared_ptr<const AudioStream> i, ac.front()->audio->streams()) {
+ shared_ptr<const FFmpegAudioStream> f = dynamic_pointer_cast<const FFmpegAudioStream> (i);
+ groups.push_back (AudioMappingView::Group (c, c + i->channels() - 1, f ? f->name : ""));
+ c += i->channels ();
+ }
+ _mapping->set_input_groups (groups);
+
} else {
_mapping->set (AudioMapping ());
}