HardwareBufferFrame


@ExperimentalApi
interface HardwareBufferFrame : Frame


A Frame backed by a HardwareBuffer.

Summary

Nested types

A Builder for HardwareBufferFrame instances.

Public functions

HardwareBufferFrame.Builder!

Returns a Builder initialized with the values of this instance.

HardwareBuffer!

Returns the HardwareBuffer backing this frame.

Inherited Constants

From androidx.media3.common.video.Frame
const String!
KEY_DISPLAY_TIME_NS = "KEY_DISPLAY_TIME_NS"

Metadata key for storing the system time that this frame should be displayed at to maintain A/V sync.

const String!
KEY_PRESENTATION_TIME_US = "KEY_PRESENTATION_TIME_US"

Metadata key for storing the composition presentation time of this frame, in microseconds.

const Long

The frame will be used as a hardware composer overlay layer.

const Long

The frame will often be read by the CPU.

const Long

The frame will sometimes be read by the CPU.

const Long

The frame will often be written to by the CPU.

const Long

The frame will sometimes be written to by the CPU.

const Long

The frame will be written to by the GPU.

const Long

The frame will be read from by the GPU.

const Long

The frame will be read by a hardware video encoder.

Inherited functions

From androidx.media3.common.video.Frame
Long

The time of the frame in the context of the input media in microseconds, or TIME_UNSET if it is not set.

Format!

The frame format.

ImmutableMap<String!, Any!>!

The frame metadata.

Public functions

buildUpon

fun buildUpon(): HardwareBufferFrame.Builder!

Returns a Builder initialized with the values of this instance.

Returns
HardwareBufferFrame.Builder!

A Builder that can be used to create a modified copy of this frame.

getHardwareBuffer

@RequiresApi(value = 26)
fun getHardwareBuffer(): HardwareBuffer!

Returns the HardwareBuffer backing this frame.

Returns
HardwareBuffer!

The underlying HardwareBuffer.