CCIPTV PRO v3.0.9.1版本的 MD5 值为:e78d4d980447be4a9f823314f45bbf03
以下内容为反编译后的 i0.java 源代码,内容仅作参考
package f.f.a.b;
import android.annotation.TargetApi;
import android.content.Context;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
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 f.f.a.b.a0;
import f.f.a.b.k0.a;
import f.f.a.b.l0.k;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.concurrent.CopyOnWriteArraySet;
@TargetApi(16)
public class i0 extends f.f.a.b.b implements a0, a0.c, a0.b {
public f.f.a.b.t0.v A;
public List<f.f.a.b.u0.b> B;
public f.f.a.b.z0.m C;
public f.f.a.b.z0.r.a D;
public boolean E;
public final d0[] b;
public final l c;
public final Handler f5272d;
public final b f5273e;
public final CopyOnWriteArraySet<f.f.a.b.z0.p> f5274f;
public final CopyOnWriteArraySet<f.f.a.b.l0.l> f5275g;
public final CopyOnWriteArraySet<f.f.a.b.u0.k> f5276h;
public final CopyOnWriteArraySet<f.f.a.b.r0.e> f5277i;
public final CopyOnWriteArraySet<f.f.a.b.z0.q> f5278j;
public final CopyOnWriteArraySet<f.f.a.b.l0.n> f5279k;
public final f.f.a.b.x0.g f5280l;
public final f.f.a.b.k0.a f5281m;
public final f.f.a.b.l0.k f5282n;
public o f5283o;
public o f5284p;
public Surface f5285q;
public boolean r;
public SurfaceHolder s;
public TextureView t;
public int u;
public int v;
public f.f.a.b.m0.d w;
public f.f.a.b.m0.d x;
public int y;
public float z;
public final class b implements f.f.a.b.z0.q, f.f.a.b.l0.n, f.f.a.b.u0.k, f.f.a.b.r0.e, SurfaceHolder.Callback, TextureView.SurfaceTextureListener, k.c {
public b() {
}
@Override
public void C(o oVar) {
i0.this.f5283o = oVar;
Iterator it = i0.this.f5278j.iterator();
while (it.hasNext()) {
((f.f.a.b.z0.q) it.next()).C(oVar);
}
}
@Override
public void D(f.f.a.b.m0.d dVar) {
i0.this.w = dVar;
Iterator it = i0.this.f5278j.iterator();
while (it.hasNext()) {
((f.f.a.b.z0.q) it.next()).D(dVar);
}
}
@Override
public void F(o oVar) {
i0.this.f5284p = oVar;
Iterator it = i0.this.f5279k.iterator();
while (it.hasNext()) {
((f.f.a.b.l0.n) it.next()).F(oVar);
}
}
@Override
public void H(int i2, long j2, long j3) {
Iterator it = i0.this.f5279k.iterator();
while (it.hasNext()) {
((f.f.a.b.l0.n) it.next()).H(i2, j2, j3);
}
}
@Override
public void J(f.f.a.b.m0.d dVar) {
Iterator it = i0.this.f5278j.iterator();
while (it.hasNext()) {
((f.f.a.b.z0.q) it.next()).J(dVar);
}
i0.this.f5283o = null;
i0.this.w = null;
}
@Override
public void a(int i2) {
if (i0.this.y == i2) {
return;
}
i0.this.y = i2;
Iterator it = i0.this.f5275g.iterator();
while (it.hasNext()) {
f.f.a.b.l0.l lVar = (f.f.a.b.l0.l) it.next();
if (!i0.this.f5279k.contains(lVar)) {
lVar.a(i2);
}
}
Iterator it2 = i0.this.f5279k.iterator();
while (it2.hasNext()) {
((f.f.a.b.l0.n) it2.next()).a(i2);
}
}
@Override
public void b(int i2, int i3, int i4, float f2) {
Iterator it = i0.this.f5274f.iterator();
while (it.hasNext()) {
f.f.a.b.z0.p pVar = (f.f.a.b.z0.p) it.next();
if (!i0.this.f5278j.contains(pVar)) {
pVar.b(i2, i3, i4, f2);
}
}
Iterator it2 = i0.this.f5278j.iterator();
while (it2.hasNext()) {
((f.f.a.b.z0.q) it2.next()).b(i2, i3, i4, f2);
}
}
@Override
public void c(float f2) {
i0.this.p0();
}
@Override
public void d(int i2) {
i0 i0Var = i0.this;
i0Var.s0(i0Var.h(), i2);
}
@Override
public void f(f.f.a.b.m0.d dVar) {
Iterator it = i0.this.f5279k.iterator();
while (it.hasNext()) {
((f.f.a.b.l0.n) it.next()).f(dVar);
}
i0.this.f5284p = null;
i0.this.x = null;
i0.this.y = 0;
}
@Override
public void g(f.f.a.b.m0.d dVar) {
i0.this.x = dVar;
Iterator it = i0.this.f5279k.iterator();
while (it.hasNext()) {
((f.f.a.b.l0.n) it.next()).g(dVar);
}
}
@Override
public void h(String str, long j2, long j3) {
Iterator it = i0.this.f5278j.iterator();
while (it.hasNext()) {
((f.f.a.b.z0.q) it.next()).h(str, j2, j3);
}
}
@Override
public void j(List<f.f.a.b.u0.b> list) {
i0.this.B = list;
Iterator it = i0.this.f5276h.iterator();
while (it.hasNext()) {
((f.f.a.b.u0.k) it.next()).j(list);
}
}
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i2, int i3) {
i0.this.r0(new Surface(surfaceTexture), true);
i0.this.l0(i2, i3);
}
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) {
i0.this.r0(null, true);
i0.this.l0(0, 0);
return true;
}
@Override
public void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int i2, int i3) {
i0.this.l0(i2, i3);
}
@Override
public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {
}
@Override
public void p(Surface surface) {
if (i0.this.f5285q == surface) {
Iterator it = i0.this.f5274f.iterator();
while (it.hasNext()) {
((f.f.a.b.z0.p) it.next()).B();
}
}
Iterator it2 = i0.this.f5278j.iterator();
while (it2.hasNext()) {
((f.f.a.b.z0.q) it2.next()).p(surface);
}
}
@Override
public void r(String str, long j2, long j3) {
Iterator it = i0.this.f5279k.iterator();
while (it.hasNext()) {
((f.f.a.b.l0.n) it.next()).r(str, j2, j3);
}
}
@Override
public void surfaceChanged(SurfaceHolder surfaceHolder, int i2, int i3, int i4) {
i0.this.l0(i3, i4);
}
@Override
public void surfaceCreated(SurfaceHolder surfaceHolder) {
i0.this.r0(surfaceHolder.getSurface(), false);
}
@Override
public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
i0.this.r0(null, false);
i0.this.l0(0, 0);
}
@Override
public void t(f.f.a.b.r0.a aVar) {
Iterator it = i0.this.f5277i.iterator();
while (it.hasNext()) {
((f.f.a.b.r0.e) it.next()).t(aVar);
}
}
@Override
public void v(int i2, long j2) {
Iterator it = i0.this.f5278j.iterator();
while (it.hasNext()) {
((f.f.a.b.z0.q) it.next()).v(i2, j2);
}
}
}
public i0(Context context, g0 g0Var, f.f.a.b.v0.j jVar, r rVar, f.f.a.b.n0.o<f.f.a.b.n0.s> oVar, f.f.a.b.x0.g gVar, a.C0164a c0164a, Looper looper) {
this(context, g0Var, jVar, rVar, oVar, gVar, c0164a, f.f.a.b.y0.g.a, looper);
}
public i0(Context context, g0 g0Var, f.f.a.b.v0.j jVar, r rVar, f.f.a.b.n0.o<f.f.a.b.n0.s> oVar, f.f.a.b.x0.g gVar, a.C0164a c0164a, f.f.a.b.y0.g gVar2, Looper looper) {
this.f5280l = gVar;
this.f5273e = new b();
this.f5274f = new CopyOnWriteArraySet<>();
this.f5275g = new CopyOnWriteArraySet<>();
this.f5276h = new CopyOnWriteArraySet<>();
this.f5277i = new CopyOnWriteArraySet<>();
this.f5278j = new CopyOnWriteArraySet<>();
this.f5279k = new CopyOnWriteArraySet<>();
Handler handler = new Handler(looper);
this.f5272d = handler;
b bVar = this.f5273e;
this.b = g0Var.a(handler, bVar, bVar, bVar, bVar, oVar);
this.z = 1.0f;
this.y = 0;
f.f.a.b.l0.h hVar = f.f.a.b.l0.h.f5372e;
this.B = Collections.emptyList();
l lVar = new l(this.b, jVar, rVar, gVar, gVar2, looper);
this.c = lVar;
f.f.a.b.k0.a a2 = c0164a.a(lVar, gVar2);
this.f5281m = a2;
n(a2);
this.f5278j.add(this.f5281m);
this.f5274f.add(this.f5281m);
this.f5279k.add(this.f5281m);
this.f5275g.add(this.f5281m);
j0(this.f5281m);
gVar.g(this.f5272d, this.f5281m);
if (oVar instanceof f.f.a.b.n0.l) {
((f.f.a.b.n0.l) oVar).i(this.f5272d, this.f5281m);
}
this.f5282n = new f.f.a.b.l0.k(context, this.f5273e);
}
@Override
public void B(SurfaceView surfaceView) {
k0(surfaceView == null ? null : surfaceView.getHolder());
}
@Override
public void C(f.f.a.b.u0.k kVar) {
if (!this.B.isEmpty()) {
kVar.j(this.B);
}
this.f5276h.add(kVar);
}
@Override
public f.f.a.b.t0.d0 D() {
t0();
return this.c.D();
}
@Override
public j0 E() {
t0();
return this.c.E();
}
@Override
public Looper F() {
return this.c.F();
}
@Override
public boolean G() {
t0();
return this.c.G();
}
@Override
public long H() {
t0();
return this.c.H();
}
@Override
public void I(TextureView textureView) {
t0();
o0();
this.t = textureView;
if (textureView != null) {
if (textureView.getSurfaceTextureListener() != null) {
f.f.a.b.y0.r.f("SimpleExoPlayer", "Replacing existing SurfaceTextureListener.");
}
textureView.setSurfaceTextureListener(this.f5273e);
SurfaceTexture surfaceTexture = textureView.isAvailable() ? textureView.getSurfaceTexture() : null;
if (surfaceTexture != null) {
r0(new Surface(surfaceTexture), true);
l0(textureView.getWidth(), textureView.getHeight());
return;
}
}
r0(null, true);
l0(0, 0);
}
@Override
public f.f.a.b.v0.i J() {
t0();
return this.c.J();
}
@Override
public int K(int i2) {
t0();
return this.c.K(i2);
}
@Override
public void L(f.f.a.b.z0.p pVar) {
this.f5274f.remove(pVar);
}
@Override
public a0.b M() {
return this;
}
@Override
public void a(Surface surface) {
t0();
o0();
r0(surface, false);
int i2 = surface != null ? -1 : 0;
l0(i2, i2);
}
@Override
public void b(f.f.a.b.z0.r.a aVar) {
d0[] d0VarArr;
t0();
this.D = aVar;
for (d0 d0Var : this.b) {
if (d0Var.getTrackType() == 5) {
b0 Q = this.c.Q(d0Var);
Q.n(7);
Q.m(aVar);
Q.l();
}
}
}
@Override
public x c() {
t0();
return this.c.c();
}
@Override
public boolean d() {
t0();
return this.c.d();
}
@Override
public long e() {
t0();
return this.c.e();
}
@Override
public void f(int i2, long j2) {
t0();
this.f5281m.W();
this.c.f(i2, j2);
}
@Override
public void g(f.f.a.b.z0.m mVar) {
d0[] d0VarArr;
t0();
this.C = mVar;
for (d0 d0Var : this.b) {
if (d0Var.getTrackType() == 2) {
b0 Q = this.c.Q(d0Var);
Q.n(6);
Q.m(mVar);
Q.l();
}
}
}
@Override
public long getCurrentPosition() {
t0();
return this.c.getCurrentPosition();
}
@Override
public long getDuration() {
t0();
return this.c.getDuration();
}
@Override
public int getPlaybackState() {
t0();
return this.c.getPlaybackState();
}
@Override
public int getRepeatMode() {
t0();
return this.c.getRepeatMode();
}
@Override
public boolean h() {
t0();
return this.c.h();
}
@Override
public void i(Surface surface) {
t0();
if (surface == null || surface != this.f5285q) {
return;
}
a(null);
}
public void i0(f.f.a.b.k0.b bVar) {
t0();
this.f5281m.O(bVar);
}
@Override
public void j(boolean z) {
t0();
this.c.j(z);
}
public void j0(f.f.a.b.r0.e eVar) {
this.f5277i.add(eVar);
}
@Override
public j k() {
t0();
return this.c.k();
}
public void k0(SurfaceHolder surfaceHolder) {
t0();
if (surfaceHolder == null || surfaceHolder != this.s) {
return;
}
q0(null);
}
@Override
public void l(f.f.a.b.z0.r.a aVar) {
d0[] d0VarArr;
t0();
if (this.D != aVar) {
return;
}
for (d0 d0Var : this.b) {
if (d0Var.getTrackType() == 5) {
b0 Q = this.c.Q(d0Var);
Q.n(7);
Q.m(null);
Q.l();
}
}
}
public final void l0(int i2, int i3) {
if (i2 == this.u && i3 == this.v) {
return;
}
this.u = i2;
this.v = i3;
Iterator<f.f.a.b.z0.p> it = this.f5274f.iterator();
while (it.hasNext()) {
it.next().K(i2, i3);
}
}
@Override
public void m(TextureView textureView) {
t0();
if (textureView == null || textureView != this.t) {
return;
}
I(null);
}
public void m0(f.f.a.b.t0.v vVar, boolean z, boolean z2) {
t0();
f.f.a.b.t0.v vVar2 = this.A;
if (vVar2 != null) {
vVar2.e(this.f5281m);
this.f5281m.X();
}
this.A = vVar;
vVar.d(this.f5272d, this.f5281m);
s0(h(), this.f5282n.n(h()));
this.c.W(vVar, z, z2);
}
@Override
public void n(a0.a aVar) {
t0();
this.c.n(aVar);
}
public void n0() {
this.f5282n.p();
this.c.X();
o0();
Surface surface = this.f5285q;
if (surface != null) {
if (this.r) {
surface.release();
}
this.f5285q = null;
}
f.f.a.b.t0.v vVar = this.A;
if (vVar != null) {
vVar.e(this.f5281m);
this.A = null;
}
this.f5280l.d(this.f5281m);
this.B = Collections.emptyList();
}
@Override
public int o() {
t0();
return this.c.o();
}
public final void o0() {
TextureView textureView = this.t;
if (textureView != null) {
if (textureView.getSurfaceTextureListener() != this.f5273e) {
f.f.a.b.y0.r.f("SimpleExoPlayer", "SurfaceTextureListener already unset or replaced.");
} else {
this.t.setSurfaceTextureListener(null);
}
this.t = null;
}
SurfaceHolder surfaceHolder = this.s;
if (surfaceHolder != null) {
surfaceHolder.removeCallback(this.f5273e);
this.s = null;
}
}
@Override
public void p(SurfaceView surfaceView) {
q0(surfaceView == null ? null : surfaceView.getHolder());
}
public final void p0() {
d0[] d0VarArr;
float l2 = this.z * this.f5282n.l();
for (d0 d0Var : this.b) {
if (d0Var.getTrackType() == 1) {
b0 Q = this.c.Q(d0Var);
Q.n(2);
Q.m(Float.valueOf(l2));
Q.l();
}
}
}
@Override
public void q(f.f.a.b.u0.k kVar) {
this.f5276h.remove(kVar);
}
public void q0(SurfaceHolder surfaceHolder) {
t0();
o0();
this.s = surfaceHolder;
if (surfaceHolder != null) {
surfaceHolder.addCallback(this.f5273e);
Surface surface = surfaceHolder.getSurface();
if (surface != null && surface.isValid()) {
r0(surface, false);
Rect surfaceFrame = surfaceHolder.getSurfaceFrame();
l0(surfaceFrame.width(), surfaceFrame.height());
return;
}
}
r0(null, false);
l0(0, 0);
}
@Override
public void r(a0.a aVar) {
t0();
this.c.r(aVar);
}
public final void r0(Surface surface, boolean z) {
d0[] d0VarArr;
ArrayList<b0> arrayList = new ArrayList();
for (d0 d0Var : this.b) {
if (d0Var.getTrackType() == 2) {
b0 Q = this.c.Q(d0Var);
Q.n(1);
Q.m(surface);
Q.l();
arrayList.add(Q);
}
}
Surface surface2 = this.f5285q;
if (surface2 != null && surface2 != surface) {
try {
for (b0 b0Var : arrayList) {
b0Var.a();
}
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
}
if (this.r) {
this.f5285q.release();
}
}
this.f5285q = surface;
this.r = z;
}
@Override
public int s() {
t0();
return this.c.s();
}
public final void s0(boolean z, int i2) {
this.c.Y(z && i2 != -1, i2 != 1);
}
@Override
public void setRepeatMode(int i2) {
t0();
this.c.setRepeatMode(i2);
}
@Override
public void t(f.f.a.b.z0.p pVar) {
this.f5274f.add(pVar);
}
public final void t0() {
if (Looper.myLooper() != F()) {
f.f.a.b.y0.r.g("SimpleExoPlayer", "Player is accessed on the wrong thread. See https://google.github.io/ExoPlayer/faqs.html#what-do-player-is-accessed-on-the-wrong-thread-warnings-mean", this.E ? null : new IllegalStateException());
this.E = true;
}
}
@Override
public void u(boolean z) {
t0();
s0(z, this.f5282n.o(z, getPlaybackState()));
}
@Override
public a0.c v() {
return this;
}
@Override
public long w() {
t0();
return this.c.w();
}
@Override
public void y(f.f.a.b.z0.m mVar) {
d0[] d0VarArr;
t0();
if (this.C != mVar) {
return;
}
for (d0 d0Var : this.b) {
if (d0Var.getTrackType() == 2) {
b0 Q = this.c.Q(d0Var);
Q.n(6);
Q.m(null);
Q.l();
}
}
}
@Override
public int z() {
t0();
return this.c.z();
}
}