package defpackage;

import java.util.Locale;

/* JADX INFO: renamed from: ᵛᵸˋ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C2820 implements InterfaceC0728 {

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public InterfaceC5226 f10826;

    /* JADX INFO: renamed from: ˊᵫᵗ, reason: contains not printable characters */
    public boolean f10827;

    /* JADX INFO: renamed from: ᵱᵽʡᵚ, reason: contains not printable characters */
    public boolean f10830;

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final C3176 f10831;

    /* JADX INFO: renamed from: ᵻʽᵯ, reason: contains not printable characters */
    public boolean f10834;

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public long f10828 = -9223372036854775807L;

    /* JADX INFO: renamed from: ᵷᵺʾᵖ, reason: contains not printable characters */
    public int f10833 = -1;

    /* JADX INFO: renamed from: ᵨᵣ, reason: contains not printable characters */
    public int f10829 = -1;

    /* JADX INFO: renamed from: ᵻˈᵦʼ, reason: contains not printable characters */
    public long f10835 = -9223372036854775807L;

    /* JADX INFO: renamed from: ᵵᵽ, reason: contains not printable characters */
    public long f10832 = 0;

    public C2820(C3176 c3176) {
        this.f10831 = c3176;
    }

    @Override // defpackage.InterfaceC0728
    /* JADX INFO: renamed from: ʽˈˋ */
    public final void mo2599(long j, long j2) {
        this.f10828 = j;
        this.f10829 = -1;
        this.f10832 = j2;
    }

    @Override // defpackage.InterfaceC0728
    /* JADX INFO: renamed from: ːˏᵟᵯ */
    public final void mo2600(InterfaceC4550 interfaceC4550, int i) {
        InterfaceC5226 interfaceC5226Mo2743 = interfaceC4550.mo2743(i, 2);
        this.f10826 = interfaceC5226Mo2743;
        interfaceC5226Mo2743.mo1742(this.f10831.f12057);
    }

    @Override // defpackage.InterfaceC0728
    /* JADX INFO: renamed from: ᵲᵶᵳˈ */
    public final void mo2601(long j) {
        ᵻᵪ.ˌᴵ(this.f10828 == -9223372036854775807L);
        this.f10828 = j;
    }

    /* JADX WARN: Type inference fix 'apply assigned field type' failed
    java.lang.UnsupportedOperationException: ArgType.getObject(), call class: class jadx.core.dex.instructions.args.ArgType$PrimitiveArg
    	at jadx.core.dex.instructions.args.ArgType.getObject(ArgType.java:593)
    	at jadx.core.dex.attributes.nodes.ClassTypeVarsAttr.getTypeVarsMapFor(ClassTypeVarsAttr.java:35)
    	at jadx.core.dex.nodes.utils.TypeUtils.replaceClassGenerics(TypeUtils.java:177)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.insertExplicitUseCast(FixTypesVisitor.java:397)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.tryFieldTypeWithNewCasts(FixTypesVisitor.java:359)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.applyFieldType(FixTypesVisitor.java:309)
    	at jadx.core.dex.visitors.typeinference.FixTypesVisitor.visit(FixTypesVisitor.java:94)
     */
    @Override // defpackage.InterfaceC0728
    /* JADX INFO: renamed from: ᵷᵺʾᵖ */
    public final void mo2602(C4545 c4545, long j, int i, boolean z) {
        this.f10826.getClass();
        int iM9626 = c4545.m9626();
        if ((iM9626 & 16) == 16 && (iM9626 & 7) == 0) {
            if (this.f10827 && this.f10829 > 0) {
                InterfaceC5226 interfaceC5226 = this.f10826;
                interfaceC5226.getClass();
                interfaceC5226.mo1741(this.f10835, this.f10834 ? 1 : 0, this.f10829, 0, null);
                this.f10829 = -1;
                this.f10835 = -9223372036854775807L;
                this.f10827 = false;
            }
            this.f10827 = true;
        } else {
            if (!this.f10827) {
                ˋˀᵧ.ʿٴˇ("RTP packet is not the start of a new VP8 partition, skipping.");
                return;
            }
            int iM10653 = C5141.m10653(this.f10833);
            if (i < iM10653) {
                String str = AbstractC0956.f4222;
                Locale locale = Locale.US;
                ˋˀᵧ.ʿٴˇ("Received RTP packet with unexpected sequence number. Expected: " + iM10653 + "; received: " + i + ". Dropping packet.");
                return;
            }
        }
        if ((iM9626 & 128) != 0) {
            int iM96262 = c4545.m9626();
            if ((iM96262 & 128) != 0 && (c4545.m9626() & 128) != 0) {
                c4545.m9609(1);
            }
            if ((iM96262 & 64) != 0) {
                c4545.m9609(1);
            }
            if ((iM96262 & 32) != 0 || (iM96262 & 16) != 0) {
                c4545.m9609(1);
            }
        }
        if (this.f10829 == -1 && this.f10827) {
            this.f10834 = (c4545.m9622() & 1) == 0;
        }
        if (!this.f10830) {
            int i2 = c4545.f17282;
            c4545.m9624(i2 + 6);
            int iM9607 = c4545.m9607() & 16383;
            int iM96072 = c4545.m9607() & 16383;
            c4545.m9624(i2);
            C5286 c5286 = this.f10831.f12057;
            if (iM9607 != c5286.f19973 || iM96072 != c5286.f19981) {
                InterfaceC5226 interfaceC52262 = this.f10826;
                C4753 c4753M10878 = c5286.m10878();
                c4753M10878.f18098 = iM9607;
                c4753M10878.f18102 = iM96072;
                AbstractC0659.m2415(c4753M10878, interfaceC52262);
            }
            this.f10830 = true;
        }
        int iM9623 = c4545.m9623();
        this.f10826.mo1740(iM9623, c4545);
        int i3 = this.f10829;
        if (i3 == -1) {
            this.f10829 = iM9623;
        } else {
            this.f10829 = i3 + iM9623;
        }
        this.f10835 = ᵸᵺᵜ.ˁˌᵩ(90000, this.f10832, j, this.f10828);
        if (z) {
            InterfaceC5226 interfaceC52263 = this.f10826;
            interfaceC52263.getClass();
            interfaceC52263.mo1741(this.f10835, this.f10834 ? 1 : 0, this.f10829, 0, null);
            this.f10829 = -1;
            this.f10835 = -9223372036854775807L;
            this.f10827 = false;
        }
        this.f10833 = i;
    }
}
