Back to Exoplayer

GlEffect (ExoPlayer library)

docs/doc/reference/com/google/android/exoplayer2/effect/GlEffect.html

latest3.6 KB
Original Source

Package com.google.android.exoplayer2.effect

Interface GlEffect

  • All Superinterfaces:EffectAll Known Subinterfaces:ColorLut, GlMatrixTransformation, MatrixTransformation, RgbMatrixAll Known Implementing Classes:Brightness, Contrast, Crop, FrameCache, FrameDropEffect, HslAdjustment, OverlayEffect, Presentation, RgbAdjustment, RgbFilter, ScaleAndRotateTransformation, SingleColorLut, TimestampWrapper

[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public interfaceGlEffectextends[Effect](../util/Effect.html "interface in com.google.android.exoplayer2.util")

Deprecated. com.google.android.exoplayer2 is deprecated. Please migrate to androidx.media3 (which contains the same ExoPlayer code). See the migration guide for more details, including a script to help with the migration.

Interface for a video frame effect with a GlShaderProgram implementation.

Implementations contain information specifying the effect and can be converted to a GlShaderProgram which applies the effect.

Method Summary

All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | default boolean | isNoOp​(int inputWidth, int inputHeight) | Deprecated.

Returns whether a GlEffect applies no change at every timestamp. | | GlShaderProgram | toGlShaderProgram​(Context context, boolean useHdr) | Deprecated.

Returns a GlShaderProgram that applies the effect. |

Method Detail

- 

toGlShaderProgram

[GlShaderProgram](GlShaderProgram.html "interface in com.google.android.exoplayer2.effect")toGlShaderProgram​([Context](https://developer.android.com/reference/android/content/Context.html "class or interface in android.content")context,
                                  boolean useHdr)
                           throws[VideoFrameProcessingException](../util/VideoFrameProcessingException.html "class in com.google.android.exoplayer2.util")

Deprecated.

Returns a GlShaderProgram that applies the effect. Parameters:context - A Context.useHdr - Whether input textures come from an HDR source. If true, colors will be in linear RGB BT.2020. If false, colors will be in linear RGB BT.709.Throws:VideoFrameProcessingException - If an error occurs while creating the GlShaderProgram.

- 

isNoOp

default boolean isNoOp​(int inputWidth,
                       int inputHeight)

Deprecated.

Returns whether a GlEffect applies no change at every timestamp.

This can be used as a hint to skip this instance.

Parameters:inputWidth - The input frame width, in pixels.inputHeight - The input frame height, in pixels.