Class BitmapOverlay
- java.lang.Object
-
- com.google.android.exoplayer2.effect.TextureOverlay
-
- com.google.android.exoplayer2.effect.BitmapOverlay
-
- Direct Known Subclasses:
DrawableOverlay,TextOverlay
@Deprecated public abstract class BitmapOverlay extends TextureOverlay
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.
-
-
Constructor Summary
Constructors Constructor Description BitmapOverlay()Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static BitmapOverlaycreateStaticBitmapOverlay(Context context, Uri overlayBitmapUri, OverlaySettings overlaySettings)Deprecated.Creates aBitmapOverlaythat shows the input atoverlayBitmapUriwith the sameOverlaySettingsthroughout the whole video.static BitmapOverlaycreateStaticBitmapOverlay(Bitmap overlayBitmap)Deprecated.Creates aBitmapOverlaythat shows theoverlayBitmapin the same position and size throughout the whole video.static BitmapOverlaycreateStaticBitmapOverlay(Bitmap overlayBitmap, OverlaySettings overlaySettings)Deprecated.Creates aBitmapOverlaythat shows theoverlayBitmapin the sameOverlaySettingsthroughout the whole video.abstract BitmapgetBitmap(long presentationTimeUs)Deprecated.Returns the overlay bitmap displayed at the specified timestamp.intgetTextureId(long presentationTimeUs)Deprecated.Returns the overlay texture identifier displayed at the specified timestamp.SizegetTextureSize(long presentationTimeUs)Deprecated.Returns the pixel width and height of the overlay texture displayed at the specified timestamp.-
Methods inherited from class com.google.android.exoplayer2.effect.TextureOverlay
configure, getOverlaySettings
-
-
-
-
Method Detail
-
getBitmap
public abstract Bitmap getBitmap(long presentationTimeUs) throws VideoFrameProcessingException
Deprecated.Returns the overlay bitmap displayed at the specified timestamp.- Parameters:
presentationTimeUs- The presentation timestamp of the current frame, in microseconds.- Throws:
VideoFrameProcessingException- If an error occurs while processing or drawing the frame.
-
getTextureSize
public Size getTextureSize(long presentationTimeUs)
Deprecated.Returns the pixel width and height of the overlay texture displayed at the specified timestamp.This method must be called after
TextureOverlay.getTextureId(long).Gets the width and height of the cached bitmap.
- Specified by:
getTextureSizein classTextureOverlay- Parameters:
presentationTimeUs- The presentation timestamp of the current frame, in microseconds.
-
getTextureId
public int getTextureId(long presentationTimeUs) throws VideoFrameProcessingExceptionDeprecated.Description copied from class:TextureOverlayReturns the overlay texture identifier displayed at the specified timestamp.- Specified by:
getTextureIdin classTextureOverlay- Parameters:
presentationTimeUs- The presentation timestamp of the current frame, in microseconds.- Throws:
VideoFrameProcessingException- If an error occurs while processing or drawing the frame.
-
createStaticBitmapOverlay
public static BitmapOverlay createStaticBitmapOverlay(Bitmap overlayBitmap)
Deprecated.Creates aBitmapOverlaythat shows theoverlayBitmapin the same position and size throughout the whole video.- Parameters:
overlayBitmap- The bitmap to overlay on the video.
-
createStaticBitmapOverlay
public static BitmapOverlay createStaticBitmapOverlay(Bitmap overlayBitmap, OverlaySettings overlaySettings)
Deprecated.Creates aBitmapOverlaythat shows theoverlayBitmapin the sameOverlaySettingsthroughout the whole video.- Parameters:
overlayBitmap- The bitmap to overlay on the video.overlaySettings- TheOverlaySettingsconfiguring how the overlay is displayed on the frames.
-
createStaticBitmapOverlay
public static BitmapOverlay createStaticBitmapOverlay(Context context, Uri overlayBitmapUri, OverlaySettings overlaySettings)
Deprecated.Creates aBitmapOverlaythat shows the input atoverlayBitmapUriwith the sameOverlaySettingsthroughout the whole video.- Parameters:
context- TheContext.overlayBitmapUri- TheUripointing to the resource to be converted into a bitmap.overlaySettings- TheOverlaySettingsconfiguring how the overlay is displayed on the frames.
-
-