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.FactoryforExoPlayerAssetLoaderinstances.
-
-
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 AssetLoadercreateAssetLoader(EditedMediaItem editedMediaItem, Looper looper, AssetLoader.Listener listener)Creates anAssetLoaderinstance.
-
-
-
Constructor Detail
-
Factory
public Factory(Context context, Codec.DecoderFactory decoderFactory, boolean forceInterpretHdrAsSdr, Clock clock)
Creates an instance using aDefaultMediaSourceFactory.- Parameters:
context- TheContext.decoderFactory- TheCodec.DecoderFactoryto use to decode the samples (if necessary).forceInterpretHdrAsSdr- Whether to applyTransformationRequest.HDR_MODE_EXPERIMENTAL_FORCE_INTERPRET_HDR_AS_SDR.clock- TheClockto 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.DecoderFactoryto use to decode the samples (if necessary).forceInterpretHdrAsSdr- Whether to applyTransformationRequest.HDR_MODE_EXPERIMENTAL_FORCE_INTERPRET_HDR_AS_SDR.clock- TheClockto use. It should always beClock.DEFAULT, except for testing.mediaSourceFactory- TheMediaSource.Factoryto 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.FactoryCreates anAssetLoaderinstance.- Specified by:
createAssetLoaderin interfaceAssetLoader.Factory- Parameters:
editedMediaItem- TheEditedMediaItemto load.looper- TheLooperthat's used to access theAssetLoaderafter it's been created.listener- TheAssetLoader.Listeneron which theAssetLoadershould notify of events.- Returns:
- An
AssetLoader.
-
-