package androidx.media3.exoplayer;

import android.os.Bundle;
import android.os.SystemClock;
import android.text.TextUtils;
import androidx.media3.common.PlaybackException;
import defpackage.AbstractC0956;
import defpackage.C4100;
import defpackage.C5286;
import java.io.IOException;

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

    /* JADX INFO: renamed from: ˈᵲᵢ, reason: contains not printable characters */
    public final int f606;

    /* JADX INFO: renamed from: ˌᵨʠᵫ, reason: contains not printable characters */
    public final C4100 f607;

    /* JADX INFO: renamed from: ᵔᵖᵹᵫ, reason: contains not printable characters */
    public final int f608;

    /* JADX INFO: renamed from: ᵨᵼⁱ, reason: contains not printable characters */
    public final String f609;

    /* JADX INFO: renamed from: ᵯᵷʽ, reason: contains not printable characters */
    public final int f610;

    /* JADX INFO: renamed from: ᵶˇᵱ, reason: contains not printable characters */
    public final C5286 f611;

    /* JADX INFO: renamed from: ᵸˆˁ, reason: contains not printable characters */
    public final boolean 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, C5286 c5286, int i4, C4100 c4100, boolean z) {
        String str2;
        int i5;
        C5286 c52862;
        String string;
        String str3;
        if (i == 0) {
            str2 = str;
            i5 = i3;
            c52862 = c5286;
            string = "Source error";
        } else if (i != 1) {
            string = i != 3 ? "Unexpected runtime error" : "Remote error";
            str2 = str;
            i5 = i3;
            c52862 = c5286;
        } else {
            StringBuilder sb = new StringBuilder();
            str2 = str;
            sb.append(str2);
            sb.append(" error, index=");
            i5 = i3;
            sb.append(i5);
            sb.append(", format=");
            c52862 = c5286;
            sb.append(c52862);
            sb.append(", format_supported=");
            String str4 = AbstractC0956.f4222;
            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, c52862, i4, c4100, 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, C5286 c5286, int i4, C4100 c4100, long j, boolean z) {
        super(str, th, i, j);
        Bundle bundle = Bundle.EMPTY;
        ᵻᵪ.ᵱᵽʡᵚ(!z || i2 == 1);
        ᵻᵪ.ᵱᵽʡᵚ(th != null || i2 == 3);
        this.f608 = i2;
        this.f609 = str2;
        this.f610 = i3;
        this.f611 = c5286;
        this.f606 = i4;
        this.f607 = c4100;
        this.f612 = z;
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final Exception m399() {
        ᵻᵪ.ˌᴵ(this.f608 == 1);
        Throwable cause = getCause();
        cause.getClass();
        return (Exception) cause;
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final IOException m400() {
        ᵻᵪ.ˌᴵ(this.f608 == 0);
        Throwable cause = getCause();
        cause.getClass();
        return (IOException) cause;
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final ExoPlaybackException m401(C4100 c4100) {
        String message = getMessage();
        String str = AbstractC0956.f4222;
        return new ExoPlaybackException(message, getCause(), this.f554, this.f608, this.f609, this.f610, this.f611, this.f606, c4100, this.f555, this.f612);
    }

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public final RuntimeException m402() {
        ᵻᵪ.ˌᴵ(this.f608 == 2);
        Throwable cause = getCause();
        cause.getClass();
        return (RuntimeException) cause;
    }
}
