Interface MediaContainerProbe

    • 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 info
        inputStream - 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 information
        inputStream - Input stream of the track file
        Returns:
        A new audio track