@ExperimentalApi
interface Frame

Known direct subclasses

Holds a frame of video data.

Pixel data is accessible via subtypes.

Summary

Nested types

@Retention(value = RetentionPolicy.SOURCE)
@Target(value = ElementType.TYPE_USE)
@LongDef(flag = true, value = )
annotation Frame.Usage

Flags that define how frames are used.

Constants

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.

Public functions

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.

Constants

KEY_DISPLAY_TIME_NS

const val KEY_DISPLAY_TIME_NS = "KEY_DISPLAY_TIME_NS": String!

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

KEY_PRESENTATION_TIME_US

const val KEY_PRESENTATION_TIME_US = "KEY_PRESENTATION_TIME_US": String!

Metadata key for storing the composition presentation time of this frame, in microseconds. The value should be a Long.

USAGE_COMPOSER_OVERLAY

const val USAGE_COMPOSER_OVERLAY = 2048: Long

The frame will be used as a hardware composer overlay layer. That is, it will be displayed using the system compositor via android.view.SurfaceControl.

USAGE_CPU_READ_OFTEN

const val USAGE_CPU_READ_OFTEN = 3: Long

The frame will often be read by the CPU.

USAGE_CPU_READ_RARELY

const val USAGE_CPU_READ_RARELY = 2: Long

The frame will sometimes be read by the CPU.

USAGE_CPU_WRITE_OFTEN

const val USAGE_CPU_WRITE_OFTEN = 48: Long

The frame will often be written to by the CPU.

USAGE_CPU_WRITE_RARELY

const val USAGE_CPU_WRITE_RARELY = 32: Long

The frame will sometimes be written to by the CPU.

USAGE_GPU_COLOR_OUTPUT

const val USAGE_GPU_COLOR_OUTPUT = 512: Long

The frame will be written to by the GPU.

USAGE_GPU_SAMPLED_IMAGE

const val USAGE_GPU_SAMPLED_IMAGE = 256: Long

The frame will be read from by the GPU.

USAGE_VIDEO_ENCODE

const val USAGE_VIDEO_ENCODE = 65536: Long

The frame will be read by a hardware video encoder.

Public functions

getContentTimeUs

fun getContentTimeUs(): Long

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

getFormat

fun getFormat(): Format!

The frame format.

getMetadata

fun getMetadata(): ImmutableMap<String!, Any!>!

The frame metadata.