discord-jadx/app/src/main/java/com/google/android/exoplayer2/ExoPlaybackException.java

88 lines
3.1 KiB
Java

package com.google.android.exoplayer2;
import android.os.SystemClock;
import android.text.TextUtils;
import androidx.annotation.CheckResult;
import androidx.annotation.Nullable;
import c.d.b.a.a;
import c.i.a.c.d2.w;
import c.i.a.c.h0;
import java.util.UUID;
public final class ExoPlaybackException extends Exception {
@Nullable
private final Throwable cause;
public final boolean isRecoverable;
@Nullable
public final w mediaPeriodId;
@Nullable
public final Format rendererFormat;
public final int rendererFormatSupport;
public final int rendererIndex;
@Nullable
public final String rendererName;
public final long timestampMs;
public final int type;
public ExoPlaybackException(int i, Throwable th) {
this(i, th, null, null, -1, null, 4, false);
}
/* JADX WARNING: Illegal instructions before constructor call */
public ExoPlaybackException(int i, @Nullable Throwable th, @Nullable String str, @Nullable String str2, int i2, @Nullable Format format, int i3, boolean z2) {
this(!TextUtils.isEmpty(null) ? a.u(r0, ": ", null) : r0, th, i, str2, i2, format, i3, null, SystemClock.elapsedRealtime(), z2);
String str3;
String str4;
if (i == 0) {
str3 = "Source error";
} else if (i != 1) {
str3 = i != 3 ? "Unexpected runtime error" : "Remote error";
} else {
StringBuilder sb = new StringBuilder();
sb.append(str2);
sb.append(" error, index=");
sb.append(i2);
sb.append(", format=");
sb.append(format);
sb.append(", format_supported=");
UUID uuid = h0.a;
if (i3 == 0) {
str4 = "NO";
} else if (i3 == 1) {
str4 = "NO_UNSUPPORTED_TYPE";
} else if (i3 == 2) {
str4 = "NO_UNSUPPORTED_DRM";
} else if (i3 == 3) {
str4 = "NO_EXCEEDS_CAPABILITIES";
} else if (i3 == 4) {
str4 = "YES";
} else {
throw new IllegalStateException();
}
sb.append(str4);
str3 = sb.toString();
}
}
public ExoPlaybackException(@Nullable String str, @Nullable Throwable th, int i, @Nullable String str2, int i2, @Nullable Format format, int i3, @Nullable w wVar, long j, boolean z2) {
super(str, th);
this.type = i;
this.cause = th;
this.rendererName = str2;
this.rendererIndex = i2;
this.rendererFormat = format;
this.rendererFormatSupport = i3;
this.mediaPeriodId = wVar;
this.timestampMs = j;
this.isRecoverable = z2;
}
public static ExoPlaybackException b(Exception exc) {
return new ExoPlaybackException(1, exc, null, null, -1, null, 4, false);
}
@CheckResult
public ExoPlaybackException a(@Nullable w wVar) {
return new ExoPlaybackException(getMessage(), this.cause, this.type, this.rendererName, this.rendererIndex, this.rendererFormat, this.rendererFormatSupport, wVar, this.timestampMs, this.isRecoverable);
}
}