Back to Exoplayer

AssetLoader (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/transformer/AssetLoader.html

latest5.8 KB
Original Source

Package com.google.android.exoplayer2.transformer

Interface AssetLoader

  • All Known Implementing Classes:ExoPlayerAssetLoader, ImageAssetLoader, TextureAssetLoader

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceAssetLoader

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.

Provides media data to a Transformer.

The output samples can be encoded or decoded.

Only audio and video samples are supported. Both audio and video tracks can be provided by a single asset loader, but outputting multiple tracks of the same type is not supported.

An asset loader is responsible for removing audio or video if requested.

If slow motion flattening is requested, the asset loader should flatten the video track for media containing slow motion markers. This is usually done prior to decoding. The audio samples are flattened after they are output by the AssetLoader, because this is done on decoded samples.

Nested Class Summary

Nested Classes | Modifier and Type | Interface | Description | | --- | --- | --- | | static interface | AssetLoader.Factory | Deprecated.

A factory for AssetLoader instances. | | static interface | AssetLoader.Listener | Deprecated.

A listener of AssetLoader events. | | static interface | AssetLoader.SupportedOutputTypes | Deprecated.

Supported output types of an asset loader. |

Field Summary

Fields | Modifier and Type | Field | Description | | --- | --- | --- | | static int | SUPPORTED_OUTPUT_TYPE_DECODED | Deprecated.

Indicates that the asset loader can output decoded samples. | | static int | SUPPORTED_OUTPUT_TYPE_ENCODED | Deprecated.

Indicates that the asset loader can output encoded samples. |

Method Summary

All Methods Instance Methods Abstract Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | ImmutableMap<Integer,​String> | getDecoderNames() | Deprecated.

Return the used decoders' names. | | @com.google.android.exoplayer2.transformer.Transformer.ProgressState int | getProgress​(ProgressHolder progressHolder) | Deprecated.

Returns the current Transformer.ProgressState and updates progressHolder with the current progress if it is available. | | void | release() | Deprecated.

Stops loading data and releases all resources associated with the asset loader. | | void | start() | Deprecated.

Starts the asset loader. |

Field Detail

- 

SUPPORTED_OUTPUT_TYPE_ENCODED

static final int SUPPORTED_OUTPUT_TYPE_ENCODED

Deprecated.

Indicates that the asset loader can output encoded samples. See Also:Constant Field Values

- 

SUPPORTED_OUTPUT_TYPE_DECODED

static final int SUPPORTED_OUTPUT_TYPE_DECODED

Deprecated.

Indicates that the asset loader can output decoded samples. See Also:Constant Field Values

Method Detail

- 

start

void start()

Deprecated.

Starts the asset loader.

- 

getProgress

@com.google.android.exoplayer2.transformer.Transformer.ProgressState int getProgress​([ProgressHolder](ProgressHolder.html "class in com.google.android.exoplayer2.transformer")progressHolder)

Deprecated.

Returns the current Transformer.ProgressState and updates progressHolder with the current progress if it is available. Parameters:progressHolder - A ProgressHolder, updated to hold the percentage progress if available.Returns:The Transformer.ProgressState.

- 

getDecoderNames

[ImmutableMap](https://guava.dev/releases/31.1-android/api/docs/com/google/common/collect/ImmutableMap.html?is-external=true "class or interface in com.google.common.collect")<[Integer](https://developer.android.com/reference/java/lang/Integer.html "class or interface in java.lang"),​[String](https://developer.android.com/reference/java/lang/String.html?is-external=true "class or interface in java.lang")> getDecoderNames()

Deprecated.

Return the used decoders' names. Returns:The decoders' names keyed by track type.

- 

release

void release()

Deprecated.

Stops loading data and releases all resources associated with the asset loader.