Back to Exoplayer

VideoFrameProcessorTestRunner.Builder (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/testutil/VideoFrameProcessorTestRunner.Builder.html

latest11.1 KB
Original Source

Package com.google.android.exoplayer2.testutil

Class VideoFrameProcessorTestRunner.Builder


public static final classVideoFrameProcessorTestRunner.Builderextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")

A builder for VideoFrameProcessorTestRunner instances.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Builder() | Creates a new instance with default values. |

Method Summary

All Methods Instance Methods Concrete Methods | Modifier and Type | Method | Description | | --- | --- | --- | | VideoFrameProcessorTestRunner | build() | | | VideoFrameProcessorTestRunner.Builder | setBitmapReader​(VideoFrameProcessorTestRunner.BitmapReader bitmapReader) | Sets the VideoFrameProcessorTestRunner.BitmapReader. | | VideoFrameProcessorTestRunner.Builder | setEffects​(Effect... effects) | Sets the Effects used. | | VideoFrameProcessorTestRunner.Builder | setEffects​(List<Effect> effects) | Sets the Effects used. | | VideoFrameProcessorTestRunner.Builder | setInputColorInfo​(ColorInfo inputColorInfo) | Sets the input ColorInfo. | | VideoFrameProcessorTestRunner.Builder | setInputType​(@com.google.android.exoplayer2.util.VideoFrameProcessor.InputType int inputType) | Sets whether input comes from an external texture. | | VideoFrameProcessorTestRunner.Builder | setOnOutputFrameAvailableForRenderingListener​(VideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListener onOutputFrameAvailableListener) | Sets the method to be called in VideoFrameProcessor.Listener.onOutputFrameAvailableForRendering(long). | | VideoFrameProcessorTestRunner.Builder | setOutputColorInfo​(ColorInfo outputColorInfo) | Sets the output ColorInfo. | | VideoFrameProcessorTestRunner.Builder | setOutputFileLabel​(String outputFileLabel) | Sets the output file label. | | VideoFrameProcessorTestRunner.Builder | setPixelWidthHeightRatio​(float pixelWidthHeightRatio) | Sets the pixelWidthHeightRatio. | | VideoFrameProcessorTestRunner.Builder | setTestId​(String testId) | Sets the test ID, used to generate output files. | | VideoFrameProcessorTestRunner.Builder | setVideoAssetPath​(String videoAssetPath) | Sets the input video asset path. | | VideoFrameProcessorTestRunner.Builder | setVideoFrameProcessorFactory​(VideoFrameProcessor.Factory videoFrameProcessorFactory) | Sets the VideoFrameProcessor.Factory. |

- 

Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

- 

Builder

public Builder()

Creates a new instance with default values.

Method Detail

- 

setTestId

@CanIgnoreReturnValue
public[VideoFrameProcessorTestRunner.Builder](VideoFrameProcessorTestRunner.Builder.html "class in com.google.android.exoplayer2.testutil")setTestId​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")testId)

Sets the test ID, used to generate output files.

This is a required value.

- 

setVideoFrameProcessorFactory

@CanIgnoreReturnValue
public[VideoFrameProcessorTestRunner.Builder](VideoFrameProcessorTestRunner.Builder.html "class in com.google.android.exoplayer2.testutil")setVideoFrameProcessorFactory​([VideoFrameProcessor.Factory](../util/VideoFrameProcessor.Factory.html "interface in com.google.android.exoplayer2.util")videoFrameProcessorFactory)

Sets the VideoFrameProcessor.Factory.

This is a required value.

- 

setBitmapReader

@CanIgnoreReturnValue
public[VideoFrameProcessorTestRunner.Builder](VideoFrameProcessorTestRunner.Builder.html "class in com.google.android.exoplayer2.testutil")setBitmapReader​([VideoFrameProcessorTestRunner.BitmapReader](VideoFrameProcessorTestRunner.BitmapReader.html "interface in com.google.android.exoplayer2.testutil")bitmapReader)

Sets the VideoFrameProcessorTestRunner.BitmapReader.

The default value is a VideoFrameProcessorTestRunner.SurfaceBitmapReader instance.

- 

setVideoAssetPath

@CanIgnoreReturnValue
public[VideoFrameProcessorTestRunner.Builder](VideoFrameProcessorTestRunner.Builder.html "class in com.google.android.exoplayer2.testutil")setVideoAssetPath​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")videoAssetPath)

Sets the input video asset path.

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

- 

setOutputFileLabel

@CanIgnoreReturnValue
public[VideoFrameProcessorTestRunner.Builder](VideoFrameProcessorTestRunner.Builder.html "class in com.google.android.exoplayer2.testutil")setOutputFileLabel​([String](https://developer.android.com/reference/java/lang/String.html "class or interface in java.lang")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.

- 

setEffects

@CanIgnoreReturnValue
public[VideoFrameProcessorTestRunner.Builder](VideoFrameProcessorTestRunner.Builder.html "class in com.google.android.exoplayer2.testutil")setEffects​([List](https://developer.android.com/reference/java/util/List.html "class or interface in java.util")<[Effect](../util/Effect.html "interface in com.google.android.exoplayer2.util")> effects)

Sets the Effects used.

The default value is an empty list.

- 

setEffects

@CanIgnoreReturnValue
public[VideoFrameProcessorTestRunner.Builder](VideoFrameProcessorTestRunner.Builder.html "class in com.google.android.exoplayer2.testutil")setEffects​([Effect](../util/Effect.html "interface in com.google.android.exoplayer2.util")... effects)

Sets the Effects used.

The default value is an empty list.

- 

setPixelWidthHeightRatio

@CanIgnoreReturnValue
public[VideoFrameProcessorTestRunner.Builder](VideoFrameProcessorTestRunner.Builder.html "class in com.google.android.exoplayer2.testutil")setPixelWidthHeightRatio​(float pixelWidthHeightRatio)

Sets the pixelWidthHeightRatio.

The default value is DEFAULT_PIXEL_WIDTH_HEIGHT_RATIO.

- 

setInputColorInfo

@CanIgnoreReturnValue
public[VideoFrameProcessorTestRunner.Builder](VideoFrameProcessorTestRunner.Builder.html "class in com.google.android.exoplayer2.testutil")setInputColorInfo​([ColorInfo](../video/ColorInfo.html "class in com.google.android.exoplayer2.video")inputColorInfo)

Sets the input ColorInfo.

The default value is ColorInfo.SDR_BT709_LIMITED.

- 

setOutputColorInfo

@CanIgnoreReturnValue
public[VideoFrameProcessorTestRunner.Builder](VideoFrameProcessorTestRunner.Builder.html "class in com.google.android.exoplayer2.testutil")setOutputColorInfo​([ColorInfo](../video/ColorInfo.html "class in com.google.android.exoplayer2.video")outputColorInfo)

Sets the output ColorInfo.

The default value is ColorInfo.SDR_BT709_LIMITED.

- 

setInputType

@CanIgnoreReturnValue
public[VideoFrameProcessorTestRunner.Builder](VideoFrameProcessorTestRunner.Builder.html "class in com.google.android.exoplayer2.testutil")setInputType​(@com.google.android.exoplayer2.util.VideoFrameProcessor.InputType int inputType)

Sets whether input comes from an external texture. See VideoFrameProcessor.Factory.create(android.content.Context, java.util.List<com.google.android.exoplayer2.util.Effect>, com.google.android.exoplayer2.util.DebugViewProvider, com.google.android.exoplayer2.video.ColorInfo, com.google.android.exoplayer2.video.ColorInfo, boolean, java.util.concurrent.Executor, com.google.android.exoplayer2.util.VideoFrameProcessor.Listener).

The default value is VideoFrameProcessor.INPUT_TYPE_SURFACE.

- 

setOnOutputFrameAvailableForRenderingListener

@CanIgnoreReturnValue
public[VideoFrameProcessorTestRunner.Builder](VideoFrameProcessorTestRunner.Builder.html "class in com.google.android.exoplayer2.testutil")setOnOutputFrameAvailableForRenderingListener​([VideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListener](VideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListener.html "interface in com.google.android.exoplayer2.testutil")onOutputFrameAvailableListener)

Sets the method to be called in VideoFrameProcessor.Listener.onOutputFrameAvailableForRendering(long).

The default value is a no-op.

- 

build

public[VideoFrameProcessorTestRunner](VideoFrameProcessorTestRunner.html "class in com.google.android.exoplayer2.testutil")build()
                                    throws[VideoFrameProcessingException](../util/VideoFrameProcessingException.html "class in com.google.android.exoplayer2.util")

Throws:VideoFrameProcessingException