if (GUID.GUID_AUDIOSTREAM.equals(streamTypeGUID)) {
/*
* Reading audio specific information
*/
AudioStreamChunk audioStreamChunk = new AudioStreamChunk(
chunkStart, chunkLength);
result = audioStreamChunk;
/*
* read WAVEFORMATEX and format extension.
*/
long compressionFormat = Utils.readUINT16(raf);
long channelCount = Utils.readUINT16(raf);
long samplingRate = Utils.readUINT32(raf);
long avgBytesPerSec = Utils.readUINT32(raf);
long blockAlignment = Utils.readUINT16(raf);
int bitsPerSample = Utils.readUINT16(raf);
int codecSpecificDataSize = Utils.readUINT16(raf);
byte[] codecSpecificData = new byte[codecSpecificDataSize];
raf.readFully(codecSpecificData);
audioStreamChunk.setCompressionFormat(compressionFormat);
audioStreamChunk.setChannelCount(channelCount);
audioStreamChunk.setSamplingRate(samplingRate);
audioStreamChunk.setAverageBytesPerSec(avgBytesPerSec);
audioStreamChunk.setErrorConcealment(errorConcealment);
audioStreamChunk.setBlockAlignment(blockAlignment);
audioStreamChunk.setBitsPerSample (bitsPerSample);
audioStreamChunk.setCodecData (codecSpecificData);
} else if (GUID.GUID_VIDEOSTREAM.equals(streamTypeGUID)) {
/*
* Reading video specific information
*/
VideoStreamChunk videoStreamChunk = new VideoStreamChunk(