TimestampAdjustment


@UnstableApi
class TimestampAdjustment : GlEffect


Changes the frame timestamps using the TimestampMap.

This effect doesn't drop any frames.

Summary

Nested types

This interface is deprecated. Deprecated in Java

Public constructors

TimestampAdjustment(
    timestampMap: TimestampAdjustment.TimestampMap!,
    speedProvider: SpeedProvider!
)

This function is deprecated. Deprecated in Java

Public functions

Long

This function is deprecated. Deprecated in Java

GlShaderProgram!
toGlShaderProgram(context: Context!, useHdr: Boolean)

This function is deprecated. Deprecated in Java

Public properties

SpeedProvider!

This property is deprecated. Deprecated in Java

TimestampAdjustment.TimestampMap!

This property is deprecated. Deprecated in Java

Inherited functions

From androidx.media3.effect.GlEffect
Boolean
isNoOp(inputWidth: Int, inputHeight: Int)

This function is deprecated. Deprecated in Java

Public constructors

TimestampAdjustment

TimestampAdjustment(
    timestampMap: TimestampAdjustment.TimestampMap!,
    speedProvider: SpeedProvider!
)

Creates an instance.

Parameters
timestampMap: TimestampAdjustment.TimestampMap!

The TimestampMap

speedProvider: SpeedProvider!

The SpeedProvider specifying the approximate speed adjustments the TimestampMap should be applying.

Public functions

getDurationAfterEffectApplied

fun getDurationAfterEffectApplied(durationUs: Long): Long

Returns the expected duration of the output stream when the effect is applied given a input durationUs.

toGlShaderProgram

fun toGlShaderProgram(context: Context!, useHdr: Boolean): GlShaderProgram!

Returns a GlShaderProgram that applies the effect.

Parameters
context: Context!

A Context.

useHdr: Boolean

Whether input textures come from an HDR source. If true, colors will be in linear RGB BT.2020. If false, colors will be in linear RGB BT.709.

Throws
androidx.media3.common.VideoFrameProcessingException

If an error occurs while creating the GlShaderProgram.

Public properties

speedProvider

val speedProvider: SpeedProvider!

timestampMap

val timestampMap: TimestampAdjustment.TimestampMap!