Interface MediaContainerProbe
-
- All Known Implementing Classes:
AdtsContainerProbe,FlacContainerProbe,M3uPlaylistContainerProbe,MatroskaContainerProbe,Mp3ContainerProbe,MpegAdtsContainerProbe,MpegContainerProbe,OggContainerProbe,PlainPlaylistContainerProbe,PlsPlaylistContainerProbe,WavContainerProbe
public interface MediaContainerProbeTrack information probe for one media container type and factory for tracks for that container.
-
-
Method Summary
All Methods Instance Methods Abstract 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
java.lang.String getName()
- Returns:
- The name of this container
-
matchesHints
boolean matchesHints(MediaContainerHints hints)
- 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
MediaContainerDetectionResult probe(AudioReference reference, SeekableInputStream inputStream) throws java.io.IOException
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.- 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
AudioTrack createTrack(java.lang.String parameters, AudioTrackInfo trackInfo, SeekableInputStream inputStream)
Creates 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.- Parameters:
parameters- Parameters specific to the probe.trackInfo- Track meta informationinputStream- Input stream of the track file- Returns:
- A new audio track
-
-