Class MatroskaAacTrackConsumer
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.container.matroska.MatroskaAacTrackConsumer
-
- All Implemented Interfaces:
MatroskaTrackConsumer,java.lang.AutoCloseable
public class MatroskaAacTrackConsumer extends java.lang.Object implements MatroskaTrackConsumer
Consumes AAC track data from a matroska file.
-
-
Constructor Summary
Constructors Constructor Description MatroskaAacTrackConsumer(AudioProcessingContext context, MatroskaFileTrack track)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Already flushed, no more input coming.voidconsume(java.nio.ByteBuffer data)Consume one frame from the trackvoidflush()Indicates that no more input will come, all remaining buffers should be flushedMatroskaFileTrackgetTrack()voidinitialise()Initialise the consumer, called before first consume()voidseekPerformed(long requestedTimecode, long providedTimecode)Indicates that the next frame is not a direct continuation of the previous one
-
-
-
Constructor Detail
-
MatroskaAacTrackConsumer
public MatroskaAacTrackConsumer(AudioProcessingContext context, MatroskaFileTrack track)
- Parameters:
context- Configuration and output information for processingtrack- The MP4 audio track descriptor
-
-
Method Detail
-
initialise
public void initialise()
Description copied from interface:MatroskaTrackConsumerInitialise the consumer, called before first consume()- Specified by:
initialisein interfaceMatroskaTrackConsumer
-
getTrack
public MatroskaFileTrack getTrack()
- Specified by:
getTrackin interfaceMatroskaTrackConsumer- Returns:
- The associated matroska file track
-
seekPerformed
public void seekPerformed(long requestedTimecode, long providedTimecode)Description copied from interface:MatroskaTrackConsumerIndicates that the next frame is not a direct continuation of the previous one- Specified by:
seekPerformedin interfaceMatroskaTrackConsumer- Parameters:
requestedTimecode- Timecode in milliseconds to which the seek was requested toprovidedTimecode- Timecode in milliseconds to which the seek was actually performed to
-
flush
public void flush() throws java.lang.InterruptedExceptionDescription copied from interface:MatroskaTrackConsumerIndicates that no more input will come, all remaining buffers should be flushed- Specified by:
flushin interfaceMatroskaTrackConsumer- Throws:
java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
consume
public void consume(java.nio.ByteBuffer data) throws java.lang.InterruptedExceptionDescription copied from interface:MatroskaTrackConsumerConsume one frame from the track- Specified by:
consumein interfaceMatroskaTrackConsumer- Parameters:
data- The data of the frame- Throws:
java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
close
public void close()
Description copied from interface:MatroskaTrackConsumerAlready flushed, no more input coming. Free all resources.- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfaceMatroskaTrackConsumer
-
-