Class ExoPlayerAssetLoader.Factory
- java.lang.Object
-
- com.google.android.exoplayer2.transformer.ExoPlayerAssetLoader.Factory
-
- All Implemented Interfaces:
AssetLoader.Factory
- Enclosing class:
- ExoPlayerAssetLoader
public static final class ExoPlayerAssetLoader.Factory extends Object implements AssetLoader.Factory
AnAssetLoader.Factory
forExoPlayerAssetLoader
instances.
-
-
Constructor Summary
Constructors Constructor Description Factory(Context context, Codec.DecoderFactory decoderFactory, boolean forceInterpretHdrAsSdr, Clock clock)
Creates an instance using aDefaultMediaSourceFactory
.Factory(Context context, Codec.DecoderFactory decoderFactory, boolean forceInterpretHdrAsSdr, Clock clock, MediaSource.Factory mediaSourceFactory)
Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AssetLoader
createAssetLoader(EditedMediaItem editedMediaItem, Looper looper, AssetLoader.Listener listener)
Creates anAssetLoader
instance.
-
-
-
Constructor Detail
-
Factory
public Factory(Context context, Codec.DecoderFactory decoderFactory, boolean forceInterpretHdrAsSdr, Clock clock)
Creates an instance using aDefaultMediaSourceFactory
.- Parameters:
context
- TheContext
.decoderFactory
- TheCodec.DecoderFactory
to use to decode the samples (if necessary).forceInterpretHdrAsSdr
- Whether to applyTransformationRequest.HDR_MODE_EXPERIMENTAL_FORCE_INTERPRET_HDR_AS_SDR
.clock
- TheClock
to use. It should always beClock.DEFAULT
, except for testing.
-
Factory
public Factory(Context context, Codec.DecoderFactory decoderFactory, boolean forceInterpretHdrAsSdr, Clock clock, MediaSource.Factory mediaSourceFactory)
Creates an instance.- Parameters:
context
- TheContext
.decoderFactory
- TheCodec.DecoderFactory
to use to decode the samples (if necessary).forceInterpretHdrAsSdr
- Whether to applyTransformationRequest.HDR_MODE_EXPERIMENTAL_FORCE_INTERPRET_HDR_AS_SDR
.clock
- TheClock
to use. It should always beClock.DEFAULT
, except for testing.mediaSourceFactory
- TheMediaSource.Factory
to use to retrieve the samples to transform.
-
-
Method Detail
-
createAssetLoader
public AssetLoader createAssetLoader(EditedMediaItem editedMediaItem, Looper looper, AssetLoader.Listener listener)
Description copied from interface:AssetLoader.Factory
Creates anAssetLoader
instance.- Specified by:
createAssetLoader
in interfaceAssetLoader.Factory
- Parameters:
editedMediaItem
- TheEditedMediaItem
to load.looper
- TheLooper
that's used to access theAssetLoader
after it's been created.listener
- TheAssetLoader.Listener
on which theAssetLoader
should notify of events.- Returns:
- An
AssetLoader
.
-
-