本文整理匯總了Java中org.mp4parser.boxes.iso14496.part1.objectdescriptors.AudioSpecificConfig類的典型用法代碼示例。如果您正苦於以下問題:Java AudioSpecificConfig類的具體用法?Java AudioSpecificConfig怎麽用?Java AudioSpecificConfig使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
AudioSpecificConfig類屬於org.mp4parser.boxes.iso14496.part1.objectdescriptors包,在下文中一共展示了AudioSpecificConfig類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: getAudioSamplingRate
import org.mp4parser.boxes.iso14496.part1.objectdescriptors.AudioSpecificConfig; //導入依賴的package包/類
public static long getAudioSamplingRate(AudioSampleEntry e) {
ESDescriptorBox esds = Path.getPath(e, "esds");
if (esds != null) {
final DecoderConfigDescriptor decoderConfigDescriptor = esds.getEsDescriptor().getDecoderConfigDescriptor();
final AudioSpecificConfig audioSpecificConfig = decoderConfigDescriptor.getAudioSpecificInfo();
if (audioSpecificConfig.getExtensionAudioObjectType() > 0 && audioSpecificConfig.sbrPresentFlag) {
return audioSpecificConfig.getExtensionSamplingFrequency();
} else {
return audioSpecificConfig.getSamplingFrequency();
}
} else {
return e.getSampleRate();
}
}
示例2: getAACChannelConfig
import org.mp4parser.boxes.iso14496.part1.objectdescriptors.AudioSpecificConfig; //導入依賴的package包/類
private static ChannelConfiguration getAACChannelConfig(AudioSampleEntry e, ESDescriptorBox esds) {
final DecoderConfigDescriptor decoderConfigDescriptor = esds.getEsDescriptor().getDecoderConfigDescriptor();
final AudioSpecificConfig audioSpecificConfig = decoderConfigDescriptor.getAudioSpecificInfo();
ChannelConfiguration cc = new ChannelConfiguration();
cc.schemeIdUri = "urn:mpeg:dash:23003:3:audio_channel_configuration:2011";
cc.value = "2";
if (audioSpecificConfig != null && audioSpecificConfig.getChannelConfiguration() > 2) {
// in case of mono let's assume stereo as it will be Parametric Stereo in most cases.
cc.value = String.valueOf(audioSpecificConfig.getChannelConfiguration());
}
return cc;
}