本文整理汇总了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;
}