ExoPlayerAssetLoader.Factory


public final class ExoPlayerAssetLoader.Factory implements AssetLoader.Factory


An AssetLoader.Factory for ExoPlayerAssetLoader instances.

Summary

Public constructors

Factory(
    Context context,
    Codec.DecoderFactory decoderFactory,
    Clock clock
)

Creates an instance using a DefaultMediaSourceFactory.

Factory(
    Context context,
    Codec.DecoderFactory decoderFactory,
    Clock clock,
    MediaSource.Factory mediaSourceFactory
)

Creates an instance.

Public methods

AssetLoader
createAssetLoader(
    EditedMediaItem editedMediaItem,
    Looper looper,
    AssetLoader.Listener listener,
    AssetLoader.CompositionSettings compositionSettings
)

Creates an AssetLoader instance.

Public constructors

Factory

public Factory(
    Context context,
    Codec.DecoderFactory decoderFactory,
    Clock clock
)

Creates an instance using a DefaultMediaSourceFactory.

Parameters
Context context

The Context.

Codec.DecoderFactory decoderFactory

The Codec.DecoderFactory to use to decode the samples (if necessary).

Clock clock

The Clock to use. It should always be DEFAULT, except for testing.

Factory

public Factory(
    Context context,
    Codec.DecoderFactory decoderFactory,
    Clock clock,
    MediaSource.Factory mediaSourceFactory
)

Creates an instance.

Parameters
Context context

The Context.

Codec.DecoderFactory decoderFactory

The Codec.DecoderFactory to use to decode the samples (if necessary).

Clock clock

The Clock to use. It should always be DEFAULT, except for testing.

MediaSource.Factory mediaSourceFactory

The MediaSource.Factory to use to retrieve the samples to transform.

Public methods

createAssetLoader

public AssetLoader createAssetLoader(
    EditedMediaItem editedMediaItem,
    Looper looper,
    AssetLoader.Listener listener,
    AssetLoader.CompositionSettings compositionSettings
)

Creates an AssetLoader instance.

Parameters
EditedMediaItem editedMediaItem

The EditedMediaItem to load.

Looper looper

The Looper that's used to access the AssetLoader after it's been created.

AssetLoader.Listener listener

The Listener on which the AssetLoader should notify of events.

AssetLoader.CompositionSettings compositionSettings

The CompositionSettings.

Returns
AssetLoader

An AssetLoader.