Class OggStreamSizeInfo


  • public class OggStreamSizeInfo
    extends java.lang.Object
    Describes the size information of an OGG stream.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      long firstPageOffset
      Absolute offset of the first page in the stream.
      long lastPageOffset
      Absolute offset of the last page in the stream.
      int sampleRate
      Sample rate of the track in this stream, useful for calculating duration in milliseconds.
      long totalBytes
      Total number of bytes in the stream.
      long totalSamples
      Total number of samples in the stream.
    • Constructor Summary

      Constructors 
      Constructor Description
      OggStreamSizeInfo​(long totalBytes, long totalSamples, long firstPageOffset, long lastPageOffset, int sampleRate)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long getDuration()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • totalBytes

        public final long totalBytes
        Total number of bytes in the stream.
      • totalSamples

        public final long totalSamples
        Total number of samples in the stream.
      • firstPageOffset

        public final long firstPageOffset
        Absolute offset of the first page in the stream.
      • lastPageOffset

        public final long lastPageOffset
        Absolute offset of the last page in the stream.
      • sampleRate

        public final int sampleRate
        Sample rate of the track in this stream, useful for calculating duration in milliseconds.
    • Constructor Detail

      • OggStreamSizeInfo

        public OggStreamSizeInfo​(long totalBytes,
                                 long totalSamples,
                                 long firstPageOffset,
                                 long lastPageOffset,
                                 int sampleRate)
        Parameters:
        totalBytes - See totalBytes.
        totalSamples - See totalSamples.
        firstPageOffset - See firstPageOffset.
        lastPageOffset - See lastPageOffset.
        sampleRate - See sampleRate.
    • Method Detail

      • getDuration

        public long getDuration()
        Returns:
        Duration calculated from size info in milliseconds (rounded down).