# BufferInfo

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

*** ** * ** ***


```
@UnstableApi
public final class BufferInfo
```

<br />

*** ** * ** ***

Contains metadata of a sample `https://developer.android.com/reference/java/nio/ByteBuffer.html`.

## Summary

| ### Public fields |
|---|---|
| `final int` | `@https://developer.android.com/reference/androidx/media3/common/C.BufferFlags https://developer.android.com/reference/androidx/media3/muxer/BufferInfo#flags()` The buffer flags, which should be a combination of the `C.BUFFER_FLAG_*`. |
| `final long` | `https://developer.android.com/reference/androidx/media3/muxer/BufferInfo#presentationTimeUs()` The presentation timestamp of sample (in microseconds). |
| `final int` | `https://developer.android.com/reference/androidx/media3/muxer/BufferInfo#size()` The amount of data (in bytes) in the buffer. |

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/media3/muxer/BufferInfo#BufferInfo(long,int,int)(long presentationTimeUs, int size, @https://developer.android.com/reference/androidx/media3/common/C.BufferFlags int flags)` Creates an instance. |

## Public fields

### flags

```
@C.BufferFlags
public final int flags
```

The buffer flags, which should be a combination of the `C.BUFFER_FLAG_*`.

### presentationTimeUs

```
public final long presentationTimeUs
```

The presentation timestamp of sample (in microseconds).

### size

```
public final int size
```

The amount of data (in bytes) in the buffer.

## Public constructors

### BufferInfo

```
public BufferInfo(long presentationTimeUs, int size, @C.BufferFlags int flags)
```

Creates an instance.

| Parameters |
|---|---|
| `long presentationTimeUs` | The presentation timestamp of sample (in microseconds). |
| `int size` | The amount of data (in bytes) in the buffer. |
| `@https://developer.android.com/reference/androidx/media3/common/C.BufferFlags int flags` | The buffer flags, which should be a combination of the `C.BUFFER_FLAG_*`. |