HardwareBufferFrame


@ExperimentalApi
public interface HardwareBufferFrame extends Frame


A Frame backed by a HardwareBuffer.

Summary

Nested types

A Builder for HardwareBufferFrame instances.

Public methods

abstract HardwareBufferFrame.Builder

Returns a Builder initialized with the values of this instance.

abstract HardwareBuffer

Returns the HardwareBuffer backing this frame.

Inherited Constants

From androidx.media3.common.video.Frame
default static final 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.

default static final String
KEY_PRESENTATION_TIME_US = "KEY_PRESENTATION_TIME_US"

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

default static final long

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

default static final long

The frame will often be read by the CPU.

default static final long

The frame will sometimes be read by the CPU.

default static final long

The frame will often be written to by the CPU.

default static final long

The frame will sometimes be written to by the CPU.

default static final long

The frame will be written to by the GPU.

default static final long

The frame will be read from by the GPU.

default static final long

The frame will be read by a hardware video encoder.

Inherited methods

From androidx.media3.common.video.Frame
abstract long

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

abstract Format

The frame format.

abstract ImmutableMap<StringObject>

The frame metadata.

Public methods

buildUpon

abstract HardwareBufferFrame.Builder buildUpon()

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)
abstract HardwareBuffer getHardwareBuffer()

Returns the HardwareBuffer backing this frame.

Returns
HardwareBuffer

The underlying HardwareBuffer.