Rabbit-R1/android (non root)/java/sources/androidx/media3/common/VideoSize.java
2024-05-21 17:08:36 -04:00

69 lines
3 KiB
Java

package androidx.media3.common;
import android.os.Bundle;
import androidx.media3.common.Bundleable;
import androidx.media3.common.util.Util;
/* loaded from: classes2.dex */
public final class VideoSize implements Bundleable {
private static final int DEFAULT_HEIGHT = 0;
private static final float DEFAULT_PIXEL_WIDTH_HEIGHT_RATIO = 1.0f;
private static final int DEFAULT_UNAPPLIED_ROTATION_DEGREES = 0;
private static final int DEFAULT_WIDTH = 0;
public final int height;
public final float pixelWidthHeightRatio;
public final int unappliedRotationDegrees;
public final int width;
public static final VideoSize UNKNOWN = new VideoSize(0, 0);
private static final String FIELD_WIDTH = Util.intToStringMaxRadix(0);
private static final String FIELD_HEIGHT = Util.intToStringMaxRadix(1);
private static final String FIELD_UNAPPLIED_ROTATION_DEGREES = Util.intToStringMaxRadix(2);
private static final String FIELD_PIXEL_WIDTH_HEIGHT_RATIO = Util.intToStringMaxRadix(3);
public static final Bundleable.Creator<VideoSize> CREATOR = new Bundleable.Creator() { // from class: androidx.media3.common.VideoSize$$ExternalSyntheticLambda0
@Override // androidx.media3.common.Bundleable.Creator
public final Bundleable fromBundle(Bundle bundle) {
return VideoSize.lambda$static$0(bundle);
}
};
public VideoSize(int i, int i2) {
this(i, i2, 0, 1.0f);
}
public VideoSize(int i, int i2, int i3, float f) {
this.width = i;
this.height = i2;
this.unappliedRotationDegrees = i3;
this.pixelWidthHeightRatio = f;
}
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof VideoSize)) {
return false;
}
VideoSize videoSize = (VideoSize) obj;
return this.width == videoSize.width && this.height == videoSize.height && this.unappliedRotationDegrees == videoSize.unappliedRotationDegrees && this.pixelWidthHeightRatio == videoSize.pixelWidthHeightRatio;
}
public int hashCode() {
return ((((((217 + this.width) * 31) + this.height) * 31) + this.unappliedRotationDegrees) * 31) + Float.floatToRawIntBits(this.pixelWidthHeightRatio);
}
@Override // androidx.media3.common.Bundleable
public Bundle toBundle() {
Bundle bundle = new Bundle();
bundle.putInt(FIELD_WIDTH, this.width);
bundle.putInt(FIELD_HEIGHT, this.height);
bundle.putInt(FIELD_UNAPPLIED_ROTATION_DEGREES, this.unappliedRotationDegrees);
bundle.putFloat(FIELD_PIXEL_WIDTH_HEIGHT_RATIO, this.pixelWidthHeightRatio);
return bundle;
}
/* JADX INFO: Access modifiers changed from: package-private */
public static /* synthetic */ VideoSize lambda$static$0(Bundle bundle) {
return new VideoSize(bundle.getInt(FIELD_WIDTH, 0), bundle.getInt(FIELD_HEIGHT, 0), bundle.getInt(FIELD_UNAPPLIED_ROTATION_DEGREES, 0), bundle.getFloat(FIELD_PIXEL_WIDTH_HEIGHT_RATIO, 1.0f));
}
}