Back to Exoplayer

DefaultExtractorsFactory (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/extractor/DefaultExtractorsFactory.html

latest20.9 KB
Original Source

Package com.google.android.exoplayer2.extractor

Class DefaultExtractorsFactory

  • java.lang.Object

    • com.google.android.exoplayer2.extractor.DefaultExtractorsFactory
  • All Implemented Interfaces:ExtractorsFactory


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public final classDefaultExtractorsFactoryextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[ExtractorsFactory](ExtractorsFactory.html "interface in com.google.android.exoplayer2.extractor")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

An ExtractorsFactory that provides an array of extractors for the following formats:

Field Summary

- 

Fields inherited from interface com.google.android.exoplayer2.extractor.ExtractorsFactory

EMPTY

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | DefaultExtractorsFactory() | Deprecated. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | Extractor[] | createExtractors() | Deprecated.

Returns an array of new Extractor instances. | | Extractor[] | createExtractors​(Uri uri, Map<String,​List<String>> responseHeaders) | Deprecated.

Returns an array of new Extractor instances. | | DefaultExtractorsFactory | setAdtsExtractorFlags​(@com.google.android.exoplayer2.extractor.ts.AdtsExtractor.Flags int flags) | Deprecated.

Sets flags for AdtsExtractor instances created by the factory. | | DefaultExtractorsFactory | setAmrExtractorFlags​(@com.google.android.exoplayer2.extractor.amr.AmrExtractor.Flags int flags) | Deprecated.

Sets flags for AmrExtractor instances created by the factory. | | DefaultExtractorsFactory | setConstantBitrateSeekingAlwaysEnabled​(boolean constantBitrateSeekingAlwaysEnabled) | Deprecated.

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. | | DefaultExtractorsFactory | setConstantBitrateSeekingEnabled​(boolean constantBitrateSeekingEnabled) | Deprecated.

Convenience method to set whether approximate seeking using constant bitrate assumptions should be enabled for all extractors that support it. | | DefaultExtractorsFactory | setFlacExtractorFlags​(@com.google.android.exoplayer2.extractor.flac.FlacExtractor.Flags int flags) | Deprecated.

Sets flags for FlacExtractor instances created by the factory. | | DefaultExtractorsFactory | setFragmentedMp4ExtractorFlags​(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags) | Deprecated.

Sets flags for FragmentedMp4Extractor instances created by the factory. | | DefaultExtractorsFactory | setMatroskaExtractorFlags​(@com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor.Flags int flags) | Deprecated.

Sets flags for MatroskaExtractor instances created by the factory. | | DefaultExtractorsFactory | setMp3ExtractorFlags​(@com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.Flags int flags) | Deprecated.

Sets flags for Mp3Extractor instances created by the factory. | | DefaultExtractorsFactory | setMp4ExtractorFlags​(@com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.Flags int flags) | Deprecated.

Sets flags for Mp4Extractor instances created by the factory. | | DefaultExtractorsFactory | setTsExtractorFlags​(@com.google.android.exoplayer2.extractor.ts.DefaultTsPayloadReaderFactory.Flags int flags) | Deprecated.

Sets flags for DefaultTsPayloadReaderFactorys used by TsExtractor instances created by the factory. | | DefaultExtractorsFactory | setTsExtractorMode​(@com.google.android.exoplayer2.extractor.ts.TsExtractor.Mode int mode) | Deprecated.

Sets the mode for TsExtractor instances created by the factory. | | DefaultExtractorsFactory | setTsExtractorTimestampSearchBytes​(int timestampSearchBytes) | Deprecated.

Sets the number of bytes searched to find a timestamp for TsExtractor instances created by the factory. | | DefaultExtractorsFactory | setTsSubtitleFormats​(List<Format> subtitleFormats) | Deprecated.

Sets a list of subtitle formats to pass to the DefaultTsPayloadReaderFactory used by TsExtractor instances created by the factory. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

DefaultExtractorsFactory

public DefaultExtractorsFactory()

Deprecated.

Method Detail

- 

setConstantBitrateSeekingEnabled

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setConstantBitrateSeekingEnabled​(boolean constantBitrateSeekingEnabled)

Deprecated.

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

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setConstantBitrateSeekingAlwaysEnabled​(boolean constantBitrateSeekingAlwaysEnabled)

Deprecated.

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

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setAdtsExtractorFlags​(@com.google.android.exoplayer2.extractor.ts.AdtsExtractor.Flags int flags)

Deprecated.

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

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setAmrExtractorFlags​(@com.google.android.exoplayer2.extractor.amr.AmrExtractor.Flags int flags)

Deprecated.

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

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setFlacExtractorFlags​(@com.google.android.exoplayer2.extractor.flac.FlacExtractor.Flags int flags)

Deprecated.

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

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setMatroskaExtractorFlags​(@com.google.android.exoplayer2.extractor.mkv.MatroskaExtractor.Flags int flags)

Deprecated.

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

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setMp4ExtractorFlags​(@com.google.android.exoplayer2.extractor.mp4.Mp4Extractor.Flags int flags)

Deprecated.

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

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setFragmentedMp4ExtractorFlags​(@com.google.android.exoplayer2.extractor.mp4.FragmentedMp4Extractor.Flags int flags)

Deprecated.

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

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setMp3ExtractorFlags​(@com.google.android.exoplayer2.extractor.mp3.Mp3Extractor.Flags int flags)

Deprecated.

Sets flags for Mp3Extractor instances created by the factory. Parameters:flags - The flags to use.Returns:The factory, for convenience.See Also:Mp3Extractor(int)

- 

setTsExtractorMode

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setTsExtractorMode​(@com.google.android.exoplayer2.extractor.ts.TsExtractor.Mode int mode)

Deprecated.

Sets the mode for TsExtractor instances created by the factory. Parameters:mode - The mode to use.Returns:The factory, for convenience.See Also:TsExtractor(int, TimestampAdjuster, TsPayloadReader.Factory, int)

- 

setTsExtractorFlags

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setTsExtractorFlags​(@com.google.android.exoplayer2.extractor.ts.DefaultTsPayloadReaderFactory.Flags int flags)

Deprecated.

Sets flags for DefaultTsPayloadReaderFactorys used by TsExtractor instances created by the factory. Parameters:flags - The flags to use.Returns:The factory, for convenience.See Also:TsExtractor(int)

- 

setTsSubtitleFormats

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setTsSubtitleFormats​([List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Format](../Format.html "class in com.google.android.exoplayer2")> subtitleFormats)

Deprecated.

Sets a list of subtitle formats to pass to the DefaultTsPayloadReaderFactory used by TsExtractor instances created by the factory. Parameters:subtitleFormats - The subtitle formats.Returns:The factory, for convenience.See Also:DefaultTsPayloadReaderFactory(int, List)

- 

setTsExtractorTimestampSearchBytes

@CanIgnoreReturnValue
public[DefaultExtractorsFactory](DefaultExtractorsFactory.html "class in com.google.android.exoplayer2.extractor")setTsExtractorTimestampSearchBytes​(int timestampSearchBytes)

Deprecated.

Sets the number of bytes searched to find a timestamp for TsExtractor instances created by the factory. Parameters:timestampSearchBytes - The number of search bytes to use.Returns:The factory, for convenience.See Also:TsExtractor(int, TimestampAdjuster, TsPayloadReader.Factory, int)

- 

createExtractors

public[Extractor](Extractor.html "interface in com.google.android.exoplayer2.extractor")[] createExtractors()

Deprecated.

Description copied from interface: ExtractorsFactory

Returns an array of new Extractor instances. Specified by:createExtractors in interface ExtractorsFactory

- 

createExtractors

public[Extractor](Extractor.html "interface in com.google.android.exoplayer2.extractor")[] createExtractors​([Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")uri,[Map](https://developer.android.com/reference/java/util/Map.html "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang"),​[List](https://developer.android.com/reference/java/util/List.html?is-external=true "class or interface in java.util")<[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")>> responseHeaders)

Deprecated.

Description copied from interface: ExtractorsFactory

Returns an array of new Extractor instances. Specified by:createExtractors in interface ExtractorsFactoryParameters:uri - The Uri of the media to extract.responseHeaders - The response headers of the media to extract, or an empty map if there are none. The map lookup should be case-insensitive.Returns:The Extractor instances.