91快播 v3.3.0版本的 MD5 值为:094b9519ad2388a8147509cb8a126145
以下内容为反编译后的 C3757.java 源代码,内容仅作参考
package anta.ᕐ;
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.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.util.SparseBooleanArray;
import android.view.Surface;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.TextureView;
import anta.ੳ.AbstractC1592;
import anta.ੳ.C1602;
import anta.ર.C1690;
import anta.ર.InterfaceC1691;
import anta.ச.C1804;
import anta.ஜ.InterfaceC1833;
import anta.ዚ.C3145;
import anta.ዚ.InterfaceC3143;
import anta.ዚ.InterfaceC3158;
import anta.ዚ.InterfaceC3194;
import anta.Ꮩ.C3293;
import anta.Ꮩ.C3309;
import anta.Ꮩ.C3310;
import anta.Ꮩ.C3318;
import anta.Ꮩ.C3326;
import anta.Ꮩ.C3335;
import anta.Ꮩ.InterfaceC3329;
import anta.ᕐ.C3720;
import anta.ᕐ.C3723;
import anta.ᕐ.C3733;
import anta.ᕐ.C3743;
import anta.ᕐ.C3746;
import anta.ᕐ.C3753;
import anta.ᕐ.C3771;
import anta.ᕐ.C3794;
import anta.ᕐ.InterfaceC3800;
import anta.ᕐ.InterfaceC3828;
import anta.⁀.InterfaceC5892;
import anta.ₛ.C5955;
import anta.ₛ.C5960;
import anta.㝽.C7664;
import anta.㝽.InterfaceC7669;
import anta.㪊.C8738;
import anta.㪊.InterfaceC8748;
import anta.㪊.InterfaceC8750;
import anta.㪊.InterfaceC8762;
import anta.㪊.InterfaceC8771;
import anta.㬵.C8968;
import anta.㬵.InterfaceC8971;
import anta.㭰.C9049;
import anta.㭰.InterfaceC9079;
import anta.㭰.InterfaceC9085;
import anta.㮌.C9125;
import anta.㶢.C9725;
import anta.㶢.InterfaceC9733;
import com.google.android.exoplayer2.video.spherical.SphericalGLSurfaceView;
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.UUID;
import java.util.concurrent.CopyOnWriteArraySet;
import java.util.concurrent.TimeoutException;
public class C3757 extends AbstractC3799 implements InterfaceC3800 {
public final C9725 f9445;
public TextureView f9446;
public boolean f9447;
public float f9448;
public final C3318 f9449 = new C3318();
public C1690 f9450;
public final CopyOnWriteArraySet<InterfaceC9085> f9451;
public boolean f9452;
public final C3743 f9453;
public boolean f9454;
public final C3720 f9455;
public int f9456;
public int f9457;
public final C3753 f9458;
public final C3746 f9459;
public boolean f9460;
public boolean f9461;
public Object f9462;
public AudioTrack f9463;
public final CopyOnWriteArraySet<InterfaceC8971> f9464;
public final InterfaceC3821[] f9465;
public SurfaceHolder f9466;
public List<C8968> f9467;
public final CopyOnWriteArraySet<InterfaceC7669> f9468;
public final Context f9469;
public SphericalGLSurfaceView f9470;
public final long f9471;
public int f9472;
public final CopyOnWriteArraySet<InterfaceC1691> f9473;
public final C3840 f9474;
public final CopyOnWriteArraySet<InterfaceC8762> f9475;
public int f9476;
public final SurfaceHolder$CallbackC3759 f9477;
public final C3793 f9478;
public Surface f9479;
public final C3761 f9480;
public C9049 f9481;
public final class SurfaceHolder$CallbackC3759 implements InterfaceC8748, InterfaceC9079, InterfaceC8971, InterfaceC7669, SurfaceHolder.Callback, TextureView.SurfaceTextureListener, SphericalGLSurfaceView.InterfaceC10927, C3743.InterfaceC3745, C3746.InterfaceC3748, C3753.InterfaceC3756, InterfaceC3828.InterfaceC3830, InterfaceC3800.InterfaceC3801 {
public SurfaceHolder$CallbackC3759(C3758 c3758) {
}
@Override
public void onAudioCodecError(Exception exc) {
C3757.this.f9445.onAudioCodecError(exc);
}
@Override
public void onAudioDecoderInitialized(String str, long j, long j2) {
C3757.this.f9445.onAudioDecoderInitialized(str, j, j2);
}
@Override
public void onAudioDecoderReleased(String str) {
C3757.this.f9445.onAudioDecoderReleased(str);
}
@Override
public void onAudioDisabled(C5955 c5955) {
C3757.this.f9445.onAudioDisabled(c5955);
Objects.requireNonNull(C3757.this);
Objects.requireNonNull(C3757.this);
}
@Override
public void onAudioEnabled(C5955 c5955) {
Objects.requireNonNull(C3757.this);
C3757.this.f9445.onAudioEnabled(c5955);
}
@Override
public void onAudioInputFormatChanged(C3737 c3737, C5960 c5960) {
Objects.requireNonNull(C3757.this);
C3757.this.f9445.onAudioInputFormatChanged(c3737, c5960);
}
@Override
public void onAudioPositionAdvancing(long j) {
C3757.this.f9445.onAudioPositionAdvancing(j);
}
@Override
public void onAudioSinkError(Exception exc) {
C3757.this.f9445.onAudioSinkError(exc);
}
@Override
public void onAudioUnderrun(int i, long j, long j2) {
C3757.this.f9445.onAudioUnderrun(i, j, j2);
}
@Override
public void onCues(List<C8968> list) {
C3757 c3757 = C3757.this;
c3757.f9467 = list;
Iterator<InterfaceC8971> it = c3757.f9464.iterator();
while (it.hasNext()) {
it.next().onCues(list);
}
}
@Override
public void onDroppedFrames(int i, long j) {
C3757.this.f9445.onDroppedFrames(i, j);
}
@Override
public void onIsLoadingChanged(boolean z) {
Objects.requireNonNull(C3757.this);
}
@Override
public void onMetadata(C7664 c7664) {
C3757.this.f9445.onMetadata(c7664);
final C3720 c3720 = C3757.this.f9455;
C3794.C3796 c3796 = new C3794.C3796(c3720.f9209, null);
int i = 0;
while (true) {
C7664.InterfaceC7666[] interfaceC7666Arr = c7664.f17013;
if (i >= interfaceC7666Arr.length) {
break;
}
interfaceC7666Arr[i].mo6658(c3796);
i++;
}
C3794 m4086 = c3796.m4086();
if (!m4086.equals(c3720.f9209)) {
c3720.f9209 = m4086;
C3310<InterfaceC3828.InterfaceC3830> c3310 = c3720.f9192;
c3310.m3406(15, new C3310.InterfaceC3311() {
@Override
public final void mo3407(Object obj) {
((InterfaceC3828.InterfaceC3830) obj).onMediaMetadataChanged(C3720.this.f9209);
}
});
c3310.m3404();
}
Iterator<InterfaceC7669> it = C3757.this.f9468.iterator();
while (it.hasNext()) {
it.next().onMetadata(c7664);
}
}
@Override
public void onPlayWhenReadyChanged(boolean z, int i) {
C3757.m4009(C3757.this);
}
@Override
public void onPlaybackStateChanged(int i) {
C3757.m4009(C3757.this);
}
@Override
public void onRenderedFirstFrame(Object obj, long j) {
C3757.this.f9445.onRenderedFirstFrame(obj, j);
C3757 c3757 = C3757.this;
if (c3757.f9462 == obj) {
Iterator<InterfaceC8762> it = c3757.f9475.iterator();
while (it.hasNext()) {
it.next().onRenderedFirstFrame();
}
}
}
@Override
public void onSkipSilenceEnabledChanged(boolean z) {
C3757 c3757 = C3757.this;
if (c3757.f9447 == z) {
return;
}
c3757.f9447 = z;
c3757.f9445.onSkipSilenceEnabledChanged(z);
Iterator<InterfaceC9085> it = c3757.f9451.iterator();
while (it.hasNext()) {
it.next().onSkipSilenceEnabledChanged(c3757.f9447);
}
}
@Override
public void onSurfaceTextureAvailable(SurfaceTexture surfaceTexture, int i, int i2) {
C3757 c3757 = C3757.this;
Objects.requireNonNull(c3757);
Surface surface = new Surface(surfaceTexture);
c3757.m4023(surface);
c3757.f9479 = surface;
C3757.this.m4019(i, i2);
}
@Override
public boolean onSurfaceTextureDestroyed(SurfaceTexture surfaceTexture) {
C3757.this.m4023(null);
C3757.this.m4019(0, 0);
return true;
}
@Override
public void onSurfaceTextureSizeChanged(SurfaceTexture surfaceTexture, int i, int i2) {
C3757.this.m4019(i, i2);
}
@Override
public void onSurfaceTextureUpdated(SurfaceTexture surfaceTexture) {
}
@Override
public void onVideoCodecError(Exception exc) {
C3757.this.f9445.onVideoCodecError(exc);
}
@Override
public void onVideoDecoderInitialized(String str, long j, long j2) {
C3757.this.f9445.onVideoDecoderInitialized(str, j, j2);
}
@Override
public void onVideoDecoderReleased(String str) {
C3757.this.f9445.onVideoDecoderReleased(str);
}
@Override
public void onVideoDisabled(C5955 c5955) {
C3757.this.f9445.onVideoDisabled(c5955);
Objects.requireNonNull(C3757.this);
Objects.requireNonNull(C3757.this);
}
@Override
public void onVideoEnabled(C5955 c5955) {
Objects.requireNonNull(C3757.this);
C3757.this.f9445.onVideoEnabled(c5955);
}
@Override
public void onVideoFrameProcessingOffset(long j, int i) {
C3757.this.f9445.onVideoFrameProcessingOffset(j, i);
}
@Override
public void onVideoInputFormatChanged(C3737 c3737, C5960 c5960) {
Objects.requireNonNull(C3757.this);
C3757.this.f9445.onVideoInputFormatChanged(c3737, c5960);
}
@Override
public void onVideoSizeChanged(C8738 c8738) {
Objects.requireNonNull(C3757.this);
C3757.this.f9445.onVideoSizeChanged(c8738);
Iterator<InterfaceC8762> it = C3757.this.f9475.iterator();
while (it.hasNext()) {
InterfaceC8762 next = it.next();
next.onVideoSizeChanged(c8738);
next.onVideoSizeChanged(c8738.f19450, c8738.f19452, c8738.f19451, c8738.f19453);
}
}
@Override
public void surfaceChanged(SurfaceHolder surfaceHolder, int i, int i2, int i3) {
C3757.this.m4019(i2, i3);
}
@Override
public void surfaceCreated(SurfaceHolder surfaceHolder) {
C3757 c3757 = C3757.this;
if (c3757.f9460) {
c3757.m4023(surfaceHolder.getSurface());
}
}
@Override
public void surfaceDestroyed(SurfaceHolder surfaceHolder) {
C3757 c3757 = C3757.this;
if (c3757.f9460) {
c3757.m4023(null);
}
C3757.this.m4019(0, 0);
}
@Override
public void mo4026(Surface surface) {
C3757.this.m4023(null);
}
@Override
public void mo4027(Surface surface) {
C3757.this.m4023(surface);
}
@Override
public void mo4028(boolean z) {
C3757.m4009(C3757.this);
}
}
public static final class C3760 {
public final Context f9483;
public InterfaceC3143 f9487;
public final InterfaceC3803 f9491;
public AbstractC1592 f9493;
public boolean f9495;
public C9725 f9496;
public InterfaceC3786 f9497;
public InterfaceC5892 f9498;
public Looper f9485 = C3335.m3511();
public C9049 f9490 = C9049.f20384;
public int f9492 = 1;
public boolean f9494 = true;
public C3777 f9482 = C3777.f9554;
public InterfaceC3841 f9489 = new C3823(0.97f, 1.03f, 1000, 1.0E-7f, C3788.m4084(20), C3788.m4084(500), 0.999f, null);
public InterfaceC3329 f9484 = InterfaceC3329.f8127;
public long f9486 = 500;
public long f9488 = 2000;
public C3760(Context context, InterfaceC3803 interfaceC3803, AbstractC1592 abstractC1592, InterfaceC3143 interfaceC3143, InterfaceC3786 interfaceC3786, InterfaceC5892 interfaceC5892, C9725 c9725) {
this.f9483 = context;
this.f9491 = interfaceC3803;
this.f9493 = abstractC1592;
this.f9487 = interfaceC3143;
this.f9497 = interfaceC3786;
this.f9498 = interfaceC5892;
this.f9496 = c9725;
}
}
public static final class C3761 implements InterfaceC8771, InterfaceC1833, C3733.InterfaceC3735 {
public InterfaceC1833 f9499;
public InterfaceC8771 f9500;
public InterfaceC8771 f9501;
public InterfaceC1833 f9502;
public C3761(C3758 c3758) {
}
@Override
public void mo1932() {
InterfaceC1833 interfaceC1833 = this.f9499;
if (interfaceC1833 != null) {
interfaceC1833.mo1932();
}
InterfaceC1833 interfaceC18332 = this.f9502;
if (interfaceC18332 != null) {
interfaceC18332.mo1932();
}
}
@Override
public void mo1933(long j, float[] fArr) {
InterfaceC1833 interfaceC1833 = this.f9499;
if (interfaceC1833 != null) {
interfaceC1833.mo1933(j, fArr);
}
InterfaceC1833 interfaceC18332 = this.f9502;
if (interfaceC18332 != null) {
interfaceC18332.mo1933(j, fArr);
}
}
@Override
public void mo1934(long j, long j2, C3737 c3737, MediaFormat mediaFormat) {
InterfaceC8771 interfaceC8771 = this.f9500;
if (interfaceC8771 != null) {
interfaceC8771.mo1934(j, j2, c3737, mediaFormat);
}
InterfaceC8771 interfaceC87712 = this.f9501;
if (interfaceC87712 != null) {
interfaceC87712.mo1934(j, j2, c3737, mediaFormat);
}
}
@Override
public void mo1928(int i, Object obj) {
if (i == 6) {
this.f9501 = (InterfaceC8771) obj;
} else if (i == 7) {
this.f9502 = (InterfaceC1833) obj;
} else if (i != 10000) {
} else {
SphericalGLSurfaceView sphericalGLSurfaceView = (SphericalGLSurfaceView) obj;
if (sphericalGLSurfaceView == null) {
this.f9500 = null;
this.f9499 = null;
return;
}
this.f9500 = sphericalGLSurfaceView.getVideoFrameMetadataListener();
this.f9499 = sphericalGLSurfaceView.getCameraMotionListener();
}
}
}
public C3757(C3760 c3760) {
C3757 c3757;
try {
Context applicationContext = c3760.f9483.getApplicationContext();
this.f9469 = applicationContext;
this.f9445 = c3760.f9496;
this.f9481 = c3760.f9490;
this.f9476 = c3760.f9492;
this.f9447 = false;
this.f9471 = c3760.f9488;
SurfaceHolder$CallbackC3759 surfaceHolder$CallbackC3759 = new SurfaceHolder$CallbackC3759(null);
this.f9477 = surfaceHolder$CallbackC3759;
this.f9480 = new C3761(null);
this.f9475 = new CopyOnWriteArraySet<>();
this.f9451 = new CopyOnWriteArraySet<>();
this.f9464 = new CopyOnWriteArraySet<>();
this.f9468 = new CopyOnWriteArraySet<>();
this.f9473 = new CopyOnWriteArraySet<>();
Handler handler = new Handler(c3760.f9485);
this.f9465 = ((C3842) c3760.f9491).m4113(handler, surfaceHolder$CallbackC3759, surfaceHolder$CallbackC3759, surfaceHolder$CallbackC3759, surfaceHolder$CallbackC3759);
this.f9448 = 1.0f;
if (C3335.f8136 < 21) {
AudioTrack audioTrack = this.f9463;
if (audioTrack != null && audioTrack.getAudioSessionId() != 0) {
this.f9463.release();
this.f9463 = null;
}
if (this.f9463 == null) {
this.f9463 = new AudioTrack(3, 4000, 4, 2, 2, 0, 0);
}
this.f9457 = this.f9463.getAudioSessionId();
} else {
UUID uuid = C3788.f9588;
AudioManager audioManager = (AudioManager) applicationContext.getSystemService("audio");
this.f9457 = audioManager == null ? -1 : audioManager.generateAudioSessionId();
}
this.f9467 = Collections.emptyList();
this.f9454 = true;
SparseBooleanArray sparseBooleanArray = new SparseBooleanArray();
int[] iArr = {15, 16, 17, 18, 19, 20, 21, 22};
for (int i = 0; i < 8; i++) {
int i2 = iArr[i];
C1804.m1910(!false);
sparseBooleanArray.append(i2, true);
}
C1804.m1910(!false);
try {
C3720 c3720 = new C3720(this.f9465, c3760.f9493, c3760.f9487, c3760.f9497, c3760.f9498, this.f9445, c3760.f9494, c3760.f9482, c3760.f9489, c3760.f9486, false, c3760.f9484, c3760.f9485, this, new InterfaceC3828.C3832(new C3326(sparseBooleanArray, null), null));
c3757 = this;
try {
c3757.f9455 = c3720;
c3720.mo3842(c3757.f9477);
c3720.f9202.add(c3757.f9477);
C3746 c3746 = new C3746(c3760.f9483, handler, c3757.f9477);
c3757.f9459 = c3746;
c3746.m3987(false);
C3743 c3743 = new C3743(c3760.f9483, handler, c3757.f9477);
c3757.f9453 = c3743;
c3743.m3983(null);
C3753 c3753 = new C3753(c3760.f9483, handler, c3757.f9477);
c3757.f9458 = c3753;
c3753.m4006(C3335.m3490(c3757.f9481.f20386));
C3840 c3840 = new C3840(c3760.f9483);
c3757.f9474 = c3840;
c3840.f9758 = false;
c3840.m4112();
C3793 c3793 = new C3793(c3760.f9483);
c3757.f9478 = c3793;
c3793.f9600 = false;
c3793.m4085();
c3757.f9450 = m4010(c3753);
c3757.m4025(1, 102, Integer.valueOf(c3757.f9457));
c3757.m4025(2, 102, Integer.valueOf(c3757.f9457));
c3757.m4025(1, 3, c3757.f9481);
c3757.m4025(2, 4, Integer.valueOf(c3757.f9476));
c3757.m4025(1, 101, Boolean.valueOf(c3757.f9447));
c3757.m4025(2, 6, c3757.f9480);
c3757.m4025(6, 7, c3757.f9480);
c3757.f9449.m3416();
} catch (Throwable th) {
th = th;
c3757.f9449.m3416();
throw th;
}
} catch (Throwable th2) {
th = th2;
c3757 = this;
}
} catch (Throwable th3) {
th = th3;
c3757 = this;
}
}
public static int m4008(boolean z, int i) {
return (!z || i == 1) ? 1 : 2;
}
public static void m4009(C3757 c3757) {
int mo3868 = c3757.mo3868();
boolean z = true;
if (mo3868 != 1) {
if (mo3868 == 2 || mo3868 == 3) {
c3757.m4013();
boolean z2 = c3757.f9455.f9195.f9381;
C3840 c3840 = c3757.f9474;
if (!c3757.mo3844() || z2) {
z = false;
}
c3840.f9760 = z;
c3840.m4112();
C3793 c3793 = c3757.f9478;
c3793.f9602 = c3757.mo3844();
c3793.m4085();
return;
} else if (mo3868 != 4) {
throw new IllegalStateException();
}
}
C3840 c38402 = c3757.f9474;
c38402.f9760 = false;
c38402.m4112();
C3793 c37932 = c3757.f9478;
c37932.f9602 = false;
c37932.m4085();
}
public static C1690 m4010(C3753 c3753) {
Objects.requireNonNull(c3753);
return new C1690(0, C3335.f8136 >= 28 ? c3753.f9441.getStreamMinVolume(c3753.f9443) : 0, c3753.f9441.getStreamMaxVolume(c3753.f9443));
}
@Override
public long getCurrentPosition() {
m4013();
return this.f9455.getCurrentPosition();
}
@Override
public long getDuration() {
m4013();
return this.f9455.getDuration();
}
public void m4011() {
String str;
boolean z;
AudioTrack audioTrack;
m4013();
if (C3335.f8136 < 21 && (audioTrack = this.f9463) != null) {
audioTrack.release();
this.f9463 = null;
}
this.f9459.m3987(false);
C3753 c3753 = this.f9458;
C3753.C3755 c3755 = c3753.f9439;
if (c3755 != null) {
try {
c3753.f9437.unregisterReceiver(c3755);
} catch (RuntimeException e) {
C3309.m3403("StreamVolumeManager", "Error unregistering stream volume receiver", e);
}
c3753.f9439 = null;
}
C3840 c3840 = this.f9474;
c3840.f9760 = false;
c3840.m4112();
C3793 c3793 = this.f9478;
c3793.f9602 = false;
c3793.m4085();
C3743 c3743 = this.f9453;
c3743.f9395 = null;
c3743.m3982();
C3720 c3720 = this.f9455;
Objects.requireNonNull(c3720);
String hexString = Integer.toHexString(System.identityHashCode(c3720));
String str2 = C3335.f8140;
HashSet<String> hashSet = C3782.f9579;
synchronized (C3782.class) {
str = C3782.f9580;
}
StringBuilder m8057 = C9125.m8057(C9125.m8079(str, C9125.m8079(str2, C9125.m8079(hexString, 36))), "Release ", hexString, " [", "ExoPlayerLib/2.14.2");
C9125.m8126(m8057, "] [", str2, "] [", str);
m8057.append("]");
Log.i("ExoPlayerImpl", m8057.toString());
C3723 c3723 = c3720.f9212;
synchronized (c3723) {
if (!c3723.f9234 && c3723.f9222.isAlive()) {
((C3293) c3723.f9249).m3365(7);
long j = c3723.f9223;
synchronized (c3723) {
long mo3373 = c3723.f9239.mo3373() + j;
boolean z2 = false;
while (!Boolean.valueOf(c3723.f9234).booleanValue() && j > 0) {
try {
c3723.f9239.mo3371();
c3723.wait(j);
} catch (InterruptedException unused) {
z2 = true;
}
j = mo3373 - c3723.f9239.mo3373();
}
if (z2) {
Thread.currentThread().interrupt();
}
z = c3723.f9234;
}
}
z = true;
}
if (!z) {
C3310<InterfaceC3828.InterfaceC3830> c3310 = c3720.f9192;
c3310.m3406(11, new C3310.InterfaceC3311() {
@Override
public final void mo3407(Object obj) {
((InterfaceC3828.InterfaceC3830) obj).onPlayerError(C3764.m4039(new C3719(1)));
}
});
c3310.m3404();
}
c3720.f9192.m3405();
((C3293) c3720.f9214).f8045.removeCallbacksAndMessages(null);
C9725 c9725 = c3720.f9193;
if (c9725 != null) {
c3720.f9211.mo5510(c9725);
}
C3742 m3981 = c3720.f9195.m3981(1);
c3720.f9195 = m3981;
C3742 m3974 = m3981.m3974(m3981.f9384);
c3720.f9195 = m3974;
m3974.f9389 = m3974.f9387;
c3720.f9195.f9392 = 0L;
C9725 c97252 = this.f9445;
final InterfaceC9733.C9734 m8534 = c97252.m8534();
c97252.f21858.put(1036, m8534);
C3310<InterfaceC9733> c33102 = c97252.f21859;
C3310.InterfaceC3311 interfaceC3311 = new C3310.InterfaceC3311() {
@Override
public final void mo3407(Object obj) {
((InterfaceC9733) obj).onPlayerReleased(InterfaceC9733.C9734.this);
}
};
C3293 c3293 = (C3293) c33102.f8091;
Objects.requireNonNull(c3293);
C3293.C3295 m3362 = C3293.m3362();
m3362.f8046 = c3293.f8045.obtainMessage(1, 1036, 0, interfaceC3311);
m3362.m3368();
m4017();
Surface surface = this.f9479;
if (surface != null) {
surface.release();
this.f9479 = null;
}
if (!this.f9461) {
this.f9467 = Collections.emptyList();
return;
}
throw null;
}
public void m4012() {
m4013();
m4017();
m4023(null);
m4019(0, 0);
}
public final void m4013() {
C3318 c3318 = this.f9449;
synchronized (c3318) {
boolean z = false;
while (!c3318.f8110) {
try {
c3318.wait();
} catch (InterruptedException unused) {
z = true;
}
}
if (z) {
Thread.currentThread().interrupt();
}
}
if (Thread.currentThread() != this.f9455.f9197.getThread()) {
String m3507 = C3335.m3507("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(), this.f9455.f9197.getThread().getName());
if (!this.f9454) {
C3309.m3403("SimpleExoPlayer", m3507, this.f9452 ? null : new IllegalStateException());
this.f9452 = true;
return;
}
throw new IllegalStateException(m3507);
}
}
@Override
public AbstractC1592 mo3827() {
m4013();
return this.f9455.f9194;
}
public void m4014(int i, int i2) {
m4013();
this.f9455.m3835(i, i2);
}
public final void m4015(boolean z, int i, int i2) {
int i3 = 0;
boolean z2 = z && i != -1;
if (z2 && i != 1) {
i3 = 1;
}
this.f9455.m3846(z2, i3, i2);
}
@Override
public int mo3829() {
m4013();
return this.f9455.f9195.f9375;
}
@Override
public void mo3830(SurfaceView surfaceView) {
m4013();
SurfaceHolder holder = surfaceView == null ? null : surfaceView.getHolder();
m4013();
if (holder == null || holder != this.f9466) {
return;
}
m4012();
}
public void m4016(float f) {
m4013();
float m3524 = C3335.m3524(f, 0.0f, 1.0f);
if (this.f9448 == m3524) {
return;
}
this.f9448 = m3524;
m4025(1, 2, Float.valueOf(this.f9453.f9401 * m3524));
this.f9445.onVolumeChanged(m3524);
Iterator<InterfaceC9085> it = this.f9451.iterator();
while (it.hasNext()) {
it.next().onVolumeChanged(m3524);
}
}
@Override
public boolean mo3833() {
m4013();
return this.f9455.f9201;
}
@Override
public long mo3834() {
m4013();
return this.f9455.mo3834();
}
public final void m4017() {
if (this.f9470 != null) {
C3733 m3832 = this.f9455.m3832(this.f9480);
m3832.m3948(10000);
m3832.m3945(null);
m3832.m3947();
SphericalGLSurfaceView sphericalGLSurfaceView = this.f9470;
sphericalGLSurfaceView.f24710.remove(this.f9477);
this.f9470 = null;
}
TextureView textureView = this.f9446;
if (textureView != null) {
if (textureView.getSurfaceTextureListener() != this.f9477) {
Log.w("SimpleExoPlayer", "SurfaceTextureListener already unset or replaced.");
} else {
this.f9446.setSurfaceTextureListener(null);
}
this.f9446 = null;
}
SurfaceHolder surfaceHolder = this.f9466;
if (surfaceHolder != null) {
surfaceHolder.removeCallback(this.f9477);
this.f9466 = null;
}
}
@Override
public AbstractC3749 mo3836() {
m4013();
return this.f9455.f9195.f9376;
}
@Deprecated
public void m4018(boolean z) {
m4013();
this.f9453.m3984(mo3844(), 1);
this.f9455.m3861(z, null);
this.f9467 = Collections.emptyList();
}
@Override
public long mo3838() {
m4013();
return this.f9455.mo3838();
}
@Override
public int mo3839() {
m4013();
return this.f9455.f9208;
}
@Override
public int mo3840() {
m4013();
return this.f9455.mo3840();
}
@Override
public void mo3841() {
m4013();
boolean mo3844 = mo3844();
int m3984 = this.f9453.m3984(mo3844, 2);
m4015(mo3844, m3984, m4008(mo3844, m3984));
this.f9455.mo3841();
}
@Override
@Deprecated
public void mo3842(InterfaceC3828.InterfaceC3830 interfaceC3830) {
Objects.requireNonNull(interfaceC3830);
this.f9455.mo3842(interfaceC3830);
}
public final void m4019(int i, int i2) {
if (i == this.f9472 && i2 == this.f9456) {
return;
}
this.f9472 = i;
this.f9456 = i2;
this.f9445.onSurfaceSizeChanged(i, i2);
Iterator<InterfaceC8762> it = this.f9475.iterator();
while (it.hasNext()) {
it.next().onSurfaceSizeChanged(i, i2);
}
}
@Override
public int mo3843() {
m4013();
return this.f9455.mo3843();
}
@Override
public boolean mo3844() {
m4013();
return this.f9455.f9195.f9388;
}
@Override
public InterfaceC3828.C3832 mo3845() {
m4013();
return this.f9455.f9213;
}
public final void m4020(SurfaceHolder surfaceHolder) {
this.f9460 = false;
this.f9466 = surfaceHolder;
surfaceHolder.addCallback(this.f9477);
Surface surface = this.f9466.getSurface();
if (surface != null && surface.isValid()) {
Rect surfaceFrame = this.f9466.getSurfaceFrame();
m4019(surfaceFrame.width(), surfaceFrame.height());
return;
}
m4019(0, 0);
}
@Override
public int mo3847() {
m4013();
return this.f9455.mo3847();
}
@Override
public Looper mo3848() {
return this.f9455.f9197;
}
@Override
public List<C8968> mo3849() {
m4013();
return this.f9467;
}
@Override
public int mo3850() {
m4013();
return this.f9455.mo3850();
}
@Override
public void mo3851(InterfaceC3828.InterfaceC3831 interfaceC3831) {
Objects.requireNonNull(interfaceC3831);
this.f9451.add(interfaceC3831);
this.f9475.add(interfaceC3831);
this.f9464.add(interfaceC3831);
this.f9468.add(interfaceC3831);
this.f9473.add(interfaceC3831);
mo3842(interfaceC3831);
}
public void m4021(Surface surface) {
m4013();
m4017();
m4023(surface);
int i = surface == null ? 0 : -1;
m4019(i, i);
}
@Override
public C3806 mo3853() {
m4013();
return this.f9455.f9195.f9382;
}
@Override
public void mo3854(TextureView textureView) {
m4013();
if (textureView == null || textureView != this.f9446) {
return;
}
m4012();
}
@Override
public C3145 mo3855() {
m4013();
return this.f9455.f9195.f9390;
}
public void m4022(InterfaceC9733 interfaceC9733) {
Objects.requireNonNull(interfaceC9733);
C9725 c9725 = this.f9445;
Objects.requireNonNull(c9725);
C3310<InterfaceC9733> c3310 = c9725.f21859;
if (c3310.f8094) {
return;
}
c3310.f8092.add(new C3310.C3312<>(interfaceC9733));
}
@Override
public long mo3857() {
m4013();
return C3788.m4083(this.f9455.f9195.f9392);
}
@Override
public void mo3858(C3806 c3806) {
m4013();
this.f9455.mo3858(c3806);
}
@Override
public void mo3859(InterfaceC3828.InterfaceC3831 interfaceC3831) {
Objects.requireNonNull(interfaceC3831);
this.f9451.remove(interfaceC3831);
this.f9475.remove(interfaceC3831);
this.f9464.remove(interfaceC3831);
this.f9468.remove(interfaceC3831);
this.f9473.remove(interfaceC3831);
this.f9455.mo3869(interfaceC3831);
}
@Override
public List<C7664> mo3860() {
m4013();
return this.f9455.f9195.f9383;
}
public final void m4023(Object obj) {
InterfaceC3821[] interfaceC3821Arr;
ArrayList arrayList = new ArrayList();
for (InterfaceC3821 interfaceC3821 : this.f9465) {
if (interfaceC3821.getTrackType() == 2) {
C3733 m3832 = this.f9455.m3832(interfaceC3821);
m3832.m3948(1);
C1804.m1910(true ^ m3832.f9289);
m3832.f9296 = obj;
m3832.m3947();
arrayList.add(m3832);
}
}
Object obj2 = this.f9462;
if (obj2 != null && obj2 != obj) {
try {
Iterator it = arrayList.iterator();
while (it.hasNext()) {
((C3733) it.next()).m3943(this.f9471);
}
} catch (InterruptedException unused) {
Thread.currentThread().interrupt();
} catch (TimeoutException unused2) {
this.f9455.m3861(false, C3764.m4039(new C3719(3)));
}
Object obj3 = this.f9462;
Surface surface = this.f9479;
if (obj3 == surface) {
surface.release();
this.f9479 = null;
}
}
this.f9462 = obj;
}
@Override
public void mo3862(int i, long j) {
m4013();
C9725 c9725 = this.f9445;
if (!c9725.f21856) {
final InterfaceC9733.C9734 m8534 = c9725.m8534();
c9725.f21856 = true;
C3310.InterfaceC3311<InterfaceC9733> interfaceC3311 = new C3310.InterfaceC3311() {
@Override
public final void mo3407(Object obj) {
((InterfaceC9733) obj).onSeekStarted(InterfaceC9733.C9734.this);
}
};
c9725.f21858.put(-1, m8534);
C3310<InterfaceC9733> c3310 = c9725.f21859;
c3310.m3406(-1, interfaceC3311);
c3310.m3404();
}
this.f9455.mo3862(i, j);
}
@Override
public void mo3863(boolean z) {
m4013();
this.f9455.mo3863(z);
}
@Override
public boolean mo3864() {
m4013();
return this.f9455.mo3864();
}
@Override
public long mo3865() {
m4013();
return this.f9455.mo3865();
}
@Override
public void mo3866(int i) {
m4013();
this.f9455.mo3866(i);
}
@Override
public C3764 mo3867() {
m4013();
return this.f9455.f9195.f9391;
}
@Override
public int mo3868() {
m4013();
return this.f9455.f9195.f9380;
}
@Override
@Deprecated
public void mo3869(InterfaceC3828.InterfaceC3830 interfaceC3830) {
this.f9455.mo3869(interfaceC3830);
}
public void m4024(InterfaceC3158 interfaceC3158) {
m4013();
C3720 c3720 = this.f9455;
Objects.requireNonNull(c3720);
List singletonList = Collections.singletonList(interfaceC3158);
c3720.m3826();
c3720.getCurrentPosition();
c3720.f9200++;
if (!c3720.f9210.isEmpty()) {
c3720.m3870(0, c3720.f9210.size());
}
ArrayList arrayList = new ArrayList();
for (int i = 0; i < singletonList.size(); i++) {
C3771.C3773 c3773 = new C3771.C3773((InterfaceC3158) singletonList.get(i), c3720.f9189);
arrayList.add(c3773);
c3720.f9210.add(i + 0, new C3720.C3721(c3773.f9547, c3773.f9544.f7629));
}
InterfaceC3194 mo3288 = c3720.f9190.mo3288(0, arrayList.size());
c3720.f9190 = mo3288;
C3844 c3844 = new C3844(c3720.f9210, mo3288);
if (!c3844.m3992() && -1 >= c3844.f9766) {
throw new C3848(c3844, -1, -9223372036854775807L);
}
int mo3292 = c3844.mo3292(c3720.f9201);
C3742 m3825 = c3720.m3825(c3720.f9195, c3844, c3720.m3837(c3844, mo3292, -9223372036854775807L));
int i2 = m3825.f9380;
if (mo3292 != -1 && i2 != 1) {
i2 = (c3844.m3992() || mo3292 >= c3844.f9766) ? 4 : 2;
}
C3742 m3981 = m3825.m3981(i2);
((C3293.C3295) ((C3293) c3720.f9212.f9249).m3364(17, new C3723.C3724(arrayList, c3720.f9190, mo3292, C3788.m4084(-9223372036854775807L), null))).m3368();
c3720.m3831(m3981, 0, 1, false, (c3720.f9195.f9384.f7697.equals(m3981.f9384.f7697) || c3720.f9195.f9376.m3992()) ? false : true, 4, c3720.m3856(m3981), -1);
}
@Override
public C1602 mo3871() {
m4013();
return this.f9455.mo3871();
}
@Override
public void mo3872(boolean z) {
m4013();
int m3984 = this.f9453.m3984(z, mo3868());
m4015(z, m3984, m4008(z, m3984));
}
@Override
public void mo3873(TextureView textureView) {
m4013();
if (textureView == null) {
m4012();
return;
}
m4017();
this.f9446 = textureView;
if (textureView.getSurfaceTextureListener() != null) {
Log.w("SimpleExoPlayer", "Replacing existing SurfaceTextureListener.");
}
textureView.setSurfaceTextureListener(this.f9477);
SurfaceTexture surfaceTexture = textureView.isAvailable() ? textureView.getSurfaceTexture() : null;
if (surfaceTexture == null) {
m4023(null);
m4019(0, 0);
return;
}
Surface surface = new Surface(surfaceTexture);
m4023(surface);
this.f9479 = surface;
m4019(textureView.getWidth(), textureView.getHeight());
}
@Override
public void mo3874(SurfaceView surfaceView) {
m4013();
if (surfaceView instanceof InterfaceC8750) {
m4017();
m4023(surfaceView);
m4020(surfaceView.getHolder());
} else if (surfaceView instanceof SphericalGLSurfaceView) {
m4017();
this.f9470 = (SphericalGLSurfaceView) surfaceView;
C3733 m3832 = this.f9455.m3832(this.f9480);
m3832.m3948(10000);
m3832.m3945(this.f9470);
m3832.m3947();
this.f9470.f24710.add(this.f9477);
m4023(this.f9470.getVideoSurface());
m4020(surfaceView.getHolder());
} else {
SurfaceHolder holder = surfaceView == null ? null : surfaceView.getHolder();
m4013();
if (holder == null) {
m4012();
return;
}
m4017();
this.f9460 = true;
this.f9466 = holder;
holder.addCallback(this.f9477);
Surface surface = holder.getSurface();
if (surface != null && surface.isValid()) {
m4023(surface);
Rect surfaceFrame = holder.getSurfaceFrame();
m4019(surfaceFrame.width(), surfaceFrame.height());
return;
}
m4023(null);
m4019(0, 0);
}
}
public final void m4025(int i, int i2, Object obj) {
InterfaceC3821[] interfaceC3821Arr;
for (InterfaceC3821 interfaceC3821 : this.f9465) {
if (interfaceC3821.getTrackType() == i) {
C3733 m3832 = this.f9455.m3832(interfaceC3821);
C1804.m1910(!m3832.f9289);
m3832.f9290 = i2;
C1804.m1910(!m3832.f9289);
m3832.f9296 = obj;
m3832.m3947();
}
}
}
}