FrameInfo.Builder


public final class FrameInfo.Builder


A builder for FrameInfo instances.

Summary

Public constructors

Builder(FrameInfo frameInfo)

Creates an instance with the values of the provided FrameInfo.

Builder(ColorInfo colorInfo, int width, int height)

Creates an instance with default values.

Public methods

FrameInfo

Builds a FrameInfo instance.

FrameInfo.Builder

Sets the ColorInfo.

FrameInfo.Builder

Sets the frame height, in pixels.

FrameInfo.Builder

Sets the offset to add to the frame presentation timestamp, in microseconds.

FrameInfo.Builder
@CanIgnoreReturnValue
setPixelWidthHeightRatio(float pixelWidthHeightRatio)

Sets the ratio of width over height for each pixel.

FrameInfo.Builder

Sets the frame width, in pixels.

Public constructors

Builder

public Builder(FrameInfo frameInfo)

Creates an instance with the values of the provided FrameInfo.

Builder

public Builder(ColorInfo colorInfo, int width, int height)

Creates an instance with default values.

Parameters
ColorInfo colorInfo

The ColorInfo.

int width

The frame width, in pixels.

int height

The frame height, in pixels.

Public methods

build

public FrameInfo build()

Builds a FrameInfo instance.

setColorInfo

@CanIgnoreReturnValue
public FrameInfo.Builder setColorInfo(ColorInfo colorInfo)

Sets the ColorInfo.

setHeight

@CanIgnoreReturnValue
public FrameInfo.Builder setHeight(int height)

Sets the frame height, in pixels.

setOffsetToAddUs

@CanIgnoreReturnValue
public FrameInfo.Builder setOffsetToAddUs(long offsetToAddUs)

Sets the offset to add to the frame presentation timestamp, in microseconds.

The default value is 0.

setPixelWidthHeightRatio

@CanIgnoreReturnValue
public FrameInfo.Builder setPixelWidthHeightRatio(float pixelWidthHeightRatio)

Sets the ratio of width over height for each pixel.

The default value is 1.

setWidth

@CanIgnoreReturnValue
public FrameInfo.Builder setWidth(int width)

Sets the frame width, in pixels.