Class TextureAssetLoader
- java.lang.Object
-
- com.google.android.exoplayer2.transformer.TextureAssetLoader
-
- All Implemented Interfaces:
AssetLoader
@Deprecated public final class TextureAssetLoader extends Object implements 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.AnAssetLoader
implementation that loads videos from traditional GLES texture instances.Typically instantiated in a custom
AssetLoader.Factory
saving a reference to the createdTextureAssetLoader
. Input is provided callingqueueInputTexture(int, long)
to provide all the video frames, thensignalling the end of input
when finished.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.android.exoplayer2.transformer.AssetLoader
AssetLoader.Factory, AssetLoader.Listener, AssetLoader.SupportedOutputTypes
-
-
Field Summary
-
Fields inherited from interface com.google.android.exoplayer2.transformer.AssetLoader
SUPPORTED_OUTPUT_TYPE_DECODED, SUPPORTED_OUTPUT_TYPE_ENCODED
-
-
Constructor Summary
Constructors Constructor Description TextureAssetLoader(EditedMediaItem editedMediaItem, AssetLoader.Listener assetLoaderListener, Format format, OnInputFrameProcessedListener frameProcessedListener)
Deprecated.Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete 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
.boolean
queueInputTexture(int texId, long presentationTimeUs)
Deprecated.Attempts to provide an input texture.void
release()
Deprecated.Stops loading data and releases all resources associated with the asset loader.void
signalEndOfVideoInput()
Deprecated.Signals that no further input frames will be rendered.void
start()
Deprecated.Starts the asset loader.
-
-
-
Constructor Detail
-
TextureAssetLoader
public TextureAssetLoader(EditedMediaItem editedMediaItem, AssetLoader.Listener assetLoaderListener, Format format, OnInputFrameProcessedListener frameProcessedListener)
Deprecated.Creates an instance.The
EditedMediaItem.durationUs
,Format.width
andFormat.height
must be set.
-
-
Method Detail
-
start
public void start()
Deprecated.Description copied from interface:AssetLoader
Starts the asset loader.- Specified by:
start
in interfaceAssetLoader
-
getProgress
public @com.google.android.exoplayer2.transformer.Transformer.ProgressState int getProgress(ProgressHolder progressHolder)
Deprecated.Description copied from interface:AssetLoader
Returns the currentTransformer.ProgressState
and updatesprogressHolder
with the current progress if it isavailable
.- Specified by:
getProgress
in interfaceAssetLoader
- Parameters:
progressHolder
- AProgressHolder
, updated to hold the percentage progress ifavailable
.- Returns:
- The
Transformer.ProgressState
.
-
getDecoderNames
public ImmutableMap<Integer,String> getDecoderNames()
Deprecated.Description copied from interface:AssetLoader
Return the used decoders' names.- Specified by:
getDecoderNames
in interfaceAssetLoader
- Returns:
- The decoders' names keyed by track type.
-
release
public void release()
Deprecated.Description copied from interface:AssetLoader
Stops loading data and releases all resources associated with the asset loader.- Specified by:
release
in interfaceAssetLoader
-
queueInputTexture
public boolean queueInputTexture(int texId, long presentationTimeUs)
Deprecated.Attempts to provide an input texture.Must be called on the same thread as
signalEndOfVideoInput()
.- Parameters:
texId
- The ID of the texture to queue.presentationTimeUs
- The presentation time for the texture, in microseconds.- Returns:
- Whether the texture was successfully queued. If
false
, the caller should try again later.
-
signalEndOfVideoInput
public void signalEndOfVideoInput()
Deprecated.Signals that no further input frames will be rendered.Must be called on the same thread as
queueInputTexture(int, long)
.
-
-