DrawableOverlay
@UnstableApi
abstract class DrawableOverlay : BitmapOverlay
| kotlin.Any | |||
| ↳ | androidx.media3.effect.TextureOverlay | ||
| ↳ | androidx.media3.effect.BitmapOverlay | ||
| ↳ | androidx.media3.effect.DrawableOverlay |
Creates a TextureOverlay from Drawable.
Uses a canvas to draw DrawableOverlay onto BitmapOverlay, which is then displayed on each frame.
Summary
Public constructors |
|---|
Public functions |
|
|---|---|
java-static DrawableOverlay! |
createStaticDrawableOverlay(Creates a |
Bitmap! |
Returns the overlay bitmap displayed at the specified timestamp. |
abstract Drawable! |
getDrawable(presentationTimeUs: Long)Returns the overlay |
Inherited functions |
||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
||||||||||||||
|
Public constructors
Public functions
createStaticDrawableOverlay
java-static fun createStaticDrawableOverlay(
drawable: Drawable!,
overlaySettings: StaticOverlaySettings!
): DrawableOverlay!
Creates a DrawableOverlay that shows the Drawable with the same StaticOverlaySettings throughout the whole video.
| Parameters | |
|---|---|
drawable: Drawable! |
The |
overlaySettings: StaticOverlaySettings! |
The |
getBitmap
fun getBitmap(presentationTimeUs: Long): Bitmap!
Returns the overlay bitmap displayed at the specified timestamp.
| Parameters | |
|---|---|
presentationTimeUs: Long |
The presentation timestamp of the current frame, in microseconds. |
| Throws | |
|---|---|
androidx.media3.common.VideoFrameProcessingException |
If an error occurs while processing or drawing the frame. |
getDrawable
abstract fun getDrawable(presentationTimeUs: Long): Drawable!
Returns the overlay Drawable displayed at the specified timestamp.
The drawable must have its bounds set via setBounds for drawable to be displayed on the frame.
| Parameters | |
|---|---|
presentationTimeUs: Long |
The presentation timestamp of the current frame, in microseconds. |