GlEffect
@UnstableApi
public interface GlEffect extends 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 methods |
|
|---|---|
default boolean |
isNoOp(int inputWidth, int inputHeight)Returns whether a |
abstract GlShaderProgram |
toGlShaderProgram(Context context, boolean useHdr)Returns a |
Inherited methods |
||
|---|---|---|
|
Public methods
isNoOp
default boolean isNoOp(int inputWidth, int inputHeight)
Returns whether a GlEffect applies no change at every timestamp.
This can be used as a hint to skip this instance.
| Parameters | |
|---|---|
int inputWidth |
The input frame width, in pixels. |
int inputHeight |
The input frame height, in pixels. |
toGlShaderProgram
abstract GlShaderProgram 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 |