VideoFrameProcessorTestRunner.Builder


public final class VideoFrameProcessorTestRunner.Builder


A builder for VideoFrameProcessorTestRunner instances.

Summary

Public constructors

Creates a new instance with default values.

Public methods

VideoFrameProcessorTestRunner
VideoFrameProcessorTestRunner.Builder

Sets the BitmapReader.

VideoFrameProcessorTestRunner.Builder
@CanIgnoreReturnValue
setEffects(Effect[] effects)

Sets the Effects used.

VideoFrameProcessorTestRunner.Builder

Sets the Effects used.

VideoFrameProcessorTestRunner.Builder

Sets the method to be called in onEnded.

VideoFrameProcessorTestRunner.Builder

Sets the method to be called in onOutputFrameAvailableForRendering.

VideoFrameProcessorTestRunner.Builder

Sets the output ColorInfo.

VideoFrameProcessorTestRunner.Builder

Sets the output file label.

VideoFrameProcessorTestRunner.Builder
@CanIgnoreReturnValue
setPixelWidthHeightRatio(float pixelWidthHeightRatio)

Sets the pixelWidthHeightRatio.

VideoFrameProcessorTestRunner.Builder

Sets the test ID, used to generate output files.

VideoFrameProcessorTestRunner.Builder

Sets the input video asset path.

VideoFrameProcessorTestRunner.Builder

Sets the VideoFrameProcessor.Factory.

Public constructors

Builder

public Builder()

Creates a new instance with default values.

Public methods

setBitmapReader

@CanIgnoreReturnValue
public VideoFrameProcessorTestRunner.Builder setBitmapReader(
    VideoFrameProcessorTestRunner.BitmapReader bitmapReader
)

Sets the BitmapReader.

The default value is a SurfaceBitmapReader instance.

setEffects

@CanIgnoreReturnValue
public VideoFrameProcessorTestRunner.Builder setEffects(Effect[] effects)

Sets the Effects used.

The default value is an empty list.

setEffects

@CanIgnoreReturnValue
public VideoFrameProcessorTestRunner.Builder setEffects(List<Effect> effects)

Sets the Effects used.

The default value is an empty list.

setOnEndedListener

@CanIgnoreReturnValue
public VideoFrameProcessorTestRunner.Builder setOnEndedListener(
    VideoFrameProcessorTestRunner.OnVideoFrameProcessingEndedListener onEndedListener
)

Sets the method to be called in onEnded.

The default value is a no-op.

setOnOutputFrameAvailableForRenderingListener

@CanIgnoreReturnValue
public VideoFrameProcessorTestRunner.Builder setOnOutputFrameAvailableForRenderingListener(
    VideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListener onOutputFrameAvailableListener
)

Sets the method to be called in onOutputFrameAvailableForRendering.

The method will be called on the thread the VideoFrameProcessorTestRunner is created on.

The default value is a no-op.

setOutputColorInfo

@CanIgnoreReturnValue
public VideoFrameProcessorTestRunner.Builder setOutputColorInfo(ColorInfo outputColorInfo)

Sets the output ColorInfo.

The default value is SDR_BT709_LIMITED.

setOutputFileLabel

@CanIgnoreReturnValue
public VideoFrameProcessorTestRunner.Builder setOutputFileLabel(String outputFileLabel)

Sets the output file label.

This value will be postfixed after the testId to generated output files.

The default value is an empty string.

setPixelWidthHeightRatio

@CanIgnoreReturnValue
public VideoFrameProcessorTestRunner.Builder setPixelWidthHeightRatio(float pixelWidthHeightRatio)

Sets the pixelWidthHeightRatio.

The default value is DEFAULT_PIXEL_WIDTH_HEIGHT_RATIO.

setTestId

@CanIgnoreReturnValue
public VideoFrameProcessorTestRunner.Builder setTestId(String testId)

Sets the test ID, used to generate output files.

This is a required value.

setVideoAssetPath

@CanIgnoreReturnValue
public VideoFrameProcessorTestRunner.Builder setVideoAssetPath(String videoAssetPath)

Sets the input video asset path.

No default value is set. Must be set when the input is a video file.

setVideoFrameProcessorFactory

@CanIgnoreReturnValue
public VideoFrameProcessorTestRunner.Builder setVideoFrameProcessorFactory(
    VideoFrameProcessor.Factory videoFrameProcessorFactory
)

Sets the VideoFrameProcessor.Factory.

This is a required value.