# 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)

*** ** * ** ***


```
public interface HardwareBufferFrame.Builder
```

<br />

*** ** * ** ***

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

## Summary

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

## Public methods

### build

```
abstract HardwareBufferFrame build()
```

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

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

### setContentTimeUs

```
@CanIgnoreReturnValue
abstract HardwareBufferFrame.Builder setContentTimeUs(long contentTimeUs)
```

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

| Parameters |
|---|---|
| `long contentTimeUs` | The presentation timestamp of the frame, in microseconds. |

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

### setMetadata

```
@CanIgnoreReturnValue
abstract HardwareBufferFrame.Builder setMetadata(Map<String, Object> metadata)
```

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

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/util/Map.html<https://developer.android.com/reference/java/lang/String.html, https://developer.android.com/reference/java/lang/Object.html> metadata` | The metadata to associate with this frame. |

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