Back to Exoplayer

DrawableOverlay (ExoPlayer library)

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

latest6.2 KB
Original Source

Package com.google.android.exoplayer2.effect

Class DrawableOverlay


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public abstract classDrawableOverlayextends[BitmapOverlay](BitmapOverlay.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 a TextureOverlay from Drawable.

Uses a canvas to draw DrawableOverlay onto BitmapOverlay, which is then displayed on each frame.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | DrawableOverlay() | Deprecated. |

Method Summary

All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | static DrawableOverlay | createStaticDrawableOverlay​(Drawable drawable, OverlaySettings overlaySettings) | Deprecated.

Creates a TextOverlay that shows the Drawable with the same OverlaySettings throughout the whole video. | | Bitmap | getBitmap​(long presentationTimeUs) | Deprecated.

Returns the overlay bitmap displayed at the specified timestamp. | | abstract Drawable | getDrawable​(long presentationTimeUs) | Deprecated.

Returns the overlay Drawable displayed at the specified timestamp. |

- 

Methods inherited from class com.google.android.exoplayer2.effect.BitmapOverlay

createStaticBitmapOverlay, createStaticBitmapOverlay, createStaticBitmapOverlay, getTextureId, getTextureSize

- 

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

- 

DrawableOverlay

public DrawableOverlay()

Deprecated.

Method Detail

- 

getDrawable

public abstract[Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html "class or interface in android.graphics.drawable")getDrawable​(long presentationTimeUs)

Deprecated.

Returns the overlay Drawable displayed at the specified timestamp.

The drawable must have its bounds set via Drawable.setBounds(int, int, int, int) for drawable to be displayed on the frame.

Parameters:presentationTimeUs - The presentation timestamp of the current frame, in microseconds.

- 

getBitmap

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

Deprecated.

Description copied from class: BitmapOverlay

Returns the overlay bitmap displayed at the specified timestamp. Specified by:getBitmap in class BitmapOverlayParameters:presentationTimeUs - The presentation timestamp of the current frame, in microseconds.

- 

createStaticDrawableOverlay

public static[DrawableOverlay](DrawableOverlay.html "class in com.google.android.exoplayer2.effect")createStaticDrawableOverlay​([Drawable](https://developer.android.com/reference/android/graphics/drawable/Drawable.html "class or interface in android.graphics.drawable")drawable,[OverlaySettings](OverlaySettings.html "class in com.google.android.exoplayer2.effect")overlaySettings)

Deprecated.

Creates a TextOverlay that shows the Drawable with the same OverlaySettings throughout the whole video. Parameters:drawable - The Drawable to be displayed.overlaySettings - The OverlaySettings configuring how the overlay is displayed on the frames.