Class Mp3XingSeeker
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.container.mp3.Mp3XingSeeker
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Mp3XingSeekercreateFromFrame(long firstFramePosition, long contentLength, byte[] frameBuffer)longgetDuration()booleanisSeekable()longseekAndGetFrameIndex(long timecode, SeekableInputStream inputStream)
-
-
-
Method Detail
-
createFromFrame
public static Mp3XingSeeker createFromFrame(long firstFramePosition, long contentLength, byte[] frameBuffer)
- Parameters:
firstFramePosition- Position of the first frame in the filecontentLength- Total length of the fileframeBuffer- Buffer of the first frame- Returns:
- Xing seeker, if its header is found in the first frame and has all the necessary fields
-
getDuration
public long getDuration()
- Specified by:
getDurationin interfaceMp3Seeker- Returns:
- The duration of the file in milliseconds. May be an estimate.
-
isSeekable
public boolean isSeekable()
- Specified by:
isSeekablein interfaceMp3Seeker- Returns:
- True if the track is seekable.
-
seekAndGetFrameIndex
public long seekAndGetFrameIndex(long timecode, SeekableInputStream inputStream) throws java.io.IOException- Specified by:
seekAndGetFrameIndexin interfaceMp3Seeker- Parameters:
timecode- The timecode that the seek is requested toinputStream- The input stream to perform the seek on- Returns:
- The index of the frame that the seek was performed to
- Throws:
java.io.IOException- On IO error
-
-