Back to Exoplayer

BitmapOverlay (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/effect/BitmapOverlay.html

latest8.4 KB
Original Source

Package com.google.android.exoplayer2.effect

Class BitmapOverlay


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public abstract classBitmapOverlayextends[TextureOverlay](TextureOverlay.html "class in com.google.android.exoplayer2.effect")

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.

Creates TextureOverlays from Bitmaps.

Useful for overlaying images and animated images (e.g. GIFs).

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 a BitmapOverlay that shows the input at overlayBitmapUri with the same OverlaySettings throughout the whole video. | | static BitmapOverlay | createStaticBitmapOverlay​(Bitmap overlayBitmap) | Deprecated.

Creates a BitmapOverlay that shows the overlayBitmap in the same position and size throughout the whole video. | | static BitmapOverlay | createStaticBitmapOverlay​(Bitmap overlayBitmap, OverlaySettings overlaySettings) | Deprecated.

Creates a BitmapOverlay that shows the overlayBitmap in the same OverlaySettings 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

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

BitmapOverlay

public BitmapOverlay()

Deprecated.

Method Detail

- 

getBitmap

public abstract[Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")getBitmap​(long presentationTimeUs)
                          throws[VideoFrameProcessingException](../util/VideoFrameProcessingException.html "class in com.google.android.exoplayer2.util")

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](../util/Size.html "class in com.google.android.exoplayer2.util")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 class TextureOverlayParameters:presentationTimeUs - The presentation timestamp of the current frame, in microseconds.

- 

getTextureId

public int getTextureId​(long presentationTimeUs)
                 throws[VideoFrameProcessingException](../util/VideoFrameProcessingException.html "class in com.google.android.exoplayer2.util")

Deprecated.

Description copied from class: TextureOverlay

Returns the overlay texture identifier displayed at the specified timestamp. Specified by:getTextureId in class TextureOverlayParameters: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](BitmapOverlay.html "class in com.google.android.exoplayer2.effect")createStaticBitmapOverlay​([Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")overlayBitmap)

Deprecated.

Creates a BitmapOverlay that shows the overlayBitmap in the same position and size throughout the whole video. Parameters:overlayBitmap - The bitmap to overlay on the video.

- 

createStaticBitmapOverlay

public static[BitmapOverlay](BitmapOverlay.html "class in com.google.android.exoplayer2.effect")createStaticBitmapOverlay​([Bitmap](https://developer.android.com/reference/android/graphics/Bitmap.html "class or interface in android.graphics")overlayBitmap,[OverlaySettings](OverlaySettings.html "class in com.google.android.exoplayer2.effect")overlaySettings)

Deprecated.

Creates a BitmapOverlay that shows the overlayBitmap in the same OverlaySettings throughout the whole video. Parameters:overlayBitmap - The bitmap to overlay on the video.overlaySettings - The OverlaySettings configuring how the overlay is displayed on the frames.

- 

createStaticBitmapOverlay

public static[BitmapOverlay](BitmapOverlay.html "class in com.google.android.exoplayer2.effect")createStaticBitmapOverlay​([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,[Uri](https://developer.android.com/reference/android/net/Uri.html "class or interface in android.net")overlayBitmapUri,[OverlaySettings](OverlaySettings.html "class in com.google.android.exoplayer2.effect")overlaySettings)

Deprecated.

Creates a BitmapOverlay that shows the input at overlayBitmapUri with the same OverlaySettings throughout the whole video. Parameters:context - The Context.overlayBitmapUri - The Uri pointing to the resource to be converted into a bitmap.overlaySettings - The OverlaySettings configuring how the overlay is displayed on the frames.