RgbMatrix
@UnstableApi
interface RgbMatrix : GlEffect
Brightness |
Modifies brightness of an input frame. |
Contrast |
A |
RgbAdjustment |
Scales the red, green, and blue color channels of a frame. |
RgbFilter |
Provides common color filters. |
Specifies a 4x4 RGB color transformation matrix to apply to each frame in the fragment shader.
Summary
Public functions |
|
|---|---|
FloatArray<Float>! |
Returns the 4x4 RGB transformation |
BaseGlShaderProgram! |
toGlShaderProgram(context: Context!, useHdr: Boolean)Returns a |
Inherited functions |
||
|---|---|---|
|
||
Public functions
getMatrix
fun getMatrix(presentationTimeUs: Long, useHdr: Boolean): FloatArray<Float>!
Returns the 4x4 RGB transformation matrix to apply to the color values of each pixel in the frame with the given timestamp.
| Parameters | |
|---|---|
presentationTimeUs: Long |
The timestamp of the frame to apply the matrix on. |
useHdr: Boolean |
If |
| Returns | |
|---|---|
FloatArray<Float>! |
The |
toGlShaderProgram
fun toGlShaderProgram(context: Context!, useHdr: Boolean): BaseGlShaderProgram!
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 |