# TimestampAdjustment

Artifact: [androidx.media3:media3-effect](https://developer.android.com/jetpack/androidx/releases/media3) [View Source](https://cs.android.com/search?q=file:androidx/media3/effect/TimestampAdjustment.java+class:androidx.media3.effect.TimestampAdjustment)

*** ** * ** ***


```
@UnstableApi
class TimestampAdjustment : GlEffect
```

<br />

*** ** * ** ***

> [!CAUTION]
> **This class is deprecated.**   
>
> Use `EditedMediaItem.Builder#setSpeed(SpeedProvider)` instead.

Changes the frame timestamps using the `https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment.TimestampMap`.

This effect doesn't drop any frames.

## Summary

| ### Nested types |
|---|
| `interface https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment.TimestampMap` **This interface is deprecated.** Deprecated in Java |

| ### Public constructors |
|---|
| `[TimestampAdjustment](https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment#TimestampAdjustment(androidx.media3.effect.TimestampAdjustment.TimestampMap,androidx.media3.common.audio.SpeedProvider))( timestampMap: https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment.TimestampMap!, speedProvider: https://developer.android.com/reference/kotlin/androidx/media3/common/audio/SpeedProvider! )` **This function is deprecated.** Deprecated in Java |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | `[getDurationAfterEffectApplied](https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment#getDurationAfterEffectApplied(long))(durationUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` **This function is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram!` | `[toGlShaderProgram](https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment#toGlShaderProgram(android.content.Context,boolean))(context: https://developer.android.com/reference/android/content/Context.html!, useHdr: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)` **This function is deprecated.** Deprecated in Java |

| ### Public properties |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/SpeedProvider!` | `https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment#speedProvider()` **This property is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment.TimestampMap!` | `https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment#timestampMap()` **This property is deprecated.** Deprecated in Java |

### Inherited functions

From [androidx.media3.effect.GlEffect](https://developer.android.com/reference/kotlin/androidx/media3/effect/GlEffect) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `[isNoOp](https://developer.android.com/reference/kotlin/androidx/media3/effect/GlEffect#isNoOp(int,int))(inputWidth: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, inputHeight: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`

**This function is deprecated.** Deprecated in Java

## Public constructors

### TimestampAdjustment

```
[TimestampAdjustment](https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment#TimestampAdjustment(androidx.media3.effect.TimestampAdjustment.TimestampMap,androidx.media3.common.audio.SpeedProvider))(
    timestampMap: TimestampAdjustment.TimestampMap!,
    speedProvider: SpeedProvider!
)
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Creates an instance.

| Parameters |
|---|---|
| `timestampMap: https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment.TimestampMap!` | The `https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment.TimestampMap` |
| `speedProvider: https://developer.android.com/reference/kotlin/androidx/media3/common/audio/SpeedProvider!` | The `https://developer.android.com/reference/kotlin/androidx/media3/common/audio/SpeedProvider` specifying the approximate speed adjustments the `https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment.TimestampMap` should be applying. |

## Public functions

### getDurationAfterEffectApplied

```
fun [getDurationAfterEffectApplied](https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment#getDurationAfterEffectApplied(long))(durationUs: Long): Long
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

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

### toGlShaderProgram

```
fun [toGlShaderProgram](https://developer.android.com/reference/kotlin/androidx/media3/effect/TimestampAdjustment#toGlShaderProgram(android.content.Context,boolean))(context: Context!, useHdr: Boolean): GlShaderProgram!
```

> [!CAUTION]
> **This function is deprecated.**   
> Deprecated in Java

Returns a `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram` that applies the effect.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html!` | A `https://developer.android.com/reference/android/content/Context.html`. |
| `useHdr: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | 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 |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/VideoFrameProcessingException` | If an error occurs while creating the `https://developer.android.com/reference/kotlin/androidx/media3/effect/GlShaderProgram`. |

## Public properties

### speedProvider

```
val speedProvider: SpeedProvider!
```

> [!CAUTION]
> **This property is deprecated.**   
> Deprecated in Java

### timestampMap

```
val timestampMap: TimestampAdjustment.TimestampMap!
```

> [!CAUTION]
> **This property is deprecated.**   
> Deprecated in Java