# HardwareBufferFrame.Builder

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/video/HardwareBufferFrame.java+class:androidx.media3.common.video.HardwareBufferFrame.Builder)

*** ** * ** ***


```
interface HardwareBufferFrame.Builder
```

<br />

*** ** * ** ***

A Builder for `https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame` instances.

## Summary

| ### Public functions |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame!` | `https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame.Builder#build()()` Builds a `https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame` instance. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame.Builder#setContentTimeUs(long)(contentTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/video/Frame#getContentTimeUs()` of the frame. |
| `https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame.Builder!` | `@https://checkerframework.org/api/com/google/errorprone/annotations/CanIgnoreReturnValue.html https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame.Builder#setMetadata(java.util.Map<java.lang.String,java.lang.Object>)(metadata: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>!)` Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/video/Frame#getMetadata()` associated with the frame. |

## Public functions

### build

```
fun build(): HardwareBufferFrame!
```

Builds a `https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame` instance.

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame!` | The built `https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame`. |

### setContentTimeUs

```
@CanIgnoreReturnValue
fun setContentTimeUs(contentTimeUs: Long): HardwareBufferFrame.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/video/Frame#getContentTimeUs()` of the frame.

| Parameters |
|---|---|
| `contentTimeUs: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-long/index.html` | The presentation timestamp of the frame, in microseconds. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame.Builder!` | This builder. |

### setMetadata

```
@CanIgnoreReturnValue
fun setMetadata(metadata: (Mutable)Map<String!, Any!>!): HardwareBufferFrame.Builder!
```

Sets the `https://developer.android.com/reference/kotlin/androidx/media3/common/video/Frame#getMetadata()` associated with the frame.

| Parameters |
|---|---|
| `metadata: (https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-map/index.html)https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html!, https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html!>!` | The metadata to associate with this frame. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/media3/common/video/HardwareBufferFrame.Builder!` | This builder. |