org.jaudiotagger.audio.asf.data
Class StreamBitratePropertiesChunk

java.lang.Object
  extended by org.jaudiotagger.audio.asf.data.Chunk
      extended by org.jaudiotagger.audio.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

Constructor Summary
StreamBitratePropertiesChunk(long pos, java.math.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.
 java.lang.String prettyPrint()
          (overridden)
 
Methods inherited from class org.jaudiotagger.audio.asf.data.Chunk
getChunckEnd, getChunkLength, getGuid, getPosition, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StreamBitratePropertiesChunk

public StreamBitratePropertiesChunk(long pos,
                                    java.math.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 java.lang.String prettyPrint()
(overridden)

Overrides:
prettyPrint in class Chunk
Returns:
Information of current Chunk Object.
See Also:
entagged.audioformats.asf.data.Chunk#prettyPrint()