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 BitmapOverlay
createStaticBitmapOverlay(Context context, Uri overlayBitmapUri, OverlaySettings overlaySettings)
Deprecated.Creates aBitmapOverlay
that shows the input atoverlayBitmapUri
with the sameOverlaySettings
throughout the whole video.static BitmapOverlay
createStaticBitmapOverlay(Bitmap overlayBitmap)
Deprecated.Creates aBitmapOverlay
that shows theoverlayBitmap
in the same position and size throughout the whole video.static BitmapOverlay
createStaticBitmapOverlay(Bitmap overlayBitmap, OverlaySettings overlaySettings)
Deprecated.Creates aBitmapOverlay
that shows theoverlayBitmap
in the sameOverlaySettings
throughout the whole video.abstract Bitmap
getBitmap(long presentationTimeUs)
Deprecated.Returns the overlay bitmap displayed at the specified timestamp.int
getTextureId(long presentationTimeUs)
Deprecated.Returns the overlay texture identifier displayed at the specified timestamp.Size
getTextureSize(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:
getTextureSize
in classTextureOverlay
- Parameters:
presentationTimeUs
- The presentation timestamp of the current frame, in microseconds.
-
getTextureId
public int getTextureId(long presentationTimeUs) throws VideoFrameProcessingException
Deprecated.Description copied from class:TextureOverlay
Returns the overlay texture identifier displayed at the specified timestamp.- Specified by:
getTextureId
in 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 aBitmapOverlay
that shows theoverlayBitmap
in 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 aBitmapOverlay
that shows theoverlayBitmap
in the sameOverlaySettings
throughout the whole video.- Parameters:
overlayBitmap
- The bitmap to overlay on the video.overlaySettings
- TheOverlaySettings
configuring how the overlay is displayed on the frames.
-
createStaticBitmapOverlay
public static BitmapOverlay createStaticBitmapOverlay(Context context, Uri overlayBitmapUri, OverlaySettings overlaySettings)
Deprecated.Creates aBitmapOverlay
that shows the input atoverlayBitmapUri
with the sameOverlaySettings
throughout the whole video.- Parameters:
context
- TheContext
.overlayBitmapUri
- TheUri
pointing to the resource to be converted into a bitmap.overlaySettings
- TheOverlaySettings
configuring how the overlay is displayed on the frames.
-
-