Search in sources :

Example 1 with ChainedInputStream

use of com.sedmelluq.discord.lavaplayer.tools.io.ChainedInputStream in project lavaplayer by sedmelluq.

the class M3uStreamAudioTrack method process.

@Override
public void process(LocalAudioTrackExecutor localExecutor) throws Exception {
    try (final HttpInterface httpInterface = getHttpInterface()) {
        try (ChainedInputStream chainedInputStream = new ChainedInputStream(() -> segmentUrlProvider.getNextSegmentStream(httpInterface))) {
            MpegTsElementaryInputStream elementaryInputStream = new MpegTsElementaryInputStream(chainedInputStream, ADTS_ELEMENTARY_STREAM);
            PesPacketInputStream pesPacketInputStream = new PesPacketInputStream(elementaryInputStream);
            processDelegate(new AdtsAudioTrack(trackInfo, pesPacketInputStream), localExecutor);
        }
    }
}
Also used : HttpInterface(com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface) MpegTsElementaryInputStream(com.sedmelluq.discord.lavaplayer.container.mpegts.MpegTsElementaryInputStream) ChainedInputStream(com.sedmelluq.discord.lavaplayer.tools.io.ChainedInputStream) PesPacketInputStream(com.sedmelluq.discord.lavaplayer.container.mpegts.PesPacketInputStream) AdtsAudioTrack(com.sedmelluq.discord.lavaplayer.container.adts.AdtsAudioTrack)

Aggregations

AdtsAudioTrack (com.sedmelluq.discord.lavaplayer.container.adts.AdtsAudioTrack)1 MpegTsElementaryInputStream (com.sedmelluq.discord.lavaplayer.container.mpegts.MpegTsElementaryInputStream)1 PesPacketInputStream (com.sedmelluq.discord.lavaplayer.container.mpegts.PesPacketInputStream)1 ChainedInputStream (com.sedmelluq.discord.lavaplayer.tools.io.ChainedInputStream)1 HttpInterface (com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface)1