mirror of
https://github.com/samsonjs/media.git
synced 2026-04-27 15:07:40 +00:00
Make effect classes final
Making classes final when possible is good practice PiperOrigin-RevId: 554776293
This commit is contained in:
parent
7d6f02dc50
commit
57086b6641
7 changed files with 7 additions and 7 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue