OverlayEffect
@UnstableApi
public final class OverlayEffect implements GlEffect
Applies a list of TextureOverlays to a frame in FIFO order (the last overlay in the list is displayed on top).
This effect assumes a non-linear working color space for SDR input and a linear working color space or HDR input.
Summary
Public constructors |
|---|
OverlayEffect(List<TextureOverlay> textureOverlays)Creates a new instance for the given list of |
Public methods |
|
|---|---|
BaseGlShaderProgram |
toGlShaderProgram(Context context, boolean useHdr)Returns a |
Inherited methods |
||
|---|---|---|
|
||
Public constructors
OverlayEffect
public OverlayEffect(List<TextureOverlay> textureOverlays)
Creates a new instance for the given list of TextureOverlays.
| Parameters | |
|---|---|
List<TextureOverlay> textureOverlays |
The |
Public methods
toGlShaderProgram
public BaseGlShaderProgram toGlShaderProgram(Context context, boolean useHdr)
Returns a GlShaderProgram that applies the effect.
| Parameters | |
|---|---|
Context context |
A |
boolean useHdr |
Whether input textures come from an HDR source. If |
| Throws | |
|---|---|
androidx.media3.common.VideoFrameProcessingException |
If an error occurs while creating the |