Class OggVorbisTrackHandler
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.container.ogg.vorbis.OggVorbisTrackHandler
-
- All Implemented Interfaces:
OggTrackHandler,java.io.Closeable,java.lang.AutoCloseable
public class OggVorbisTrackHandler extends java.lang.Object implements OggTrackHandler
OGG stream handler for Vorbis codec.
-
-
Constructor Summary
Constructors Constructor Description OggVorbisTrackHandler(byte[] infoPacket, OggPacketInputStream packetInputStream, DirectBufferStreamBroker broker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidinitialise(AudioProcessingContext context, long timecode, long desiredTimecode)Initialises the track stream.voidprovideFrames()Decodes audio frames and sends them to frame consumer.voidseekToTimecode(long timecode)Seeks to the specified timecode.
-
-
-
Constructor Detail
-
OggVorbisTrackHandler
public OggVorbisTrackHandler(byte[] infoPacket, OggPacketInputStream packetInputStream, DirectBufferStreamBroker broker)- Parameters:
packetInputStream- OGG packet input streambroker- Broker for loading stream data into direct byte buffer, it has already loaded the first two packets (info and comments) and should be in the state where we should request the next - the setup packet.
-
-
Method Detail
-
initialise
public void initialise(AudioProcessingContext context, long timecode, long desiredTimecode) throws java.io.IOException
Description copied from interface:OggTrackHandlerInitialises the track stream.- Specified by:
initialisein interfaceOggTrackHandler- Parameters:
context- Configuration and output information for processing- Throws:
java.io.IOException- On read error.
-
provideFrames
public void provideFrames() throws java.lang.InterruptedExceptionDescription copied from interface:OggTrackHandlerDecodes audio frames and sends them to frame consumer.- Specified by:
provideFramesin interfaceOggTrackHandler- Throws:
java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
seekToTimecode
public void seekToTimecode(long timecode)
Description copied from interface:OggTrackHandlerSeeks to the specified timecode.- Specified by:
seekToTimecodein interfaceOggTrackHandler- Parameters:
timecode- The timecode in milliseconds
-
close
public void close()
- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable
-
-