GlEffect
@UnstableApi
interface GlEffect : Effect
AlphaScale |
Scales the alpha value (i.e. the translucency) of a frame. |
ByteBufferGlEffect |
A |
ColorLut |
Specifies color transformations using color lookup tables to apply to each frame in the fragment shader. |
DebugViewEffect |
|
FrameCache |
Caches the input frames. |
FrameDropEffect |
Drops frames to lower average frame rate to around |
GlMatrixTransformation |
Specifies a 4x4 transformation |
HslAdjustment |
Adjusts the HSL (Hue, Saturation, and Lightness) of a frame. |
LanczosResample |
A |
OverlayEffect |
Applies a list of |
RgbMatrix |
Specifies a 4x4 RGB color transformation matrix to apply to each frame in the fragment shader. |
SeparableConvolution |
A |
SpeedChangeEffect |
Applies a speed change by updating the frame timestamps. |
TimestampAdjustment |
Changes the frame timestamps using the |
TimestampWrapper |
Applies a |
Brightness |
Modifies brightness of an input frame. |
Contrast |
A |
Crop |
Specifies a crop to apply in the vertex shader. |
GaussianBlurWithFrameOverlaid |
A |
GaussianBlur |
A |
MatrixTransformation |
Specifies a 3x3 transformation |
Presentation |
Controls how a frame is presented with options to set the output resolution and choose how to map the input pixels onto the output frame geometry (for example, by stretching the input frame to match the specified output frame, or fitting the input frame using letterboxing). |
RgbAdjustment |
Scales the red, green, and blue color channels of a frame. |
RgbFilter |
Provides common color filters. |
ScaleAndRotateTransformation |
Specifies a simple rotation and/or scale to apply in the vertex shader. |
SingleColorLut |
Transforms the colors of a frame by applying the same color lookup table to each frame. |
Interface for a video frame effect with a GlShaderProgram implementation.
Implementations contain information specifying the effect and can be converted to a GlShaderProgram which applies the effect.
Summary
Public functions |
|
|---|---|
Boolean |
Returns whether a |
GlShaderProgram! |
toGlShaderProgram(context: Context!, useHdr: Boolean)Returns a |
Inherited functions |
||
|---|---|---|
|
Public functions
isNoOp
fun isNoOp(inputWidth: Int, inputHeight: Int): Boolean
Returns whether a GlEffect applies no change at every timestamp.
This can be used as a hint to skip this instance.
toGlShaderProgram
fun toGlShaderProgram(context: Context!, useHdr: Boolean): GlShaderProgram!
Returns a GlShaderProgram that applies the effect.
| Parameters | |
|---|---|
context: Context! |
A |
useHdr: Boolean |
Whether input textures come from an HDR source. If |
| Throws | |
|---|---|
androidx.media3.common.VideoFrameProcessingException |
If an error occurs while creating the |