Class MpegNoopTrackConsumer
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.container.mpeg.MpegNoopTrackConsumer
-
- All Implemented Interfaces:
MpegTrackConsumer
public class MpegNoopTrackConsumer extends java.lang.Object implements MpegTrackConsumer
No-op MP4 track consumer, for probing purposes.
-
-
Constructor Summary
Constructors Constructor Description MpegNoopTrackConsumer(MpegTrackInfo trackInfo)
-
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
-
MpegNoopTrackConsumer
public MpegNoopTrackConsumer(MpegTrackInfo trackInfo)
- Parameters:
trackInfo- Track info.
-
-
Method Detail
-
getTrack
public MpegTrackInfo getTrack()
- Specified by:
getTrackin interfaceMpegTrackConsumer- Returns:
- The associated MP4 track
-
initialise
public void initialise()
Description copied from interface:MpegTrackConsumerInitialise the consumer, called before first consume()- Specified by:
initialisein interfaceMpegTrackConsumer
-
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
-
-