TimestampWrapper
@UnstableApi
class TimestampWrapper : GlEffect
Applies a GlEffect from startTimeUs to endTimeUs, and no change on all other timestamps.
Summary
Public constructors |
|---|
TimestampWrapper(Creates a new instance. |
Public functions |
|
|---|---|
Boolean |
Returns whether a |
GlShaderProgram! |
toGlShaderProgram(context: Context!, useHdr: Boolean)Returns a |
Inherited functions |
||
|---|---|---|
|
Public constructors
TimestampWrapper
TimestampWrapper(
glEffect: GlEffect!,
startTimeUs: @IntRange(from = 0) Long,
endTimeUs: @IntRange(from = 0) Long
)
Creates a new instance.
| Parameters | |
|---|---|
glEffect: GlEffect! |
The |
startTimeUs: @IntRange(from = 0) Long |
The time to begin applying |
endTimeUs: @IntRange(from = 0) Long |
The time to stop applying {code glEffect} on, in microseconds. Must be non-negative. |
Public functions
isNoOp
fun isNoOp(inputWidth: Int, inputHeight: Int): Boolean
Returns whether a GlEffect applies no change at every timestamp.
This can be used as a hint to skip this instance.
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 |