TimestampWrapper
@UnstableApi
public final class TimestampWrapper implements GlEffect
Applies a GlEffect from startTimeUs to endTimeUs, and no change on all other timestamps.
Summary
Public fields |
|
|---|---|
final long |
|
final GlEffect |
|
final long |
Public constructors |
|---|
TimestampWrapper(Creates a new instance. |
Public methods |
|
|---|---|
boolean |
isNoOp(int inputWidth, int inputHeight)Returns whether a |
GlShaderProgram |
toGlShaderProgram(Context context, boolean useHdr)Returns a |
Inherited methods |
||
|---|---|---|
|
Public fields
Public constructors
TimestampWrapper
public TimestampWrapper(
GlEffect glEffect,
@IntRange(from = 0) long startTimeUs,
@IntRange(from = 0) long endTimeUs
)
Creates a new instance.
| Parameters | |
|---|---|
GlEffect glEffect |
The |
@IntRange(from = 0) long startTimeUs |
The time to begin applying |
@IntRange(from = 0) long endTimeUs |
The time to stop applying {code glEffect} on, in microseconds. Must be non-negative. |
Public methods
isNoOp
public boolean isNoOp(int inputWidth, int inputHeight)
Returns whether a GlEffect applies no change at every timestamp.
This can be used as a hint to skip this instance.
| Parameters | |
|---|---|
int inputWidth |
The input frame width, in pixels. |
int inputHeight |
The input frame height, in pixels. |
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 |