Class VideoFrameProcessorTestRunner.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.testutil.VideoFrameProcessorTestRunner.Builder
-
- Enclosing class:
- VideoFrameProcessorTestRunner
public static final class VideoFrameProcessorTestRunner.Builder extends Object
A builder forVideoFrameProcessorTestRunner
instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
Creates a new instance with default values.
-
Method Summary
-
-
-
Method Detail
-
setTestId
@CanIgnoreReturnValue public VideoFrameProcessorTestRunner.Builder setTestId(String testId)
Sets the test ID, used to generate output files.This is a required value.
-
setVideoFrameProcessorFactory
@CanIgnoreReturnValue public VideoFrameProcessorTestRunner.Builder setVideoFrameProcessorFactory(VideoFrameProcessor.Factory videoFrameProcessorFactory)
Sets theVideoFrameProcessor.Factory
.This is a required value.
-
setBitmapReader
@CanIgnoreReturnValue public VideoFrameProcessorTestRunner.Builder setBitmapReader(VideoFrameProcessorTestRunner.BitmapReader bitmapReader)
Sets theVideoFrameProcessorTestRunner.BitmapReader
.The default value is a
VideoFrameProcessorTestRunner.SurfaceBitmapReader
instance.
-
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.
-
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.
-
setEffects
@CanIgnoreReturnValue public VideoFrameProcessorTestRunner.Builder setEffects(List<Effect> effects)
Sets theEffect
s used.The default value is an empty list.
-
setEffects
@CanIgnoreReturnValue public VideoFrameProcessorTestRunner.Builder setEffects(Effect... effects)
Sets theEffect
s used.The default value is an empty list.
-
setPixelWidthHeightRatio
@CanIgnoreReturnValue public VideoFrameProcessorTestRunner.Builder setPixelWidthHeightRatio(float pixelWidthHeightRatio)
Sets thepixelWidthHeightRatio
.The default value is
DEFAULT_PIXEL_WIDTH_HEIGHT_RATIO
.
-
setInputColorInfo
@CanIgnoreReturnValue public VideoFrameProcessorTestRunner.Builder setInputColorInfo(ColorInfo inputColorInfo)
Sets the inputColorInfo
.The default value is
ColorInfo.SDR_BT709_LIMITED
.
-
setOutputColorInfo
@CanIgnoreReturnValue public VideoFrameProcessorTestRunner.Builder setOutputColorInfo(ColorInfo outputColorInfo)
Sets the outputColorInfo
.The default value is
ColorInfo.SDR_BT709_LIMITED
.
-
setInputType
@CanIgnoreReturnValue public VideoFrameProcessorTestRunner.Builder setInputType(@com.google.android.exoplayer2.util.VideoFrameProcessor.InputType int inputType)
Sets whether input comes from an external texture. SeeVideoFrameProcessor.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 setOnOutputFrameAvailableForRenderingListener(VideoFrameProcessorTestRunner.OnOutputFrameAvailableForRenderingListener onOutputFrameAvailableListener)
Sets the method to be called inVideoFrameProcessor.Listener.onOutputFrameAvailableForRendering(long)
.The default value is a no-op.
-
build
public VideoFrameProcessorTestRunner build() throws VideoFrameProcessingException
- Throws:
VideoFrameProcessingException
-
-