ByteBufferGlEffect
@UnstableApi
class ByteBufferGlEffect<T> : 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 |
|---|
class ByteBufferGlEffect.ImageA class that represents image data is backed by a |
interface ByteBufferGlEffect.Processor<T>A processor that takes in |
Public constructors |
|---|
ByteBufferGlEffect(processor: ByteBufferGlEffect.Processor<T!>!)Creates an instance. |
Public functions |
|
|---|---|
GlShaderProgram! |
toGlShaderProgram(context: Context!, useHdr: Boolean)Returns a |
Inherited functions |
||
|---|---|---|
|
||
Public constructors
ByteBufferGlEffect
ByteBufferGlEffect(processor: ByteBufferGlEffect.Processor<T!>!)
Creates an instance.
| Parameters | |
|---|---|
processor: ByteBufferGlEffect.Processor<T!>! |
The effect to apply. |
Public functions
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 |