HardwareBufferFrameQueue.FrameFormat.Builder


class HardwareBufferFrameQueue.FrameFormat.Builder


A builder for FrameFormat instances.

Summary

Public constructors

Creates a new builder with default values.

Public constructors

Builder

Builder()

Creates a new builder with default values.

Width and height default to 0, pixelFormat defaults to RGBA_8888, usageFlags defaults to USAGE_GPU_SAMPLED_IMAGE, and ColorInfo defaults to SDR_BT709_LIMITED.

Public functions

build

fun build(): HardwareBufferFrameQueue.FrameFormat!

Builds the FrameFormat instance.

setColorInfo

@CanIgnoreReturnValue
fun setColorInfo(colorInfo: ColorInfo!): HardwareBufferFrameQueue.FrameFormat.Builder!

Sets the ColorInfo.

Parameters
colorInfo: ColorInfo!

The ColorInfo.

setHeight

@CanIgnoreReturnValue
fun setHeight(height: Int): HardwareBufferFrameQueue.FrameFormat.Builder!

Sets the height of the buffer in pixels.

Parameters
height: Int

The height.

setPixelFormat

@CanIgnoreReturnValue
fun setPixelFormat(pixelFormat: Int): HardwareBufferFrameQueue.FrameFormat.Builder!

Sets the format of the HardwareBuffer.

Parameters
pixelFormat: Int

The pixel format.

setUsageFlags

@CanIgnoreReturnValue
fun setUsageFlags(usageFlags: Long): HardwareBufferFrameQueue.FrameFormat.Builder!

Sets the usage flags of the HardwareBuffer.

Parameters
usageFlags: Long

The usage flags.

setWidth

@CanIgnoreReturnValue
fun setWidth(width: Int): HardwareBufferFrameQueue.FrameFormat.Builder!

Sets the width of the buffer in pixels.

Parameters
width: Int

The width.