Stay organized with collections Save and categorize content based on your preferences.

GlEffect

@UnstableApi
public interface GlEffect extends Effect

Known direct subclasses
ColorLut

Specifies color transformations using color lookup tables to apply to each frame in the fragment shader.

Contrast

A GlEffect to control the contrast of video frames.

GlMatrixTransformation

Specifies a 4x4 transformation Matrix to apply in the vertex shader for each frame.

HslAdjustment

Adjusts the HSL (Hue, Saturation, and Lightness) of a frame.

RgbMatrix

Specifies a 4x4 RGB color transformation matrix to apply to each frame in the fragment shader.

Known indirect subclasses
Crop

Specifies a crop to apply in the vertex shader.

MatrixTransformation

Specifies a 3x3 transformation Matrix to apply in the vertex shader for each frame.

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.

ScaleToFitTransformation

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 GlTextureProcessor implementation.

Implementations contain information specifying the effect and can be converted to a GlTextureProcessor which applies the effect.

Summary

Public methods

abstract GlTextureProcessor
toGlTextureProcessor(Context context, boolean useHdr)

Returns a SingleFrameGlTextureProcessor that applies the effect.

Public methods

toGlTextureProcessor

abstract GlTextureProcessor toGlTextureProcessor(Context context, boolean useHdr)

Returns a SingleFrameGlTextureProcessor that applies the effect.

Parameters
Context context

A Context.

boolean useHdr

Whether input textures come from an HDR source. If true, colors will be in linear RGB BT.2020. If false, colors will be in linear RGB BT.709.

Throws
androidx.media3.common.FrameProcessingException androidx.media3.common.FrameProcessingException