Search in sources :

Example 1 with MpegTsElementaryInputStream

use of com.sedmelluq.discord.lavaplayer.container.mpegts.MpegTsElementaryInputStream 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)

Example 2 with MpegTsElementaryInputStream

use of com.sedmelluq.discord.lavaplayer.container.mpegts.MpegTsElementaryInputStream in project lavaplayer by sedmelluq.

the class MpegTsM3uStreamAudioTrack method processJoinedStream.

@Override
protected void processJoinedStream(LocalAudioTrackExecutor localExecutor, InputStream stream) throws Exception {
    MpegTsElementaryInputStream elementaryInputStream = new MpegTsElementaryInputStream(stream, ADTS_ELEMENTARY_STREAM);
    PesPacketInputStream pesPacketInputStream = new PesPacketInputStream(elementaryInputStream);
    processDelegate(new AdtsAudioTrack(trackInfo, pesPacketInputStream), localExecutor);
}
Also used : MpegTsElementaryInputStream(com.sedmelluq.discord.lavaplayer.container.mpegts.MpegTsElementaryInputStream) 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)2 MpegTsElementaryInputStream (com.sedmelluq.discord.lavaplayer.container.mpegts.MpegTsElementaryInputStream)2 PesPacketInputStream (com.sedmelluq.discord.lavaplayer.container.mpegts.PesPacketInputStream)2 ChainedInputStream (com.sedmelluq.discord.lavaplayer.tools.io.ChainedInputStream)1 HttpInterface (com.sedmelluq.discord.lavaplayer.tools.io.HttpInterface)1