Class DefaultExtractorsFactory

    • Constructor Detail

      • DefaultExtractorsFactory

        public DefaultExtractorsFactory()
    • Method Detail

      • setConstantBitrateSeekingEnabled

        public DefaultExtractorsFactory setConstantBitrateSeekingEnabled​(boolean constantBitrateSeekingEnabled)
        Convenience method to set whether approximate seeking using constant bitrate assumptions should be enabled for all extractors that support it. If set to true, the flags required to enable this functionality will be OR'd with those passed to the setters when creating extractor instances. If set to false then the flags passed to the setters will be used without modification.
        Parameters:
        constantBitrateSeekingEnabled - Whether approximate seeking using a constant bitrate assumption should be enabled for all extractors that support it.
        Returns:
        The factory, for convenience.
      • setConstantBitrateSeekingAlwaysEnabled

        public DefaultExtractorsFactory setConstantBitrateSeekingAlwaysEnabled​(boolean constantBitrateSeekingAlwaysEnabled)
        Convenience method to set whether approximate seeking using constant bitrate assumptions should be enabled for all extractors that support it, and if it should be enabled even if the content length (and hence the duration of the media) is unknown. If set to true, the flags required to enable this functionality will be OR'd with those passed to the setters when creating extractor instances. If set to false then the flags passed to the setters will be used without modification.

        When seeking into content where the length is unknown, application code should ensure that requested seek positions are valid, or should be ready to handle playback failures reported through Player.Listener.onPlayerError(com.google.android.exoplayer2.PlaybackException) with PlaybackException.errorCode set to PlaybackException.ERROR_CODE_IO_READ_POSITION_OUT_OF_RANGE.

        Parameters:
        constantBitrateSeekingAlwaysEnabled - Whether approximate seeking using a constant bitrate assumption should be enabled for all extractors that support it, including when the content duration is unknown.
        Returns:
        The factory, for convenience.
      • setAdtsExtractorFlags

        public DefaultExtractorsFactory setAdtsExtractorFlags​(@com.google.android.exoplayer2.extractor.ts.AdtsExtractor.Flags int flags)
        Sets flags for AdtsExtractor instances created by the factory.
        Parameters:
        flags - The flags to use.
        Returns:
        The factory, for convenience.
        See Also:
        AdtsExtractor(int)
      • setAmrExtractorFlags

        public DefaultExtractorsFactory setAmrExtractorFlags​(@com.google.android.exoplayer2.extractor.amr.AmrExtractor.Flags int flags)
        Sets flags for AmrExtractor instances created by the factory.
        Parameters:
        flags - The flags to use.
        Returns:
        The factory, for convenience.
        See Also:
        AmrExtractor(int)
      • setFlacExtractorFlags

        public DefaultExtractorsFactory setFlacExtractorFlags​(@com.google.android.exoplayer2.extractor.flac.FlacExtractor.Flags int flags)
        Sets flags for FlacExtractor instances created by the factory. The flags are also used by com.google.android.exoplayer2.ext.flac.FlacExtractor instances if the FLAC extension is being used.
        Parameters:
        flags - The flags to use.
        Returns:
        The factory, for convenience.
        See Also:
        FlacExtractor(int)
      • setMatroskaExtractorFlags

        public DefaultExtractorsFactory setMatroskaExtractorFlags​(@com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor.Flags int flags)
        Sets flags for MatroskaExtractor instances created by the factory.
        Parameters:
        flags - The flags to use.
        Returns:
        The factory, for convenience.
        See Also:
        MatroskaExtractor(int)
      • setMp4ExtractorFlags

        public DefaultExtractorsFactory setMp4ExtractorFlags​(@com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.Flags int flags)
        Sets flags for Mp4Extractor instances created by the factory.
        Parameters:
        flags - The flags to use.
        Returns:
        The factory, for convenience.
        See Also:
        Mp4Extractor(int)
      • setFragmentedMp4ExtractorFlags

        public DefaultExtractorsFactory setFragmentedMp4ExtractorFlags​(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags)
        Sets flags for FragmentedMp4Extractor instances created by the factory.
        Parameters:
        flags - The flags to use.
        Returns:
        The factory, for convenience.
        See Also:
        FragmentedMp4Extractor(int)
      • setMp3ExtractorFlags

        public DefaultExtractorsFactory setMp3ExtractorFlags​(@com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.Flags int flags)
        Sets flags for Mp3Extractor instances created by the factory.
        Parameters:
        flags - The flags to use.
        Returns:
        The factory, for convenience.
        See Also:
        Mp3Extractor(int)