Back to Exoplayer

Brightness (ExoPlayer library)

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

latest4.2 KB
Original Source

Package com.google.android.exoplayer2.effect

Class Brightness

  • java.lang.Object

    • com.google.android.exoplayer2.effect.Brightness
  • All Implemented Interfaces:GlEffect, RgbMatrix, Effect


[@Deprecated](https://developer.android.com/reference/java/lang/Deprecated.html "class or interface in java.lang")public classBrightnessextends[Object](https://developer.android.com/reference/java/lang/Object.html "class or interface in java.lang")implements[RgbMatrix](RgbMatrix.html "interface in com.google.android.exoplayer2.effect")

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.

Modifies brightness of an input frame.

Constructor Summary

Constructors | Constructor | Description | | --- | --- | | Brightness​(float brightness) | Deprecated.

Modifies brightness by adding a constant value to red, green, and blue values. |

Method Summary

All Methods Instance Methods Concrete Methods Deprecated Methods | Modifier and Type | Method | Description | | --- | --- | --- | | 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. | | boolean | isNoOp​(int inputWidth, int inputHeight) | Deprecated.

Returns whether a GlEffect applies no change at every timestamp. |

- 

Methods inherited from class java.lang.Object

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

- 

Methods inherited from interface com.google.android.exoplayer2.effect.RgbMatrix

toGlShaderProgram

Constructor Detail

- 

Brightness

public Brightness​(@FloatRange(from=-1.0,to=1.0)
                  float brightness)

Deprecated.

Modifies brightness by adding a constant value to red, green, and blue values. Parameters:brightness - The constant value to add to red, green, and blue values. Should be greater than or equal to -1f, and less than or equal to 1f. 0 means to leave brightness unchanged.

Method Detail

- 

getMatrix

public float[] getMatrix​(long presentationTimeUs,
                         boolean useHdr)

Deprecated.

Description copied from interface: RgbMatrix

Returns the 4x4 RGB transformation matrix to apply to the color values of each pixel in the frame with the given timestamp. Specified by:getMatrix in interface RgbMatrixParameters:presentationTimeUs - The timestamp of the frame to apply the matrix on.useHdr - If true, colors will be in linear RGB BT.2020. If false, colors will be in linear RGB BT.709. Must be consistent with useHdr in RgbMatrix.toGlShaderProgram(Context, boolean).Returns:The RgbMatrix to apply to the frame.

- 

isNoOp

public boolean isNoOp​(int inputWidth,
                      int inputHeight)

Deprecated.

Description copied from interface: GlEffect

Returns whether a GlEffect applies no change at every timestamp.

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

Specified by:isNoOp in interface GlEffectParameters:inputWidth - The input frame width, in pixels.inputHeight - The input frame height, in pixels.