entagged.audioformats.asf.data
Class StreamBitratePropertiesChunk

java.lang.Object
  extended by entagged.audioformats.asf.data.Chunk
      extended by entagged.audioformats.asf.data.StreamBitratePropertiesChunk

public class StreamBitratePropertiesChunk
extends Chunk

This class represents the "Stream Bitrate Properties" chunk of an asf media file.
It is optional, but contains useful information about the streams bitrate.

Author:
Christian Laireiter

Field Summary
 
Fields inherited from class entagged.audioformats.asf.data.Chunk
chunkLength, guid, position
 
Constructor Summary
StreamBitratePropertiesChunk(long pos, BigInteger chunkSize)
          Creates an instance.
 
Method Summary
 void addBitrateRecord(int streamNum, long averageBitrate)
          Adds the public values of a stream-record.
 long getAvgBitrate(int streamNumber)
          Returns the average bitrate of the given stream.
 String prettyPrint()
          (overridden)
 
Methods inherited from class entagged.audioformats.asf.data.Chunk
getChunckEnd, getChunkLength, getGuid, getPosition, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StreamBitratePropertiesChunk

public StreamBitratePropertiesChunk(long pos,
                                    BigInteger chunkSize)
Creates an instance.

Parameters:
pos - Position of the chunk within file or stream
chunkLen - Length of current chunk.
Method Detail

addBitrateRecord

public void addBitrateRecord(int streamNum,
                             long averageBitrate)
Adds the public values of a stream-record.

Parameters:
streamNum - The number of the refered stream.
averageBitrate - Its average Bitrate.

getAvgBitrate

public long getAvgBitrate(int streamNumber)
Returns the average bitrate of the given stream.

Parameters:
streamNumber - Number of the stream whose bitrate to determine.
Returns:
The average bitrate of the numbered stream. -1 if no information was given.

prettyPrint

public String prettyPrint()
(overridden)

Overrides:
prettyPrint in class Chunk
Returns:
Information of current Chunk Object.
See Also:
Chunk.prettyPrint()


Copyright © 2007-2008. All Rights Reserved.