Class RgbFilter
- java.lang.Object
-
- com.google.android.exoplayer2.effect.RgbFilter
-
@Deprecated public class RgbFilter extends Object implements RgbMatrix
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.Provides common color filters.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static RgbFiltercreateGrayscaleFilter()Deprecated.Creates a new grayscaleRgbFilterinstance.static RgbFiltercreateInvertedFilter()Deprecated.Creates a new invertedRgbFilterinstance.float[]getMatrix(long presentationTimeUs, boolean useHdr)Deprecated.Returns the 4x4 RGB transformation matrix to apply to the color values of each pixel in the frame with the given timestamp.SingleFrameGlShaderProgramtoGlShaderProgram(Context context, boolean useHdr)Deprecated.Returns aGlShaderProgramthat applies the effect.
-
-
-
Method Detail
-
createGrayscaleFilter
public static RgbFilter createGrayscaleFilter()
Deprecated.Creates a new grayscaleRgbFilterinstance.
-
createInvertedFilter
public static RgbFilter createInvertedFilter()
Deprecated.Creates a new invertedRgbFilterinstance.
-
getMatrix
public float[] getMatrix(long presentationTimeUs, boolean useHdr)Deprecated.Description copied from interface:RgbMatrixReturns the 4x4 RGB transformation matrix to apply to the color values of each pixel in the frame with the given timestamp.- Specified by:
getMatrixin interfaceRgbMatrix- Parameters:
presentationTimeUs- The timestamp of the frame to apply the matrix on.useHdr- Iftrue, colors will be in linear RGB BT.2020. Iffalse, colors will be in linear RGB BT.709. Must be consistent withuseHdrinRgbMatrix.toGlShaderProgram(Context, boolean).- Returns:
- The
RgbMatrixto apply to the frame.
-
toGlShaderProgram
public SingleFrameGlShaderProgram toGlShaderProgram(Context context, boolean useHdr) throws VideoFrameProcessingException
Deprecated.Description copied from interface:GlEffectReturns aGlShaderProgramthat applies the effect.- Specified by:
toGlShaderProgramin interfaceGlEffect- Specified by:
toGlShaderProgramin interfaceRgbMatrix- Parameters:
context- AContext.useHdr- Whether input textures come from an HDR source. Iftrue, colors will be in linear RGB BT.2020. Iffalse, colors will be in linear RGB BT.709.- Throws:
VideoFrameProcessingException- If an error occurs while creating theGlShaderProgram.
-
-