Class PlainPlaylistContainerProbe
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.container.playlists.PlainPlaylistContainerProbe
-
- All Implemented Interfaces:
MediaContainerProbe
public class PlainPlaylistContainerProbe extends java.lang.Object implements MediaContainerProbe
Probe for a playlist containing the raw link without any format.
-
-
Constructor Summary
Constructors Constructor Description PlainPlaylistContainerProbe()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AudioTrackcreateTrack(java.lang.String parameters, AudioTrackInfo trackInfo, SeekableInputStream inputStream)Creates a new track for this container.java.lang.StringgetName()booleanmatchesHints(MediaContainerHints hints)MediaContainerDetectionResultprobe(AudioReference reference, SeekableInputStream inputStream)Detect whether the file readable from the input stream is using this container and if this specific file uses a format and codec that is supported for playback.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceMediaContainerProbe- Returns:
- The name of this container
-
matchesHints
public boolean matchesHints(MediaContainerHints hints)
- Specified by:
matchesHintsin interfaceMediaContainerProbe- Parameters:
hints- The available hints about the possible container.- Returns:
- True if the hints match the format this probe detects. Should always return false if all hints are null.
-
probe
public MediaContainerDetectionResult probe(AudioReference reference, SeekableInputStream inputStream) throws java.io.IOException
Description copied from interface:MediaContainerProbeDetect whether the file readable from the input stream is using this container and if this specific file uses a format and codec that is supported for playback.- Specified by:
probein interfaceMediaContainerProbe- Parameters:
reference- Reference with an identifier to use in the returned audio track infoinputStream- Input stream that contains the track file- Returns:
- Returns result with audio track on supported format, result with unsupported reason set if this is the container that the file uses, but this specific file uses a format or codec that is not supported. Returns null in case this file does not appear to be using this container format.
- Throws:
java.io.IOException- On read error.
-
createTrack
public AudioTrack createTrack(java.lang.String parameters, AudioTrackInfo trackInfo, SeekableInputStream inputStream)
Description copied from interface:MediaContainerProbeCreates a new track for this container. The audio tracks created here are never used directly, but the playback is delegated to them. As such, they do not have to support cloning or have a source manager.- Specified by:
createTrackin interfaceMediaContainerProbe- Parameters:
parameters- Parameters specific to the probe.trackInfo- Track meta informationinputStream- Input stream of the track file- Returns:
- A new audio track
-
-