* @throws IOException
* read errors.
*/
private StreamBitratePropertiesChunk parseData(RandomAccessFile raf)
throws IOException {
StreamBitratePropertiesChunk result = null;
long chunkStart = raf.getFilePointer();
GUID guid = Utils.readGUID(raf);
if (GUID.GUID_STREAM_BITRATE_PROPERTIES.equals(guid)) {
BigInteger chunkLen = Utils.readBig64(raf);
result = new StreamBitratePropertiesChunk(chunkStart, chunkLen);
/*
* Read the amount of bitrate records
*/
long recordCount = Utils.readUINT16(raf);
for (int i = 0; i < recordCount; i++) {
int flags = Utils.readUINT16(raf);
long avgBitrate = Utils.readUINT32(raf);
result.addBitrateRecord(flags & 0x00FF, avgBitrate);
}
}
return result;
}