Class DefaultVideoFrameProcessor.Factory.Builder
- java.lang.Object
-
- com.google.android.exoplayer2.effect.DefaultVideoFrameProcessor.Factory.Builder
-
- Enclosing class:
- DefaultVideoFrameProcessor.Factory
public static final class DefaultVideoFrameProcessor.Factory.Builder extends Object
A builder forDefaultVideoFrameProcessor.Factoryinstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()Creates an instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DefaultVideoFrameProcessor.Factorybuild()Builds anDefaultVideoFrameProcessor.Factoryinstance.DefaultVideoFrameProcessor.Factory.BuildersetEnableColorTransfers(boolean enableColorTransfers)Sets whether to transfer colors to an intermediate color space when applying effects.DefaultVideoFrameProcessor.Factory.BuildersetGlObjectsProvider(GlObjectsProvider glObjectsProvider)Sets theGlObjectsProvider.DefaultVideoFrameProcessor.Factory.BuildersetTextureOutput(DefaultVideoFrameProcessor.TextureOutputListener textureOutputListener, int textureOutputCapacity)Sets texture output settings.
-
-
-
Method Detail
-
setEnableColorTransfers
@CanIgnoreReturnValue public DefaultVideoFrameProcessor.Factory.Builder setEnableColorTransfers(boolean enableColorTransfers)
Sets whether to transfer colors to an intermediate color space when applying effects.If the input or output is HDR, this must be
true.
-
setGlObjectsProvider
@CanIgnoreReturnValue public DefaultVideoFrameProcessor.Factory.Builder setGlObjectsProvider(GlObjectsProvider glObjectsProvider)
Sets theGlObjectsProvider.The default value is
GlObjectsProvider.DEFAULT.
-
setTextureOutput
@CanIgnoreReturnValue public DefaultVideoFrameProcessor.Factory.Builder setTextureOutput(DefaultVideoFrameProcessor.TextureOutputListener textureOutputListener, @IntRange(from=1L) int textureOutputCapacity)
Sets texture output settings.If set, the
VideoFrameProcessorwill output to OpenGL textures, accessible viaDefaultVideoFrameProcessor.TextureOutputListener.onTextureRendered(com.google.android.exoplayer2.util.GlTextureInfo, long, com.google.android.exoplayer2.effect.DefaultVideoFrameProcessor.ReleaseOutputTextureCallback). Textures will stop being outputted when the number of output textures available reaches thetextureOutputCapacity. To regain capacity, output textures must be released usingDefaultVideoFrameProcessor.ReleaseOutputTextureCallback.If set, VideoFrameProcessor.setOutputSurfaceInfo(com.google.android.exoplayer2.util.SurfaceInfo) and
VideoFrameProcessor.renderOutputFrame(long)will be no-ops, andrenderFramesAutomaticallywill behave as if it is set totrue.If not set, there will be no texture output.
- Parameters:
textureOutputListener- TheDefaultVideoFrameProcessor.TextureOutputListener.textureOutputCapacity- The amount of output textures that may be allocated at a time before texture output blocks. Must be greater than or equal to 1.
-
build
public DefaultVideoFrameProcessor.Factory build()
Builds anDefaultVideoFrameProcessor.Factoryinstance.
-
-