# 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
public final class TimestampAdjustment implements GlEffect
```

<br />

*** ** * ** ***

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

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

This effect doesn't drop any frames.

## Summary

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

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

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

| ### Public methods |
|---|---|
| `long` | `[getDurationAfterEffectApplied](https://developer.android.com/reference/androidx/media3/effect/TimestampAdjustment#getDurationAfterEffectApplied(long))(long durationUs)` **This method is deprecated.** Deprecated in Java |
| `https://developer.android.com/reference/androidx/media3/effect/GlShaderProgram` | `[toGlShaderProgram](https://developer.android.com/reference/androidx/media3/effect/TimestampAdjustment#toGlShaderProgram(android.content.Context,boolean))(https://developer.android.com/reference/android/content/Context.html context, boolean useHdr)` **This method is deprecated.** Deprecated in Java |

### Inherited methods

From [androidx.media3.effect.GlEffect](https://developer.android.com/reference/androidx/media3/effect/GlEffect) `boolean` `[isNoOp](https://developer.android.com/reference/androidx/media3/effect/GlEffect#isNoOp(int,int))(int inputWidth, int inputHeight)`

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

## Public fields

### speedProvider

```
public final SpeedProvider speedProvider
```

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

### timestampMap

```
public final TimestampAdjustment.TimestampMap timestampMap
```

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

## Public constructors

### TimestampAdjustment

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

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

Creates an instance.

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

## Public methods

### getDurationAfterEffectApplied

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

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

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

### toGlShaderProgram

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

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

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

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