package androidx.media3.exoplayer;

import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import androidx.media3.common.PlaybackException;
import defpackage.AbstractC3558;
import defpackage.C2477;
import defpackage.C3446;
import java.io.IOException;

/* loaded from: classes3.dex */
public final class ExoPlaybackException extends PlaybackException {

    /* renamed from: ˀᵗᵝᵭ, reason: contains not printable characters */
    public final int f606;

    /* renamed from: ˑᵥˁ, reason: contains not printable characters */
    public final boolean f607;

    /* renamed from: ᵡˎ, reason: contains not printable characters */
    public final C2477 f608;

    /* renamed from: ᵡⁱᵥ, reason: contains not printable characters */
    public final C3446 f609;

    /* renamed from: ᵤᵙᵷ, reason: contains not printable characters */
    public final int f610;

    /* renamed from: ᵾᵬ, reason: contains not printable characters */
    public final String f611;

    /* renamed from: ᵿʗᵝʽ, reason: contains not printable characters */
    public final int f612;

    public ExoPlaybackException(int i, Exception exc, int i2) {
        this(i, exc, i2, null, -1, null, 4, null, false);
    }

    /* JADX WARN: Illegal instructions before constructor call */
    public ExoPlaybackException(int i, Throwable th, int i2, String str, int i3, C3446 c3446, int i4, C2477 c2477, boolean z) {
        String str2;
        int i5;
        C3446 c34462;
        String string;
        String str3;
        if (i == 0) {
            str2 = str;
            i5 = i3;
            c34462 = c3446;
            string = "Source error";
        } else if (i != 1) {
            string = i != 3 ? "Unexpected runtime error" : "Remote error";
            str2 = str;
            i5 = i3;
            c34462 = c3446;
        } else {
            StringBuilder sb = new StringBuilder();
            str2 = str;
            sb.append(str2);
            sb.append(" error, index=");
            i5 = i3;
            sb.append(i5);
            sb.append(", format=");
            c34462 = c3446;
            sb.append(c34462);
            sb.append(", format_supported=");
            String str4 = AbstractC3558.f13329;
            if (i4 == 0) {
                str3 = "NO";
            } else if (i4 == 1) {
                str3 = "NO_UNSUPPORTED_SUBTYPE";
            } else if (i4 == 2) {
                str3 = "NO_UNSUPPORTED_DRM";
            } else if (i4 == 3) {
                str3 = "NO_EXCEEDS_CAPABILITIES";
            } else {
                if (i4 != 4) {
                    ᵨᴵᵺ.ˌʾˀ();
                    throw null;
                }
                str3 = "YES";
            }
            sb.append(str3);
            string = sb.toString();
        }
        this(TextUtils.isEmpty(null) ? string : string.concat(": null"), th, i2, i, str2, i5, c34462, i4, c2477, SystemClock.elapsedRealtime(), z);
    }

    /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
    public ExoPlaybackException(String str, Throwable th, int i, int i2, String str2, int i3, C3446 c3446, int i4, C2477 c2477, long j, boolean z) {
        super(str, th, i, j);
        Bundle bundle = Bundle.EMPTY;
        ᵛᵾˏ.ᵯٴᵦ(!z || i2 == 1);
        ᵛᵾˏ.ᵯٴᵦ(th != null || i2 == 3);
        this.f612 = i2;
        this.f611 = str2;
        this.f610 = i3;
        this.f609 = c3446;
        this.f606 = i4;
        this.f608 = c2477;
        this.f607 = z;
    }

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public final IOException m399() {
        ᵛᵾˏ.ᵿʗᵝʽ(this.f612 == 0);
        Throwable cause = getCause();
        cause.getClass();
        return (IOException) cause;
    }

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final ExoPlaybackException m400(C2477 c2477) {
        String message = getMessage();
        String str = AbstractC3558.f13329;
        return new ExoPlaybackException(message, getCause(), this.f555, this.f612, this.f611, this.f610, this.f609, this.f606, c2477, this.f554, this.f607);
    }

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public final Exception m401() {
        ᵛᵾˏ.ᵿʗᵝʽ(this.f612 == 1);
        Throwable cause = getCause();
        cause.getClass();
        return (Exception) cause;
    }

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public final RuntimeException m402() {
        ᵛᵾˏ.ᵿʗᵝʽ(this.f612 == 2);
        Throwable cause = getCause();
        cause.getClass();
        return (RuntimeException) cause;
    }
}
