package defpackage;

import java.util.Locale;

/* renamed from: ˊʒᵠˑ, reason: contains not printable characters */
/* loaded from: classes3.dex */
public final class C1254 implements InterfaceC1593 {

    /* renamed from: ᵝᵵᵺ, reason: contains not printable characters */
    public boolean f5232;

    /* renamed from: ᵥᵯˎ, reason: contains not printable characters */
    public final C2419 f5233;

    /* renamed from: ᵴᵳ, reason: contains not printable characters */
    public InterfaceC2154 f5234;

    /* renamed from: ᵶᵷᵕ, reason: contains not printable characters */
    public boolean f5235;

    /* renamed from: ᵹᵝᵶ, reason: contains not printable characters */
    public boolean f5236;

    /* renamed from: ˏᵙ, reason: contains not printable characters */
    public long f5231 = -9223372036854775807L;

    /* renamed from: ᵻᵢﹳᵰ, reason: contains not printable characters */
    public int f5237 = -1;

    /* renamed from: ˇʼʤˎ, reason: contains not printable characters */
    public int f5228 = -1;

    /* renamed from: ˏˋٴ, reason: contains not printable characters */
    public long f5230 = -9223372036854775807L;

    /* renamed from: ˎˏʜʾ, reason: contains not printable characters */
    public long f5229 = 0;

    public C1254(C2419 c2419) {
        this.f5233 = c2419;
    }

    @Override // defpackage.InterfaceC1593
    /* renamed from: ˏᵙ */
    public final void mo2630(InterfaceC1982 interfaceC1982, int i) {
        InterfaceC2154 interfaceC2154Mo4996 = interfaceC1982.mo4996(i, 2);
        this.f5234 = interfaceC2154Mo4996;
        interfaceC2154Mo4996.mo4407(this.f5233.f9445);
    }

    @Override // defpackage.InterfaceC1593
    /* renamed from: ᵥᵯˎ */
    public final void mo2631(long j) {
        ᵛᵾˏ.ᵿʗᵝʽ(this.f5231 == -9223372036854775807L);
        this.f5231 = j;
    }

    @Override // defpackage.InterfaceC1593
    /* renamed from: ᵴᵳ */
    public final void mo2632(long j, long j2) {
        this.f5231 = j;
        this.f5228 = -1;
        this.f5229 = j2;
    }

    @Override // defpackage.InterfaceC1593
    /* renamed from: ᵻᵢﹳᵰ */
    public final void mo2633(C3493 c3493, long j, int i, boolean z) {
        this.f5234.getClass();
        int iM7956 = c3493.m7956();
        if ((iM7956 & 16) == 16 && (iM7956 & 7) == 0) {
            if (this.f5236 && this.f5228 > 0) {
                InterfaceC2154 interfaceC2154 = this.f5234;
                interfaceC2154.getClass();
                interfaceC2154.mo4410(this.f5230, this.f5232 ? 1 : 0, this.f5228, 0, null);
                this.f5228 = -1;
                this.f5230 = -9223372036854775807L;
                this.f5236 = false;
            }
            this.f5236 = true;
        } else {
            if (!this.f5236) {
                ᵳʿˉ.ᵶʔᵢˊ("RTP packet is not the start of a new VP8 partition, skipping.");
                return;
            }
            int iM10873 = C5228.m10873(this.f5237);
            if (i < iM10873) {
                String str = AbstractC3558.f13329;
                Locale locale = Locale.US;
                ᵳʿˉ.ᵶʔᵢˊ("Received RTP packet with unexpected sequence number. Expected: " + iM10873 + "; received: " + i + ". Dropping packet.");
                return;
            }
        }
        if ((iM7956 & 128) != 0) {
            int iM79562 = c3493.m7956();
            if ((iM79562 & 128) != 0 && (c3493.m7956() & 128) != 0) {
                c3493.m7946(1);
            }
            if ((iM79562 & 64) != 0) {
                c3493.m7946(1);
            }
            if ((iM79562 & 32) != 0 || (iM79562 & 16) != 0) {
                c3493.m7946(1);
            }
        }
        if (this.f5228 == -1 && this.f5236) {
            this.f5232 = (c3493.m7968() & 1) == 0;
        }
        if (!this.f5235) {
            int i2 = c3493.f13083;
            c3493.m7955(i2 + 6);
            int iM7962 = c3493.m7962() & 16383;
            int iM79622 = c3493.m7962() & 16383;
            c3493.m7955(i2);
            C3446 c3446 = this.f5233.f9445;
            if (iM7962 != c3446.f12924 || iM79622 != c3446.f12920) {
                InterfaceC2154 interfaceC21542 = this.f5234;
                C2153 c2153M7829 = c3446.m7829();
                c2153M7829.f8501 = iM7962;
                c2153M7829.f8514 = iM79622;
                AbstractC4737.m10004(c2153M7829, interfaceC21542);
            }
            this.f5235 = true;
        }
        int iM7959 = c3493.m7959();
        this.f5234.mo4406(iM7959, c3493);
        int i3 = this.f5228;
        if (i3 == -1) {
            this.f5228 = iM7959;
        } else {
            this.f5228 = i3 + iM7959;
        }
        this.f5230 = ˁˈᵸ.ᵡᵘˎʽ(90000, this.f5229, j, this.f5231);
        if (z) {
            InterfaceC2154 interfaceC21543 = this.f5234;
            interfaceC21543.getClass();
            interfaceC21543.mo4410(this.f5230, this.f5232 ? 1 : 0, this.f5228, 0, null);
            this.f5228 = -1;
            this.f5230 = -9223372036854775807L;
            this.f5236 = false;
        }
        this.f5237 = i;
    }
}
