String rfc5646SpokenLanguage = null; if(this.hasWaveAudioEssenceDescriptor()){ List<InterchangeObject> soundfieldGroupLabelSubDescriptors = this.getSoundFieldGroupLabelSubDescriptors(); for (InterchangeObject subDescriptor : soundfieldGroupLabelSubDescriptors) { SoundFieldGroupLabelSubDescriptor soundFieldGroupLabelSubDescriptor = (SoundFieldGroupLabelSubDescriptor) subDescriptor;
/** * A method that returns the audio content kind for this Essence * @return AudioContentKind enumeration * @throws IOException - any I/O related error is exposed through an IOException */ public AudioContentKind getAudioContentKind() throws IOException { String audioContentKind = null; if(this.hasWaveAudioEssenceDescriptor()){ List<InterchangeObject> soundfieldGroupLabelSubDescriptors = this.getSoundFieldGroupLabelSubDescriptors(); for (InterchangeObject subDescriptor : soundfieldGroupLabelSubDescriptors) { SoundFieldGroupLabelSubDescriptor soundFieldGroupLabelSubDescriptor = (SoundFieldGroupLabelSubDescriptor) subDescriptor; if (audioContentKind == null) { audioContentKind = soundFieldGroupLabelSubDescriptor.getAudioContentKind(); } else if (!audioContentKind.equals(soundFieldGroupLabelSubDescriptor.getAudioContentKind())) { this.imfErrorLogger.addError(IMFErrorLogger.IMFErrors.ErrorCodes.IMF_ESSENCE_COMPONENT_ERROR, IMFErrorLogger.IMFErrors.ErrorLevels.NON_FATAL, String.format("AudioContentKind (%s, %s) do not match across the SoundFieldGroupLabelSubDescriptors", audioContentKind, soundFieldGroupLabelSubDescriptor.getAudioContentKind())); } } } return AudioContentKind.getAudioContentKindFromSymbol(audioContentKind); }
String.format("WaveAudioEssenceDescriptor in the IMFTrackFile represented by ID %s refers to a SoundFieldGroupLabelSubDescriptor that is missing one/all of MCATitle, MCATitleVersion, MCAAudioContentKind, MCAAudioElementKind, %n%s.", packageID.toString(), soundFieldGroupLabelSubDescriptorBO.toString())); SoundFieldGroupLabelSubDescriptor soundFieldGroupLabelSubDescriptor = (SoundFieldGroupLabelSubDescriptor) headerPartition.getSoundFieldGroupLabelSubDescriptors() .get(0); List<InterchangeObject> audioChannelLabelSubDescriptors = headerPartition.getAudioChannelLabelSubDescriptors();