正在查看: Cantique de Louanges v12 应用的 aw.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Cantique de Louanges v12 应用的 aw.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.applovin.exoplayer2;
import android.content.Context;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.media.AudioTrack;
import android.media.MediaFormat;
import android.os.Handler;
import android.os.Looper;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.TextureView;
import androidx.annotation.Nullable;
import com.applovin.exoplayer2.an;
import com.applovin.exoplayer2.ao;
import com.applovin.exoplayer2.ay;
import com.applovin.exoplayer2.b;
import com.applovin.exoplayer2.c;
import com.applovin.exoplayer2.k;
import com.applovin.exoplayer2.m.a.i;
import com.applovin.exoplayer2.q;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.TimeoutException;
public class aw extends d implements q {
private com.applovin.exoplayer2.b.d N;
protected final ar[] bB;
private final com.applovin.exoplayer2.a.a bM;
private final bc hA;
private final long hB;
@Nullable
private v hC;
@Nullable
private v hD;
@Nullable
private AudioTrack hE;
@Nullable
private Object hF;
@Nullable
private Surface hG;
@Nullable
private SurfaceHolder hH;
@Nullable
private com.applovin.exoplayer2.m.a.i hI;
private boolean hJ;
@Nullable
private TextureView hK;
private int hL;
private int hM;
private int hN;
private int hO;
@Nullable
private com.applovin.exoplayer2.c.e hP;
@Nullable
private com.applovin.exoplayer2.c.e hQ;
private int hR;
private float hS;
private boolean hT;
private List<com.applovin.exoplayer2.i.a> hU;
private boolean hV;
private boolean hW;
@Nullable
private com.applovin.exoplayer2.l.aa hX;
private boolean hY;
private boolean hZ;
private final com.applovin.exoplayer2.l.g hq;
private final Context hr;
private final r hs;
private final b ht;
private final c hu;
private final CopyOnWriteArraySet<an.d> hv;
private final com.applovin.exoplayer2.b hw;
private final com.applovin.exoplayer2.c hx;
private final ay hy;
private final bb hz;
private o ia;
private com.applovin.exoplayer2.m.o ib;
@Deprecated
public static final class a {
private final Context E;
private com.applovin.exoplayer2.b.d N;
private com.applovin.exoplayer2.j.j bC;
private boolean bK;
private com.applovin.exoplayer2.h.r bL;
private com.applovin.exoplayer2.a.a bM;
private com.applovin.exoplayer2.k.d bO;
private long bP;
private long bQ;
private com.applovin.exoplayer2.l.d bR;
private av bY;
private boolean bZ;
private aa cl;
private z ct;
private long cu;
private Looper gU;
private long hB;
private int hL;
private int hM;
private boolean hT;
@Nullable
private com.applovin.exoplayer2.l.aa hX;
private final au ic;
private long id;
private boolean ie;
private int f0if;
private boolean ig;
private boolean ih;
@Deprecated
public a(Context context) {
this(context, new n(context), new com.applovin.exoplayer2.e.f());
}
@Deprecated
public aw cY() {
com.applovin.exoplayer2.l.a.checkState(!this.ih);
this.ih = true;
return new aw(this);
}
@Deprecated
public a(Context context, au auVar, com.applovin.exoplayer2.e.l lVar) {
this(context, auVar, new com.applovin.exoplayer2.j.c(context), new com.applovin.exoplayer2.h.f(context, lVar), new l(), com.applovin.exoplayer2.k.n.i(context), new com.applovin.exoplayer2.a.a(com.applovin.exoplayer2.l.d.abJ));
}
@Deprecated
public a(Context context, au auVar, com.applovin.exoplayer2.j.j jVar, com.applovin.exoplayer2.h.r rVar, aa aaVar, com.applovin.exoplayer2.k.d dVar, com.applovin.exoplayer2.a.a aVar) {
this.E = context;
this.ic = auVar;
this.bC = jVar;
this.bL = rVar;
this.cl = aaVar;
this.bO = dVar;
this.bM = aVar;
this.gU = com.applovin.exoplayer2.l.ai.pZ();
this.N = com.applovin.exoplayer2.b.d.jD;
this.f0if = 0;
this.hL = 1;
this.hM = 0;
this.bK = true;
this.bY = av.hn;
this.bP = 5000L;
this.bQ = 15000L;
this.ct = new k.a().ao();
this.bR = com.applovin.exoplayer2.l.d.abJ;
this.cu = 500L;
this.hB = 2000L;
}
}
private final class b implements SurfaceHolder.Callback, TextureView.SurfaceTextureListener, an.b, ay.a, b.InterfaceC0135b, com.applovin.exoplayer2.b.g, c.b, com.applovin.exoplayer2.g.e, com.applovin.exoplayer2.i.l, i.a, com.applovin.exoplayer2.m.n, q.a {
private b() {
}
@Override
public void A(boolean z4) {
if (aw.this.hT == z4) {
return;
}
aw.this.hT = z4;
aw.this.cV();
}
@Override
public void Z(int i5) {
aw.this.cW();
}
@Override
public void a(ab abVar, int i5) {
k0.b(this, abVar, i5);
}
@Override
public void aa(int i5) {
k0.h(this, i5);
}
@Override
public void ab(int i5) {
k0.i(this, i5);
}
@Override
public void ac(int i5) {
k0.j(this, i5);
}
@Override
public void ai(int i5) {
o a5 = aw.a(aw.this.hy);
if (a5.equals(aw.this.ia)) {
return;
}
aw.this.ia = a5;
Iterator it = aw.this.hv.iterator();
while (it.hasNext()) {
((an.d) it.next()).a(a5);
}
}
@Override
public void b(ak akVar) {
k0.k(this, akVar);
}
@Override
public void c(v vVar) {
com.applovin.exoplayer2.b.a0.g(this, vVar);
}
@Override
public void cD() {
k0.n(this);
}
@Override
public void d(an.a aVar) {
k0.o(this, aVar);
}
@Override
public void e(List<com.applovin.exoplayer2.i.a> list) {
aw.this.hU = list;
Iterator it = aw.this.hv.iterator();
while (it.hasNext()) {
((an.d) it.next()).e(list);
}
}
@Override
public void f(int i5, boolean z4) {
Iterator it = aw.this.hv.iterator();
while (it.hasNext()) {
((an.d) it.next()).e(i5, z4);
}
}
@Override
public void i(boolean z4) {
a1.a(this, z4);
}
@Override
public void j(boolean z4) {
aw.this.cW();
}
@Override
public void l(int i5) {
boolean aE = aw.this.aE();
aw.this.b(aE, i5, aw.f(aE, i5));
}
@Override
public void m() {
aw.this.b(false, -1, 3);
}
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i5, int i6) {
aw.this.a(surfaceTexture);
aw.this.g(i5, i6);
}
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) {
aw.this.i((Object) null);
aw.this.g(0, 0);
return true;
}
@Override
public void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int i5, int i6) {
aw.this.g(i5, i6);
}
@Override
public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {
}
@Override
public void r(String str) {
aw.this.bM.r(str);
}
@Override
public void s(String str) {
aw.this.bM.s(str);
}
@Override
public void surfaceChanged(SurfaceHolder surfaceHolder, int i5, int i6, int i7) {
aw.this.g(i6, i7);
}
@Override
public void surfaceCreated(SurfaceHolder surfaceHolder) {
if (aw.this.hJ) {
aw.this.i(surfaceHolder.getSurface());
}
}
@Override
public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
if (aw.this.hJ) {
aw.this.i((Object) null);
}
aw.this.g(0, 0);
}
@Override
public void w(boolean z4) {
if (aw.this.hX != null) {
if (z4 && !aw.this.hY) {
aw.this.hX.cR(0);
aw.this.hY = true;
} else {
if (z4 || !aw.this.hY) {
return;
}
aw.this.hX.fF(0);
aw.this.hY = false;
}
}
}
@Override
public void x(boolean z4) {
k0.s(this, z4);
}
@Override
public void y(v vVar) {
com.applovin.exoplayer2.m.r.k(this, vVar);
}
@Override
public void z(boolean z4) {
k0.u(this, z4);
}
@Override
public void a(ac acVar) {
k0.c(this, acVar);
}
@Override
public void b(am amVar) {
k0.l(this, amVar);
}
@Override
public void c(com.applovin.exoplayer2.c.e eVar) {
aw.this.hQ = eVar;
aw.this.bM.c(eVar);
}
@Override
public void d(boolean z4, int i5) {
k0.p(this, z4, i5);
}
@Override
public void y(boolean z4) {
k0.t(this, z4);
}
@Override
public void z(long j5) {
aw.this.bM.z(j5);
}
@Override
public void a(ak akVar) {
k0.d(this, akVar);
}
@Override
public void b(ba baVar, int i5) {
k0.m(this, baVar, i5);
}
@Override
public void d(com.applovin.exoplayer2.c.e eVar) {
aw.this.bM.d(eVar);
aw.this.hD = null;
aw.this.hQ = null;
}
@Override
public void a(an.e eVar, an.e eVar2, int i5) {
k0.e(this, eVar, eVar2, i5);
}
@Override
public void b(int i5, long j5) {
aw.this.bM.b(i5, j5);
}
@Override
public void c(Exception exc) {
aw.this.bM.c(exc);
}
@Override
public void e(boolean z4, int i5) {
aw.this.cW();
}
@Override
public void a(an anVar, an.c cVar) {
k0.f(this, anVar, cVar);
}
@Override
public void b(com.applovin.exoplayer2.c.e eVar) {
aw.this.bM.b(eVar);
aw.this.hC = null;
aw.this.hP = null;
}
@Override
public void a(com.applovin.exoplayer2.h.ad adVar, com.applovin.exoplayer2.j.h hVar) {
k0.g(this, adVar, hVar);
}
@Override
public void a(com.applovin.exoplayer2.c.e eVar) {
aw.this.hP = eVar;
aw.this.bM.a(eVar);
}
@Override
public void b(String str, long j5, long j6) {
aw.this.bM.b(str, j5, j6);
}
@Override
public void a(String str, long j5, long j6) {
aw.this.bM.a(str, j5, j6);
}
@Override
public void b(v vVar, @Nullable com.applovin.exoplayer2.c.h hVar) {
aw.this.hD = vVar;
aw.this.bM.b(vVar, hVar);
}
@Override
public void a(v vVar, @Nullable com.applovin.exoplayer2.c.h hVar) {
aw.this.hC = vVar;
aw.this.bM.a(vVar, hVar);
}
@Override
public void b(Exception exc) {
aw.this.bM.b(exc);
}
@Override
public void a(com.applovin.exoplayer2.m.o oVar) {
aw.this.ib = oVar;
aw.this.bM.a(oVar);
Iterator it = aw.this.hv.iterator();
while (it.hasNext()) {
((an.d) it.next()).a(oVar);
}
}
@Override
public void b(float f5) {
aw.this.cU();
}
@Override
public void a(Object obj, long j5) {
aw.this.bM.a(obj, j5);
if (aw.this.hF == obj) {
Iterator it = aw.this.hv.iterator();
while (it.hasNext()) {
((an.d) it.next()).cE();
}
}
}
@Override
public void a(long j5, int i5) {
aw.this.bM.a(j5, i5);
}
@Override
public void a(Exception exc) {
aw.this.bM.a(exc);
}
@Override
public void a(int i5, long j5, long j6) {
aw.this.bM.a(i5, j5, j6);
}
@Override
public void a(com.applovin.exoplayer2.g.a aVar) {
aw.this.bM.a(aVar);
aw.this.hs.a(aVar);
Iterator it = aw.this.hv.iterator();
while (it.hasNext()) {
((an.d) it.next()).a(aVar);
}
}
@Override
public void a(Surface surface) {
aw.this.i((Object) null);
}
}
protected aw(a aVar) {
aw awVar;
com.applovin.exoplayer2.l.g gVar = new com.applovin.exoplayer2.l.g();
this.hq = gVar;
try {
Context applicationContext = aVar.E.getApplicationContext();
this.hr = applicationContext;
com.applovin.exoplayer2.a.a aVar2 = aVar.bM;
this.bM = aVar2;
this.hX = aVar.hX;
this.N = aVar.N;
this.hL = aVar.hL;
this.hM = aVar.hM;
this.hT = aVar.hT;
this.hB = aVar.hB;
b bVar = new b();
this.ht = bVar;
c cVar = new c();
this.hu = cVar;
this.hv = new CopyOnWriteArraySet<>();
Handler handler = new Handler(aVar.gU);
ar[] a5 = aVar.ic.a(handler, bVar, bVar, bVar, bVar);
this.bB = a5;
this.hS = 1.0f;
if (com.applovin.exoplayer2.l.ai.acV < 21) {
this.hR = ah(0);
} else {
this.hR = h.c(applicationContext);
}
this.hU = Collections.emptyList();
this.hV = true;
try {
r rVar = new r(a5, aVar.bC, aVar.bL, aVar.cl, aVar.bO, aVar2, aVar.bK, aVar.bY, aVar.bP, aVar.bQ, aVar.ct, aVar.cu, aVar.bZ, aVar.bR, aVar.gU, this, new an.a.C0133a().a(20, 21, 22, 23, 24, 25, 26, 27).cC());
awVar = this;
try {
awVar.hs = rVar;
rVar.a((an.b) bVar);
rVar.a((q.a) bVar);
if (aVar.id > 0) {
rVar.j(aVar.id);
}
com.applovin.exoplayer2.b bVar2 = new com.applovin.exoplayer2.b(aVar.E, handler, bVar);
awVar.hw = bVar2;
bVar2.setEnabled(aVar.ig);
com.applovin.exoplayer2.c cVar2 = new com.applovin.exoplayer2.c(aVar.E, handler, bVar);
awVar.hx = cVar2;
cVar2.a(aVar.ie ? awVar.N : null);
ay ayVar = new ay(aVar.E, handler, bVar);
awVar.hy = ayVar;
ayVar.aj(com.applovin.exoplayer2.l.ai.fM(awVar.N.jG));
bb bbVar = new bb(aVar.E);
awVar.hz = bbVar;
bbVar.setEnabled(aVar.f0if != 0);
bc bcVar = new bc(aVar.E);
awVar.hA = bcVar;
bcVar.setEnabled(aVar.f0if == 2);
awVar.ia = a(ayVar);
awVar.ib = com.applovin.exoplayer2.m.o.afk;
awVar.a(1, 10, Integer.valueOf(awVar.hR));
awVar.a(2, 10, Integer.valueOf(awVar.hR));
awVar.a(1, 3, awVar.N);
awVar.a(2, 4, Integer.valueOf(awVar.hL));
awVar.a(2, 5, Integer.valueOf(awVar.hM));
awVar.a(1, 9, Boolean.valueOf(awVar.hT));
awVar.a(2, 7, cVar);
awVar.a(6, 8, cVar);
gVar.oN();
} catch (Throwable th) {
th = th;
awVar.hq.oN();
throw th;
}
} catch (Throwable th2) {
th = th2;
awVar = this;
}
} catch (Throwable th3) {
th = th3;
awVar = this;
}
}
private int ah(int i5) {
AudioTrack audioTrack = this.hE;
if (audioTrack != null && audioTrack.getAudioSessionId() != i5) {
this.hE.release();
this.hE = null;
}
if (this.hE == null) {
this.hE = new AudioTrack(3, 4000, 4, 2, 2, 0, i5);
}
return this.hE.getAudioSessionId();
}
private void cT() {
if (this.hI != null) {
this.hs.a(this.hu).ad(10000).h(null).cM();
this.hI.b(this.ht);
this.hI = null;
}
TextureView textureView = this.hK;
if (textureView != null) {
if (textureView.getSurfaceTextureListener() != this.ht) {
com.applovin.exoplayer2.l.q.h("SimpleExoPlayer", "SurfaceTextureListener already unset or replaced.");
} else {
this.hK.setSurfaceTextureListener(null);
}
this.hK = null;
}
SurfaceHolder surfaceHolder = this.hH;
if (surfaceHolder != null) {
surfaceHolder.removeCallback(this.ht);
this.hH = null;
}
}
public void cU() {
a(1, 2, Float.valueOf(this.hS * this.hx.n()));
}
public void cV() {
this.bM.A(this.hT);
Iterator<an.d> it = this.hv.iterator();
while (it.hasNext()) {
it.next().A(this.hT);
}
}
public void cW() {
int aB = aB();
if (aB != 1) {
if (aB == 2 || aB == 3) {
this.hz.C(aE() && !ay());
this.hA.C(aE());
return;
} else if (aB != 4) {
throw new IllegalStateException();
}
}
this.hz.C(false);
this.hA.C(false);
}
private void cX() {
this.hq.oQ();
if (Thread.currentThread() != az().getThread()) {
String a5 = com.applovin.exoplayer2.l.ai.a("Player is accessed on the wrong thread.\nCurrent thread: '%s'\nExpected thread: '%s'\nSee https://exoplayer.dev/issues/player-accessed-on-wrong-thread", Thread.currentThread().getName(), az().getThread().getName());
if (this.hV) {
throw new IllegalStateException(a5);
}
com.applovin.exoplayer2.l.q.b("SimpleExoPlayer", a5, this.hW ? null : new IllegalStateException());
this.hW = true;
}
}
public static int f(boolean z4, int i5) {
return (!z4 || i5 == 1) ? 1 : 2;
}
@Override
public an.a aA() {
cX();
return this.hs.aA();
}
@Override
public int aB() {
cX();
return this.hs.aB();
}
@Override
public int aC() {
cX();
return this.hs.aC();
}
@Override
public void aD() {
cX();
boolean aE = aE();
int a5 = this.hx.a(aE, 2);
b(aE, a5, f(aE, a5));
this.hs.aD();
}
@Override
public boolean aE() {
cX();
return this.hs.aE();
}
@Override
public int aF() {
cX();
return this.hs.aF();
}
@Override
public boolean aG() {
cX();
return this.hs.aG();
}
@Override
public long aH() {
cX();
return this.hs.aH();
}
@Override
public long aI() {
cX();
return this.hs.aI();
}
@Override
public long aJ() {
cX();
return this.hs.aJ();
}
@Override
public int aK() {
cX();
return this.hs.aK();
}
@Override
public int aL() {
cX();
return this.hs.aL();
}
@Override
public long aM() {
cX();
return this.hs.aM();
}
@Override
public long aN() {
cX();
return this.hs.aN();
}
@Override
public long aO() {
cX();
return this.hs.aO();
}
@Override
public boolean aP() {
cX();
return this.hs.aP();
}
@Override
public int aQ() {
cX();
return this.hs.aQ();
}
@Override
public int aR() {
cX();
return this.hs.aR();
}
@Override
public long aS() {
cX();
return this.hs.aS();
}
@Override
public long aT() {
cX();
return this.hs.aT();
}
@Override
public com.applovin.exoplayer2.h.ad aU() {
cX();
return this.hs.aU();
}
@Override
public com.applovin.exoplayer2.j.h aV() {
cX();
return this.hs.aV();
}
@Override
public ac aW() {
return this.hs.aW();
}
@Override
public ba aX() {
cX();
return this.hs.aX();
}
@Override
public com.applovin.exoplayer2.m.o aY() {
return this.ib;
}
@Override
public am av() {
cX();
return this.hs.av();
}
@Override
@Nullable
public p ax() {
cX();
return this.hs.ax();
}
public boolean ay() {
cX();
return this.hs.ay();
}
@Override
public Looper az() {
return this.hs.az();
}
@Override
public List<com.applovin.exoplayer2.i.a> bd() {
cX();
return this.hU;
}
public void cS() {
cX();
cT();
i((Object) null);
g(0, 0);
}
public void release() {
AudioTrack audioTrack;
cX();
if (com.applovin.exoplayer2.l.ai.acV < 21 && (audioTrack = this.hE) != null) {
audioTrack.release();
this.hE = null;
}
this.hw.setEnabled(false);
this.hy.release();
this.hz.C(false);
this.hA.C(false);
this.hx.release();
this.hs.release();
this.bM.release();
cT();
Surface surface = this.hG;
if (surface != null) {
surface.release();
this.hG = null;
}
if (this.hY) {
((com.applovin.exoplayer2.l.aa) com.applovin.exoplayer2.l.a.checkNotNull(this.hX)).fF(0);
this.hY = false;
}
this.hU = Collections.emptyList();
this.hZ = true;
}
@Override
public void u(int i5) {
cX();
this.hs.u(i5);
}
private void c(SurfaceHolder surfaceHolder) {
this.hJ = false;
this.hH = surfaceHolder;
surfaceHolder.addCallback(this.ht);
Surface surface = this.hH.getSurface();
if (surface == null || !surface.isValid()) {
g(0, 0);
} else {
Rect surfaceFrame = this.hH.getSurfaceFrame();
g(surfaceFrame.width(), surfaceFrame.height());
}
}
public void i(@Nullable Object obj) {
boolean z4;
ArrayList arrayList = new ArrayList();
ar[] arVarArr = this.bB;
int length = arVarArr.length;
int i5 = 0;
while (true) {
z4 = true;
if (i5 >= length) {
break;
}
ar arVar = arVarArr[i5];
if (arVar.M() == 2) {
arrayList.add(this.hs.a(arVar).ad(1).h(obj).cM());
}
i5++;
}
Object obj2 = this.hF;
if (obj2 == null || obj2 == obj) {
z4 = false;
} else {
try {
Iterator it = arrayList.iterator();
while (it.hasNext()) {
((ao) it.next()).y(this.hB);
}
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
} catch (TimeoutException unused2) {
}
z4 = false;
Object obj3 = this.hF;
Surface surface = this.hG;
if (obj3 == surface) {
surface.release();
this.hG = null;
}
}
this.hF = obj;
if (z4) {
this.hs.a(false, p.a(new u(3), 1003));
}
}
public void h(float f5) {
cX();
float a5 = com.applovin.exoplayer2.l.ai.a(f5, 0.0f, 1.0f);
if (this.hS == a5) {
return;
}
this.hS = a5;
cU();
this.bM.g(a5);
Iterator<an.d> it = this.hv.iterator();
while (it.hasNext()) {
it.next().g(a5);
}
}
@Override
public void k(boolean z4) {
cX();
int a5 = this.hx.a(z4, aB());
b(z4, a5, f(z4, a5));
}
@Override
public void l(boolean z4) {
cX();
this.hs.l(z4);
}
@Deprecated
public void f(an.b bVar) {
com.applovin.exoplayer2.l.a.checkNotNull(bVar);
this.hs.a(bVar);
}
@Deprecated
public void g(an.b bVar) {
this.hs.b(bVar);
}
public void g(int i5, int i6) {
if (i5 == this.hN && i6 == this.hO) {
return;
}
this.hN = i5;
this.hO = i6;
this.bM.f(i5, i6);
Iterator<an.d> it = this.hv.iterator();
while (it.hasNext()) {
it.next().f(i5, i6);
}
}
public void b(@Nullable SurfaceHolder surfaceHolder) {
cX();
if (surfaceHolder == null || surfaceHolder != this.hH) {
return;
}
cS();
}
private static final class c implements ao.b, com.applovin.exoplayer2.m.a.a, com.applovin.exoplayer2.m.l {
@Nullable
private com.applovin.exoplayer2.m.l ij;
@Nullable
private com.applovin.exoplayer2.m.a.a ik;
@Nullable
private com.applovin.exoplayer2.m.l il;
@Nullable
private com.applovin.exoplayer2.m.a.a im;
private c() {
}
@Override
public void a(int i5, @Nullable Object obj) {
if (i5 == 7) {
this.ij = (com.applovin.exoplayer2.m.l) obj;
return;
}
if (i5 == 8) {
this.ik = (com.applovin.exoplayer2.m.a.a) obj;
return;
}
if (i5 != 10000) {
return;
}
com.applovin.exoplayer2.m.a.i iVar = (com.applovin.exoplayer2.m.a.i) obj;
if (iVar == null) {
this.il = null;
this.im = null;
} else {
this.il = iVar.getVideoFrameMetadataListener();
this.im = iVar.getCameraMotionListener();
}
}
@Override
public void cZ() {
com.applovin.exoplayer2.m.a.a aVar = this.im;
if (aVar != null) {
aVar.cZ();
}
com.applovin.exoplayer2.m.a.a aVar2 = this.ik;
if (aVar2 != null) {
aVar2.cZ();
}
}
@Override
public void a(long j5, long j6, v vVar, @Nullable MediaFormat mediaFormat) {
com.applovin.exoplayer2.m.l lVar = this.il;
if (lVar != null) {
lVar.a(j5, j6, vVar, mediaFormat);
}
com.applovin.exoplayer2.m.l lVar2 = this.ij;
if (lVar2 != null) {
lVar2.a(j5, j6, vVar, mediaFormat);
}
}
@Override
public void a(long j5, float[] fArr) {
com.applovin.exoplayer2.m.a.a aVar = this.im;
if (aVar != null) {
aVar.a(j5, fArr);
}
com.applovin.exoplayer2.m.a.a aVar2 = this.ik;
if (aVar2 != null) {
aVar2.a(j5, fArr);
}
}
}
@Override
public void b(@Nullable SurfaceView surfaceView) {
cX();
b(surfaceView == null ? null : surfaceView.getHolder());
}
@Override
public void b(@Nullable TextureView textureView) {
cX();
if (textureView == null || textureView != this.hK) {
return;
}
cS();
}
public void a(@Nullable SurfaceHolder surfaceHolder) {
cX();
if (surfaceHolder == null) {
cS();
return;
}
cT();
this.hJ = true;
this.hH = surfaceHolder;
surfaceHolder.addCallback(this.ht);
Surface surface = surfaceHolder.getSurface();
if (surface != null && surface.isValid()) {
i(surface);
Rect surfaceFrame = surfaceHolder.getSurfaceFrame();
g(surfaceFrame.width(), surfaceFrame.height());
} else {
i((Object) null);
g(0, 0);
}
}
@Override
public void b(an.d dVar) {
com.applovin.exoplayer2.l.a.checkNotNull(dVar);
this.hv.remove(dVar);
g(dVar);
}
public void b(boolean z4, int i5, int i6) {
int i7 = 0;
boolean z5 = z4 && i5 != -1;
if (z5 && i5 != 1) {
i7 = 1;
}
this.hs.a(z5, i7, i6);
}
@Override
public void a(@Nullable SurfaceView surfaceView) {
cX();
if (surfaceView instanceof com.applovin.exoplayer2.m.k) {
cT();
i(surfaceView);
c(surfaceView.getHolder());
} else {
if (surfaceView instanceof com.applovin.exoplayer2.m.a.i) {
cT();
this.hI = (com.applovin.exoplayer2.m.a.i) surfaceView;
this.hs.a(this.hu).ad(10000).h(this.hI).cM();
this.hI.a(this.ht);
i(this.hI.getVideoSurface());
c(surfaceView.getHolder());
return;
}
a(surfaceView == null ? null : surfaceView.getHolder());
}
}
@Override
public void a(@Nullable TextureView textureView) {
cX();
if (textureView == null) {
cS();
return;
}
cT();
this.hK = textureView;
if (textureView.getSurfaceTextureListener() != null) {
com.applovin.exoplayer2.l.q.h("SimpleExoPlayer", "Replacing existing SurfaceTextureListener.");
}
textureView.setSurfaceTextureListener(this.ht);
SurfaceTexture surfaceTexture = textureView.isAvailable() ? textureView.getSurfaceTexture() : null;
if (surfaceTexture == null) {
i((Object) null);
g(0, 0);
} else {
a(surfaceTexture);
g(textureView.getWidth(), textureView.getHeight());
}
}
@Override
public void a(an.d dVar) {
com.applovin.exoplayer2.l.a.checkNotNull(dVar);
this.hv.add(dVar);
f(dVar);
}
public void a(com.applovin.exoplayer2.h.p pVar) {
cX();
this.hs.a(pVar);
}
@Override
public void a(int i5, long j5) {
cX();
this.bM.dq();
this.hs.a(i5, j5);
}
public void a(SurfaceTexture surfaceTexture) {
Surface surface = new Surface(surfaceTexture);
i(surface);
this.hG = surface;
}
private void a(int i5, int i6, @Nullable Object obj) {
for (ar arVar : this.bB) {
if (arVar.M() == i5) {
this.hs.a(arVar).ad(i6).h(obj).cM();
}
}
}
public static o a(ay ayVar) {
return new o(0, ayVar.da(), ayVar.db());
}
}