Class MediaContainerDetectionResult
- java.lang.Object
-
- com.sedmelluq.discord.lavaplayer.container.MediaContainerDetectionResult
-
public class MediaContainerDetectionResult extends java.lang.ObjectResult of audio container detection.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaContainerDescriptorgetContainerDescriptor()AudioReferencegetReference()AudioTrackInfogetTrackInfo()java.lang.StringgetUnsupportedReason()booleanisContainerDetected()booleanisReference()booleanisSupportedFile()static MediaContainerDetectionResultrefer(MediaContainerProbe probe, AudioReference reference)Creates a load result referring to another item.static MediaContainerDetectionResultsupportedFormat(MediaContainerProbe probe, java.lang.String settings, AudioTrackInfo trackInfo)Creates a load result for supported file.static MediaContainerDetectionResultunknownFormat()Creates an unknown format result.static MediaContainerDetectionResultunsupportedFormat(MediaContainerProbe probe, java.lang.String reason)Creates a result ofr an unsupported file of a known container.
-
-
-
Method Detail
-
unknownFormat
public static MediaContainerDetectionResult unknownFormat()
Creates an unknown format result.
-
unsupportedFormat
public static MediaContainerDetectionResult unsupportedFormat(MediaContainerProbe probe, java.lang.String reason)
Creates a result ofr an unsupported file of a known container.- Parameters:
probe- Probe of the containerreason- The reason why this track is not supported
-
refer
public static MediaContainerDetectionResult refer(MediaContainerProbe probe, AudioReference reference)
Creates a load result referring to another item.- Parameters:
probe- Probe of the containerreference- Reference to another item
-
supportedFormat
public static MediaContainerDetectionResult supportedFormat(MediaContainerProbe probe, java.lang.String settings, AudioTrackInfo trackInfo)
Creates a load result for supported file.- Parameters:
probe- Probe of the containertrackInfo- Track info for the file
-
isContainerDetected
public boolean isContainerDetected()
- Returns:
- If the container this file uses was detected. In case this returns true, the container probe is non-null.
-
getContainerDescriptor
public MediaContainerDescriptor getContainerDescriptor()
- Returns:
- The probe for the container of the file
-
isSupportedFile
public boolean isSupportedFile()
- Returns:
- Whether this specific file is supported. If this returns true, the track info is non-null. Otherwise the reason why this file is not supported can be retrieved via getUnsupportedReason().
-
getUnsupportedReason
public java.lang.String getUnsupportedReason()
- Returns:
- The reason why this track is not supported.
-
getTrackInfo
public AudioTrackInfo getTrackInfo()
- Returns:
- Track info for the detected file.
-
isReference
public boolean isReference()
-
getReference
public AudioReference getReference()
-
-