91重口 v1.4.7版本的 MD5 值为:b580d7e8a501ee704e75352ed0f5eb0d
以下内容为反编译后的 t0.java 源代码,内容仅作参考
package e.f.a.a;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.Rect;
import android.graphics.SurfaceTexture;
import android.os.Handler;
import android.os.Looper;
import android.provider.Settings;
import android.util.Log;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.TextureView;
import com.google.android.exoplayer2.ExoPlaybackException;
import com.google.android.exoplayer2.Format;
import com.google.android.exoplayer2.audio.AudioProcessor;
import com.google.android.exoplayer2.audio.DefaultAudioSink;
import com.google.android.exoplayer2.drm.DefaultDrmSessionManager;
import com.google.android.exoplayer2.metadata.Metadata;
import com.google.android.exoplayer2.source.TrackGroupArray;
import com.google.android.exoplayer2.video.MediaCodecVideoRenderer;
import e.f.a.a.n0;
import e.f.a.a.r;
import e.f.a.a.s;
import e.f.a.a.t;
import e.f.a.a.w0.b;
import java.lang.reflect.Constructor;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Objects;
import java.util.concurrent.CopyOnWriteArraySet;
public class t0 extends t implements n0, n0.c, n0.b {
public e.f.a.a.n1.m A;
public e.f.a.a.n1.r.a B;
public boolean C;
public boolean D;
public final q0[] f9738b;
public final b0 f9739c;
public final Handler f9740d;
public final b f9741e;
public final CopyOnWriteArraySet<e.f.a.a.n1.p> f9742f;
public final CopyOnWriteArraySet<e.f.a.a.x0.k> f9743g;
public final CopyOnWriteArraySet<e.f.a.a.i1.j> f9744h;
public final CopyOnWriteArraySet<e.f.a.a.e1.e> f9745i;
public final CopyOnWriteArraySet<e.f.a.a.n1.q> f9746j;
public final CopyOnWriteArraySet<e.f.a.a.x0.l> f9747k;
public final e.f.a.a.l1.f f9748l;
public final e.f.a.a.w0.a f9749m;
public final r f9750n;
public final s o;
public final v0 p;
public Surface q;
public boolean r;
public SurfaceHolder s;
public TextureView t;
public int u;
public int v;
public int w;
public float x;
public e.f.a.a.h1.x y;
public List<e.f.a.a.i1.b> z;
public final class b implements e.f.a.a.n1.q, e.f.a.a.x0.l, e.f.a.a.i1.j, e.f.a.a.e1.e, SurfaceHolder.Callback, TextureView.SurfaceTextureListener, s.b, r.b, n0.a {
public b(a aVar) {
}
public void a(int i2) {
t0 t0Var = t0.this;
t0Var.Q(t0Var.h(), i2);
}
@Override
public void onAudioDecoderInitialized(String str, long j2, long j3) {
Iterator<e.f.a.a.x0.l> it = t0.this.f9747k.iterator();
while (it.hasNext()) {
it.next().onAudioDecoderInitialized(str, j2, j3);
}
}
@Override
public void onAudioDisabled(e.f.a.a.z0.d dVar) {
Iterator<e.f.a.a.x0.l> it = t0.this.f9747k.iterator();
while (it.hasNext()) {
it.next().onAudioDisabled(dVar);
}
Objects.requireNonNull(t0.this);
Objects.requireNonNull(t0.this);
t0.this.w = 0;
}
@Override
public void onAudioEnabled(e.f.a.a.z0.d dVar) {
Objects.requireNonNull(t0.this);
Iterator<e.f.a.a.x0.l> it = t0.this.f9747k.iterator();
while (it.hasNext()) {
it.next().onAudioEnabled(dVar);
}
}
@Override
public void onAudioInputFormatChanged(Format format) {
Objects.requireNonNull(t0.this);
Iterator<e.f.a.a.x0.l> it = t0.this.f9747k.iterator();
while (it.hasNext()) {
it.next().onAudioInputFormatChanged(format);
}
}
@Override
public void onAudioSessionId(int i2) {
t0 t0Var = t0.this;
if (t0Var.w == i2) {
return;
}
t0Var.w = i2;
Iterator<e.f.a.a.x0.k> it = t0Var.f9743g.iterator();
while (it.hasNext()) {
e.f.a.a.x0.k next = it.next();
if (!t0.this.f9747k.contains(next)) {
next.onAudioSessionId(i2);
}
}
Iterator<e.f.a.a.x0.l> it2 = t0.this.f9747k.iterator();
while (it2.hasNext()) {
it2.next().onAudioSessionId(i2);
}
}
@Override
public void onAudioSinkUnderrun(int i2, long j2, long j3) {
Iterator<e.f.a.a.x0.l> it = t0.this.f9747k.iterator();
while (it.hasNext()) {
it.next().onAudioSinkUnderrun(i2, j2, j3);
}
}
@Override
public void onCues(List<e.f.a.a.i1.b> list) {
t0 t0Var = t0.this;
t0Var.z = list;
Iterator<e.f.a.a.i1.j> it = t0Var.f9744h.iterator();
while (it.hasNext()) {
it.next().onCues(list);
}
}
@Override
public void onDroppedFrames(int i2, long j2) {
Iterator<e.f.a.a.n1.q> it = t0.this.f9746j.iterator();
while (it.hasNext()) {
it.next().onDroppedFrames(i2, j2);
}
}
@Override
public void onIsPlayingChanged(boolean z) {
m0.a(this, z);
}
@Override
public void onLoadingChanged(boolean z) {
Objects.requireNonNull(t0.this);
}
@Override
public void onMetadata(Metadata metadata) {
Iterator<e.f.a.a.e1.e> it = t0.this.f9745i.iterator();
while (it.hasNext()) {
it.next().onMetadata(metadata);
}
}
@Override
public void onPlaybackParametersChanged(k0 k0Var) {
m0.c(this, k0Var);
}
@Override
public void onPlaybackSuppressionReasonChanged(int i2) {
m0.d(this, i2);
}
@Override
public void onPlayerError(ExoPlaybackException exoPlaybackException) {
m0.e(this, exoPlaybackException);
}
@Override
public void onPlayerStateChanged(boolean z, int i2) {
if (i2 != 1) {
if (i2 == 2 || i2 == 3) {
t0.this.p.a = z;
return;
} else if (i2 != 4) {
return;
}
}
t0.this.p.a = false;
}
@Override
public void onPositionDiscontinuity(int i2) {
m0.f(this, i2);
}
@Override
public void onRenderedFirstFrame(Surface surface) {
t0 t0Var = t0.this;
if (t0Var.q == surface) {
Iterator<e.f.a.a.n1.p> it = t0Var.f9742f.iterator();
while (it.hasNext()) {
it.next().b();
}
}
Iterator<e.f.a.a.n1.q> it2 = t0.this.f9746j.iterator();
while (it2.hasNext()) {
it2.next().onRenderedFirstFrame(surface);
}
}
@Override
public void onRepeatModeChanged(int i2) {
m0.g(this, i2);
}
@Override
public void onSeekProcessed() {
m0.h(this);
}
@Override
public void onShuffleModeEnabledChanged(boolean z) {
m0.i(this, z);
}
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i2, int i3) {
t0.this.N(new Surface(surfaceTexture), true);
t0.this.F(i2, i3);
}
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) {
t0.this.N(null, true);
t0.this.F(0, 0);
return true;
}
@Override
public void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int i2, int i3) {
t0.this.F(i2, i3);
}
@Override
public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {
}
@Override
public void onTimelineChanged(u0 u0Var, int i2) {
m0.j(this, u0Var, i2);
}
@Override
public void onTimelineChanged(u0 u0Var, Object obj, int i2) {
m0.k(this, u0Var, obj, i2);
}
@Override
public void onTracksChanged(TrackGroupArray trackGroupArray, e.f.a.a.j1.g gVar) {
m0.l(this, trackGroupArray, gVar);
}
@Override
public void onVideoDecoderInitialized(String str, long j2, long j3) {
Iterator<e.f.a.a.n1.q> it = t0.this.f9746j.iterator();
while (it.hasNext()) {
it.next().onVideoDecoderInitialized(str, j2, j3);
}
}
@Override
public void onVideoDisabled(e.f.a.a.z0.d dVar) {
Iterator<e.f.a.a.n1.q> it = t0.this.f9746j.iterator();
while (it.hasNext()) {
it.next().onVideoDisabled(dVar);
}
Objects.requireNonNull(t0.this);
Objects.requireNonNull(t0.this);
}
@Override
public void onVideoEnabled(e.f.a.a.z0.d dVar) {
Objects.requireNonNull(t0.this);
Iterator<e.f.a.a.n1.q> it = t0.this.f9746j.iterator();
while (it.hasNext()) {
it.next().onVideoEnabled(dVar);
}
}
@Override
public void onVideoInputFormatChanged(Format format) {
Objects.requireNonNull(t0.this);
Iterator<e.f.a.a.n1.q> it = t0.this.f9746j.iterator();
while (it.hasNext()) {
it.next().onVideoInputFormatChanged(format);
}
}
@Override
public void onVideoSizeChanged(int i2, int i3, int i4, float f2) {
Iterator<e.f.a.a.n1.p> it = t0.this.f9742f.iterator();
while (it.hasNext()) {
e.f.a.a.n1.p next = it.next();
if (!t0.this.f9746j.contains(next)) {
next.onVideoSizeChanged(i2, i3, i4, f2);
}
}
Iterator<e.f.a.a.n1.q> it2 = t0.this.f9746j.iterator();
while (it2.hasNext()) {
it2.next().onVideoSizeChanged(i2, i3, i4, f2);
}
}
@Override
public void surfaceChanged(SurfaceHolder surfaceHolder, int i2, int i3, int i4) {
t0.this.F(i3, i4);
}
@Override
public void surfaceCreated(SurfaceHolder surfaceHolder) {
t0.this.N(surfaceHolder.getSurface(), false);
}
@Override
public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
t0.this.N(null, false);
t0.this.F(0, 0);
}
}
@Deprecated
public t0(Context context, a0 a0Var, e.f.a.a.j1.h hVar, f0 f0Var, e.f.a.a.a1.b<e.f.a.a.a1.e> bVar, e.f.a.a.l1.f fVar, e.f.a.a.w0.a aVar, e.f.a.a.m1.f fVar2, Looper looper) {
int i2;
int i3;
Intent registerReceiver;
int i4;
e.f.a.a.x0.j jVar;
int i5;
int i6;
int i7;
this.f9748l = fVar;
this.f9749m = aVar;
b bVar2 = new b(null);
this.f9741e = bVar2;
this.f9742f = new CopyOnWriteArraySet<>();
this.f9743g = new CopyOnWriteArraySet<>();
this.f9744h = new CopyOnWriteArraySet<>();
this.f9745i = new CopyOnWriteArraySet<>();
this.f9746j = new CopyOnWriteArraySet<>();
this.f9747k = new CopyOnWriteArraySet<>();
Handler handler = new Handler(looper);
this.f9740d = handler;
Objects.requireNonNull(a0Var);
e.f.a.a.a1.b<e.f.a.a.a1.e> bVar3 = bVar == null ? null : bVar;
ArrayList arrayList = new ArrayList();
Context context2 = a0Var.a;
int i8 = a0Var.f7937b;
arrayList.add(new MediaCodecVideoRenderer(context2, e.f.a.a.d1.f.a, 5000L, bVar3, false, false, handler, bVar2, 50));
if (i8 != 0) {
int size = arrayList.size();
int i9 = i8 == 2 ? size - 1 : size;
try {
try {
i2 = i9 + 1;
try {
arrayList.add(i9, (q0) Class.forName("com.google.android.exoplayer2.ext.vp9.LibvpxVideoRenderer").getConstructor(Long.TYPE, Handler.class, e.f.a.a.n1.q.class, Integer.TYPE).newInstance(5000L, handler, bVar2, 50));
Log.i("DefaultRenderersFactory", "Loaded LibvpxVideoRenderer.");
} catch (ClassNotFoundException unused) {
i9 = i2;
i2 = i9;
try {
Class<?> cls = Class.forName("com.google.android.exoplayer2.ext.av1.Libgav1VideoRenderer");
Class<?>[] clsArr = new Class[4];
clsArr[0] = Long.TYPE;
clsArr[1] = Handler.class;
clsArr[2] = e.f.a.a.n1.q.class;
try {
clsArr[3] = Integer.TYPE;
Constructor<?> constructor = cls.getConstructor(clsArr);
Object[] objArr = new Object[4];
objArr[0] = 5000L;
objArr[1] = handler;
try {
objArr[2] = bVar2;
try {
objArr[3] = 50;
arrayList.add(i2, (q0) constructor.newInstance(objArr));
Log.i("DefaultRenderersFactory", "Loaded Libgav1VideoRenderer.");
} catch (ClassNotFoundException unused2) {
}
} catch (ClassNotFoundException unused3) {
}
} catch (ClassNotFoundException unused4) {
}
} catch (ClassNotFoundException unused5) {
}
Context context3 = a0Var.a;
i3 = a0Var.f7937b;
e.f.a.a.d1.f fVar3 = e.f.a.a.d1.f.a;
AudioProcessor[] audioProcessorArr = new AudioProcessor[0];
e.f.a.a.x0.j jVar2 = e.f.a.a.x0.j.a;
registerReceiver = context3.registerReceiver(null, new IntentFilter("android.media.action.HDMI_AUDIO_PLUG"));
if (e.f.a.a.m1.b0.a < 17 && "Amazon".equals(e.f.a.a.m1.b0.f9575c)) {
}
if (registerReceiver == null) {
}
jVar = e.f.a.a.x0.j.a;
arrayList.add(new e.f.a.a.x0.t(context3, fVar3, bVar3, false, false, handler, bVar2, new DefaultAudioSink(jVar, audioProcessorArr)));
if (i3 != 0) {
}
arrayList.add(new e.f.a.a.i1.k(bVar2, handler.getLooper()));
arrayList.add(new e.f.a.a.e1.f(bVar2, handler.getLooper()));
arrayList.add(new e.f.a.a.n1.r.b());
q0[] q0VarArr = (q0[]) arrayList.toArray(new q0[0]);
this.f9738b = q0VarArr;
this.x = 1.0f;
this.w = 0;
this.z = Collections.emptyList();
b0 b0Var = new b0(q0VarArr, hVar, f0Var, fVar, fVar2, looper);
this.f9739c = b0Var;
c.o.a.n.J(aVar.f9779n != null || aVar.f9778m.a.isEmpty());
aVar.f9779n = b0Var;
R();
b0Var.f7945h.addIfAbsent(new t.a(aVar));
l(this.f9741e);
this.f9746j.add(aVar);
this.f9742f.add(aVar);
this.f9747k.add(aVar);
this.f9743g.add(aVar);
this.f9745i.add(aVar);
fVar.g(this.f9740d, aVar);
if (bVar instanceof DefaultDrmSessionManager) {
}
}
} catch (ClassNotFoundException unused6) {
}
try {
Class<?> cls2 = Class.forName("com.google.android.exoplayer2.ext.av1.Libgav1VideoRenderer");
Class<?>[] clsArr2 = new Class[4];
clsArr2[0] = Long.TYPE;
clsArr2[1] = Handler.class;
clsArr2[2] = e.f.a.a.n1.q.class;
clsArr2[3] = Integer.TYPE;
Constructor<?> constructor2 = cls2.getConstructor(clsArr2);
Object[] objArr2 = new Object[4];
objArr2[0] = 5000L;
objArr2[1] = handler;
objArr2[2] = bVar2;
objArr2[3] = 50;
arrayList.add(i2, (q0) constructor2.newInstance(objArr2));
Log.i("DefaultRenderersFactory", "Loaded Libgav1VideoRenderer.");
Context context32 = a0Var.a;
i3 = a0Var.f7937b;
e.f.a.a.d1.f fVar32 = e.f.a.a.d1.f.a;
AudioProcessor[] audioProcessorArr2 = new AudioProcessor[0];
e.f.a.a.x0.j jVar22 = e.f.a.a.x0.j.a;
registerReceiver = context32.registerReceiver(null, new IntentFilter("android.media.action.HDMI_AUDIO_PLUG"));
if (e.f.a.a.m1.b0.a < 17 && "Amazon".equals(e.f.a.a.m1.b0.f9575c)) {
i4 = 0;
if (Settings.Global.getInt(context32.getContentResolver(), "external_surround_sound_enabled", 0) == 1) {
jVar = e.f.a.a.x0.j.f9817b;
arrayList.add(new e.f.a.a.x0.t(context32, fVar32, bVar3, false, false, handler, bVar2, new DefaultAudioSink(jVar, audioProcessorArr2)));
if (i3 != 0) {
int size2 = arrayList.size();
size2 = i3 == 2 ? size2 - 1 : size2;
try {
try {
i5 = 3;
try {
i6 = size2 + 1;
} catch (ClassNotFoundException unused7) {
}
} catch (ClassNotFoundException unused8) {
i5 = 3;
}
try {
try {
arrayList.add(size2, (q0) Class.forName("com.google.android.exoplayer2.ext.opus.LibopusAudioRenderer").getConstructor(Handler.class, e.f.a.a.x0.l.class, AudioProcessor[].class).newInstance(handler, bVar2, audioProcessorArr2));
Log.i("DefaultRenderersFactory", "Loaded LibopusAudioRenderer.");
} catch (ClassNotFoundException unused9) {
size2 = i6;
i6 = size2;
Class<?> cls3 = Class.forName("com.google.android.exoplayer2.ext.flac.LibflacAudioRenderer");
Class<?>[] clsArr3 = new Class[i5];
clsArr3[0] = Handler.class;
clsArr3[1] = e.f.a.a.x0.l.class;
clsArr3[2] = AudioProcessor[].class;
Constructor<?> constructor3 = cls3.getConstructor(clsArr3);
Object[] objArr3 = new Object[i5];
objArr3[0] = handler;
objArr3[1] = bVar2;
objArr3[2] = audioProcessorArr2;
q0 q0Var = (q0) constructor3.newInstance(objArr3);
i7 = i6 + 1;
arrayList.add(i6, q0Var);
Log.i("DefaultRenderersFactory", "Loaded LibflacAudioRenderer.");
Class<?> cls4 = Class.forName("com.google.android.exoplayer2.ext.ffmpeg.FfmpegAudioRenderer");
Class<?>[] clsArr4 = new Class[i5];
clsArr4[0] = Handler.class;
clsArr4[1] = e.f.a.a.x0.l.class;
clsArr4[2] = AudioProcessor[].class;
Constructor<?> constructor4 = cls4.getConstructor(clsArr4);
Object[] objArr4 = new Object[i5];
objArr4[0] = handler;
objArr4[1] = bVar2;
objArr4[2] = audioProcessorArr2;
arrayList.add(i7, (q0) constructor4.newInstance(objArr4));
Log.i("DefaultRenderersFactory", "Loaded FfmpegAudioRenderer.");
arrayList.add(new e.f.a.a.i1.k(bVar2, handler.getLooper()));
arrayList.add(new e.f.a.a.e1.f(bVar2, handler.getLooper()));
arrayList.add(new e.f.a.a.n1.r.b());
q0[] q0VarArr2 = (q0[]) arrayList.toArray(new q0[0]);
this.f9738b = q0VarArr2;
this.x = 1.0f;
this.w = 0;
this.z = Collections.emptyList();
b0 b0Var2 = new b0(q0VarArr2, hVar, f0Var, fVar, fVar2, looper);
this.f9739c = b0Var2;
c.o.a.n.J(aVar.f9779n != null || aVar.f9778m.a.isEmpty());
aVar.f9779n = b0Var2;
R();
b0Var2.f7945h.addIfAbsent(new t.a(aVar));
l(this.f9741e);
this.f9746j.add(aVar);
this.f9742f.add(aVar);
this.f9747k.add(aVar);
this.f9743g.add(aVar);
this.f9745i.add(aVar);
fVar.g(this.f9740d, aVar);
if (bVar instanceof DefaultDrmSessionManager) {
}
}
Class<?> cls32 = Class.forName("com.google.android.exoplayer2.ext.flac.LibflacAudioRenderer");
Class<?>[] clsArr32 = new Class[i5];
clsArr32[0] = Handler.class;
clsArr32[1] = e.f.a.a.x0.l.class;
clsArr32[2] = AudioProcessor[].class;
Constructor<?> constructor32 = cls32.getConstructor(clsArr32);
Object[] objArr32 = new Object[i5];
objArr32[0] = handler;
objArr32[1] = bVar2;
objArr32[2] = audioProcessorArr2;
q0 q0Var2 = (q0) constructor32.newInstance(objArr32);
i7 = i6 + 1;
try {
arrayList.add(i6, q0Var2);
Log.i("DefaultRenderersFactory", "Loaded LibflacAudioRenderer.");
} catch (ClassNotFoundException unused10) {
i6 = i7;
i7 = i6;
Class<?> cls42 = Class.forName("com.google.android.exoplayer2.ext.ffmpeg.FfmpegAudioRenderer");
Class<?>[] clsArr42 = new Class[i5];
clsArr42[0] = Handler.class;
clsArr42[1] = e.f.a.a.x0.l.class;
clsArr42[2] = AudioProcessor[].class;
Constructor<?> constructor42 = cls42.getConstructor(clsArr42);
Object[] objArr42 = new Object[i5];
objArr42[0] = handler;
objArr42[1] = bVar2;
objArr42[2] = audioProcessorArr2;
arrayList.add(i7, (q0) constructor42.newInstance(objArr42));
Log.i("DefaultRenderersFactory", "Loaded FfmpegAudioRenderer.");
arrayList.add(new e.f.a.a.i1.k(bVar2, handler.getLooper()));
arrayList.add(new e.f.a.a.e1.f(bVar2, handler.getLooper()));
arrayList.add(new e.f.a.a.n1.r.b());
q0[] q0VarArr22 = (q0[]) arrayList.toArray(new q0[0]);
this.f9738b = q0VarArr22;
this.x = 1.0f;
this.w = 0;
this.z = Collections.emptyList();
b0 b0Var22 = new b0(q0VarArr22, hVar, f0Var, fVar, fVar2, looper);
this.f9739c = b0Var22;
c.o.a.n.J(aVar.f9779n != null || aVar.f9778m.a.isEmpty());
aVar.f9779n = b0Var22;
R();
b0Var22.f7945h.addIfAbsent(new t.a(aVar));
l(this.f9741e);
this.f9746j.add(aVar);
this.f9742f.add(aVar);
this.f9747k.add(aVar);
this.f9743g.add(aVar);
this.f9745i.add(aVar);
fVar.g(this.f9740d, aVar);
if (bVar instanceof DefaultDrmSessionManager) {
}
}
try {
Class<?> cls422 = Class.forName("com.google.android.exoplayer2.ext.ffmpeg.FfmpegAudioRenderer");
Class<?>[] clsArr422 = new Class[i5];
clsArr422[0] = Handler.class;
clsArr422[1] = e.f.a.a.x0.l.class;
clsArr422[2] = AudioProcessor[].class;
Constructor<?> constructor422 = cls422.getConstructor(clsArr422);
Object[] objArr422 = new Object[i5];
objArr422[0] = handler;
objArr422[1] = bVar2;
objArr422[2] = audioProcessorArr2;
arrayList.add(i7, (q0) constructor422.newInstance(objArr422));
Log.i("DefaultRenderersFactory", "Loaded FfmpegAudioRenderer.");
} catch (ClassNotFoundException unused11) {
} catch (Exception e2) {
throw new RuntimeException("Error instantiating FFmpeg extension", e2);
}
} catch (Exception e3) {
throw new RuntimeException("Error instantiating FLAC extension", e3);
}
} catch (Exception e4) {
throw new RuntimeException("Error instantiating Opus extension", e4);
}
}
arrayList.add(new e.f.a.a.i1.k(bVar2, handler.getLooper()));
arrayList.add(new e.f.a.a.e1.f(bVar2, handler.getLooper()));
arrayList.add(new e.f.a.a.n1.r.b());
q0[] q0VarArr222 = (q0[]) arrayList.toArray(new q0[0]);
this.f9738b = q0VarArr222;
this.x = 1.0f;
this.w = 0;
this.z = Collections.emptyList();
b0 b0Var222 = new b0(q0VarArr222, hVar, f0Var, fVar, fVar2, looper);
this.f9739c = b0Var222;
c.o.a.n.J(aVar.f9779n != null || aVar.f9778m.a.isEmpty());
aVar.f9779n = b0Var222;
R();
b0Var222.f7945h.addIfAbsent(new t.a(aVar));
l(this.f9741e);
this.f9746j.add(aVar);
this.f9742f.add(aVar);
this.f9747k.add(aVar);
this.f9743g.add(aVar);
this.f9745i.add(aVar);
fVar.g(this.f9740d, aVar);
if (bVar instanceof DefaultDrmSessionManager) {
this.f9750n = new r(context, this.f9740d, this.f9741e);
this.o = new s(context, this.f9740d, this.f9741e);
this.p = new v0(context);
return;
}
Objects.requireNonNull((DefaultDrmSessionManager) bVar);
throw null;
}
} else {
i4 = 0;
}
if (registerReceiver == null && registerReceiver.getIntExtra("android.media.extra.AUDIO_PLUG_STATE", i4) != 0) {
jVar = new e.f.a.a.x0.j(registerReceiver.getIntArrayExtra("android.media.extra.ENCODINGS"), registerReceiver.getIntExtra("android.media.extra.MAX_CHANNEL_COUNT", 8));
} else {
jVar = e.f.a.a.x0.j.a;
}
arrayList.add(new e.f.a.a.x0.t(context32, fVar32, bVar3, false, false, handler, bVar2, new DefaultAudioSink(jVar, audioProcessorArr2)));
if (i3 != 0) {
}
arrayList.add(new e.f.a.a.i1.k(bVar2, handler.getLooper()));
arrayList.add(new e.f.a.a.e1.f(bVar2, handler.getLooper()));
arrayList.add(new e.f.a.a.n1.r.b());
q0[] q0VarArr2222 = (q0[]) arrayList.toArray(new q0[0]);
this.f9738b = q0VarArr2222;
this.x = 1.0f;
this.w = 0;
this.z = Collections.emptyList();
b0 b0Var2222 = new b0(q0VarArr2222, hVar, f0Var, fVar, fVar2, looper);
this.f9739c = b0Var2222;
c.o.a.n.J(aVar.f9779n != null || aVar.f9778m.a.isEmpty());
aVar.f9779n = b0Var2222;
R();
b0Var2222.f7945h.addIfAbsent(new t.a(aVar));
l(this.f9741e);
this.f9746j.add(aVar);
this.f9742f.add(aVar);
this.f9747k.add(aVar);
this.f9743g.add(aVar);
this.f9745i.add(aVar);
fVar.g(this.f9740d, aVar);
if (bVar instanceof DefaultDrmSessionManager) {
}
} catch (Exception e5) {
throw new RuntimeException("Error instantiating AV1 extension", e5);
}
} catch (Exception e6) {
throw new RuntimeException("Error instantiating VP9 extension", e6);
}
}
Context context322 = a0Var.a;
i3 = a0Var.f7937b;
e.f.a.a.d1.f fVar322 = e.f.a.a.d1.f.a;
AudioProcessor[] audioProcessorArr22 = new AudioProcessor[0];
e.f.a.a.x0.j jVar222 = e.f.a.a.x0.j.a;
registerReceiver = context322.registerReceiver(null, new IntentFilter("android.media.action.HDMI_AUDIO_PLUG"));
if (e.f.a.a.m1.b0.a < 17 && "Amazon".equals(e.f.a.a.m1.b0.f9575c)) {
}
if (registerReceiver == null) {
}
jVar = e.f.a.a.x0.j.a;
arrayList.add(new e.f.a.a.x0.t(context322, fVar322, bVar3, false, false, handler, bVar2, new DefaultAudioSink(jVar, audioProcessorArr22)));
if (i3 != 0) {
}
arrayList.add(new e.f.a.a.i1.k(bVar2, handler.getLooper()));
arrayList.add(new e.f.a.a.e1.f(bVar2, handler.getLooper()));
arrayList.add(new e.f.a.a.n1.r.b());
q0[] q0VarArr22222 = (q0[]) arrayList.toArray(new q0[0]);
this.f9738b = q0VarArr22222;
this.x = 1.0f;
this.w = 0;
this.z = Collections.emptyList();
b0 b0Var22222 = new b0(q0VarArr22222, hVar, f0Var, fVar, fVar2, looper);
this.f9739c = b0Var22222;
c.o.a.n.J(aVar.f9779n != null || aVar.f9778m.a.isEmpty());
aVar.f9779n = b0Var22222;
R();
b0Var22222.f7945h.addIfAbsent(new t.a(aVar));
l(this.f9741e);
this.f9746j.add(aVar);
this.f9742f.add(aVar);
this.f9747k.add(aVar);
this.f9743g.add(aVar);
this.f9745i.add(aVar);
fVar.g(this.f9740d, aVar);
if (bVar instanceof DefaultDrmSessionManager) {
}
}
@Override
public boolean A() {
R();
return this.f9739c.o;
}
@Override
public long B() {
R();
return this.f9739c.B();
}
@Override
public e.f.a.a.j1.g C() {
R();
return this.f9739c.v.f9323j.f9359c;
}
@Override
public int D(int i2) {
R();
return this.f9739c.f7940c[i2].getTrackType();
}
@Override
public n0.b E() {
return this;
}
public final void F(int i2, int i3) {
if (i2 == this.u && i3 == this.v) {
return;
}
this.u = i2;
this.v = i3;
Iterator<e.f.a.a.n1.p> it = this.f9742f.iterator();
while (it.hasNext()) {
it.next().c(i2, i3);
}
}
public void G() {
String str;
R();
r rVar = this.f9750n;
Objects.requireNonNull(rVar);
if (rVar.f9724c) {
rVar.a.unregisterReceiver(rVar.f9723b);
rVar.f9724c = false;
}
this.o.a(true);
this.p.a = false;
b0 b0Var = this.f9739c;
Objects.requireNonNull(b0Var);
StringBuilder sb = new StringBuilder();
sb.append("Release ");
sb.append(Integer.toHexString(System.identityHashCode(b0Var)));
sb.append(" [");
sb.append("ExoPlayerLib/2.11.3");
sb.append("] [");
sb.append(e.f.a.a.m1.b0.f9577e);
sb.append("] [");
HashSet<String> hashSet = d0.a;
synchronized (d0.class) {
str = d0.f8594b;
}
sb.append(str);
sb.append("]");
Log.i("ExoPlayerImpl", sb.toString());
c0 c0Var = b0Var.f7943f;
synchronized (c0Var) {
if (!c0Var.F && c0Var.q.isAlive()) {
c0Var.p.c(7);
boolean z = false;
while (!c0Var.F) {
try {
c0Var.wait();
} catch (InterruptedException unused) {
z = true;
}
}
if (z) {
Thread.currentThread().interrupt();
}
}
}
b0Var.f7942e.removeCallbacksAndMessages(null);
b0Var.v = b0Var.c(false, false, false, 1);
H();
Surface surface = this.q;
if (surface != null) {
if (this.r) {
surface.release();
}
this.q = null;
}
e.f.a.a.h1.x xVar = this.y;
if (xVar != null) {
xVar.d(this.f9749m);
this.y = null;
}
if (!this.D) {
this.f9748l.d(this.f9749m);
this.z = Collections.emptyList();
return;
}
Objects.requireNonNull(null);
throw null;
}
public final void H() {
TextureView textureView = this.t;
if (textureView != null) {
if (textureView.getSurfaceTextureListener() != this.f9741e) {
Log.w("SimpleExoPlayer", "SurfaceTextureListener already unset or replaced.");
} else {
this.t.setSurfaceTextureListener(null);
}
this.t = null;
}
SurfaceHolder surfaceHolder = this.s;
if (surfaceHolder != null) {
surfaceHolder.removeCallback(this.f9741e);
this.s = null;
}
}
public final void I() {
q0[] q0VarArr;
float f2 = this.x * this.o.f9732e;
for (q0 q0Var : this.f9738b) {
if (q0Var.getTrackType() == 1) {
o0 b2 = this.f9739c.b(q0Var);
b2.e(2);
b2.d(Float.valueOf(f2));
b2.c();
}
}
}
public void J(final k0 k0Var) {
R();
b0 b0Var = this.f9739c;
Objects.requireNonNull(b0Var);
if (k0Var == null) {
k0Var = k0.a;
}
if (b0Var.t.equals(k0Var)) {
return;
}
b0Var.s++;
b0Var.t = k0Var;
b0Var.f7943f.p.b(4, k0Var).sendToTarget();
b0Var.G(new t.b() {
@Override
public final void a(n0.a aVar) {
aVar.onPlaybackParametersChanged(k0.this);
}
});
}
public final void K(e.f.a.a.n1.k kVar) {
q0[] q0VarArr;
for (q0 q0Var : this.f9738b) {
if (q0Var.getTrackType() == 2) {
o0 b2 = this.f9739c.b(q0Var);
b2.e(8);
c.o.a.n.J(!b2.f9718h);
b2.f9715e = kVar;
b2.c();
}
}
}
public void L(Surface surface) {
R();
H();
if (surface != null) {
b();
}
N(surface, false);
int i2 = surface != null ? -1 : 0;
F(i2, i2);
}
public void M(SurfaceHolder surfaceHolder) {
R();
H();
if (surfaceHolder != null) {
b();
}
this.s = surfaceHolder;
if (surfaceHolder == null) {
N(null, false);
F(0, 0);
return;
}
surfaceHolder.addCallback(this.f9741e);
Surface surface = surfaceHolder.getSurface();
if (surface != null && surface.isValid()) {
N(surface, false);
Rect surfaceFrame = surfaceHolder.getSurfaceFrame();
F(surfaceFrame.width(), surfaceFrame.height());
return;
}
N(null, false);
F(0, 0);
}
public final void N(Surface surface, boolean z) {
q0[] q0VarArr;
ArrayList arrayList = new ArrayList();
for (q0 q0Var : this.f9738b) {
if (q0Var.getTrackType() == 2) {
o0 b2 = this.f9739c.b(q0Var);
b2.e(1);
c.o.a.n.J(true ^ b2.f9718h);
b2.f9715e = surface;
b2.c();
arrayList.add(b2);
}
}
Surface surface2 = this.q;
if (surface2 != null && surface2 != surface) {
try {
Iterator it = arrayList.iterator();
while (it.hasNext()) {
o0 o0Var = (o0) it.next();
synchronized (o0Var) {
c.o.a.n.J(o0Var.f9718h);
c.o.a.n.J(o0Var.f9716f.getLooper().getThread() != Thread.currentThread());
while (!o0Var.f9720j) {
o0Var.wait();
}
}
}
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
}
if (this.r) {
this.q.release();
}
}
this.q = surface;
this.r = z;
}
public void O(TextureView textureView) {
R();
H();
if (textureView != null) {
b();
}
this.t = textureView;
if (textureView == null) {
N(null, true);
F(0, 0);
return;
}
if (textureView.getSurfaceTextureListener() != null) {
Log.w("SimpleExoPlayer", "Replacing existing SurfaceTextureListener.");
}
textureView.setSurfaceTextureListener(this.f9741e);
SurfaceTexture surfaceTexture = textureView.isAvailable() ? textureView.getSurfaceTexture() : null;
if (surfaceTexture == null) {
N(null, true);
F(0, 0);
return;
}
N(new Surface(surfaceTexture), true);
F(textureView.getWidth(), textureView.getHeight());
}
public void P(boolean z) {
R();
this.f9739c.L(z);
e.f.a.a.h1.x xVar = this.y;
if (xVar != null) {
xVar.d(this.f9749m);
this.f9749m.j();
if (z) {
this.y = null;
}
}
this.o.a(true);
this.z = Collections.emptyList();
}
public final void Q(boolean z, int i2) {
int i3 = 0;
boolean z2 = z && i2 != -1;
if (z2 && i2 != 1) {
i3 = 1;
}
this.f9739c.J(z2, i3);
}
public final void R() {
if (Looper.myLooper() != z()) {
Log.w("SimpleExoPlayer", "Player is accessed on the wrong thread. See https://exoplayer.dev/issues/player-accessed-on-wrong-thread", this.C ? null : new IllegalStateException());
this.C = true;
}
}
public void b() {
R();
K(null);
}
public void c(Surface surface) {
R();
if (surface == null || surface != this.q) {
return;
}
R();
H();
N(null, false);
F(0, 0);
}
@Override
public k0 d() {
R();
return this.f9739c.t;
}
@Override
public boolean e() {
R();
return this.f9739c.e();
}
@Override
public long f() {
R();
return v.b(this.f9739c.v.f9326m);
}
@Override
public void g(int i2, long j2) {
R();
e.f.a.a.w0.a aVar = this.f9749m;
if (!aVar.f9778m.f9788h) {
b.a h2 = aVar.h();
aVar.f9778m.f9788h = true;
Iterator<e.f.a.a.w0.b> it = aVar.f9775d.iterator();
while (it.hasNext()) {
it.next().onSeekStarted(h2);
}
}
this.f9739c.g(i2, j2);
}
@Override
public long getCurrentPosition() {
R();
return this.f9739c.getCurrentPosition();
}
@Override
public long getDuration() {
R();
return this.f9739c.getDuration();
}
@Override
public int getPlaybackState() {
R();
return this.f9739c.v.f9319f;
}
@Override
public int getRepeatMode() {
R();
return this.f9739c.f7951n;
}
@Override
public boolean h() {
R();
return this.f9739c.f7949l;
}
@Override
public void i(boolean z) {
R();
this.f9739c.i(z);
}
@Override
public ExoPlaybackException j() {
R();
return this.f9739c.v.f9320g;
}
@Override
public void l(n0.a aVar) {
R();
this.f9739c.f7945h.addIfAbsent(new t.a(aVar));
}
@Override
public int m() {
R();
b0 b0Var = this.f9739c;
if (b0Var.e()) {
return b0Var.v.f9316c.f9052c;
}
return -1;
}
@Override
public void n(n0.a aVar) {
R();
this.f9739c.n(aVar);
}
@Override
public int o() {
R();
return this.f9739c.o();
}
@Override
public void p(boolean z) {
R();
s sVar = this.o;
int playbackState = getPlaybackState();
Objects.requireNonNull(sVar);
int i2 = -1;
if (z) {
if (playbackState != 1) {
if (sVar.f9731d != 0) {
sVar.a(true);
}
}
i2 = 1;
} else {
sVar.a(false);
}
Q(z, i2);
}
@Override
public n0.c q() {
return this;
}
@Override
public long r() {
R();
return this.f9739c.r();
}
@Override
public void setRepeatMode(int i2) {
R();
this.f9739c.setRepeatMode(i2);
}
@Override
public long t() {
R();
return this.f9739c.t();
}
@Override
public int u() {
R();
b0 b0Var = this.f9739c;
if (b0Var.e()) {
return b0Var.v.f9316c.f9051b;
}
return -1;
}
@Override
public int w() {
R();
return this.f9739c.f7950m;
}
@Override
public TrackGroupArray x() {
R();
return this.f9739c.v.f9322i;
}
@Override
public u0 y() {
R();
return this.f9739c.v.f9315b;
}
@Override
public Looper z() {
return this.f9739c.z();
}
}