# AudioProcessor.StreamMetadata

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

*** ** * ** ***


```
public final class AudioProcessor.StreamMetadata
```

<br />

*** ** * ** ***

Record class that holds information about the underlying stream being processed by an `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor`

## Summary

| ### Nested types |
|---|
| `public final class https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata.Builder` A builder for `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata`. |

| ### Constants |
|---|---|
| `static final https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata` | `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata#DEFAULT()` A `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata` instance populated with default values. |

| ### Public fields |
|---|---|
| `final @https://developer.android.com/reference/androidx/annotation/Nullable https://developer.android.com/reference/java/lang/Object.html` | `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata#periodUid()` The `https://developer.android.com/reference/androidx/media3/common/Timeline.Period#uid()` of the current playback this audio processor is used for, or `null` if undefined. |
| `final long` | `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata#positionOffsetUs()` The position of the underlying stream in microseconds from which the processor will start receiving input buffers after a call to `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor#flush(androidx.media3.common.audio.AudioProcessor.StreamMetadata)`. |
| `final https://developer.android.com/reference/androidx/media3/common/Timeline` | `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata#timeline()` The `https://developer.android.com/reference/androidx/media3/common/Timeline` of the current playback this audio processor is used for, or `https://developer.android.com/reference/androidx/media3/common/Timeline#EMPTY()` if undefined. |

| ### Public constructors |
|---|
| `[StreamMetadata](https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata#StreamMetadata(long))(long positionOffsetUs)` **This method is deprecated.** Use `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata.Builder` instead. <br /> |

| ### Public methods |
|---|---|
| `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata.Builder` | `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata#buildUpon()()` Creates a `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata.Builder` populated with the values from this object. |

## Constants

### DEFAULT

```
public static final AudioProcessor.StreamMetadata DEFAULT
```

A `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata` instance populated with default values.

## Public fields

### periodUid

```
public final @Nullable Object periodUid
```

The `https://developer.android.com/reference/androidx/media3/common/Timeline.Period#uid()` of the current playback this audio processor is used for, or `null` if undefined.

The value is up-to-date at the time of the `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor#flush(androidx.media3.common.audio.AudioProcessor.StreamMetadata)` call, but might change due to updates to the media structure. In that case, the value will not be updated until the next call to `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor#flush(androidx.media3.common.audio.AudioProcessor.StreamMetadata)`.

### positionOffsetUs

```
public final long positionOffsetUs
```

The position of the underlying stream in microseconds from which the processor will start receiving input buffers after a call to `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor#flush(androidx.media3.common.audio.AudioProcessor.StreamMetadata)`.

The position offset is aligned to the `https://developer.android.com/reference/androidx/media3/common/Timeline.Window` start position.

The value is up-to-date at the time of the `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor#flush(androidx.media3.common.audio.AudioProcessor.StreamMetadata)` call, but might change due to updates to the media structure. In that case, the value will not be updated until the next call to `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor#flush(androidx.media3.common.audio.AudioProcessor.StreamMetadata)`.

### timeline

```
public final Timeline timeline
```

The `https://developer.android.com/reference/androidx/media3/common/Timeline` of the current playback this audio processor is used for, or `https://developer.android.com/reference/androidx/media3/common/Timeline#EMPTY()` if undefined.

The value is up-to-date at the time of the `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor#flush(androidx.media3.common.audio.AudioProcessor.StreamMetadata)` call, but might change due to updates to the media structure. In that case, the value will not be updated until the next call to `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor#flush(androidx.media3.common.audio.AudioProcessor.StreamMetadata)`.

## Public constructors

### StreamMetadata

```
public [StreamMetadata](https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata#StreamMetadata(long))(long positionOffsetUs)
```

> [!CAUTION]
> **This method is deprecated.**   
>
> Use `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata.Builder` instead.

## Public methods

### buildUpon

```
public AudioProcessor.StreamMetadata.Builder buildUpon()
```

Creates a `https://developer.android.com/reference/androidx/media3/common/audio/AudioProcessor.StreamMetadata.Builder` populated with the values from this object.