Interface AssetLoader
-
- All Known Implementing Classes:
ExoPlayerAssetLoader
,ImageAssetLoader
,TextureAssetLoader
@Deprecated public interface AssetLoader
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 forAssetLoader
instances.static interface
AssetLoader.Listener
Deprecated.A listener ofAssetLoader
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 currentTransformer.ProgressState
and updatesprogressHolder
with the current progress if it isavailable
.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)
Deprecated.Returns the currentTransformer.ProgressState
and updatesprogressHolder
with the current progress if it isavailable
.- Parameters:
progressHolder
- AProgressHolder
, updated to hold the percentage progress ifavailable
.- Returns:
- The
Transformer.ProgressState
.
-
getDecoderNames
ImmutableMap<Integer,String> 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.
-
-