Make effect classes final

Making classes final when possible is good practice

PiperOrigin-RevId: 554776293
This commit is contained in:
kimvde 2023-08-08 11:27:49 +00:00 committed by Tianyi Feng
parent 7d6f02dc50
commit 57086b6641
7 changed files with 7 additions and 7 deletions

View file

@ -26,7 +26,7 @@ import java.util.Arrays;
/** Modifies brightness of an input frame. */
@UnstableApi
public class Brightness implements RgbMatrix {
public final class Brightness implements RgbMatrix {
private final float[] rgbMatrix;

View file

@ -23,7 +23,7 @@ import androidx.media3.common.util.UnstableApi;
/** A {@link RgbMatrix} to control the contrast of video frames. */
@UnstableApi
public class Contrast implements RgbMatrix {
public final class Contrast implements RgbMatrix {
/** Adjusts the contrast of video frames in the interval [-1, 1]. */
private final float contrast;

View file

@ -23,7 +23,7 @@ import androidx.media3.common.util.UnstableApi;
/** Drops frames to lower average frame rate to around {@code targetFrameRate}. */
@UnstableApi
public class FrameDropEffect implements GlEffect {
public final class FrameDropEffect implements GlEffect {
private final float inputFrameRate;
private final float targetFrameRate;

View file

@ -26,7 +26,7 @@ import com.google.errorprone.annotations.CanIgnoreReturnValue;
/** Adjusts the HSL (Hue, Saturation, and Lightness) of a frame. */
@UnstableApi
public class HslAdjustment implements GlEffect {
public final class HslAdjustment implements GlEffect {
/** A builder for {@code HslAdjustment} instances. */
public static final class Builder {

View file

@ -25,7 +25,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
/** Provides common color filters. */
@UnstableApi
public class RgbFilter implements RgbMatrix {
public final class RgbFilter implements RgbMatrix {
private static final int COLOR_FILTER_GRAYSCALE_INDEX = 1;
private static final int COLOR_FILTER_INVERTED_INDEX = 2;

View file

@ -31,7 +31,7 @@ import androidx.media3.common.util.Util;
/** Transforms the colors of a frame by applying the same color lookup table to each frame. */
@UnstableApi
public class SingleColorLut implements ColorLut {
public final class SingleColorLut implements ColorLut {
private final Bitmap lut;
private int lutTextureId;

View file

@ -28,7 +28,7 @@ import androidx.media3.common.util.UnstableApi;
* other timestamps.
*/
@UnstableApi
public class TimestampWrapper implements GlEffect {
public final class TimestampWrapper implements GlEffect {
public final GlEffect glEffect;
public final long startTimeUs;