public class OggAudioStatistics extends Object
OggAudioStream
,
such as how long it lasts.
Format specific subclasses may be able to also identify
additional statistics beyond these.Constructor and Description |
---|
OggAudioStatistics(OggAudioHeaders headers,
OggAudioStream audio) |
Modifier and Type | Method and Description |
---|---|
void |
calculate()
Calculate the statistics
|
long |
getAudioDataSize()
The size, in bytes, of all the audio data
|
int |
getAudioPacketsCount()
The number of audio packets in the stream
|
double |
getAverageAudioBitrate()
The average audio bitrate, in bits per second, of the
audio data, but excluding headers and ogg overhead
|
double |
getAverageOverallBitrate()
The average bitrate, in bits per second, of all data
in the file (audio, headers, overhead)
|
String |
getDuration()
Returns the duration, in Hours:Minutes:Seconds.MS
|
double |
getDurationSeconds()
Returns the duration of the audio, in seconds.
|
long |
getHeaderOverheadSize()
The size, in bytes, of the audio headers at the
start of the file
|
long |
getLastGranule()
The last granule (time position) in the audio stream
|
float |
getOggOverheadPercentage()
The percentage, from 0 to 100, of the ogg page overhead
of all the packets (audio data and audio headers)
|
long |
getOggOverheadSize()
The size, in bytes, of the ogg page overhead of all
the packets (audio data and audio headers)
|
protected void |
handleAudioData(OggStreamAudioData audioData) |
protected void |
handleHeader(OggStreamPacket header) |
public OggAudioStatistics(OggAudioHeaders headers, OggAudioStream audio) throws IOException
IOException
public void calculate() throws IOException
IOException
protected void handleHeader(OggStreamPacket header)
protected void handleAudioData(OggStreamAudioData audioData)
public double getDurationSeconds()
public String getDuration()
public long getLastGranule()
public int getAudioPacketsCount()
public long getAudioDataSize()
public long getHeaderOverheadSize()
public float getOggOverheadPercentage()
public long getOggOverheadSize()
public double getAverageOverallBitrate()
public double getAverageAudioBitrate()
Copyright © 2018. All rights reserved.