TimestampAdjustment
@UnstableApi
public final class TimestampAdjustment implements GlEffect
Changes the frame timestamps using the TimestampMap.
This effect doesn't drop any frames.
Summary
Nested types |
|---|
public interface TimestampAdjustment.TimestampMapMaps input timestamps to output timestamps asynchronously. |
Public fields |
|
|---|---|
final SpeedProvider |
|
final TimestampAdjustment.TimestampMap |
Public constructors |
|---|
Creates an instance. |
Public methods |
|
|---|---|
long |
Returns the expected duration of the output stream when the effect is applied given a input |
GlShaderProgram |
Returns a |
Inherited methods |
|---|
Public fields
Public constructors
TimestampAdjustment
publicTimestampAdjustment(
TimestampAdjustment.TimestampMap timestampMap,
SpeedProvider speedProvider
)
Creates an instance.
| Parameters | |
|---|---|
TimestampAdjustment.TimestampMap timestampMap |
The |
SpeedProvider speedProvider |
The |
Public methods
getDurationAfterEffectApplied
public long getDurationAfterEffectApplied(long durationUs)Returns the expected duration of the output stream when the effect is applied given a input durationUs.
toGlShaderProgram
public GlShaderProgramtoGlShaderProgram(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 |