public static AudioCodecMeta createAudioCodecMeta(String fourcc, int sampleSize, int channelCount, int sampleRate, ByteOrder endian, boolean pcm, Label[] labels, ByteBuffer codecPrivate) { AudioCodecMeta self = new AudioCodecMeta(fourcc, codecPrivate); self.sampleSize = sampleSize; self.channelCount = channelCount; self.sampleRate = sampleRate; self.endian = endian; self.pcm = pcm; self.labels = labels; return self; }
public static AudioCodecMeta createAudioCodecMeta2(String fourcc, int sampleSize, int channelCount, int sampleRate, ByteOrder endian, boolean pcm, Label[] labels, int samplesPerPacket, int bytesPerPacket, int bytesPerFrame, ByteBuffer codecPrivate) { AudioCodecMeta self = new AudioCodecMeta(fourcc, codecPrivate); self.sampleSize = sampleSize; self.channelCount = channelCount; self.sampleRate = sampleRate; self.endian = endian; self.samplesPerPacket = samplesPerPacket; self.bytesPerPacket = bytesPerPacket; self.bytesPerFrame = bytesPerFrame; self.pcm = pcm; self.labels = labels; return self; }
public static AudioCodecMeta fromAudioFormat(AudioFormat format) { AudioCodecMeta self = new AudioCodecMeta(null, null); self.sampleSize = format.getSampleSizeInBits() >> 3; self.channelCount = format.getChannels(); self.sampleRate = format.getSampleRate(); self.endian = format.isBigEndian() ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN; self.pcm = false; return self; } }
public static AudioCodecMeta createAudioCodecMeta3(String fourcc, ByteBuffer codecPrivate, AudioFormat format, boolean pcm, Label[] labels) { AudioCodecMeta self = new AudioCodecMeta(fourcc, codecPrivate); self.sampleSize = format.getSampleSizeInBits() >> 3; self.channelCount = format.getChannels(); self.sampleRate = format.getSampleRate(); self.endian = format.isBigEndian() ? ByteOrder.BIG_ENDIAN : ByteOrder.LITTLE_ENDIAN; self.pcm = pcm; self.labels = labels; return self; }