discord-jadx/app/src/main/java/com/google/android/exoplayer2/Format.java
2021-07-13 22:23:20 +02:00

429 lines
14 KiB
Java

package com.google.android.exoplayer2;
import android.os.Parcel;
import android.os.Parcelable;
import androidx.annotation.Nullable;
import c.i.a.c.i2.f0;
import c.i.a.c.z1.c0;
import c.i.a.c.z1.w;
import com.google.android.exoplayer2.drm.DrmInitData;
import com.google.android.exoplayer2.metadata.Metadata;
import com.google.android.exoplayer2.video.ColorInfo;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
public final class Format implements Parcelable {
public static final Parcelable.Creator<Format> CREATOR = new a();
public final float A;
public final int B;
public final float C;
@Nullable
public final byte[] D;
public final int E;
@Nullable
public final ColorInfo F;
public final int G;
public final int H;
public final int I;
public final int J;
public final int K;
public final int L;
@Nullable
public final Class<? extends w> M;
public int N;
@Nullable
public final String i;
@Nullable
public final String j;
@Nullable
public final String k;
public final int l;
public final int m;
public final int n;
public final int o;
public final int p;
@Nullable
public final String q;
@Nullable
public final Metadata r;
@Nullable
/* renamed from: s reason: collision with root package name */
public final String f2205s;
@Nullable
public final String t;
public final int u;
public final List<byte[]> v;
@Nullable
public final DrmInitData w;
/* renamed from: x reason: collision with root package name */
public final long f2206x;
/* renamed from: y reason: collision with root package name */
public final int f2207y;
/* renamed from: z reason: collision with root package name */
public final int f2208z;
public class a implements Parcelable.Creator<Format> {
/* Return type fixed from 'java.lang.Object' to match base method */
@Override // android.os.Parcelable.Creator
public Format createFromParcel(Parcel parcel) {
return new Format(parcel);
}
/* Return type fixed from 'java.lang.Object[]' to match base method */
@Override // android.os.Parcelable.Creator
public Format[] newArray(int i) {
return new Format[i];
}
}
public static final class b {
public int A;
public int B;
public int C;
@Nullable
public Class<? extends w> D;
@Nullable
public String a;
@Nullable
public String b;
@Nullable
/* renamed from: c reason: collision with root package name */
public String f2209c;
public int d;
public int e;
public int f;
public int g;
@Nullable
public String h;
@Nullable
public Metadata i;
@Nullable
public String j;
@Nullable
public String k;
public int l;
@Nullable
public List<byte[]> m;
@Nullable
public DrmInitData n;
public long o;
public int p;
public int q;
public float r;
/* renamed from: s reason: collision with root package name */
public int f2210s;
public float t;
@Nullable
public byte[] u;
public int v;
@Nullable
public ColorInfo w;
/* renamed from: x reason: collision with root package name */
public int f2211x;
/* renamed from: y reason: collision with root package name */
public int f2212y;
/* renamed from: z reason: collision with root package name */
public int f2213z;
public b() {
this.f = -1;
this.g = -1;
this.l = -1;
this.o = Long.MAX_VALUE;
this.p = -1;
this.q = -1;
this.r = -1.0f;
this.t = 1.0f;
this.v = -1;
this.f2211x = -1;
this.f2212y = -1;
this.f2213z = -1;
this.C = -1;
}
public b(Format format, a aVar) {
this.a = format.i;
this.b = format.j;
this.f2209c = format.k;
this.d = format.l;
this.e = format.m;
this.f = format.n;
this.g = format.o;
this.h = format.q;
this.i = format.r;
this.j = format.f2205s;
this.k = format.t;
this.l = format.u;
this.m = format.v;
this.n = format.w;
this.o = format.f2206x;
this.p = format.f2207y;
this.q = format.f2208z;
this.r = format.A;
this.f2210s = format.B;
this.t = format.C;
this.u = format.D;
this.v = format.E;
this.w = format.F;
this.f2211x = format.G;
this.f2212y = format.H;
this.f2213z = format.I;
this.A = format.J;
this.B = format.K;
this.C = format.L;
this.D = format.M;
}
public Format a() {
return new Format(this, null);
}
public b b(int i) {
this.a = Integer.toString(i);
return this;
}
}
public Format(Parcel parcel) {
this.i = parcel.readString();
this.j = parcel.readString();
this.k = parcel.readString();
this.l = parcel.readInt();
this.m = parcel.readInt();
int readInt = parcel.readInt();
this.n = readInt;
int readInt2 = parcel.readInt();
this.o = readInt2;
this.p = readInt2 != -1 ? readInt2 : readInt;
this.q = parcel.readString();
this.r = (Metadata) parcel.readParcelable(Metadata.class.getClassLoader());
this.f2205s = parcel.readString();
this.t = parcel.readString();
this.u = parcel.readInt();
int readInt3 = parcel.readInt();
this.v = new ArrayList(readInt3);
boolean z2 = false;
for (int i = 0; i < readInt3; i++) {
List<byte[]> list = this.v;
byte[] createByteArray = parcel.createByteArray();
Objects.requireNonNull(createByteArray);
list.add(createByteArray);
}
DrmInitData drmInitData = (DrmInitData) parcel.readParcelable(DrmInitData.class.getClassLoader());
this.w = drmInitData;
this.f2206x = parcel.readLong();
this.f2207y = parcel.readInt();
this.f2208z = parcel.readInt();
this.A = parcel.readFloat();
this.B = parcel.readInt();
this.C = parcel.readFloat();
int i2 = f0.a;
Class cls = null;
this.D = parcel.readInt() != 0 ? true : z2 ? parcel.createByteArray() : null;
this.E = parcel.readInt();
this.F = (ColorInfo) parcel.readParcelable(ColorInfo.class.getClassLoader());
this.G = parcel.readInt();
this.H = parcel.readInt();
this.I = parcel.readInt();
this.J = parcel.readInt();
this.K = parcel.readInt();
this.L = parcel.readInt();
this.M = drmInitData != null ? c0.class : cls;
}
public Format(b bVar, a aVar) {
this.i = bVar.a;
this.j = bVar.b;
this.k = f0.B(bVar.f2209c);
this.l = bVar.d;
this.m = bVar.e;
int i = bVar.f;
this.n = i;
int i2 = bVar.g;
this.o = i2;
this.p = i2 != -1 ? i2 : i;
this.q = bVar.h;
this.r = bVar.i;
this.f2205s = bVar.j;
this.t = bVar.k;
this.u = bVar.l;
List<byte[]> list = bVar.m;
this.v = list == null ? Collections.emptyList() : list;
DrmInitData drmInitData = bVar.n;
this.w = drmInitData;
this.f2206x = bVar.o;
this.f2207y = bVar.p;
this.f2208z = bVar.q;
this.A = bVar.r;
int i3 = bVar.f2210s;
int i4 = 0;
this.B = i3 == -1 ? 0 : i3;
float f = bVar.t;
this.C = f == -1.0f ? 1.0f : f;
this.D = bVar.u;
this.E = bVar.v;
this.F = bVar.w;
this.G = bVar.f2211x;
this.H = bVar.f2212y;
this.I = bVar.f2213z;
int i5 = bVar.A;
this.J = i5 == -1 ? 0 : i5;
int i6 = bVar.B;
this.K = i6 != -1 ? i6 : i4;
this.L = bVar.C;
Class<? extends w> cls = bVar.D;
if (cls != null || drmInitData == null) {
this.M = cls;
} else {
this.M = c0.class;
}
}
public b a() {
return new b(this, null);
}
public boolean b(Format format) {
if (this.v.size() != format.v.size()) {
return false;
}
for (int i = 0; i < this.v.size(); i++) {
if (!Arrays.equals(this.v.get(i), format.v.get(i))) {
return false;
}
}
return true;
}
@Override // android.os.Parcelable
public int describeContents() {
return 0;
}
@Override // java.lang.Object
public boolean equals(@Nullable Object obj) {
int i;
if (this == obj) {
return true;
}
if (obj == null || Format.class != obj.getClass()) {
return false;
}
Format format = (Format) obj;
int i2 = this.N;
return (i2 == 0 || (i = format.N) == 0 || i2 == i) && this.l == format.l && this.m == format.m && this.n == format.n && this.o == format.o && this.u == format.u && this.f2206x == format.f2206x && this.f2207y == format.f2207y && this.f2208z == format.f2208z && this.B == format.B && this.E == format.E && this.G == format.G && this.H == format.H && this.I == format.I && this.J == format.J && this.K == format.K && this.L == format.L && Float.compare(this.A, format.A) == 0 && Float.compare(this.C, format.C) == 0 && f0.a(this.M, format.M) && f0.a(this.i, format.i) && f0.a(this.j, format.j) && f0.a(this.q, format.q) && f0.a(this.f2205s, format.f2205s) && f0.a(this.t, format.t) && f0.a(this.k, format.k) && Arrays.equals(this.D, format.D) && f0.a(this.r, format.r) && f0.a(this.F, format.F) && f0.a(this.w, format.w) && b(format);
}
@Override // java.lang.Object
public int hashCode() {
if (this.N == 0) {
String str = this.i;
int i = 0;
int hashCode = (527 + (str == null ? 0 : str.hashCode())) * 31;
String str2 = this.j;
int hashCode2 = (hashCode + (str2 != null ? str2.hashCode() : 0)) * 31;
String str3 = this.k;
int hashCode3 = (((((((((hashCode2 + (str3 == null ? 0 : str3.hashCode())) * 31) + this.l) * 31) + this.m) * 31) + this.n) * 31) + this.o) * 31;
String str4 = this.q;
int hashCode4 = (hashCode3 + (str4 == null ? 0 : str4.hashCode())) * 31;
Metadata metadata = this.r;
int hashCode5 = (hashCode4 + (metadata == null ? 0 : metadata.hashCode())) * 31;
String str5 = this.f2205s;
int hashCode6 = (hashCode5 + (str5 == null ? 0 : str5.hashCode())) * 31;
String str6 = this.t;
int floatToIntBits = (((((((((((((((Float.floatToIntBits(this.C) + ((((Float.floatToIntBits(this.A) + ((((((((((hashCode6 + (str6 == null ? 0 : str6.hashCode())) * 31) + this.u) * 31) + ((int) this.f2206x)) * 31) + this.f2207y) * 31) + this.f2208z) * 31)) * 31) + this.B) * 31)) * 31) + this.E) * 31) + this.G) * 31) + this.H) * 31) + this.I) * 31) + this.J) * 31) + this.K) * 31) + this.L) * 31;
Class<? extends w> cls = this.M;
if (cls != null) {
i = cls.hashCode();
}
this.N = floatToIntBits + i;
}
return this.N;
}
@Override // java.lang.Object
public String toString() {
StringBuilder L = c.d.b.a.a.L("Format(");
L.append(this.i);
L.append(", ");
L.append(this.j);
L.append(", ");
L.append(this.f2205s);
L.append(", ");
L.append(this.t);
L.append(", ");
L.append(this.q);
L.append(", ");
L.append(this.p);
L.append(", ");
L.append(this.k);
L.append(", [");
L.append(this.f2207y);
L.append(", ");
L.append(this.f2208z);
L.append(", ");
L.append(this.A);
L.append("], [");
L.append(this.G);
L.append(", ");
return c.d.b.a.a.y(L, this.H, "])");
}
@Override // android.os.Parcelable
public void writeToParcel(Parcel parcel, int i) {
parcel.writeString(this.i);
parcel.writeString(this.j);
parcel.writeString(this.k);
parcel.writeInt(this.l);
parcel.writeInt(this.m);
parcel.writeInt(this.n);
parcel.writeInt(this.o);
parcel.writeString(this.q);
int i2 = 0;
parcel.writeParcelable(this.r, 0);
parcel.writeString(this.f2205s);
parcel.writeString(this.t);
parcel.writeInt(this.u);
int size = this.v.size();
parcel.writeInt(size);
for (int i3 = 0; i3 < size; i3++) {
parcel.writeByteArray(this.v.get(i3));
}
parcel.writeParcelable(this.w, 0);
parcel.writeLong(this.f2206x);
parcel.writeInt(this.f2207y);
parcel.writeInt(this.f2208z);
parcel.writeFloat(this.A);
parcel.writeInt(this.B);
parcel.writeFloat(this.C);
if (this.D != null) {
i2 = 1;
}
int i4 = f0.a;
parcel.writeInt(i2);
byte[] bArr = this.D;
if (bArr != null) {
parcel.writeByteArray(bArr);
}
parcel.writeInt(this.E);
parcel.writeParcelable(this.F, i);
parcel.writeInt(this.G);
parcel.writeInt(this.H);
parcel.writeInt(this.I);
parcel.writeInt(this.J);
parcel.writeInt(this.K);
parcel.writeInt(this.L);
}
}