Class MpegAacTrackConsumer
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.container.mpeg.MpegAacTrackConsumer
-
- All Implemented Interfaces:
MpegTrackConsumer
public class MpegAacTrackConsumer extends java.lang.Object implements MpegTrackConsumer
Handles processing MP4 AAC frames. Passes the decoded frames to the specified frame consumer. Currently only AAC LC format is supported, although the underlying decoder can handler other types as well.
-
-
Constructor Summary
Constructors Constructor Description MpegAacTrackConsumer(AudioProcessingContext context, MpegTrackInfo track)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Free all resourcesvoidconsume(java.nio.channels.ReadableByteChannel channel, int length)Consume one chunk from the trackvoidflush()Indicates that no more input is coming.MpegTrackInfogetTrack()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
-
MpegAacTrackConsumer
public MpegAacTrackConsumer(AudioProcessingContext context, MpegTrackInfo track)
- Parameters:
context- Configuration and output information for processingtrack- The MP4 audio track descriptor
-
-
Method Detail
-
initialise
public void initialise()
Description copied from interface:MpegTrackConsumerInitialise the consumer, called before first consume()- Specified by:
initialisein interfaceMpegTrackConsumer
-
getTrack
public MpegTrackInfo getTrack()
- Specified by:
getTrackin interfaceMpegTrackConsumer- Returns:
- The associated MP4 track
-
seekPerformed
public void seekPerformed(long requestedTimecode, long providedTimecode)Description copied from interface:MpegTrackConsumerIndicates that the next frame is not a direct continuation of the previous one- Specified by:
seekPerformedin interfaceMpegTrackConsumer- 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:MpegTrackConsumerIndicates that no more input is coming. Flush any buffers to output.- Specified by:
flushin interfaceMpegTrackConsumer- Throws:
java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
consume
public void consume(java.nio.channels.ReadableByteChannel channel, int length) throws java.lang.InterruptedExceptionDescription copied from interface:MpegTrackConsumerConsume one chunk from the track- Specified by:
consumein interfaceMpegTrackConsumer- Parameters:
channel- Byte channel to consume fromlength- Lenth of the chunk in bytes- Throws:
java.lang.InterruptedException- When interrupted externally (or for seek/stop).
-
close
public void close()
Description copied from interface:MpegTrackConsumerFree all resources- Specified by:
closein interfaceMpegTrackConsumer
-
-