use of com.sedmelluq.discord.lavaplayer.container.mpeg.MpegFileLoader in project lavaplayer by sedmelluq.
the class YoutubeMpegStreamAudioTrack method processSegmentStream.
private void processSegmentStream(SeekableInputStream stream, AudioProcessingContext context, TrackState state) throws InterruptedException {
MpegFileLoader file = new MpegFileLoader(stream);
file.parseHeaders();
state.absoluteSequence = extractAbsoluteSequenceFromEvent(file.getLastEventMessage());
if (state.trackConsumer == null) {
state.trackConsumer = loadAudioTrack(file, context);
}
MpegFileTrackProvider fileReader = file.loadReader(state.trackConsumer);
if (fileReader == null) {
throw new FriendlyException("Unknown MP4 format.", SUSPICIOUS, null);
}
fileReader.provideFrames();
}
Aggregations