AssetLoader
@UnstableApi
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 |
|---|
|
Customizations set on the |
interface AssetLoader.FactoryA factory for |
interface AssetLoader.ListenerA listener of |
@DocumentedSupported output types of an asset loader. |
Constants |
|
|---|---|
const Int |
Indicates that the asset loader can output decoded samples. |
const Int |
Indicates that the asset loader can output encoded samples. |
Public functions |
|
|---|---|
ImmutableMap<Int!, String!>! |
Return the used decoders' names. |
Int |
@Transformer.ProgressStateReturns the current |
Unit |
release()Stops loading data and releases all resources associated with the asset loader. |
Unit |
start()Starts the asset loader. |
Constants
SUPPORTED_OUTPUT_TYPE_DECODED
const val SUPPORTED_OUTPUT_TYPE_DECODED = 2: Int
Indicates that the asset loader can output decoded samples.
SUPPORTED_OUTPUT_TYPE_ENCODED
const val SUPPORTED_OUTPUT_TYPE_ENCODED = 1: Int
Indicates that the asset loader can output encoded samples.
Public functions
getDecoderNames
fun getDecoderNames(): ImmutableMap<Int!, String!>!
Return the used decoders' names.
| Returns | |
|---|---|
ImmutableMap<Int!, String!>! |
The decoders' names keyed by |
getProgress
@Transformer.ProgressState
fun getProgress(progressHolder: ProgressHolder!): Int
Returns the current Transformer.ProgressState and updates progressHolder with the current progress if it is available.
| Parameters | |
|---|---|
progressHolder: ProgressHolder! |
A |
| Returns | |
|---|---|
Int |