Rabbit-R1/original r1/java/sources/androidx/media3/common/SurfaceInfo.java
2024-05-21 17:08:36 -04:00

39 lines
1.3 KiB
Java

package androidx.media3.common;
import android.view.Surface;
import androidx.media3.common.util.Assertions;
/* loaded from: classes2.dex */
public final class SurfaceInfo {
public final int height;
public final int orientationDegrees;
public final Surface surface;
public final int width;
public SurfaceInfo(Surface surface, int i, int i2) {
this(surface, i, i2, 0);
}
public SurfaceInfo(Surface surface, int i, int i2, int i3) {
Assertions.checkArgument(i3 == 0 || i3 == 90 || i3 == 180 || i3 == 270, "orientationDegrees must be 0, 90, 180, or 270");
this.surface = surface;
this.width = i;
this.height = i2;
this.orientationDegrees = i3;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof SurfaceInfo)) {
return false;
}
SurfaceInfo surfaceInfo = (SurfaceInfo) obj;
return this.width == surfaceInfo.width && this.height == surfaceInfo.height && this.orientationDegrees == surfaceInfo.orientationDegrees && this.surface.equals(surfaceInfo.surface);
}
public int hashCode() {
return (((((this.surface.hashCode() * 31) + this.width) * 31) + this.height) * 31) + this.orientationDegrees;
}
}