Live Football Updates v1.0.1版本的 MD5 值为:636649089335ebb37514551724606ad0
以下内容为反编译后的 c0.java 源代码,内容仅作参考
package w1;
import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.media.AudioManager;
import android.media.AudioTrack;
import android.media.MediaFormat;
import android.media.metrics.LogSessionId;
import android.media.metrics.MediaMetricsManager;
import android.media.metrics.PlaybackSession;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.util.Pair;
import android.util.SparseBooleanArray;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.TextureView;
import com.google.common.collect.u;
import com.ironsource.q2;
import i2.m0;
import i2.w;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.TimeoutException;
import p1.b0;
import p1.e0;
import p1.m;
import p1.q;
import p1.v;
import p1.w;
import q2.j;
import s1.m;
import w1.b;
import w1.b1;
import w1.d;
import w1.g0;
import w1.m;
import w1.z0;
import y1.l;
public final class c0 extends p1.g implements m {
public static final int f32116k0 = 0;
public final w1.d A;
public final l1 B;
public final m1 C;
public final long D;
public int E;
public boolean F;
public int G;
public int H;
public boolean I;
public int J;
public final i1 K;
public i2.m0 L;
public b0.a M;
public p1.v N;
public AudioTrack O;
public Object P;
public Surface Q;
public SurfaceHolder R;
public q2.j S;
public boolean T;
public TextureView U;
public final int V;
public s1.v W;
public final int X;
public p1.e Y;
public final float Z;
public boolean f32117a0;
public final m2.q f32118b;
public r1.b f32119b0;
public final b0.a f32120c;
public final boolean f32121c0;
public final s1.d f32122d = new s1.d();
public boolean d0;
public final Context f32123e;
public boolean f32124e0;
public final p1.b0 f32125f;
public p1.p0 f0;
public final e1[] f32126g;
public p1.v f32127g0;
public final m2.p f32128h;
public a1 f32129h0;
public final s1.j i;
public int f32130i0;
public final androidx.lifecycle.n f32131j;
public long f32132j0;
public final g0 f32133k;
public final s1.m<b0.c> f32134l;
public final CopyOnWriteArraySet<m.a> f32135m;
public final e0.b f32136n;
public final ArrayList f32137o;
public final boolean f32138p;
public final w.a f32139q;
public final x1.a f32140r;
public final Looper f32141s;
public final n2.d t;
public final long f32142u;
public final long f32143v;
public final s1.w f32144w;
public final b f32145x;
public final c f32146y;
public final w1.b f32147z;
public static final class a {
public static x1.l0 a(Context context, c0 c0Var, boolean z10) {
PlaybackSession createPlaybackSession;
x1.j0 j0Var;
LogSessionId sessionId;
LogSessionId logSessionId;
MediaMetricsManager mediaMetricsManager = (MediaMetricsManager) context.getSystemService("media_metrics");
if (mediaMetricsManager == null) {
j0Var = null;
} else {
createPlaybackSession = mediaMetricsManager.createPlaybackSession();
j0Var = new x1.j0(context, createPlaybackSession);
}
if (j0Var == null) {
s1.n.g("ExoPlayerImpl", "MediaMetricsService unavailable.");
logSessionId = LogSessionId.LOG_SESSION_ID_NONE;
return new x1.l0(logSessionId);
}
if (z10) {
c0Var.getClass();
c0Var.f32140r.f0(j0Var);
}
sessionId = j0Var.f33311c.getSessionId();
return new x1.l0(sessionId);
}
}
public final class b implements p2.t, y1.k, l2.e, g2.b, SurfaceHolder.Callback, TextureView.SurfaceTextureListener, j.b, d.b, b.InterfaceC0420b, m.a {
public b() {
}
@Override
public final void A(p1.r rVar, g gVar) {
c0 c0Var = c0.this;
c0Var.getClass();
c0Var.f32140r.A(rVar, gVar);
}
@Override
public final void B(f fVar) {
c0.this.f32140r.B(fVar);
}
@Override
public final void C(long j4, long j10, String str) {
c0.this.f32140r.C(j4, j10, str);
}
@Override
public final void D(com.google.common.collect.u uVar) {
c0.this.f32134l.e(27, new androidx.lifecycle.n(3, uVar));
}
@Override
public final void a() {
}
@Override
public final void b(String str) {
c0.this.f32140r.b(str);
}
@Override
public final void c(f fVar) {
c0 c0Var = c0.this;
c0Var.getClass();
c0Var.f32140r.c(fVar);
}
@Override
public final void d(int i, long j4) {
c0.this.f32140r.d(i, j4);
}
@Override
public final void e(p1.r rVar, g gVar) {
c0 c0Var = c0.this;
c0Var.getClass();
c0Var.f32140r.e(rVar, gVar);
}
@Override
public final void f(p1.w wVar) {
c0 c0Var = c0.this;
p1.v vVar = c0Var.f32127g0;
vVar.getClass();
v.a aVar = new v.a(vVar);
int i = 0;
while (true) {
w.b[] bVarArr = wVar.f28252a;
if (i >= bVarArr.length) {
break;
}
bVarArr[i].d(aVar);
i++;
}
c0Var.f32127g0 = new p1.v(aVar);
p1.v f0 = c0Var.f0();
boolean equals = f0.equals(c0Var.N);
s1.m<b0.c> mVar = c0Var.f32134l;
if (!equals) {
c0Var.N = f0;
mVar.c(14, new d7.m(1, this));
}
mVar.c(28, new i1.b1(3, wVar));
mVar.b();
}
@Override
public final void g(r1.b bVar) {
c0 c0Var = c0.this;
c0Var.f32119b0 = bVar;
c0Var.f32134l.e(27, new d0(0, bVar));
}
@Override
public final void h(p1.p0 p0Var) {
c0 c0Var = c0.this;
c0Var.f0 = p0Var;
c0Var.f32134l.e(25, new t(3, p0Var));
}
@Override
public final void i(String str) {
c0.this.f32140r.i(str);
}
@Override
public final void j(l.a aVar) {
c0.this.f32140r.j(aVar);
}
@Override
public final void k(int i, long j4) {
c0.this.f32140r.k(i, j4);
}
@Override
public final void l() {
c0.this.A0();
}
@Override
public final void m(l.a aVar) {
c0.this.f32140r.m(aVar);
}
@Override
public final void n(final boolean z10) {
c0 c0Var = c0.this;
if (c0Var.f32117a0 == z10) {
return;
}
c0Var.f32117a0 = z10;
c0Var.f32134l.e(23, new m.a() {
@Override
public final void invoke(Object obj) {
((b0.c) obj).n(z10);
}
});
}
@Override
public final void o(Exception exc) {
c0.this.f32140r.o(exc);
}
@Override
public final void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i, int i10) {
c0 c0Var = c0.this;
c0Var.getClass();
Surface surface = new Surface(surfaceTexture);
c0Var.v0(surface);
c0Var.Q = surface;
c0Var.p0(i, i10);
}
@Override
public final boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) {
c0 c0Var = c0.this;
c0Var.v0(null);
c0Var.p0(0, 0);
return true;
}
@Override
public final void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int i, int i10) {
c0.this.p0(i, i10);
}
@Override
public final void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {
}
@Override
public final void p(long j4) {
c0.this.f32140r.p(j4);
}
@Override
public final void q(f fVar) {
c0 c0Var = c0.this;
c0Var.getClass();
c0Var.f32140r.q(fVar);
}
@Override
public final void r() {
c0.this.v0(null);
}
@Override
public final void s(f fVar) {
c0.this.f32140r.s(fVar);
}
@Override
public final void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i10, int i11) {
c0.this.p0(i10, i11);
}
@Override
public final void surfaceCreated(SurfaceHolder surfaceHolder) {
c0 c0Var = c0.this;
if (c0Var.T) {
c0Var.v0(surfaceHolder.getSurface());
}
}
@Override
public final void surfaceDestroyed(SurfaceHolder surfaceHolder) {
c0 c0Var = c0.this;
if (c0Var.T) {
c0Var.v0(null);
}
c0Var.p0(0, 0);
}
@Override
public final void t(Exception exc) {
c0.this.f32140r.t(exc);
}
@Override
public final void u(Exception exc) {
c0.this.f32140r.u(exc);
}
@Override
public final void v(Surface surface) {
c0.this.v0(surface);
}
@Override
public final void w(long j4, Object obj) {
c0 c0Var = c0.this;
c0Var.f32140r.w(j4, obj);
if (c0Var.P == obj) {
c0Var.f32134l.e(26, new com.facebook.appevents.t(5));
}
}
@Override
public final void x() {
}
@Override
public final void y(long j4, long j10, String str) {
c0.this.f32140r.y(j4, j10, str);
}
@Override
public final void z(int i, long j4, long j10) {
c0.this.f32140r.z(i, j4, j10);
}
}
public static final class c implements p2.k, q2.a, b1.b {
public p2.k f32149a;
public q2.a f32150b;
public p2.k f32151c;
public q2.a f32152d;
@Override
public final void b(long j4, float[] fArr) {
q2.a aVar = this.f32152d;
if (aVar != null) {
aVar.b(j4, fArr);
}
q2.a aVar2 = this.f32150b;
if (aVar2 != null) {
aVar2.b(j4, fArr);
}
}
@Override
public final void d() {
q2.a aVar = this.f32152d;
if (aVar != null) {
aVar.d();
}
q2.a aVar2 = this.f32150b;
if (aVar2 != null) {
aVar2.d();
}
}
@Override
public final void e(long j4, long j10, p1.r rVar, MediaFormat mediaFormat) {
p2.k kVar = this.f32151c;
if (kVar != null) {
kVar.e(j4, j10, rVar, mediaFormat);
}
p2.k kVar2 = this.f32149a;
if (kVar2 != null) {
kVar2.e(j4, j10, rVar, mediaFormat);
}
}
@Override
public final void t(int i, Object obj) {
if (i != 7) {
if (i != 8) {
if (i == 10000) {
q2.j jVar = (q2.j) obj;
if (jVar == null) {
this.f32151c = null;
this.f32152d = null;
return;
}
this.f32151c = jVar.getVideoFrameMetadataListener();
this.f32152d = jVar.getCameraMotionListener();
return;
}
return;
}
this.f32150b = (q2.a) obj;
return;
}
this.f32149a = (p2.k) obj;
}
}
public static final class d implements p0 {
public final Object f32153a;
public p1.e0 f32154b;
public d(Object obj, i2.t tVar) {
this.f32153a = obj;
this.f32154b = tVar.f24531o;
}
@Override
public final Object a() {
return this.f32153a;
}
@Override
public final p1.e0 b() {
return this.f32154b;
}
}
static {
p1.u.a("media3.exoplayer");
}
@SuppressLint({"HandlerLeak"})
public c0(m.b bVar) {
boolean z10;
x1.l0 a10;
try {
s1.n.f("ExoPlayerImpl", "Init " + Integer.toHexString(System.identityHashCode(this)) + " [AndroidXMedia3/1.3.0] [" + s1.e0.f30455e + q2.i.f20147e);
Context context = bVar.f32306a;
Looper looper = bVar.i;
this.f32123e = context.getApplicationContext();
dc.d<s1.b, x1.a> dVar = bVar.f32313h;
s1.w wVar = bVar.f32307b;
this.f32140r = dVar.apply(wVar);
this.Y = bVar.f32314j;
this.V = bVar.f32316l;
this.f32117a0 = false;
this.D = bVar.f32323s;
b bVar2 = new b();
this.f32145x = bVar2;
this.f32146y = new c();
Handler handler = new Handler(looper);
e1[] a11 = bVar.f32308c.get().a(handler, bVar2, bVar2, bVar2, bVar2);
this.f32126g = a11;
if (a11.length > 0) {
z10 = true;
} else {
z10 = false;
}
s1.f0.f(z10);
this.f32128h = bVar.f32310e.get();
this.f32139q = bVar.f32309d.get();
this.t = bVar.f32312g.get();
this.f32138p = bVar.f32317m;
this.K = bVar.f32318n;
this.f32142u = bVar.f32319o;
this.f32143v = bVar.f32320p;
this.f32141s = looper;
this.f32144w = wVar;
this.f32125f = this;
this.f32134l = new s1.m<>(looper, wVar, new t(2, this));
this.f32135m = new CopyOnWriteArraySet<>();
this.f32137o = new ArrayList();
this.L = new m0.a();
this.f32118b = new m2.q(new g1[a11.length], new m2.k[a11.length], p1.l0.f28033b, null);
this.f32136n = new e0.b();
SparseBooleanArray sparseBooleanArray = new SparseBooleanArray();
int[] iArr = {1, 2, 3, 13, 14, 15, 16, 17, 18, 19, 31, 20, 30, 21, 35, 22, 24, 27, 28, 32};
for (int i = 0; i < 20; i++) {
int i10 = iArr[i];
s1.f0.f(!false);
sparseBooleanArray.append(i10, true);
}
m2.p pVar = this.f32128h;
pVar.getClass();
if (pVar instanceof m2.i) {
s1.f0.f(!false);
sparseBooleanArray.append(29, true);
}
s1.f0.f(true);
p1.q qVar = new p1.q(sparseBooleanArray);
this.f32120c = new b0.a(qVar);
SparseBooleanArray sparseBooleanArray2 = new SparseBooleanArray();
for (int i11 = 0; i11 < qVar.b(); i11++) {
int a12 = qVar.a(i11);
s1.f0.f(true);
sparseBooleanArray2.append(a12, true);
}
s1.f0.f(true);
sparseBooleanArray2.append(4, true);
s1.f0.f(true);
sparseBooleanArray2.append(10, true);
s1.f0.f(!false);
this.M = new b0.a(new p1.q(sparseBooleanArray2));
this.i = this.f32144w.e(this.f32141s, null);
androidx.lifecycle.n nVar = new androidx.lifecycle.n(2, this);
this.f32131j = nVar;
this.f32129h0 = a1.i(this.f32118b);
this.f32140r.h0(this.f32125f, this.f32141s);
int i12 = s1.e0.f30451a;
if (i12 < 31) {
a10 = new x1.l0();
} else {
a10 = a.a(this.f32123e, this, bVar.t);
}
this.f32133k = new g0(this.f32126g, this.f32128h, this.f32118b, bVar.f32311f.get(), this.t, this.E, this.F, this.f32140r, this.K, bVar.f32321q, bVar.f32322r, false, this.f32141s, this.f32144w, nVar, a10);
this.Z = 1.0f;
this.E = 0;
p1.v vVar = p1.v.G;
this.N = vVar;
this.f32127g0 = vVar;
int i13 = -1;
this.f32130i0 = -1;
if (i12 < 21) {
AudioTrack audioTrack = this.O;
if (audioTrack != null && audioTrack.getAudioSessionId() != 0) {
this.O.release();
this.O = null;
}
if (this.O == null) {
this.O = new AudioTrack(3, 4000, 4, 2, 2, 0, 0);
}
this.X = this.O.getAudioSessionId();
} else {
AudioManager audioManager = (AudioManager) this.f32123e.getSystemService("audio");
if (audioManager != null) {
i13 = audioManager.generateAudioSessionId();
}
this.X = i13;
}
this.f32119b0 = r1.b.f29827b;
this.f32121c0 = true;
B(this.f32140r);
this.t.b(new Handler(this.f32141s), this.f32140r);
this.f32135m.add(this.f32145x);
w1.b bVar3 = new w1.b(context, handler, this.f32145x);
this.f32147z = bVar3;
bVar3.a(bVar.f32315k);
w1.d dVar2 = new w1.d(context, handler, this.f32145x);
this.A = dVar2;
dVar2.c(null);
this.B = new l1(context);
this.C = new m1(context);
h0();
this.f0 = p1.p0.f28055e;
this.W = s1.v.f30523c;
this.f32128h.f(this.Y);
r0(1, 10, Integer.valueOf(this.X));
r0(2, 10, Integer.valueOf(this.X));
r0(1, 3, this.Y);
r0(2, 4, Integer.valueOf(this.V));
r0(2, 5, 0);
r0(1, 9, Boolean.valueOf(this.f32117a0));
r0(2, 7, this.f32146y);
r0(6, 8, this.f32146y);
} finally {
this.f32122d.b();
}
}
public static p1.m h0() {
m.a aVar = new m.a();
aVar.f28043a = 0;
aVar.f28044b = 0;
return new p1.m(aVar);
}
public static long m0(a1 a1Var) {
e0.c cVar = new e0.c();
e0.b bVar = new e0.b();
a1Var.f32081a.g(a1Var.f32082b.f24553a, bVar);
long j4 = a1Var.f32083c;
if (j4 == -9223372036854775807L) {
return a1Var.f32081a.m(bVar.f27909c, cVar).f27927m;
}
return bVar.f27911e + j4;
}
@Override
public final int A() {
B0();
return this.f32129h0.f32085e;
}
public final void A0() {
int A = A();
m1 m1Var = this.C;
l1 l1Var = this.B;
if (A != 1) {
if (A != 2 && A != 3) {
if (A != 4) {
throw new IllegalStateException();
}
} else {
B0();
boolean z10 = this.f32129h0.f32094o;
j();
l1Var.getClass();
j();
m1Var.getClass();
return;
}
}
l1Var.getClass();
m1Var.getClass();
}
@Override
public final void B(b0.c cVar) {
cVar.getClass();
this.f32134l.a(cVar);
}
public final void B0() {
IllegalStateException illegalStateException;
s1.d dVar = this.f32122d;
synchronized (dVar) {
boolean z10 = false;
while (!dVar.f30449a) {
try {
dVar.wait();
} catch (InterruptedException unused) {
z10 = true;
}
}
if (z10) {
Thread.currentThread().interrupt();
}
}
if (Thread.currentThread() != this.f32141s.getThread()) {
String m10 = s1.e0.m("Player is accessed on the wrong thread.\nCurrent thread: '%s'\nExpected thread: '%s'\nSee https://developer.android.com/guide/topics/media/issues/player-accessed-on-wrong-thread", Thread.currentThread().getName(), this.f32141s.getThread().getName());
if (!this.f32121c0) {
if (this.d0) {
illegalStateException = null;
} else {
illegalStateException = new IllegalStateException();
}
s1.n.h("ExoPlayerImpl", m10, illegalStateException);
this.d0 = true;
return;
}
throw new IllegalStateException(m10);
}
}
@Override
public final p1.l0 C() {
B0();
return this.f32129h0.i.f26423d;
}
@Override
public final r1.b E() {
B0();
return this.f32119b0;
}
@Override
public final int F() {
B0();
if (g()) {
return this.f32129h0.f32082b.f24554b;
}
return -1;
}
@Override
public final int G() {
B0();
int l02 = l0(this.f32129h0);
if (l02 == -1) {
return 0;
}
return l02;
}
@Override
public final void I(final int i) {
B0();
if (this.E != i) {
this.E = i;
this.f32133k.f32215h.b(11, i, 0).a();
m.a<b0.c> aVar = new m.a() {
@Override
public final void invoke(Object obj) {
((b0.c) obj).Z(i);
}
};
s1.m<b0.c> mVar = this.f32134l;
mVar.c(8, aVar);
w0();
mVar.b();
}
}
@Override
public final void J(SurfaceView surfaceView) {
SurfaceHolder holder;
B0();
if (surfaceView == null) {
holder = null;
} else {
holder = surfaceView.getHolder();
}
B0();
if (holder != null && holder == this.R) {
g0();
}
}
@Override
public final int L() {
B0();
return this.f32129h0.f32092m;
}
@Override
public final int M() {
B0();
return this.E;
}
@Override
public final p1.e0 N() {
B0();
return this.f32129h0.f32081a;
}
@Override
public final Looper O() {
return this.f32141s;
}
@Override
public final boolean P() {
B0();
return this.F;
}
@Override
public final p1.j0 Q() {
B0();
return this.f32128h.a();
}
@Override
public final long R() {
B0();
if (this.f32129h0.f32081a.p()) {
return this.f32132j0;
}
a1 a1Var = this.f32129h0;
if (a1Var.f32090k.f24556d != a1Var.f32082b.f24556d) {
return s1.e0.d0(a1Var.f32081a.m(G(), this.f27935a).f27928n);
}
long j4 = a1Var.f32095p;
if (this.f32129h0.f32090k.b()) {
a1 a1Var2 = this.f32129h0;
e0.b g10 = a1Var2.f32081a.g(a1Var2.f32090k.f24553a, this.f32136n);
long d10 = g10.d(this.f32129h0.f32090k.f24554b);
if (d10 == Long.MIN_VALUE) {
j4 = g10.f27910d;
} else {
j4 = d10;
}
}
a1 a1Var3 = this.f32129h0;
p1.e0 e0Var = a1Var3.f32081a;
Object obj = a1Var3.f32090k.f24553a;
e0.b bVar = this.f32136n;
e0Var.g(obj, bVar);
return s1.e0.d0(j4 + bVar.f27911e);
}
@Override
public final void U(TextureView textureView) {
SurfaceTexture surfaceTexture;
B0();
if (textureView == null) {
g0();
return;
}
q0();
this.U = textureView;
if (textureView.getSurfaceTextureListener() != null) {
s1.n.g("ExoPlayerImpl", "Replacing existing SurfaceTextureListener.");
}
textureView.setSurfaceTextureListener(this.f32145x);
if (textureView.isAvailable()) {
surfaceTexture = textureView.getSurfaceTexture();
} else {
surfaceTexture = null;
}
if (surfaceTexture == null) {
v0(null);
p0(0, 0);
return;
}
Surface surface = new Surface(surfaceTexture);
v0(surface);
this.Q = surface;
p0(textureView.getWidth(), textureView.getHeight());
}
@Override
public final void W(b0.c cVar) {
B0();
cVar.getClass();
s1.m<b0.c> mVar = this.f32134l;
mVar.f();
CopyOnWriteArraySet<m.c<b0.c>> copyOnWriteArraySet = mVar.f30490d;
Iterator<m.c<b0.c>> it = copyOnWriteArraySet.iterator();
while (it.hasNext()) {
m.c<b0.c> next = it.next();
if (next.f30495a.equals(cVar)) {
next.f30498d = true;
if (next.f30497c) {
next.f30497c = false;
p1.q b10 = next.f30496b.b();
mVar.f30489c.c(next.f30495a, b10);
}
copyOnWriteArraySet.remove(next);
}
}
}
@Override
public final p1.v X() {
B0();
return this.N;
}
@Override
public final long Y() {
B0();
return this.f32142u;
}
@Override
public final void b() {
int i;
B0();
boolean j4 = j();
int i10 = 2;
int e10 = this.A.e(2, j4);
if (j4 && e10 != 1) {
i = 2;
} else {
i = 1;
}
x0(e10, i, j4);
a1 a1Var = this.f32129h0;
if (a1Var.f32085e != 1) {
return;
}
a1 e11 = a1Var.e(null);
if (e11.f32081a.p()) {
i10 = 4;
}
a1 g10 = e11.g(i10);
this.G++;
this.f32133k.f32215h.d(0).a();
y0(g10, 1, 1, false, 5, -9223372036854775807L, -1, false);
}
@Override
public final void b0(int i, long j4, boolean z10) {
boolean z11;
B0();
if (i >= 0) {
z11 = true;
} else {
z11 = false;
}
s1.f0.b(z11);
this.f32140r.Q();
p1.e0 e0Var = this.f32129h0.f32081a;
if (!e0Var.p() && i >= e0Var.o()) {
return;
}
this.G++;
if (g()) {
s1.n.g("ExoPlayerImpl", "seekTo ignored because an ad is playing");
g0.d dVar = new g0.d(this.f32129h0);
dVar.a(1);
c0 c0Var = (c0) this.f32131j.f2304b;
c0Var.getClass();
c0Var.i.c(new i1.g(c0Var, 2, dVar));
return;
}
a1 a1Var = this.f32129h0;
int i10 = a1Var.f32085e;
if (i10 == 3 || (i10 == 4 && !e0Var.p())) {
a1Var = this.f32129h0.g(2);
}
int G = G();
a1 n02 = n0(a1Var, e0Var, o0(e0Var, i, j4));
long Q = s1.e0.Q(j4);
g0 g0Var = this.f32133k;
g0Var.getClass();
g0Var.f32215h.j(3, new g0.g(e0Var, i, Q)).a();
y0(n02, 0, 1, true, 1, k0(n02), G, z10);
}
@Override
public final void d(p1.a0 a0Var) {
B0();
if (this.f32129h0.f32093n.equals(a0Var)) {
return;
}
a1 f10 = this.f32129h0.f(a0Var);
this.G++;
this.f32133k.f32215h.j(4, a0Var).a();
y0(f10, 0, 1, false, 5, -9223372036854775807L, -1, false);
}
@Override
public final p1.a0 e() {
B0();
return this.f32129h0.f32093n;
}
public final p1.v f0() {
byte[] bArr;
p1.e0 N = N();
if (N.p()) {
return this.f32127g0;
}
p1.t tVar = N.m(G(), this.f27935a).f27918c;
p1.v vVar = this.f32127g0;
vVar.getClass();
v.a aVar = new v.a(vVar);
p1.v vVar2 = tVar.f28128d;
if (vVar2 != null) {
CharSequence charSequence = vVar2.f28204a;
if (charSequence != null) {
aVar.f28228a = charSequence;
}
CharSequence charSequence2 = vVar2.f28205b;
if (charSequence2 != null) {
aVar.f28229b = charSequence2;
}
CharSequence charSequence3 = vVar2.f28206c;
if (charSequence3 != null) {
aVar.f28230c = charSequence3;
}
CharSequence charSequence4 = vVar2.f28207d;
if (charSequence4 != null) {
aVar.f28231d = charSequence4;
}
CharSequence charSequence5 = vVar2.f28208e;
if (charSequence5 != null) {
aVar.f28232e = charSequence5;
}
CharSequence charSequence6 = vVar2.f28209f;
if (charSequence6 != null) {
aVar.f28233f = charSequence6;
}
CharSequence charSequence7 = vVar2.f28210g;
if (charSequence7 != null) {
aVar.f28234g = charSequence7;
}
byte[] bArr2 = vVar2.f28211h;
Uri uri = vVar2.f28212j;
if (uri != null || bArr2 != null) {
aVar.f28236j = uri;
if (bArr2 == null) {
bArr = null;
} else {
bArr = (byte[]) bArr2.clone();
}
aVar.f28235h = bArr;
aVar.i = vVar2.i;
}
Integer num = vVar2.f28213k;
if (num != null) {
aVar.f28237k = num;
}
Integer num2 = vVar2.f28214l;
if (num2 != null) {
aVar.f28238l = num2;
}
Integer num3 = vVar2.f28215m;
if (num3 != null) {
aVar.f28239m = num3;
}
Boolean bool = vVar2.f28216n;
if (bool != null) {
aVar.f28240n = bool;
}
Boolean bool2 = vVar2.f28217o;
if (bool2 != null) {
aVar.f28241o = bool2;
}
Integer num4 = vVar2.f28218p;
if (num4 != null) {
aVar.f28242p = num4;
}
Integer num5 = vVar2.f28219q;
if (num5 != null) {
aVar.f28242p = num5;
}
Integer num6 = vVar2.f28220r;
if (num6 != null) {
aVar.f28243q = num6;
}
Integer num7 = vVar2.f28221s;
if (num7 != null) {
aVar.f28244r = num7;
}
Integer num8 = vVar2.t;
if (num8 != null) {
aVar.f28245s = num8;
}
Integer num9 = vVar2.f28222u;
if (num9 != null) {
aVar.t = num9;
}
Integer num10 = vVar2.f28223v;
if (num10 != null) {
aVar.f28246u = num10;
}
CharSequence charSequence8 = vVar2.f28224w;
if (charSequence8 != null) {
aVar.f28247v = charSequence8;
}
CharSequence charSequence9 = vVar2.f28225x;
if (charSequence9 != null) {
aVar.f28248w = charSequence9;
}
CharSequence charSequence10 = vVar2.f28226y;
if (charSequence10 != null) {
aVar.f28249x = charSequence10;
}
Integer num11 = vVar2.f28227z;
if (num11 != null) {
aVar.f28250y = num11;
}
Integer num12 = vVar2.A;
if (num12 != null) {
aVar.f28251z = num12;
}
CharSequence charSequence11 = vVar2.B;
if (charSequence11 != null) {
aVar.A = charSequence11;
}
CharSequence charSequence12 = vVar2.C;
if (charSequence12 != null) {
aVar.B = charSequence12;
}
CharSequence charSequence13 = vVar2.D;
if (charSequence13 != null) {
aVar.C = charSequence13;
}
Integer num13 = vVar2.E;
if (num13 != null) {
aVar.D = num13;
}
Bundle bundle = vVar2.F;
if (bundle != null) {
aVar.E = bundle;
}
}
return new p1.v(aVar);
}
@Override
public final boolean g() {
B0();
return this.f32129h0.f32082b.b();
}
public final void g0() {
B0();
q0();
v0(null);
p0(0, 0);
}
@Override
public final long getCurrentPosition() {
B0();
return s1.e0.d0(k0(this.f32129h0));
}
@Override
public final long h() {
B0();
return s1.e0.d0(this.f32129h0.f32096q);
}
public final b1 i0(b1.b bVar) {
int l02 = l0(this.f32129h0);
p1.e0 e0Var = this.f32129h0.f32081a;
if (l02 == -1) {
l02 = 0;
}
s1.w wVar = this.f32144w;
g0 g0Var = this.f32133k;
return new b1(g0Var, bVar, e0Var, l02, wVar, g0Var.f32216j);
}
@Override
public final boolean j() {
B0();
return this.f32129h0.f32091l;
}
public final long j0(a1 a1Var) {
if (a1Var.f32082b.b()) {
Object obj = a1Var.f32082b.f24553a;
p1.e0 e0Var = a1Var.f32081a;
e0.b bVar = this.f32136n;
e0Var.g(obj, bVar);
long j4 = a1Var.f32083c;
if (j4 == -9223372036854775807L) {
return s1.e0.d0(e0Var.m(l0(a1Var), this.f27935a).f27927m);
}
return s1.e0.d0(bVar.f27911e) + s1.e0.d0(j4);
}
return s1.e0.d0(k0(a1Var));
}
@Override
public final void k(final boolean z10) {
B0();
if (this.F != z10) {
this.F = z10;
this.f32133k.f32215h.b(12, z10 ? 1 : 0, 0).a();
m.a<b0.c> aVar = new m.a() {
@Override
public final void invoke(Object obj) {
((b0.c) obj).S(z10);
}
};
s1.m<b0.c> mVar = this.f32134l;
mVar.c(9, aVar);
w0();
mVar.b();
}
}
public final long k0(a1 a1Var) {
long j4;
if (a1Var.f32081a.p()) {
return s1.e0.Q(this.f32132j0);
}
if (a1Var.f32094o) {
j4 = a1Var.j();
} else {
j4 = a1Var.f32097r;
}
if (a1Var.f32082b.b()) {
return j4;
}
p1.e0 e0Var = a1Var.f32081a;
Object obj = a1Var.f32082b.f24553a;
e0.b bVar = this.f32136n;
e0Var.g(obj, bVar);
return j4 + bVar.f27911e;
}
public final int l0(a1 a1Var) {
if (a1Var.f32081a.p()) {
return this.f32130i0;
}
return a1Var.f32081a.g(a1Var.f32082b.f24553a, this.f32136n).f27909c;
}
@Override
public final int m() {
B0();
if (this.f32129h0.f32081a.p()) {
return 0;
}
a1 a1Var = this.f32129h0;
return a1Var.f32081a.b(a1Var.f32082b.f24553a);
}
@Override
public final void n(TextureView textureView) {
B0();
if (textureView != null && textureView == this.U) {
g0();
}
}
public final a1 n0(a1 a1Var, p1.e0 e0Var, Pair<Object, Long> pair) {
boolean z10;
w.b bVar;
i2.t0 t0Var;
m2.q qVar;
List<p1.w> list;
int i;
long j4;
if (!e0Var.p() && pair == null) {
z10 = false;
} else {
z10 = true;
}
s1.f0.b(z10);
p1.e0 e0Var2 = a1Var.f32081a;
long j02 = j0(a1Var);
a1 h10 = a1Var.h(e0Var);
if (e0Var.p()) {
w.b bVar2 = a1.t;
long Q = s1.e0.Q(this.f32132j0);
a1 b10 = h10.c(bVar2, Q, Q, Q, 0L, i2.t0.f24540d, this.f32118b, com.google.common.collect.j0.f17590e).b(bVar2);
b10.f32095p = b10.f32097r;
return b10;
}
Object obj = h10.f32082b.f24553a;
boolean z11 = !obj.equals(pair.first);
if (z11) {
bVar = new w.b(pair.first);
} else {
bVar = h10.f32082b;
}
w.b bVar3 = bVar;
long longValue = ((Long) pair.second).longValue();
long Q2 = s1.e0.Q(j02);
if (!e0Var2.p()) {
Q2 -= e0Var2.g(obj, this.f32136n).f27911e;
}
if (!z11 && longValue >= Q2) {
if (i == 0) {
int b11 = e0Var.b(h10.f32090k.f24553a);
if (b11 == -1 || e0Var.f(b11, this.f32136n, false).f27909c != e0Var.g(bVar3.f24553a, this.f32136n).f27909c) {
e0Var.g(bVar3.f24553a, this.f32136n);
if (bVar3.b()) {
j4 = this.f32136n.a(bVar3.f24554b, bVar3.f24555c);
} else {
j4 = this.f32136n.f27910d;
}
a1 b12 = h10.c(bVar3, h10.f32097r, h10.f32097r, h10.f32084d, j4 - h10.f32097r, h10.f32088h, h10.i, h10.f32089j).b(bVar3);
b12.f32095p = j4;
return b12;
}
return h10;
}
s1.f0.f(!bVar3.b());
long max = Math.max(0L, h10.f32096q - (longValue - Q2));
long j10 = h10.f32095p;
if (h10.f32090k.equals(h10.f32082b)) {
j10 = longValue + max;
}
a1 c10 = h10.c(bVar3, longValue, longValue, longValue, max, h10.f32088h, h10.i, h10.f32089j);
c10.f32095p = j10;
return c10;
}
s1.f0.f(!bVar3.b());
if (z11) {
t0Var = i2.t0.f24540d;
} else {
t0Var = h10.f32088h;
}
i2.t0 t0Var2 = t0Var;
if (z11) {
qVar = this.f32118b;
} else {
qVar = h10.i;
}
m2.q qVar2 = qVar;
if (z11) {
u.b bVar4 = com.google.common.collect.u.f17667b;
list = com.google.common.collect.j0.f17590e;
} else {
list = h10.f32089j;
}
a1 b13 = h10.c(bVar3, longValue, longValue, longValue, 0L, t0Var2, qVar2, list).b(bVar3);
b13.f32095p = longValue;
return b13;
}
@Override
public final p1.p0 o() {
B0();
return this.f0;
}
public final Pair<Object, Long> o0(p1.e0 e0Var, int i, long j4) {
if (e0Var.p()) {
this.f32130i0 = i;
if (j4 == -9223372036854775807L) {
j4 = 0;
}
this.f32132j0 = j4;
return null;
}
if (i == -1 || i >= e0Var.o()) {
i = e0Var.a(this.F);
j4 = s1.e0.d0(e0Var.m(i, this.f27935a).f27927m);
}
return e0Var.i(this.f27935a, this.f32136n, i, s1.e0.Q(j4));
}
public final void p0(final int i, final int i10) {
s1.v vVar = this.W;
if (i != vVar.f30524a || i10 != vVar.f30525b) {
this.W = new s1.v(i, i10);
this.f32134l.e(24, new m.a() {
@Override
public final void invoke(Object obj) {
((b0.c) obj).j0(i, i10);
}
});
r0(2, 14, new s1.v(i, i10));
}
}
@Override
public final void q(p1.j0 j0Var) {
B0();
m2.p pVar = this.f32128h;
pVar.getClass();
if ((pVar instanceof m2.i) && !j0Var.equals(pVar.a())) {
pVar.g(j0Var);
this.f32134l.e(19, new t(0, j0Var));
}
}
public final void q0() {
q2.j jVar = this.S;
b bVar = this.f32145x;
if (jVar != null) {
b1 i02 = i0(this.f32146y);
s1.f0.f(!i02.f32112g);
i02.f32109d = 10000;
s1.f0.f(!i02.f32112g);
i02.f32110e = null;
i02.c();
this.S.f29560a.remove(bVar);
this.S = null;
}
TextureView textureView = this.U;
if (textureView != null) {
if (textureView.getSurfaceTextureListener() != bVar) {
s1.n.g("ExoPlayerImpl", "SurfaceTextureListener already unset or replaced.");
} else {
this.U.setSurfaceTextureListener(null);
}
this.U = null;
}
SurfaceHolder surfaceHolder = this.R;
if (surfaceHolder != null) {
surfaceHolder.removeCallback(bVar);
this.R = null;
}
}
public final void r0(int i, int i10, Object obj) {
e1[] e1VarArr;
for (e1 e1Var : this.f32126g) {
if (e1Var.A() == i) {
b1 i02 = i0(e1Var);
s1.f0.f(!i02.f32112g);
i02.f32109d = i10;
s1.f0.f(!i02.f32112g);
i02.f32110e = obj;
i02.c();
}
}
}
@Override
public final int s() {
B0();
if (g()) {
return this.f32129h0.f32082b.f24555c;
}
return -1;
}
public final void s0(List<p1.t> list, boolean z10) {
boolean z11;
B0();
ArrayList arrayList = new ArrayList();
for (int i = 0; i < list.size(); i++) {
arrayList.add(this.f32139q.f(list.get(i)));
}
B0();
int l02 = l0(this.f32129h0);
long currentPosition = getCurrentPosition();
this.G++;
ArrayList arrayList2 = this.f32137o;
if (!arrayList2.isEmpty()) {
int size = arrayList2.size();
for (int i10 = size - 1; i10 >= 0; i10--) {
arrayList2.remove(i10);
}
this.L = this.L.b(size);
}
ArrayList arrayList3 = new ArrayList();
for (int i11 = 0; i11 < arrayList.size(); i11++) {
z0.c cVar = new z0.c((i2.w) arrayList.get(i11), this.f32138p);
arrayList3.add(cVar);
arrayList2.add(i11 + 0, new d(cVar.f32433b, cVar.f32432a));
}
this.L = this.L.e(arrayList3.size());
d1 d1Var = new d1(arrayList2, this.L);
boolean p10 = d1Var.p();
int i12 = d1Var.f32168f;
if (!p10 && -1 >= i12) {
throw new p1.s();
}
if (z10) {
l02 = d1Var.a(this.F);
currentPosition = -9223372036854775807L;
}
int i13 = l02;
a1 n02 = n0(this.f32129h0, d1Var, o0(d1Var, i13, currentPosition));
int i14 = n02.f32085e;
if (i13 != -1 && i14 != 1) {
i14 = (d1Var.p() || i13 >= i12) ? 4 : 2;
}
a1 g10 = n02.g(i14);
long Q = s1.e0.Q(currentPosition);
i2.m0 m0Var = this.L;
g0 g0Var = this.f32133k;
g0Var.getClass();
g0Var.f32215h.j(17, new g0.a(arrayList3, m0Var, i13, Q)).a();
if (!this.f32129h0.f32082b.f24553a.equals(g10.f32082b.f24553a) && !this.f32129h0.f32081a.p()) {
z11 = true;
} else {
z11 = false;
}
y0(g10, 0, 1, z11, 4, k0(g10), -1, false);
}
@Override
public final void t(SurfaceView surfaceView) {
SurfaceHolder holder;
B0();
if (surfaceView instanceof p2.j) {
q0();
v0(surfaceView);
t0(surfaceView.getHolder());
return;
}
boolean z10 = surfaceView instanceof q2.j;
b bVar = this.f32145x;
if (z10) {
q0();
this.S = (q2.j) surfaceView;
b1 i02 = i0(this.f32146y);
s1.f0.f(!i02.f32112g);
i02.f32109d = 10000;
q2.j jVar = this.S;
s1.f0.f(true ^ i02.f32112g);
i02.f32110e = jVar;
i02.c();
this.S.f29560a.add(bVar);
v0(this.S.getVideoSurface());
t0(surfaceView.getHolder());
return;
}
if (surfaceView == null) {
holder = null;
} else {
holder = surfaceView.getHolder();
}
B0();
if (holder == null) {
g0();
return;
}
q0();
this.T = true;
this.R = holder;
holder.addCallback(bVar);
Surface surface = holder.getSurface();
if (surface != null && surface.isValid()) {
v0(surface);
Rect surfaceFrame = holder.getSurfaceFrame();
p0(surfaceFrame.width(), surfaceFrame.height());
return;
}
v0(null);
p0(0, 0);
}
public final void t0(SurfaceHolder surfaceHolder) {
this.T = false;
this.R = surfaceHolder;
surfaceHolder.addCallback(this.f32145x);
Surface surface = this.R.getSurface();
if (surface != null && surface.isValid()) {
Rect surfaceFrame = this.R.getSurfaceFrame();
p0(surfaceFrame.width(), surfaceFrame.height());
return;
}
p0(0, 0);
}
public final void u0(boolean z10) {
B0();
int e10 = this.A.e(A(), z10);
int i = 1;
if (z10 && e10 != 1) {
i = 2;
}
x0(e10, i, z10);
}
public final void v0(Object obj) {
e1[] e1VarArr;
ArrayList arrayList = new ArrayList();
boolean z10 = false;
for (e1 e1Var : this.f32126g) {
if (e1Var.A() == 2) {
b1 i02 = i0(e1Var);
s1.f0.f(!i02.f32112g);
i02.f32109d = 1;
s1.f0.f(true ^ i02.f32112g);
i02.f32110e = obj;
i02.c();
arrayList.add(i02);
}
}
Object obj2 = this.P;
if (obj2 != null && obj2 != obj) {
try {
Iterator it = arrayList.iterator();
while (it.hasNext()) {
((b1) it.next()).a(this.D);
}
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
} catch (TimeoutException unused2) {
z10 = true;
}
Object obj3 = this.P;
Surface surface = this.Q;
if (obj3 == surface) {
surface.release();
this.Q = null;
}
}
this.P = obj;
if (z10) {
l lVar = new l(2, new h0(3), 1003);
a1 a1Var = this.f32129h0;
a1 b10 = a1Var.b(a1Var.f32082b);
b10.f32095p = b10.f32097r;
b10.f32096q = 0L;
a1 e10 = b10.g(1).e(lVar);
this.G++;
this.f32133k.f32215h.d(6).a();
y0(e10, 0, 1, false, 5, -9223372036854775807L, -1, false);
}
}
@Override
public final l w() {
B0();
return this.f32129h0.f32086f;
}
public final void w0() {
boolean z10;
boolean z11;
boolean z12;
boolean z13;
boolean z14;
boolean z15;
b0.a aVar = this.M;
int i = s1.e0.f30451a;
p1.b0 b0Var = this.f32125f;
boolean g10 = b0Var.g();
boolean z16 = b0Var.z();
boolean r10 = b0Var.r();
boolean D = b0Var.D();
boolean Z = b0Var.Z();
boolean K = b0Var.K();
boolean p10 = b0Var.N().p();
b0.a.C0357a c0357a = new b0.a.C0357a();
p1.q qVar = this.f32120c.f27867a;
q.a aVar2 = c0357a.f27868a;
aVar2.getClass();
boolean z17 = false;
for (int i10 = 0; i10 < qVar.b(); i10++) {
aVar2.a(qVar.a(i10));
}
boolean z18 = !g10;
c0357a.a(4, z18);
if (z16 && !g10) {
z10 = true;
} else {
z10 = false;
}
c0357a.a(5, z10);
if (r10 && !g10) {
z11 = true;
} else {
z11 = false;
}
c0357a.a(6, z11);
if (!p10 && ((r10 || !Z || z16) && !g10)) {
z12 = true;
} else {
z12 = false;
}
c0357a.a(7, z12);
if (D && !g10) {
z13 = true;
} else {
z13 = false;
}
c0357a.a(8, z13);
if (!p10 && ((D || (Z && K)) && !g10)) {
z14 = true;
} else {
z14 = false;
}
c0357a.a(9, z14);
c0357a.a(10, z18);
if (z16 && !g10) {
z15 = true;
} else {
z15 = false;
}
c0357a.a(11, z15);
if (z16 && !g10) {
z17 = true;
}
c0357a.a(12, z17);
b0.a aVar3 = new b0.a(aVar2.b());
this.M = aVar3;
if (!aVar3.equals(aVar)) {
this.f32134l.c(13, new e7.c(1, this));
}
}
@Override
public final long x() {
B0();
return this.f32143v;
}
public final void x0(int i, int i10, boolean z10) {
boolean z11;
int i11 = 1;
if (z10 && i != -1) {
z11 = true;
} else {
z11 = false;
}
if (!z11 || i == 1) {
i11 = 0;
}
a1 a1Var = this.f32129h0;
if (a1Var.f32091l == z11 && a1Var.f32092m == i11) {
return;
}
z0(i10, i11, z11);
}
@Override
public final long y() {
B0();
return j0(this.f32129h0);
}
public final void y0(final a1 a1Var, final int i, final int i10, boolean z10, final int i11, long j4, int i12, boolean z11) {
Pair pair;
int i13;
p1.t tVar;
boolean z12;
boolean z13;
boolean z14;
int i14;
int i15;
final int i16;
final int i17;
int i18;
Object obj;
p1.t tVar2;
Object obj2;
int i19;
long j10;
long m02;
Object obj3;
p1.t tVar3;
Object obj4;
int i20;
long j11;
a1 a1Var2 = this.f32129h0;
this.f32129h0 = a1Var;
boolean z15 = !a1Var2.f32081a.equals(a1Var.f32081a);
p1.e0 e0Var = a1Var2.f32081a;
p1.e0 e0Var2 = a1Var.f32081a;
int i21 = 0;
if (e0Var2.p() && e0Var.p()) {
pair = new Pair(Boolean.FALSE, -1);
} else if (e0Var2.p() != e0Var.p()) {
pair = new Pair(Boolean.TRUE, 3);
} else {
w.b bVar = a1Var2.f32082b;
Object obj5 = bVar.f24553a;
e0.b bVar2 = this.f32136n;
int i22 = e0Var.g(obj5, bVar2).f27909c;
e0.c cVar = this.f27935a;
Object obj6 = e0Var.m(i22, cVar).f27916a;
w.b bVar3 = a1Var.f32082b;
if (!obj6.equals(e0Var2.m(e0Var2.g(bVar3.f24553a, bVar2).f27909c, cVar).f27916a)) {
if (z10 && i11 == 0) {
i13 = 1;
} else if (z10 && i11 == 1) {
i13 = 2;
} else if (z15) {
i13 = 3;
} else {
throw new IllegalStateException();
}
pair = new Pair(Boolean.TRUE, Integer.valueOf(i13));
} else if (z10 && i11 == 0 && bVar.f24556d < bVar3.f24556d) {
pair = new Pair(Boolean.TRUE, 0);
} else if (z10 && i11 == 1 && z11) {
pair = new Pair(Boolean.TRUE, 2);
} else {
pair = new Pair(Boolean.FALSE, -1);
}
}
boolean booleanValue = ((Boolean) pair.first).booleanValue();
int intValue = ((Integer) pair.second).intValue();
if (booleanValue) {
if (!a1Var.f32081a.p()) {
tVar = a1Var.f32081a.m(a1Var.f32081a.g(a1Var.f32082b.f24553a, this.f32136n).f27909c, this.f27935a).f27918c;
} else {
tVar = null;
}
this.f32127g0 = p1.v.G;
} else {
tVar = null;
}
if (booleanValue || !a1Var2.f32089j.equals(a1Var.f32089j)) {
p1.v vVar = this.f32127g0;
vVar.getClass();
v.a aVar = new v.a(vVar);
List<p1.w> list = a1Var.f32089j;
int i23 = 0;
while (i23 < list.size()) {
p1.w wVar = list.get(i23);
int i24 = i21;
while (true) {
w.b[] bVarArr = wVar.f28252a;
if (i24 < bVarArr.length) {
bVarArr[i24].d(aVar);
i24++;
}
}
i23++;
i21 = 0;
}
this.f32127g0 = new p1.v(aVar);
}
p1.v f0 = f0();
boolean z16 = !f0.equals(this.N);
this.N = f0;
if (a1Var2.f32091l != a1Var.f32091l) {
z12 = true;
} else {
z12 = false;
}
if (a1Var2.f32085e != a1Var.f32085e) {
z13 = true;
} else {
z13 = false;
}
if (z13 || z12) {
A0();
}
if (a1Var2.f32087g != a1Var.f32087g) {
z14 = true;
} else {
z14 = false;
}
if (z15) {
this.f32134l.c(0, new m.a() {
@Override
public final void invoke(Object obj7) {
p1.e0 e0Var3 = a1.this.f32081a;
((b0.c) obj7).W(i);
}
});
}
if (z10) {
e0.b bVar4 = new e0.b();
if (!a1Var2.f32081a.p()) {
Object obj7 = a1Var2.f32082b.f24553a;
a1Var2.f32081a.g(obj7, bVar4);
int i25 = bVar4.f27909c;
int b10 = a1Var2.f32081a.b(obj7);
obj2 = obj7;
obj = a1Var2.f32081a.m(i25, this.f27935a).f27916a;
tVar2 = this.f27935a.f27918c;
i18 = i25;
i19 = b10;
} else {
i18 = i12;
obj = null;
tVar2 = null;
obj2 = null;
i19 = -1;
}
if (i11 == 0) {
if (a1Var2.f32082b.b()) {
w.b bVar5 = a1Var2.f32082b;
j10 = bVar4.a(bVar5.f24554b, bVar5.f24555c);
m02 = m0(a1Var2);
long d0 = s1.e0.d0(j10);
long d02 = s1.e0.d0(m02);
w.b bVar6 = a1Var2.f32082b;
final b0.d dVar = new b0.d(obj, i18, tVar2, obj2, i19, d0, d02, bVar6.f24554b, bVar6.f24555c);
int G = G();
if (this.f32129h0.f32081a.p()) {
a1 a1Var3 = this.f32129h0;
Object obj8 = a1Var3.f32082b.f24553a;
a1Var3.f32081a.g(obj8, this.f32136n);
int b11 = this.f32129h0.f32081a.b(obj8);
p1.e0 e0Var3 = this.f32129h0.f32081a;
e0.c cVar2 = this.f27935a;
Object obj9 = e0Var3.m(G, cVar2).f27916a;
i20 = b11;
tVar3 = cVar2.f27918c;
obj4 = obj8;
obj3 = obj9;
} else {
obj3 = null;
tVar3 = null;
obj4 = null;
i20 = -1;
}
long d03 = s1.e0.d0(j4);
if (!this.f32129h0.f32082b.b()) {
j11 = s1.e0.d0(m0(this.f32129h0));
} else {
j11 = d03;
}
w.b bVar7 = this.f32129h0.f32082b;
final b0.d dVar2 = new b0.d(obj3, G, tVar3, obj4, i20, d03, j11, bVar7.f24554b, bVar7.f24555c);
this.f32134l.c(11, new m.a() {
@Override
public final void invoke(Object obj10) {
b0.c cVar3 = (b0.c) obj10;
cVar3.r();
cVar3.i0(i11, dVar, dVar2);
}
});
} else {
if (a1Var2.f32082b.f24557e != -1) {
j10 = m0(this.f32129h0);
} else {
j10 = bVar4.f27911e + bVar4.f27910d;
}
m02 = j10;
long d04 = s1.e0.d0(j10);
long d022 = s1.e0.d0(m02);
w.b bVar62 = a1Var2.f32082b;
final b0.d dVar3 = new b0.d(obj, i18, tVar2, obj2, i19, d04, d022, bVar62.f24554b, bVar62.f24555c);
int G2 = G();
if (this.f32129h0.f32081a.p()) {
}
long d032 = s1.e0.d0(j4);
if (!this.f32129h0.f32082b.b()) {
}
w.b bVar72 = this.f32129h0.f32082b;
final b0.d dVar22 = new b0.d(obj3, G2, tVar3, obj4, i20, d032, j11, bVar72.f24554b, bVar72.f24555c);
this.f32134l.c(11, new m.a() {
@Override
public final void invoke(Object obj10) {
b0.c cVar3 = (b0.c) obj10;
cVar3.r();
cVar3.i0(i11, dVar3, dVar22);
}
});
}
} else if (a1Var2.f32082b.b()) {
j10 = a1Var2.f32097r;
m02 = m0(a1Var2);
long d042 = s1.e0.d0(j10);
long d0222 = s1.e0.d0(m02);
w.b bVar622 = a1Var2.f32082b;
final b0.d dVar32 = new b0.d(obj, i18, tVar2, obj2, i19, d042, d0222, bVar622.f24554b, bVar622.f24555c);
int G22 = G();
if (this.f32129h0.f32081a.p()) {
}
long d0322 = s1.e0.d0(j4);
if (!this.f32129h0.f32082b.b()) {
}
w.b bVar722 = this.f32129h0.f32082b;
final b0.d dVar222 = new b0.d(obj3, G22, tVar3, obj4, i20, d0322, j11, bVar722.f24554b, bVar722.f24555c);
this.f32134l.c(11, new m.a() {
@Override
public final void invoke(Object obj10) {
b0.c cVar3 = (b0.c) obj10;
cVar3.r();
cVar3.i0(i11, dVar32, dVar222);
}
});
} else {
j10 = bVar4.f27911e + a1Var2.f32097r;
m02 = j10;
long d0422 = s1.e0.d0(j10);
long d02222 = s1.e0.d0(m02);
w.b bVar6222 = a1Var2.f32082b;
final b0.d dVar322 = new b0.d(obj, i18, tVar2, obj2, i19, d0422, d02222, bVar6222.f24554b, bVar6222.f24555c);
int G222 = G();
if (this.f32129h0.f32081a.p()) {
}
long d03222 = s1.e0.d0(j4);
if (!this.f32129h0.f32082b.b()) {
}
w.b bVar7222 = this.f32129h0.f32082b;
final b0.d dVar2222 = new b0.d(obj3, G222, tVar3, obj4, i20, d03222, j11, bVar7222.f24554b, bVar7222.f24555c);
this.f32134l.c(11, new m.a() {
@Override
public final void invoke(Object obj10) {
b0.c cVar3 = (b0.c) obj10;
cVar3.r();
cVar3.i0(i11, dVar322, dVar2222);
}
});
}
}
if (booleanValue) {
i14 = 1;
this.f32134l.c(1, new x1.w(intValue, 2, tVar));
} else {
i14 = 1;
}
if (a1Var2.f32086f != a1Var.f32086f) {
this.f32134l.c(10, new t(i14, a1Var));
if (a1Var.f32086f != null) {
this.f32134l.c(10, new androidx.lifecycle.n(i14, a1Var));
}
}
m2.q qVar = a1Var2.i;
m2.q qVar2 = a1Var.i;
if (qVar != qVar2) {
this.f32128h.c(qVar2.f26424e);
i15 = 2;
this.f32134l.c(2, new d7.m(0, a1Var));
} else {
i15 = 2;
}
if (z16) {
this.f32134l.c(14, new i1.b1(i15, this.N));
}
if (z14) {
i16 = 1;
this.f32134l.c(3, new m.a() {
@Override
public final void invoke(Object obj10) {
int i26 = r2;
a1 a1Var4 = a1Var;
switch (i26) {
case 0:
((b0.c) obj10).q0(a1Var4.k());
return;
default:
b0.c cVar3 = (b0.c) obj10;
boolean z17 = a1Var4.f32087g;
cVar3.l();
cVar3.H(a1Var4.f32087g);
return;
}
}
});
} else {
i16 = 1;
}
if (z13 || z12) {
this.f32134l.c(-1, new m.a() {
@Override
public final void invoke(Object obj10) {
int i26 = i16;
a1 a1Var4 = a1Var;
switch (i26) {
case 0:
((b0.c) obj10).p0(a1Var4.f32093n);
return;
default:
((b0.c) obj10).g0(a1Var4.f32085e, a1Var4.f32091l);
return;
}
}
});
}
if (z13) {
this.f32134l.c(4, new e7.c(0, a1Var));
}
if (z12) {
this.f32134l.c(5, new m.a() {
@Override
public final void invoke(Object obj10) {
((b0.c) obj10).J(i10, a1.this.f32091l);
}
});
}
if (a1Var2.f32092m != a1Var.f32092m) {
this.f32134l.c(6, new i1.b1(1, a1Var));
}
if (a1Var2.k() != a1Var.k()) {
i17 = 0;
this.f32134l.c(7, new m.a() {
@Override
public final void invoke(Object obj10) {
int i26 = r2;
a1 a1Var4 = a1Var;
switch (i26) {
case 0:
((b0.c) obj10).q0(a1Var4.k());
return;
default:
b0.c cVar3 = (b0.c) obj10;
boolean z17 = a1Var4.f32087g;
cVar3.l();
cVar3.H(a1Var4.f32087g);
return;
}
}
});
} else {
i17 = 0;
}
if (!a1Var2.f32093n.equals(a1Var.f32093n)) {
this.f32134l.c(12, new m.a() {
@Override
public final void invoke(Object obj10) {
int i26 = i17;
a1 a1Var4 = a1Var;
switch (i26) {
case 0:
((b0.c) obj10).p0(a1Var4.f32093n);
return;
default:
((b0.c) obj10).g0(a1Var4.f32085e, a1Var4.f32091l);
return;
}
}
});
}
w0();
this.f32134l.b();
if (a1Var2.f32094o != a1Var.f32094o) {
Iterator<m.a> it = this.f32135m.iterator();
while (it.hasNext()) {
it.next().l();
}
}
}
public final void z0(int i, int i10, boolean z10) {
this.G++;
a1 a1Var = this.f32129h0;
if (a1Var.f32094o) {
a1Var = a1Var.a();
}
a1 d10 = a1Var.d(i10, z10);
g0 g0Var = this.f32133k;
g0Var.getClass();
g0Var.f32215h.b(1, z10 ? 1 : 0, i10).a();
y0(d10, 0, i, false, 5, -9223372036854775807L, -1, false);
}
}