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.AnAssetLoaderimplementation that loads videos from traditional GLES texture instances.Typically instantiated in a custom
AssetLoader.Factorysaving a reference to the createdTextureAssetLoader. Input is provided callingqueueInputTexture(int, long)to provide all the video frames, thensignalling the end of inputwhen 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 intgetProgress(ProgressHolder progressHolder)Deprecated.Returns the currentTransformer.ProgressStateand updatesprogressHolderwith the current progress if it isavailable.booleanqueueInputTexture(int texId, long presentationTimeUs)Deprecated.Attempts to provide an input texture.voidrelease()Deprecated.Stops loading data and releases all resources associated with the asset loader.voidsignalEndOfVideoInput()Deprecated.Signals that no further input frames will be rendered.voidstart()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.widthandFormat.heightmust be set.
-
-
Method Detail
-
start
public void start()
Deprecated.Description copied from interface:AssetLoaderStarts the asset loader.- Specified by:
startin interfaceAssetLoader
-
getProgress
public @com.google.android.exoplayer2.transformer.Transformer.ProgressState int getProgress(ProgressHolder progressHolder)
Deprecated.Description copied from interface:AssetLoaderReturns the currentTransformer.ProgressStateand updatesprogressHolderwith the current progress if it isavailable.- Specified by:
getProgressin 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:AssetLoaderReturn the used decoders' names.- Specified by:
getDecoderNamesin interfaceAssetLoader- Returns:
- The decoders' names keyed by track type.
-
release
public void release()
Deprecated.Description copied from interface:AssetLoaderStops loading data and releases all resources associated with the asset loader.- Specified by:
releasein 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).
-
-