/** * A method that returns the Channel ID to AudioChannelLabelSubDescriptor * @return Channel ID to AudioChannelLabelSubDescriptor mapping */ @Nullable public Map<Long, AudioChannelLabelSubDescriptor> getAudioChannelIDToMCASubDescriptorMap() { List<InterchangeObject> subDescriptors = getAudioChannelLabelSubDescriptors(); Map<Long, AudioChannelLabelSubDescriptor> audioChannelLabelSubDescriptorMap = new HashMap<>(); subDescriptors.stream() .map(e -> AudioChannelLabelSubDescriptor.class.cast(e)) .forEach(e -> audioChannelLabelSubDescriptorMap.put(e.getMCAChannelId() == null? 1 : e.getMCAChannelId(), e)); return audioChannelLabelSubDescriptorMap; }
List<InterchangeObject> audioChannelLabelSubDescriptors = headerPartition.getAudioChannelLabelSubDescriptors();