ByteBufferGlEffect
@UnstableApi
public class ByteBufferGlEffect<T> implements GlEffect
A GlEffect implementation that runs an asynchronous Processor on video frame data passed in as a ByteBufferGlEffect.Image.
This effect can be used to apply CPU-based effects. Or the provided ByteBufferGlEffect.Image can be passed to other heterogeneous compute components that are available such as another GPU context, FPGAs, or NPUs.
Summary
Nested types |
|---|
public class ByteBufferGlEffect.ImageA class that represents image data is backed by a |
public interface ByteBufferGlEffect.Processor<T>A processor that takes in |
Public constructors |
|---|
ByteBufferGlEffect(ByteBufferGlEffect.Processor<T> processor)Creates an instance. |
Public methods |
|
|---|---|
GlShaderProgram |
toGlShaderProgram(Context context, boolean useHdr)Returns a |
Inherited methods |
||
|---|---|---|
|
||
Public constructors
ByteBufferGlEffect
public ByteBufferGlEffect(ByteBufferGlEffect.Processor<T> processor)
Creates an instance.
| Parameters | |
|---|---|
ByteBufferGlEffect.Processor<T> processor |
The effect to apply. |
Public methods
toGlShaderProgram
public 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 |