AssetLoader
@UnstableApi
public interface AssetLoader
ExoPlayerAssetLoader |
An |
ImageAssetLoader |
An |
MediaProjectionAssetLoader |
Asset loader that provides video from |
RawAssetLoader |
An |
SurfaceAssetLoader |
Asset loader that outputs video data passed to its input |
TextureAssetLoader |
This class is deprecated. Use |
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.
Summary
Nested types |
|---|
public class AssetLoader.CompositionSettingsCustomizations set on the |
public interface AssetLoader.FactoryA factory for |
public interface AssetLoader.ListenerA listener of |
@DocumentedSupported output types of an asset loader. |
Constants |
|
|---|---|
default static final int |
Indicates that the asset loader can output decoded samples. |
default static final int |
Indicates that the asset loader can output encoded samples. |
Public methods |
|
|---|---|
abstract ImmutableMap<Integer, String> |
Return the used decoders' names. |
abstract int |
@Transformer.ProgressStateReturns the current |
abstract void |
release()Stops loading data and releases all resources associated with the asset loader. |
abstract void |
start()Starts the asset loader. |
Constants
SUPPORTED_OUTPUT_TYPE_DECODED
default static final int SUPPORTED_OUTPUT_TYPE_DECODED = 2
Indicates that the asset loader can output decoded samples.
SUPPORTED_OUTPUT_TYPE_ENCODED
default static final int SUPPORTED_OUTPUT_TYPE_ENCODED = 1
Indicates that the asset loader can output encoded samples.
Public methods
getDecoderNames
abstract ImmutableMap<Integer, String> getDecoderNames()
Return the used decoders' names.
| Returns | |
|---|---|
ImmutableMap<Integer, String> |
The decoders' names keyed by |
getProgress
@Transformer.ProgressState
abstract int getProgress(ProgressHolder progressHolder)
Returns the current Transformer.ProgressState and updates progressHolder with the current progress if it is available.
| Parameters | |
|---|---|
ProgressHolder progressHolder |
A |
| Returns | |
|---|---|
int |
release
abstract void release()
Stops loading data and releases all resources associated with the asset loader.