Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,147 @@
package com.fyber.inneractive.sdk.player.exoplayer2;
import java.io.IOException;
/* loaded from: classes2.dex */
public abstract class a implements o {
public final int a;
public p b;
public int c;
public com.fyber.inneractive.sdk.player.exoplayer2.source.q d;
public long e;
public boolean f = true;
public boolean g;
public a(int i) {
this.a = i;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final void a(p pVar, j[] jVarArr, com.fyber.inneractive.sdk.player.exoplayer2.source.q qVar, long j, boolean z, long j2) throws d {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.c == 0);
this.b = pVar;
this.c = 1;
a(z);
a(jVarArr, qVar, j2);
a(z, j);
}
public abstract void a(boolean z) throws d;
public abstract void a(boolean z, long j) throws d;
public void a(j[] jVarArr) throws d {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final boolean b() {
return this.f;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final void c() {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.c == 1);
this.c = 0;
this.d = null;
this.g = false;
n();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final com.fyber.inneractive.sdk.player.exoplayer2.source.q d() {
return this.d;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final int e() {
return this.c;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final void f() {
this.g = true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final void g() throws IOException {
this.d.a();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final boolean h() {
return this.g;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public com.fyber.inneractive.sdk.player.exoplayer2.util.g j() {
return null;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final int k() {
return this.a;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final a l() {
return this;
}
public abstract void n();
public abstract void o() throws d;
public abstract void p() throws d;
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final void setIndex(int i) {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final void start() throws d {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.c == 1);
this.c = 2;
o();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final void stop() throws d {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.c == 2);
this.c = 1;
p();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final void a(j[] jVarArr, com.fyber.inneractive.sdk.player.exoplayer2.source.q qVar, long j) throws d {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(!this.g);
this.d = qVar;
this.f = false;
this.e = j;
a(jVarArr);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final void a(long j) throws d {
this.g = false;
this.f = false;
a(false, j);
}
public final int a(k kVar, com.fyber.inneractive.sdk.player.exoplayer2.decoder.b bVar, boolean z) {
int a = this.d.a(kVar, bVar, z);
if (a == -4) {
if (bVar.a(4)) {
this.f = true;
return this.g ? -4 : -3;
}
bVar.d += this.e;
} else if (a == -5) {
j jVar = kVar.a;
long j = jVar.w;
if (j != Long.MAX_VALUE) {
kVar.a = new j(jVar.a, jVar.e, jVar.f, jVar.c, jVar.b, jVar.g, jVar.j, jVar.k, jVar.l, jVar.m, jVar.n, jVar.p, jVar.o, jVar.q, jVar.r, jVar.s, jVar.t, jVar.u, jVar.v, jVar.x, jVar.y, jVar.z, j + this.e, jVar.h, jVar.i, jVar.d);
}
}
return a;
}
}

View File

@@ -0,0 +1,154 @@
package com.fyber.inneractive.sdk.player.exoplayer2.audio;
import android.os.Handler;
import com.fyber.inneractive.sdk.player.exoplayer2.decoder.DecoderCounters;
import com.fyber.inneractive.sdk.player.exoplayer2.j;
/* loaded from: classes2.dex */
public interface AudioRendererEventListener {
public static final class EventDispatcher {
private final Handler handler;
private final AudioRendererEventListener listener;
public class a implements Runnable {
public final /* synthetic */ DecoderCounters a;
public a(DecoderCounters decoderCounters) {
this.a = decoderCounters;
}
@Override // java.lang.Runnable
public final void run() {
EventDispatcher.this.listener.onAudioEnabled(this.a);
}
}
public class b implements Runnable {
public final /* synthetic */ String a;
public final /* synthetic */ long b;
public final /* synthetic */ long c;
public b(String str, long j, long j2) {
this.a = str;
this.b = j;
this.c = j2;
}
@Override // java.lang.Runnable
public final void run() {
EventDispatcher.this.listener.onAudioDecoderInitialized(this.a, this.b, this.c);
}
}
public class c implements Runnable {
public final /* synthetic */ j a;
public c(j jVar) {
this.a = jVar;
}
@Override // java.lang.Runnable
public final void run() {
EventDispatcher.this.listener.onAudioInputFormatChanged(this.a);
}
}
public class d implements Runnable {
public final /* synthetic */ int a;
public final /* synthetic */ long b;
public final /* synthetic */ long c;
public d(int i, long j, long j2) {
this.a = i;
this.b = j;
this.c = j2;
}
@Override // java.lang.Runnable
public final void run() {
EventDispatcher.this.listener.onAudioTrackUnderrun(this.a, this.b, this.c);
}
}
public class e implements Runnable {
public final /* synthetic */ DecoderCounters a;
public e(DecoderCounters decoderCounters) {
this.a = decoderCounters;
}
@Override // java.lang.Runnable
public final void run() {
this.a.ensureUpdated();
EventDispatcher.this.listener.onAudioDisabled(this.a);
}
}
public class f implements Runnable {
public final /* synthetic */ int a;
public f(int i) {
this.a = i;
}
@Override // java.lang.Runnable
public final void run() {
EventDispatcher.this.listener.onAudioSessionId(this.a);
}
}
public EventDispatcher(Handler handler, AudioRendererEventListener audioRendererEventListener) {
this.handler = audioRendererEventListener != null ? (Handler) com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(handler) : null;
this.listener = audioRendererEventListener;
}
public void audioSessionId(int i) {
if (this.listener != null) {
this.handler.post(new f(i));
}
}
public void audioTrackUnderrun(int i, long j, long j2) {
if (this.listener != null) {
this.handler.post(new d(i, j, j2));
}
}
public void decoderInitialized(String str, long j, long j2) {
if (this.listener != null) {
this.handler.post(new b(str, j, j2));
}
}
public void disabled(DecoderCounters decoderCounters) {
if (this.listener != null) {
this.handler.post(new e(decoderCounters));
}
}
public void enabled(DecoderCounters decoderCounters) {
if (this.listener != null) {
this.handler.post(new a(decoderCounters));
}
}
public void inputFormatChanged(j jVar) {
if (this.listener != null) {
this.handler.post(new c(jVar));
}
}
}
void onAudioDecoderInitialized(String str, long j, long j2);
void onAudioDisabled(DecoderCounters decoderCounters);
void onAudioEnabled(DecoderCounters decoderCounters);
void onAudioInputFormatChanged(j jVar);
void onAudioSessionId(int i);
void onAudioTrackUnderrun(int i, long j, long j2);
}

View File

@@ -0,0 +1,324 @@
package com.fyber.inneractive.sdk.player.exoplayer2.audio;
import android.annotation.TargetApi;
import android.media.MediaCodec;
import android.media.MediaCrypto;
import android.media.MediaFormat;
import android.os.SystemClock;
import android.view.Surface;
import com.fyber.inneractive.sdk.player.exoplayer2.audio.AudioRendererEventListener;
import com.fyber.inneractive.sdk.player.exoplayer2.audio.c;
import com.fyber.inneractive.sdk.player.exoplayer2.decoder.DecoderCounters;
import com.fyber.inneractive.sdk.player.exoplayer2.j;
import com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.d;
import com.fyber.inneractive.sdk.player.exoplayer2.n;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.nio.ByteBuffer;
@TargetApi(16)
/* loaded from: classes2.dex */
public class MediaCodecAudioRenderer extends com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b implements com.fyber.inneractive.sdk.player.exoplayer2.util.g {
public final AudioRendererEventListener.EventDispatcher P;
public final c Q;
public boolean R;
public int S;
public int T;
public long U;
public boolean V;
public final class a implements c.f {
public a() {
}
public /* synthetic */ a(MediaCodecAudioRenderer mediaCodecAudioRenderer, int i) {
this();
}
}
public MediaCodecAudioRenderer() {
this(0);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.a a(com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.c cVar, j jVar) throws d.b {
String str = jVar.f;
this.Q.getClass();
return cVar.a(false, jVar.f);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final int b(com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.c cVar, j jVar) throws d.b {
int i;
int i2;
String str = jVar.f;
if (!com.fyber.inneractive.sdk.player.exoplayer2.util.h.c(str)) {
return 0;
}
int i3 = s.a;
int i4 = i3 >= 21 ? 16 : 0;
this.Q.getClass();
com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.a a2 = cVar.a(false, str);
if (a2 == null) {
return 1;
}
return ((i3 < 21 || (((i = jVar.s) == -1 || a2.b(i)) && ((i2 = jVar.r) == -1 || a2.a(i2)))) ? 3 : 2) | i4 | 4;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final boolean isReady() {
if (!this.Q.b()) {
if (this.n != null) {
if ((this.f ? this.g : this.d.isReady()) || this.D >= 0 || (this.B != C.TIME_UNSET && SystemClock.elapsedRealtime() < this.B)) {
}
}
return false;
}
return true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.a, com.fyber.inneractive.sdk.player.exoplayer2.o
public final com.fyber.inneractive.sdk.player.exoplayer2.util.g j() {
return this;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.util.g
public final long m() {
long a2 = this.Q.a(a());
if (a2 != Long.MIN_VALUE) {
if (!this.V) {
a2 = Math.max(this.U, a2);
}
this.U = a2;
this.V = false;
}
return this.U;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.a
public final void o() {
this.Q.d();
}
public MediaCodecAudioRenderer(int i) {
this(new b[0]);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.util.g
public final n i() {
return this.Q.s;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.a
public final void n() {
try {
c cVar = this.Q;
cVar.e();
for (b bVar : cVar.c) {
bVar.reset();
}
cVar.Z = 0;
cVar.Y = false;
try {
this.n = null;
u();
} finally {
}
} catch (Throwable th) {
try {
this.n = null;
u();
throw th;
} finally {
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.a
public final void p() {
c cVar = this.Q;
cVar.Y = false;
if (cVar.c()) {
cVar.z = 0L;
cVar.y = 0;
cVar.x = 0;
cVar.A = 0L;
cVar.B = false;
cVar.C = 0L;
cVar.g.d();
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final void v() throws com.fyber.inneractive.sdk.player.exoplayer2.d {
try {
c cVar = this.Q;
if (!cVar.X && cVar.c() && cVar.a()) {
cVar.g.a(cVar.o ? cVar.J : cVar.I / cVar.H);
cVar.w = 0;
cVar.X = true;
}
} catch (c.h e) {
throw new com.fyber.inneractive.sdk.player.exoplayer2.d(e);
}
}
public MediaCodecAudioRenderer(b... bVarArr) {
super(1, true);
this.Q = new c(bVarArr, new a(this, 0));
this.P = new AudioRendererEventListener.EventDispatcher(null, null);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.a aVar, MediaCodec mediaCodec, j jVar) {
boolean z;
String str = aVar.a;
if (s.a < 24 && "OMX.SEC.aac.dec".equals(str) && "samsung".equals(s.c)) {
String str2 = s.b;
if (str2.startsWith("zeroflte") || str2.startsWith("herolte") || str2.startsWith("heroqlte")) {
z = true;
this.R = z;
mediaCodec.configure(jVar.a(), (Surface) null, (MediaCrypto) null, 0);
}
}
z = false;
this.R = z;
mediaCodec.configure(jVar.a(), (Surface) null, (MediaCrypto) null, 0);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final void a(String str, long j, long j2) {
this.P.decoderInitialized(str, j, j2);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final void a(j jVar) throws com.fyber.inneractive.sdk.player.exoplayer2.d {
super.a(jVar);
this.P.inputFormatChanged(jVar);
this.S = MimeTypes.AUDIO_RAW.equals(jVar.f) ? jVar.t : 2;
this.T = jVar.r;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final void a(MediaCodec mediaCodec, MediaFormat mediaFormat) throws com.fyber.inneractive.sdk.player.exoplayer2.d {
int[] iArr;
int i;
int integer = mediaFormat.getInteger("channel-count");
int integer2 = mediaFormat.getInteger("sample-rate");
if (this.R && integer == 6 && (i = this.T) < 6) {
iArr = new int[i];
for (int i2 = 0; i2 < this.T; i2++) {
iArr[i2] = i2;
}
} else {
iArr = null;
}
try {
this.Q.a(integer, integer2, this.S, iArr);
} catch (c.d e) {
throw new com.fyber.inneractive.sdk.player.exoplayer2.d(e);
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b, com.fyber.inneractive.sdk.player.exoplayer2.a
public final void a(boolean z, long j) throws com.fyber.inneractive.sdk.player.exoplayer2.d {
super.a(z, j);
this.Q.e();
this.U = j;
this.V = true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.util.g
public final n a(n nVar) {
return this.Q.a(nVar);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final boolean a(long j, long j2, MediaCodec mediaCodec, ByteBuffer byteBuffer, int i, long j3, boolean z) throws com.fyber.inneractive.sdk.player.exoplayer2.d {
if (z) {
mediaCodec.releaseOutputBuffer(i, false);
this.N.skippedOutputBufferCount++;
c cVar = this.Q;
if (cVar.L == 1) {
cVar.L = 2;
}
return true;
}
try {
if (!this.Q.a(byteBuffer, j3)) {
return false;
}
mediaCodec.releaseOutputBuffer(i, false);
this.N.renderedOutputBufferCount++;
return true;
} catch (c.e | c.h e) {
throw new com.fyber.inneractive.sdk.player.exoplayer2.d(e);
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.a
public final void a(boolean z) throws com.fyber.inneractive.sdk.player.exoplayer2.d {
DecoderCounters decoderCounters = new DecoderCounters();
this.N = decoderCounters;
this.P.enabled(decoderCounters);
int i = this.b.a;
if (i != 0) {
c cVar = this.Q;
cVar.getClass();
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(s.a >= 21);
if (cVar.a0 && cVar.Z == i) {
return;
}
cVar.a0 = true;
cVar.Z = i;
cVar.e();
return;
}
c cVar2 = this.Q;
if (cVar2.a0) {
cVar2.a0 = false;
cVar2.Z = 0;
cVar2.e();
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.e.b
public final void a(int i, Object obj) throws com.fyber.inneractive.sdk.player.exoplayer2.d {
if (i == 2) {
c cVar = this.Q;
float floatValue = ((Float) obj).floatValue();
if (cVar.P != floatValue) {
cVar.P = floatValue;
cVar.g();
return;
}
return;
}
if (i != 3) {
return;
}
int intValue = ((Integer) obj).intValue();
c cVar2 = this.Q;
if (cVar2.n == intValue) {
return;
}
cVar2.n = intValue;
if (cVar2.a0) {
return;
}
cVar2.e();
cVar2.Z = 0;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b, com.fyber.inneractive.sdk.player.exoplayer2.o
public final boolean a() {
if (this.L) {
c cVar = this.Q;
if (!cVar.c() || (cVar.X && !cVar.b())) {
return true;
}
}
return false;
}
}

View File

@@ -0,0 +1,36 @@
package com.fyber.inneractive.sdk.player.exoplayer2.audio;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ts.PsExtractor;
import com.vungle.ads.internal.protos.Sdk;
import org.apache.http.HttpStatus;
/* loaded from: classes2.dex */
public final class a {
public static final int[] a = {1, 2, 3, 6};
public static final int[] b = {48000, 44100, 32000};
public static final int[] c = {24000, 22050, 16000};
public static final int[] d = {2, 1, 2, 3, 3, 4, 4, 5};
public static final int[] e = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, PsExtractor.AUDIO_STREAM, 224, 256, Sdk.SDKError.Reason.WEBVIEW_ERROR_VALUE, 384, 448, 512, 576, 640};
public static final int[] f = {69, 87, 104, 121, 139, 174, 208, 243, 278, 348, HttpStatus.SC_EXPECTATION_FAILED, 487, 557, 696, 835, 975, 1114, 1253, 1393};
public static int a(int i, int i2) {
int i3 = i2 / 2;
if (i < 0) {
return -1;
}
int[] iArr = b;
if (i >= 3 || i2 < 0) {
return -1;
}
int[] iArr2 = f;
if (i3 >= 19) {
return -1;
}
int i4 = iArr[i];
if (i4 == 44100) {
return ((i2 % 2) + iArr2[i3]) * 2;
}
int i5 = e[i3];
return i4 == 32000 ? i5 * 6 : i5 * 4;
}
}

View File

@@ -0,0 +1,35 @@
package com.fyber.inneractive.sdk.player.exoplayer2.audio;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
/* loaded from: classes2.dex */
public interface b {
public static final ByteBuffer a = ByteBuffer.allocateDirect(0).order(ByteOrder.nativeOrder());
public static final class a extends Exception {
public a(int i, int i2, int i3) {
super("Unhandled format: " + i + " Hz, " + i2 + " channels in encoding " + i3);
}
}
void a(ByteBuffer byteBuffer);
boolean a();
boolean a(int i, int i2, int i3) throws a;
ByteBuffer b();
void c();
boolean d();
int e();
void f();
void flush();
void reset();
}

View File

@@ -0,0 +1,811 @@
package com.fyber.inneractive.sdk.player.exoplayer2.audio;
import android.annotation.TargetApi;
import android.media.AudioAttributes;
import android.media.AudioFormat;
import android.media.AudioTimestamp;
import android.media.AudioTrack;
import android.os.ConditionVariable;
import android.os.SystemClock;
import android.support.v4.media.session.PlaybackStateCompat;
import android.util.Log;
import androidx.work.WorkRequest;
import com.fyber.inneractive.sdk.player.exoplayer2.audio.MediaCodecAudioRenderer;
import com.fyber.inneractive.sdk.player.exoplayer2.audio.b;
import com.fyber.inneractive.sdk.player.exoplayer2.i;
import com.fyber.inneractive.sdk.player.exoplayer2.n;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.ironsource.v8;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.lang.reflect.Method;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.LinkedList;
/* loaded from: classes2.dex */
public final class c {
public long A;
public boolean B;
public long C;
public Method D;
public int E;
public long F;
public long G;
public int H;
public long I;
public long J;
public int K;
public int L;
public long M;
public long N;
public long O;
public float P;
public com.fyber.inneractive.sdk.player.exoplayer2.audio.b[] Q;
public ByteBuffer[] R;
public ByteBuffer S;
public ByteBuffer T;
public byte[] U;
public int V;
public int W;
public boolean X;
public boolean Y;
public int Z;
public final com.fyber.inneractive.sdk.player.exoplayer2.audio.d a;
public boolean a0;
public final com.fyber.inneractive.sdk.player.exoplayer2.audio.h b;
public boolean b0;
public final com.fyber.inneractive.sdk.player.exoplayer2.audio.b[] c;
public long c0;
public final f d;
public final ConditionVariable e = new ConditionVariable(true);
public final long[] f;
public final b g;
public final LinkedList<g> h;
public AudioTrack i;
public int j;
public int k;
public int l;
public int m;
public int n;
public boolean o;
public int p;
public long q;
public n r;
public n s;
public long t;
public long u;
public ByteBuffer v;
public int w;
public int x;
public int y;
public long z;
public class a extends Thread {
public final /* synthetic */ AudioTrack a;
public a(AudioTrack audioTrack) {
this.a = audioTrack;
}
@Override // java.lang.Thread, java.lang.Runnable
public final void run() {
try {
this.a.flush();
this.a.release();
} finally {
c.this.e.open();
}
}
}
@TargetApi(19)
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.audio.c$c, reason: collision with other inner class name */
public static class C0083c extends b {
public final AudioTimestamp j;
public long k;
public long l;
public long m;
public C0083c() {
super(0);
this.j = new AudioTimestamp();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.c.b
public final void a(AudioTrack audioTrack, boolean z) {
super.a(audioTrack, z);
this.k = 0L;
this.l = 0L;
this.m = 0L;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.c.b
public final long b() {
return this.m;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.c.b
public final long c() {
return this.j.nanoTime;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.c.b
public final boolean e() {
boolean timestamp = this.a.getTimestamp(this.j);
if (timestamp) {
long j = this.j.framePosition;
if (this.l > j) {
this.k++;
}
this.l = j;
this.m = j + (this.k << 32);
}
return timestamp;
}
}
public static final class d extends Exception {
public d(b.a aVar) {
super(aVar);
}
public d(String str) {
super(str);
}
}
public static final class e extends Exception {
public e(int i, int i2, int i3, int i4) {
super("AudioTrack init failed: " + i + ", Config(" + i2 + ", " + i3 + ", " + i4 + ")");
}
}
public interface f {
}
public static final class g {
public final n a;
public final long b;
public final long c;
public g(n nVar, long j, long j2) {
this.a = nVar;
this.b = j;
this.c = j2;
}
}
public static final class h extends Exception {
public h(int i) {
super(i.a("AudioTrack write failed: ", i));
}
}
public c(com.fyber.inneractive.sdk.player.exoplayer2.audio.b[] bVarArr, MediaCodecAudioRenderer.a aVar) {
this.d = aVar;
if (s.a >= 18) {
try {
this.D = AudioTrack.class.getMethod("getLatency", null);
} catch (NoSuchMethodException unused) {
}
}
int i = 0;
if (s.a >= 19) {
this.g = new C0083c();
} else {
this.g = new b(i);
}
com.fyber.inneractive.sdk.player.exoplayer2.audio.d dVar = new com.fyber.inneractive.sdk.player.exoplayer2.audio.d();
this.a = dVar;
com.fyber.inneractive.sdk.player.exoplayer2.audio.h hVar = new com.fyber.inneractive.sdk.player.exoplayer2.audio.h();
this.b = hVar;
com.fyber.inneractive.sdk.player.exoplayer2.audio.b[] bVarArr2 = new com.fyber.inneractive.sdk.player.exoplayer2.audio.b[bVarArr.length + 3];
this.c = bVarArr2;
bVarArr2[0] = new com.fyber.inneractive.sdk.player.exoplayer2.audio.f();
bVarArr2[1] = dVar;
System.arraycopy(bVarArr, 0, bVarArr2, 2, bVarArr.length);
bVarArr2[bVarArr.length + 2] = hVar;
this.f = new long[10];
this.P = 1.0f;
this.L = 0;
this.n = 3;
this.Z = 0;
this.s = n.d;
this.W = -1;
this.Q = new com.fyber.inneractive.sdk.player.exoplayer2.audio.b[0];
this.R = new ByteBuffer[0];
this.h = new LinkedList<>();
}
/* JADX WARN: Removed duplicated region for block: B:46:0x00a3 */
/* JADX WARN: Removed duplicated region for block: B:59:0x00d1 */
/* JADX WARN: Removed duplicated region for block: B:62:0x00f5 */
/* JADX WARN: Removed duplicated region for block: B:65:0x00f7 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(int r9, int r10, int r11, int[] r12) throws com.fyber.inneractive.sdk.player.exoplayer2.audio.c.d {
/*
Method dump skipped, instructions count: 290
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.audio.c.a(int, int, int, int[]):void");
}
/* JADX WARN: Code restructure failed: missing block: B:46:0x00d2, code lost:
if (r10 < r9) goto L51;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void b(java.nio.ByteBuffer r8, long r9) throws com.fyber.inneractive.sdk.player.exoplayer2.audio.c.h {
/*
Method dump skipped, instructions count: 275
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.audio.c.b(java.nio.ByteBuffer, long):void");
}
public final boolean c() {
return this.i != null;
}
public final void e() {
if (c()) {
this.F = 0L;
this.G = 0L;
this.I = 0L;
this.J = 0L;
this.K = 0;
n nVar = this.r;
if (nVar != null) {
this.s = nVar;
this.r = null;
} else if (!this.h.isEmpty()) {
this.s = this.h.getLast().a;
}
this.h.clear();
this.t = 0L;
this.u = 0L;
this.S = null;
this.T = null;
int i = 0;
while (true) {
com.fyber.inneractive.sdk.player.exoplayer2.audio.b[] bVarArr = this.Q;
if (i >= bVarArr.length) {
break;
}
com.fyber.inneractive.sdk.player.exoplayer2.audio.b bVar = bVarArr[i];
bVar.flush();
this.R[i] = bVar.b();
i++;
}
this.X = false;
this.W = -1;
this.v = null;
this.w = 0;
this.L = 0;
this.O = 0L;
this.z = 0L;
this.y = 0;
this.x = 0;
this.A = 0L;
this.B = false;
this.C = 0L;
if (this.i.getPlayState() == 3) {
this.i.pause();
}
AudioTrack audioTrack = this.i;
this.i = null;
this.g.a(null, false);
this.e.close();
new a(audioTrack).start();
}
}
public final void f() {
ArrayList arrayList = new ArrayList();
for (com.fyber.inneractive.sdk.player.exoplayer2.audio.b bVar : this.c) {
if (bVar.d()) {
arrayList.add(bVar);
} else {
bVar.flush();
}
}
int size = arrayList.size();
this.Q = (com.fyber.inneractive.sdk.player.exoplayer2.audio.b[]) arrayList.toArray(new com.fyber.inneractive.sdk.player.exoplayer2.audio.b[size]);
this.R = new ByteBuffer[size];
for (int i = 0; i < size; i++) {
com.fyber.inneractive.sdk.player.exoplayer2.audio.b bVar2 = this.Q[i];
bVar2.flush();
this.R[i] = bVar2.b();
}
}
public final void g() {
if (c()) {
if (s.a >= 21) {
this.i.setVolume(this.P);
return;
}
AudioTrack audioTrack = this.i;
float f2 = this.P;
audioTrack.setStereoVolume(f2, f2);
}
}
public final void d() {
this.Y = true;
if (c()) {
this.N = System.nanoTime() / 1000;
this.i.play();
}
}
public static class b {
public AudioTrack a;
public boolean b;
public int c;
public long d;
public long e;
public long f;
public long g;
public long h;
public long i;
public b() {
}
public /* synthetic */ b(int i) {
this();
}
public long b() {
throw new UnsupportedOperationException();
}
public long c() {
throw new UnsupportedOperationException();
}
public boolean e() {
return false;
}
public final void d() {
if (this.g != C.TIME_UNSET) {
return;
}
this.a.pause();
}
public void a(AudioTrack audioTrack, boolean z) {
this.a = audioTrack;
this.b = z;
this.g = C.TIME_UNSET;
this.d = 0L;
this.e = 0L;
this.f = 0L;
if (audioTrack != null) {
this.c = audioTrack.getSampleRate();
}
}
public final void a(long j) {
this.h = a();
this.g = SystemClock.elapsedRealtime() * 1000;
this.i = j;
this.a.stop();
}
public final long a() {
if (this.g != C.TIME_UNSET) {
return Math.min(this.i, this.h + ((((SystemClock.elapsedRealtime() * 1000) - this.g) * this.c) / 1000000));
}
int playState = this.a.getPlayState();
if (playState == 1) {
return 0L;
}
long playbackHeadPosition = this.a.getPlaybackHeadPosition() & 4294967295L;
if (this.b) {
if (playState == 2 && playbackHeadPosition == 0) {
this.f = this.d;
}
playbackHeadPosition += this.f;
}
if (this.d > playbackHeadPosition) {
this.e++;
}
this.d = playbackHeadPosition;
return playbackHeadPosition + (this.e << 32);
}
}
public final boolean b() {
int i;
if (c()) {
if ((this.o ? this.J : this.I / this.H) > this.g.a() || (s.a < 23 && (((i = this.m) == 5 || i == 6) && this.i.getPlayState() == 2 && this.i.getPlaybackHeadPosition() == 0))) {
return true;
}
}
return false;
}
/* JADX WARN: Finally extract failed */
public final boolean a(ByteBuffer byteBuffer, long j) throws e, h {
int i;
int i2;
int i3;
ByteBuffer byteBuffer2 = this.S;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(byteBuffer2 == null || byteBuffer == byteBuffer2);
if (!c()) {
this.e.block();
if (this.a0) {
this.i = new AudioTrack(new AudioAttributes.Builder().setUsage(1).setContentType(3).setFlags(16).build(), new AudioFormat.Builder().setChannelMask(this.k).setEncoding(this.m).setSampleRate(this.j).build(), this.p, 1, this.Z);
} else if (this.Z == 0) {
this.i = new AudioTrack(this.n, this.j, this.k, this.m, this.p, 1);
} else {
this.i = new AudioTrack(this.n, this.j, this.k, this.m, this.p, 1, this.Z);
}
int state = this.i.getState();
if (state == 1) {
int audioSessionId = this.i.getAudioSessionId();
if (this.Z != audioSessionId) {
this.Z = audioSessionId;
MediaCodecAudioRenderer.a aVar = (MediaCodecAudioRenderer.a) this.d;
MediaCodecAudioRenderer.this.P.audioSessionId(audioSessionId);
MediaCodecAudioRenderer.this.getClass();
}
this.g.a(this.i, s.a < 23 && ((i3 = this.m) == 5 || i3 == 6));
g();
this.b0 = false;
if (this.Y) {
d();
}
} else {
try {
this.i.release();
this.i = null;
} catch (Exception unused) {
this.i = null;
} catch (Throwable th) {
this.i = null;
throw th;
}
throw new e(state, this.j, this.k, this.p);
}
}
if (s.a < 23 && ((i2 = this.m) == 5 || i2 == 6)) {
if (this.i.getPlayState() == 2) {
this.b0 = false;
return false;
}
if (this.i.getPlayState() == 1 && this.g.a() != 0) {
return false;
}
}
boolean z = this.b0;
boolean b2 = b();
this.b0 = b2;
if (z && !b2 && this.i.getPlayState() != 1) {
long elapsedRealtime = SystemClock.elapsedRealtime() - this.c0;
MediaCodecAudioRenderer.a aVar2 = (MediaCodecAudioRenderer.a) this.d;
MediaCodecAudioRenderer.this.P.audioTrackUnderrun(this.p, com.fyber.inneractive.sdk.player.exoplayer2.b.a(this.q), elapsedRealtime);
MediaCodecAudioRenderer.this.getClass();
}
if (this.S == null) {
if (!byteBuffer.hasRemaining()) {
return true;
}
if (this.o && this.K == 0) {
int i4 = this.m;
if (i4 == 7 || i4 == 8) {
int position = byteBuffer.position();
i = ((((byteBuffer.get(position + 5) & 252) >> 2) | ((byteBuffer.get(position + 4) & 1) << 6)) + 1) * 32;
} else if (i4 == 5) {
i = 1536;
} else if (i4 == 6) {
i = (((byteBuffer.get(byteBuffer.position() + 4) & 192) >> 6) != 3 ? com.fyber.inneractive.sdk.player.exoplayer2.audio.a.a[(byteBuffer.get(byteBuffer.position() + 4) & 48) >> 4] : 6) * 256;
} else {
throw new IllegalStateException(i.a("Unexpected audio encoding: ", i4));
}
this.K = i;
}
if (this.r != null) {
if (!a()) {
return false;
}
this.h.add(new g(this.r, Math.max(0L, j), ((this.o ? this.J : this.I / this.H) * 1000000) / this.j));
this.r = null;
f();
}
int i5 = this.L;
if (i5 == 0) {
this.M = Math.max(0L, j);
this.L = 1;
} else {
long j2 = (((this.o ? this.G : this.F / this.E) * 1000000) / this.j) + this.M;
if (i5 == 1 && Math.abs(j2 - j) > 200000) {
Log.e("AudioTrack", "Discontinuity detected [expected " + j2 + ", got " + j + v8.i.e);
this.L = 2;
}
if (this.L == 2) {
this.M = (j - j2) + this.M;
this.L = 1;
MediaCodecAudioRenderer.a aVar3 = (MediaCodecAudioRenderer.a) this.d;
MediaCodecAudioRenderer.this.getClass();
MediaCodecAudioRenderer.this.V = true;
}
}
if (this.o) {
this.G += this.K;
} else {
this.F += byteBuffer.remaining();
}
this.S = byteBuffer;
}
if (this.o) {
b(this.S, j);
} else {
a(j);
}
if (this.S.hasRemaining()) {
return false;
}
this.S = null;
return true;
}
public final void a(long j) throws h {
ByteBuffer byteBuffer;
int length = this.Q.length;
int i = length;
while (i >= 0) {
if (i > 0) {
byteBuffer = this.R[i - 1];
} else {
byteBuffer = this.S;
if (byteBuffer == null) {
byteBuffer = com.fyber.inneractive.sdk.player.exoplayer2.audio.b.a;
}
}
if (i == length) {
b(byteBuffer, j);
} else {
com.fyber.inneractive.sdk.player.exoplayer2.audio.b bVar = this.Q[i];
bVar.a(byteBuffer);
ByteBuffer b2 = bVar.b();
this.R[i] = b2;
if (b2.hasRemaining()) {
i++;
}
}
if (byteBuffer.hasRemaining()) {
return;
} else {
i--;
}
}
}
/* JADX WARN: Removed duplicated region for block: B:10:0x0021 */
/* JADX WARN: Removed duplicated region for block: B:18:0x0038 */
/* JADX WARN: Unsupported multi-entry loop pattern (BACK_EDGE: B:17:0x0032 -> B:7:0x0012). Please report as a decompilation issue!!! */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean a() throws com.fyber.inneractive.sdk.player.exoplayer2.audio.c.h {
/*
r9 = this;
int r0 = r9.W
r1 = 1
r2 = 0
r3 = -1
if (r0 != r3) goto L14
boolean r0 = r9.o
if (r0 == 0) goto Lf
com.fyber.inneractive.sdk.player.exoplayer2.audio.b[] r0 = r9.Q
int r0 = r0.length
goto L10
Lf:
r0 = r2
L10:
r9.W = r0
L12:
r0 = r1
goto L15
L14:
r0 = r2
L15:
int r4 = r9.W
com.fyber.inneractive.sdk.player.exoplayer2.audio.b[] r5 = r9.Q
int r6 = r5.length
r7 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)
if (r4 >= r6) goto L38
r4 = r5[r4]
if (r0 == 0) goto L28
r4.c()
L28:
r9.a(r7)
boolean r0 = r4.a()
if (r0 != 0) goto L32
return r2
L32:
int r0 = r9.W
int r0 = r0 + r1
r9.W = r0
goto L12
L38:
java.nio.ByteBuffer r0 = r9.T
if (r0 == 0) goto L44
r9.b(r0, r7)
java.nio.ByteBuffer r0 = r9.T
if (r0 == 0) goto L44
return r2
L44:
r9.W = r3
return r1
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.audio.c.a():boolean");
}
public final n a(n nVar) {
if (this.o) {
n nVar2 = n.d;
this.s = nVar2;
return nVar2;
}
com.fyber.inneractive.sdk.player.exoplayer2.audio.h hVar = this.b;
float f2 = nVar.a;
hVar.getClass();
int i = s.a;
float max = Math.max(0.1f, Math.min(f2, 8.0f));
hVar.e = max;
com.fyber.inneractive.sdk.player.exoplayer2.audio.h hVar2 = this.b;
float f3 = nVar.b;
hVar2.getClass();
hVar2.f = Math.max(0.1f, Math.min(f3, 8.0f));
n nVar3 = new n(max, f3);
n nVar4 = this.r;
if (nVar4 == null) {
nVar4 = !this.h.isEmpty() ? this.h.getLast().a : this.s;
}
if (!nVar3.equals(nVar4)) {
if (c()) {
this.r = nVar3;
} else {
this.s = nVar3;
}
}
return this.s;
}
public final long a(boolean z) {
long j;
long j2;
int i;
if (!c() || this.L == 0) {
return Long.MIN_VALUE;
}
if (this.i.getPlayState() == 3) {
long a2 = (this.g.a() * 1000000) / r1.c;
if (a2 != 0) {
long nanoTime = System.nanoTime() / 1000;
if (nanoTime - this.A >= WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS) {
long[] jArr = this.f;
int i2 = this.x;
jArr[i2] = a2 - nanoTime;
this.x = (i2 + 1) % 10;
int i3 = this.y;
if (i3 < 10) {
this.y = i3 + 1;
}
this.A = nanoTime;
this.z = 0L;
int i4 = 0;
while (true) {
int i5 = this.y;
if (i4 >= i5) {
break;
}
this.z = (this.f[i4] / i5) + this.z;
i4++;
}
}
if ((s.a >= 23 || ((i = this.m) != 5 && i != 6)) && nanoTime - this.C >= 500000) {
boolean e2 = this.g.e();
this.B = e2;
if (e2) {
long c = this.g.c() / 1000;
long b2 = this.g.b();
if (c < this.N) {
this.B = false;
} else if (Math.abs(c - nanoTime) > 5000000) {
StringBuilder sb = new StringBuilder("Spurious audio timestamp (system clock mismatch): ");
sb.append(b2);
sb.append(", ");
sb.append(c);
sb.append(", ");
sb.append(nanoTime);
sb.append(", ");
sb.append(a2);
sb.append(", ");
sb.append(this.o ? this.G : this.F / this.E);
sb.append(", ");
sb.append(this.o ? this.J : this.I / this.H);
Log.w("AudioTrack", sb.toString());
this.B = false;
} else if (Math.abs(((b2 * 1000000) / this.j) - a2) > 5000000) {
StringBuilder sb2 = new StringBuilder("Spurious audio timestamp (frame position mismatch): ");
sb2.append(b2);
sb2.append(", ");
sb2.append(c);
sb2.append(", ");
sb2.append(nanoTime);
sb2.append(", ");
sb2.append(a2);
sb2.append(", ");
sb2.append(this.o ? this.G : this.F / this.E);
sb2.append(", ");
sb2.append(this.o ? this.J : this.I / this.H);
Log.w("AudioTrack", sb2.toString());
this.B = false;
}
}
if (this.D != null && !this.o) {
try {
long intValue = (((Integer) r1.invoke(this.i, null)).intValue() * 1000) - this.q;
this.O = intValue;
long max = Math.max(intValue, 0L);
this.O = max;
if (max > 5000000) {
Log.w("AudioTrack", "Ignoring impossibly large audio latency: " + this.O);
this.O = 0L;
}
} catch (Exception unused) {
this.D = null;
}
}
this.C = nanoTime;
}
}
}
long nanoTime2 = System.nanoTime() / 1000;
if (this.B) {
j = ((this.g.b() + (((nanoTime2 - (this.g.c() / 1000)) * this.j) / 1000000)) * 1000000) / this.j;
} else {
if (this.y == 0) {
j = (this.g.a() * 1000000) / r1.c;
} else {
j = nanoTime2 + this.z;
}
if (!z) {
j -= this.O;
}
}
long j3 = this.M;
while (!this.h.isEmpty() && j >= this.h.getFirst().c) {
g remove = this.h.remove();
this.s = remove.a;
this.u = remove.c;
this.t = remove.b - this.M;
}
if (this.s.a == 1.0f) {
j2 = (j + this.t) - this.u;
} else {
if (this.h.isEmpty()) {
com.fyber.inneractive.sdk.player.exoplayer2.audio.h hVar = this.b;
long j4 = hVar.k;
if (j4 >= PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID) {
j2 = this.t + s.a(j - this.u, hVar.j, j4);
}
}
j2 = ((long) (this.s.a * (j - this.u))) + this.t;
}
return j3 + j2;
}
}

View File

@@ -0,0 +1,128 @@
package com.fyber.inneractive.sdk.player.exoplayer2.audio;
import com.fyber.inneractive.sdk.player.exoplayer2.audio.b;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.Arrays;
/* loaded from: classes2.dex */
public final class d implements b {
public int b;
public int c;
public int[] d;
public boolean e;
public int[] f;
public ByteBuffer g;
public ByteBuffer h;
public boolean i;
public d() {
ByteBuffer byteBuffer = b.a;
this.g = byteBuffer;
this.h = byteBuffer;
this.b = -1;
this.c = -1;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final boolean a() {
return this.i && this.h == b.a;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final boolean a(int i, int i2, int i3) throws b.a {
boolean z = !Arrays.equals(this.d, this.f);
int[] iArr = this.d;
this.f = iArr;
if (iArr == null) {
this.e = false;
return z;
}
if (i3 != 2) {
throw new b.a(i, i2, i3);
}
if (!z && this.c == i && this.b == i2) {
return false;
}
this.c = i;
this.b = i2;
this.e = i2 != iArr.length;
int i4 = 0;
while (true) {
int[] iArr2 = this.f;
if (i4 >= iArr2.length) {
return true;
}
int i5 = iArr2[i4];
if (i5 >= i2) {
throw new b.a(i, i2, i3);
}
this.e = (i5 != i4) | this.e;
i4++;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final ByteBuffer b() {
ByteBuffer byteBuffer = this.h;
this.h = b.a;
return byteBuffer;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void c() {
this.i = true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final boolean d() {
return this.e;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final int e() {
int[] iArr = this.f;
return iArr == null ? this.b : iArr.length;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void f() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void flush() {
this.h = b.a;
this.i = false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void reset() {
flush();
this.g = b.a;
this.b = -1;
this.c = -1;
this.f = null;
this.e = false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void a(ByteBuffer byteBuffer) {
int position = byteBuffer.position();
int limit = byteBuffer.limit();
int length = ((limit - position) / (this.b * 2)) * this.f.length * 2;
if (this.g.capacity() < length) {
this.g = ByteBuffer.allocateDirect(length).order(ByteOrder.nativeOrder());
} else {
this.g.clear();
}
while (position < limit) {
for (int i : this.f) {
this.g.putShort(byteBuffer.getShort((i * 2) + position));
}
position += this.b * 2;
}
byteBuffer.position(limit);
this.g.flip();
this.h = this.g;
}
}

View File

@@ -0,0 +1,12 @@
package com.fyber.inneractive.sdk.player.exoplayer2.audio;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ts.PsExtractor;
import csdk.gluads.Consts;
/* loaded from: classes2.dex */
public final class e {
public static final int[] a = {1, 2, 2, 2, 2, 3, 3, 4, 4, 5, 6, 6, 6, 7, 8, 8};
public static final int[] b = {-1, 8000, 16000, 32000, -1, -1, 11025, 22050, 44100, -1, -1, 12000, 24000, 48000, -1, -1};
public static final int[] c = {64, 112, 128, PsExtractor.AUDIO_STREAM, 224, 256, 384, 448, 512, 640, 768, 896, 1024, 1152, 1280, 1536, 1920, 2048, IronSourceConstants.IS_AD_UNIT_CAPPED, 2560, 2688, 2816, 2823, 2944, 3072, 3840, 4096, Consts.GEMS_CUSTOM_DATA_LIMIT, 7680};
}

View File

@@ -0,0 +1,190 @@
package com.fyber.inneractive.sdk.player.exoplayer2.audio;
import com.fyber.inneractive.sdk.player.exoplayer2.audio.b;
import java.nio.ByteBuffer;
/* loaded from: classes2.dex */
public final class f implements b {
public int b = -1;
public int c = -1;
public int d = 0;
public ByteBuffer e;
public ByteBuffer f;
public boolean g;
public f() {
ByteBuffer byteBuffer = b.a;
this.e = byteBuffer;
this.f = byteBuffer;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final boolean a() {
return this.g && this.f == b.a;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final boolean a(int i, int i2, int i3) throws b.a {
if (i3 != 3 && i3 != 2 && i3 != Integer.MIN_VALUE && i3 != 1073741824) {
throw new b.a(i, i2, i3);
}
if (this.b == i && this.c == i2 && this.d == i3) {
return false;
}
this.b = i;
this.c = i2;
this.d = i3;
if (i3 != 2) {
return true;
}
this.e = b.a;
return true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final ByteBuffer b() {
ByteBuffer byteBuffer = this.f;
this.f = b.a;
return byteBuffer;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void c() {
this.g = true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final boolean d() {
int i = this.d;
return (i == 0 || i == 2) ? false : true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final int e() {
return this.c;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void f() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void flush() {
this.f = b.a;
this.g = false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void reset() {
flush();
this.e = b.a;
this.b = -1;
this.c = -1;
this.d = 0;
}
/* JADX WARN: Removed duplicated region for block: B:11:0x0045 */
/* JADX WARN: Removed duplicated region for block: B:24:0x0083 A[ADDED_TO_REGION, LOOP:2: B:24:0x0083->B:25:0x0085, LOOP_START, PHI: r0
0x0083: PHI (r0v1 int) = (r0v0 int), (r0v2 int) binds: [B:10:0x0043, B:25:0x0085] A[DONT_GENERATE, DONT_INLINE]] */
/* JADX WARN: Removed duplicated region for block: B:27:0x003c */
/* JADX WARN: Removed duplicated region for block: B:8:0x002d */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(java.nio.ByteBuffer r8) {
/*
r7 = this;
int r0 = r8.position()
int r1 = r8.limit()
int r2 = r1 - r0
int r3 = r7.d
r4 = 1073741824(0x40000000, float:2.0)
r5 = 3
r6 = -2147483648(0xffffffff80000000, float:-0.0)
if (r3 == r6) goto L23
if (r3 == r5) goto L20
if (r3 != r4) goto L1a
int r2 = r2 / 2
goto L25
L1a:
java.lang.IllegalStateException r8 = new java.lang.IllegalStateException
r8.<init>()
throw r8
L20:
int r2 = r2 * 2
goto L25
L23:
int r2 = r2 / r5
goto L20
L25:
java.nio.ByteBuffer r3 = r7.e
int r3 = r3.capacity()
if (r3 >= r2) goto L3c
java.nio.ByteBuffer r2 = java.nio.ByteBuffer.allocateDirect(r2)
java.nio.ByteOrder r3 = java.nio.ByteOrder.nativeOrder()
java.nio.ByteBuffer r2 = r2.order(r3)
r7.e = r2
goto L41
L3c:
java.nio.ByteBuffer r2 = r7.e
r2.clear()
L41:
int r2 = r7.d
if (r2 == r6) goto L83
if (r2 == r5) goto L6a
if (r2 != r4) goto L64
L49:
if (r0 >= r1) goto L9e
java.nio.ByteBuffer r2 = r7.e
int r3 = r0 + 2
byte r3 = r8.get(r3)
r2.put(r3)
java.nio.ByteBuffer r2 = r7.e
int r3 = r0 + 3
byte r3 = r8.get(r3)
r2.put(r3)
int r0 = r0 + 4
goto L49
L64:
java.lang.IllegalStateException r8 = new java.lang.IllegalStateException
r8.<init>()
throw r8
L6a:
if (r0 >= r1) goto L9e
java.nio.ByteBuffer r2 = r7.e
r3 = 0
r2.put(r3)
java.nio.ByteBuffer r2 = r7.e
byte r3 = r8.get(r0)
r3 = r3 & 255(0xff, float:3.57E-43)
int r3 = r3 + (-128)
byte r3 = (byte) r3
r2.put(r3)
int r0 = r0 + 1
goto L6a
L83:
if (r0 >= r1) goto L9e
java.nio.ByteBuffer r2 = r7.e
int r3 = r0 + 1
byte r3 = r8.get(r3)
r2.put(r3)
java.nio.ByteBuffer r2 = r7.e
int r3 = r0 + 2
byte r3 = r8.get(r3)
r2.put(r3)
int r0 = r0 + 3
goto L83
L9e:
int r0 = r8.limit()
r8.position(r0)
java.nio.ByteBuffer r8 = r7.e
r8.flip()
java.nio.ByteBuffer r8 = r7.e
r7.f = r8
return
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.audio.f.a(java.nio.ByteBuffer):void");
}
}

View File

@@ -0,0 +1,373 @@
package com.fyber.inneractive.sdk.player.exoplayer2.audio;
import java.util.Arrays;
/* loaded from: classes2.dex */
public final class g {
public final int a;
public final int b;
public final int c;
public final int d;
public final int e;
public final short[] f;
public int g;
public short[] h;
public int i;
public short[] j;
public int k;
public short[] l;
public int q;
public int r;
public int s;
public int t;
public int v;
public int w;
public int x;
public int m = 0;
public int n = 0;
public int u = 0;
public float o = 1.0f;
public float p = 1.0f;
public g(int i, int i2) {
this.a = i;
this.b = i2;
this.c = i / 400;
int i3 = i / 65;
this.d = i3;
int i4 = i3 * 2;
this.e = i4;
this.f = new short[i4];
this.g = i4;
int i5 = i2 * i4;
this.h = new short[i5];
this.i = i4;
this.j = new short[i5];
this.k = i4;
this.l = new short[i5];
}
public final void a(int i) {
int i2 = this.q + i;
int i3 = this.g;
if (i2 > i3) {
int i4 = (i3 / 2) + i + i3;
this.g = i4;
this.h = Arrays.copyOf(this.h, i4 * this.b);
}
}
public final void b(int i) {
int i2 = this.r + i;
int i3 = this.i;
if (i2 > i3) {
int i4 = (i3 / 2) + i + i3;
this.i = i4;
this.j = Arrays.copyOf(this.j, i4 * this.b);
}
}
public final int a(short[] sArr, int i, int i2, int i3) {
int i4 = i * this.b;
int i5 = 255;
int i6 = 1;
int i7 = 0;
int i8 = 0;
while (i2 <= i3) {
int i9 = 0;
for (int i10 = 0; i10 < i2; i10++) {
short s = sArr[i4 + i10];
short s2 = sArr[i4 + i2 + i10];
i9 += s >= s2 ? s - s2 : s2 - s;
}
if (i9 * i7 < i6 * i2) {
i7 = i2;
i6 = i9;
}
if (i9 * i5 > i8 * i2) {
i5 = i2;
i8 = i9;
}
i2++;
}
this.w = i6 / i7;
this.x = i8 / i5;
return i7;
}
public final void a() {
int i;
int i2;
double d;
int i3;
float f;
int i4;
int i5;
int i6;
int i7;
int i8;
int i9 = this.r;
float f2 = this.o / this.p;
double d2 = f2;
int i10 = 1;
int i11 = 0;
if (d2 > 1.00001d || d2 < 0.99999d) {
int i12 = this.q;
if (i12 >= this.e) {
int i13 = 0;
while (true) {
int i14 = this.t;
if (i14 > 0) {
int min = Math.min(this.e, i14);
short[] sArr = this.h;
b(min);
int i15 = this.b;
System.arraycopy(sArr, i13 * i15, this.j, this.r * i15, i15 * min);
this.r += min;
this.t -= min;
i13 += min;
f = f2;
d = d2;
} else {
short[] sArr2 = this.h;
int i16 = this.a;
int i17 = i16 > 4000 ? i16 / 4000 : i10;
int i18 = this.b;
if (i18 == i10 && i17 == i10) {
i = a(sArr2, i13, this.c, this.d);
} else {
int i19 = this.e / i17;
int i20 = i18 * i17;
int i21 = i18 * i13;
for (int i22 = i11; i22 < i19; i22++) {
int i23 = i11;
int i24 = i23;
while (i23 < i20) {
i24 += sArr2[(i22 * i20) + i21 + i23];
i23++;
}
this.f[i22] = (short) (i24 / i20);
}
int a = a(this.f, i11, this.c / i17, this.d / i17);
if (i17 != 1) {
int i25 = a * i17;
int i26 = i17 * 4;
int i27 = i25 - i26;
int i28 = i25 + i26;
int i29 = this.c;
if (i27 < i29) {
i27 = i29;
}
int i30 = this.d;
if (i28 > i30) {
i28 = i30;
}
int i31 = this.b;
if (i31 == 1) {
i = a(sArr2, i13, i27, i28);
} else {
int i32 = this.e;
int i33 = i13 * i31;
int i34 = i11;
while (i34 < i32) {
int i35 = i11;
int i36 = i35;
while (i35 < i31) {
i36 += sArr2[(i34 * i31) + i33 + i35];
i35++;
}
this.f[i34] = (short) (i36 / i31);
i34++;
i11 = 0;
}
a = a(this.f, 0, i27, i28);
}
}
i = a;
}
int i37 = this.w;
int i38 = this.x;
if (i37 == 0 || (i2 = this.u) == 0 || i38 > i37 * 3 || i37 * 2 <= this.v * 3) {
i2 = i;
}
this.v = i37;
this.u = i;
if (d2 > 1.0d) {
short[] sArr3 = this.h;
if (f2 >= 2.0f) {
i4 = (int) (i2 / (f2 - 1.0f));
} else {
this.t = (int) (((2.0f - f2) * i2) / (f2 - 1.0f));
i4 = i2;
}
b(i4);
int i39 = this.b;
short[] sArr4 = this.j;
int i40 = this.r;
int i41 = i13 + i2;
int i42 = 0;
while (i42 < i39) {
int i43 = (i40 * i39) + i42;
int i44 = (i13 * i39) + i42;
double d3 = d2;
int i45 = (i41 * i39) + i42;
int i46 = 0;
while (i46 < i4) {
sArr4[i43] = (short) (((sArr3[i45] * i46) + ((i4 - i46) * sArr3[i44])) / i4);
i43 += i39;
i44 += i39;
i45 += i39;
i46++;
sArr3 = sArr3;
}
i42++;
d2 = d3;
}
d = d2;
this.r += i4;
f = f2;
i13 = i2 + i4 + i13;
} else {
d = d2;
short[] sArr5 = this.h;
if (f2 < 0.5f) {
i3 = (int) ((i2 * f2) / (1.0f - f2));
} else {
this.t = (int) ((((2.0f * f2) - 1.0f) * i2) / (1.0f - f2));
i3 = i2;
}
int i47 = i2 + i3;
b(i47);
int i48 = this.b;
System.arraycopy(sArr5, i13 * i48, this.j, this.r * i48, i48 * i2);
int i49 = this.b;
short[] sArr6 = this.j;
int i50 = this.r + i2;
int i51 = i2 + i13;
int i52 = 0;
while (i52 < i49) {
int i53 = (i50 * i49) + i52;
int i54 = (i13 * i49) + i52;
int i55 = (i51 * i49) + i52;
float f3 = f2;
int i56 = 0;
while (i56 < i3) {
sArr6[i53] = (short) (((sArr5[i54] * i56) + ((i3 - i56) * sArr5[i55])) / i3);
i53 += i49;
i55 += i49;
i54 += i49;
i56++;
sArr5 = sArr5;
}
i52++;
f2 = f3;
}
f = f2;
this.r += i47;
i13 += i3;
}
}
if (this.e + i13 > i12) {
break;
}
d2 = d;
f2 = f;
i10 = 1;
i11 = 0;
}
int i57 = this.q - i13;
short[] sArr7 = this.h;
int i58 = this.b;
System.arraycopy(sArr7, i13 * i58, sArr7, 0, i58 * i57);
this.q = i57;
}
} else {
short[] sArr8 = this.h;
int i59 = this.q;
b(i59);
int i60 = this.b;
System.arraycopy(sArr8, 0, this.j, this.r * i60, i60 * i59);
this.r += i59;
this.q = 0;
}
float f4 = this.p;
if (f4 == 1.0f || this.r == i9) {
return;
}
int i61 = this.a;
int i62 = (int) (i61 / f4);
while (true) {
if (i62 <= 16384 && i61 <= 16384) {
break;
}
i62 /= 2;
i61 /= 2;
}
int i63 = this.r - i9;
int i64 = this.s + i63;
int i65 = this.k;
if (i64 > i65) {
int i66 = (i65 / 2) + i63 + i65;
this.k = i66;
this.l = Arrays.copyOf(this.l, i66 * this.b);
}
short[] sArr9 = this.j;
int i67 = this.b;
System.arraycopy(sArr9, i9 * i67, this.l, this.s * i67, i67 * i63);
this.r = i9;
this.s += i63;
int i68 = 0;
while (true) {
i5 = this.s;
i6 = i5 - 1;
if (i68 >= i6) {
break;
}
while (true) {
i7 = this.m + 1;
int i69 = i7 * i62;
i8 = this.n;
if (i69 <= i8 * i61) {
break;
}
b(1);
int i70 = 0;
while (true) {
int i71 = this.b;
if (i70 < i71) {
short[] sArr10 = this.j;
int i72 = (this.r * i71) + i70;
short[] sArr11 = this.l;
int i73 = (i68 * i71) + i70;
short s = sArr11[i73];
short s2 = sArr11[i73 + i71];
int i74 = this.n * i61;
int i75 = this.m;
int i76 = i75 * i62;
int i77 = (i75 + 1) * i62;
int i78 = i77 - i74;
int i79 = i77 - i76;
sArr10[i72] = (short) ((((i79 - i78) * s2) + (s * i78)) / i79);
i70++;
}
}
this.n++;
this.r++;
}
this.m = i7;
if (i7 == i61) {
this.m = 0;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(i8 == i62);
this.n = 0;
}
i68++;
}
if (i6 == 0) {
return;
}
short[] sArr12 = this.l;
int i80 = this.b;
System.arraycopy(sArr12, i6 * i80, sArr12, 0, (i5 - i6) * i80);
this.s -= i6;
}
}

View File

@@ -0,0 +1,167 @@
package com.fyber.inneractive.sdk.player.exoplayer2.audio;
import com.fyber.inneractive.sdk.player.exoplayer2.audio.b;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.ShortBuffer;
/* loaded from: classes2.dex */
public final class h implements b {
public g d;
public ByteBuffer g;
public ShortBuffer h;
public ByteBuffer i;
public long j;
public long k;
public boolean l;
public float e = 1.0f;
public float f = 1.0f;
public int b = -1;
public int c = -1;
public h() {
ByteBuffer byteBuffer = b.a;
this.g = byteBuffer;
this.h = byteBuffer.asShortBuffer();
this.i = byteBuffer;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final ByteBuffer b() {
ByteBuffer byteBuffer = this.i;
this.i = b.a;
return byteBuffer;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final boolean d() {
return Math.abs(this.e - 1.0f) >= 0.01f || Math.abs(this.f - 1.0f) >= 0.01f;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final int e() {
return this.b;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void f() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void flush() {
g gVar = new g(this.c, this.b);
this.d = gVar;
gVar.o = this.e;
gVar.p = this.f;
this.i = b.a;
this.j = 0L;
this.k = 0L;
this.l = false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void c() {
int i;
g gVar = this.d;
int i2 = gVar.q;
float f = gVar.o;
float f2 = gVar.p;
int i3 = gVar.r + ((int) ((((i2 / (f / f2)) + gVar.s) / f2) + 0.5f));
gVar.a((gVar.e * 2) + i2);
int i4 = 0;
while (true) {
i = gVar.e * 2;
int i5 = gVar.b;
if (i4 >= i * i5) {
break;
}
gVar.h[(i5 * i2) + i4] = 0;
i4++;
}
gVar.q = i + gVar.q;
gVar.a();
if (gVar.r > i3) {
gVar.r = i3;
}
gVar.q = 0;
gVar.t = 0;
gVar.s = 0;
this.l = true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void reset() {
this.d = null;
ByteBuffer byteBuffer = b.a;
this.g = byteBuffer;
this.h = byteBuffer.asShortBuffer();
this.i = byteBuffer;
this.b = -1;
this.c = -1;
this.j = 0L;
this.k = 0L;
this.l = false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final boolean a(int i, int i2, int i3) throws b.a {
if (i3 != 2) {
throw new b.a(i, i2, i3);
}
if (this.c == i && this.b == i2) {
return false;
}
this.c = i;
this.b = i2;
return true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final void a(ByteBuffer byteBuffer) {
if (byteBuffer.hasRemaining()) {
ShortBuffer asShortBuffer = byteBuffer.asShortBuffer();
int remaining = byteBuffer.remaining();
this.j += remaining;
g gVar = this.d;
gVar.getClass();
int remaining2 = asShortBuffer.remaining();
int i = gVar.b;
int i2 = remaining2 / i;
gVar.a(i2);
asShortBuffer.get(gVar.h, gVar.q * gVar.b, ((i * i2) * 2) / 2);
gVar.q += i2;
gVar.a();
byteBuffer.position(byteBuffer.position() + remaining);
}
int i3 = this.d.r * this.b * 2;
if (i3 > 0) {
if (this.g.capacity() < i3) {
ByteBuffer order = ByteBuffer.allocateDirect(i3).order(ByteOrder.nativeOrder());
this.g = order;
this.h = order.asShortBuffer();
} else {
this.g.clear();
this.h.clear();
}
g gVar2 = this.d;
ShortBuffer shortBuffer = this.h;
gVar2.getClass();
int min = Math.min(shortBuffer.remaining() / gVar2.b, gVar2.r);
shortBuffer.put(gVar2.j, 0, gVar2.b * min);
int i4 = gVar2.r - min;
gVar2.r = i4;
short[] sArr = gVar2.j;
int i5 = gVar2.b;
System.arraycopy(sArr, min * i5, sArr, 0, i4 * i5);
this.k += i3;
this.g.limit(i3);
this.i = this.g;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.audio.b
public final boolean a() {
g gVar;
return this.l && ((gVar = this.d) == null || gVar.r == 0);
}
}

View File

@@ -0,0 +1,23 @@
package com.fyber.inneractive.sdk.player.exoplayer2;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.util.UUID;
/* loaded from: classes2.dex */
public final class b {
public static final int a;
public static final UUID b;
static {
a = s.a < 23 ? 1020 : 6396;
b = new UUID(0L, 0L);
new UUID(1186680826959645954L, -5988876978535335093L);
new UUID(-1301668207276963122L, -6645017420763422227L);
new UUID(-7348484286925749626L, -6083546864340672619L);
}
public static long a(long j) {
return j == C.TIME_UNSET ? C.TIME_UNSET : j / 1000;
}
}

View File

@@ -0,0 +1,60 @@
package com.fyber.inneractive.sdk.player.exoplayer2;
import com.mbridge.msdk.playercommon.exoplayer2.DefaultLoadControl;
/* loaded from: classes2.dex */
public final class c {
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.j a;
public final long b;
public final long c;
public final long d;
public final long e;
public int f;
public boolean g;
public c(com.fyber.inneractive.sdk.player.exoplayer2.upstream.j jVar, int i) {
this(jVar, (Object) null);
}
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.j a() {
return this.a;
}
public c(com.fyber.inneractive.sdk.player.exoplayer2.upstream.j jVar, Object obj) {
this.a = jVar;
this.b = DefaultLoadControl.DEFAULT_MIN_BUFFER_MS * 1000;
this.c = 30000 * 1000;
this.d = 2500000L;
this.e = 5000000L;
}
public final boolean a(long j) {
int i;
boolean z = false;
char c = j > this.c ? (char) 0 : j < this.b ? (char) 2 : (char) 1;
com.fyber.inneractive.sdk.player.exoplayer2.upstream.j jVar = this.a;
synchronized (jVar) {
i = jVar.f * jVar.b;
}
boolean z2 = i >= this.f;
boolean z3 = this.g;
if (c == 2 || (c == 1 && z3 && !z2)) {
z = true;
}
this.g = z;
return z;
}
public final void a(boolean z) {
this.f = 0;
this.g = false;
if (z) {
com.fyber.inneractive.sdk.player.exoplayer2.upstream.j jVar = this.a;
synchronized (jVar) {
if (jVar.a) {
jVar.a(0);
}
}
}
}
}

View File

@@ -0,0 +1,8 @@
package com.fyber.inneractive.sdk.player.exoplayer2;
/* loaded from: classes2.dex */
public final class d extends Exception {
public d(Throwable th) {
super(null, th);
}
}

View File

@@ -0,0 +1,25 @@
package com.fyber.inneractive.sdk.player.exoplayer2.decoder;
/* loaded from: classes2.dex */
public final class DecoderCounters {
public int decoderInitCount;
public int decoderReleaseCount;
public int droppedOutputBufferCount;
public int inputBufferCount;
public int maxConsecutiveDroppedOutputBufferCount;
public int renderedOutputBufferCount;
public int skippedOutputBufferCount;
public synchronized void ensureUpdated() {
}
public void merge(DecoderCounters decoderCounters) {
this.decoderInitCount += decoderCounters.decoderInitCount;
this.decoderReleaseCount += decoderCounters.decoderReleaseCount;
this.inputBufferCount += decoderCounters.inputBufferCount;
this.renderedOutputBufferCount += decoderCounters.renderedOutputBufferCount;
this.skippedOutputBufferCount += decoderCounters.skippedOutputBufferCount;
this.droppedOutputBufferCount += decoderCounters.droppedOutputBufferCount;
this.maxConsecutiveDroppedOutputBufferCount = Math.max(this.maxConsecutiveDroppedOutputBufferCount, decoderCounters.maxConsecutiveDroppedOutputBufferCount);
}
}

View File

@@ -0,0 +1,66 @@
package com.fyber.inneractive.sdk.player.exoplayer2.decoder;
import android.annotation.TargetApi;
import android.media.MediaCodec;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
/* loaded from: classes2.dex */
public final class a {
public byte[] a;
public int[] b;
public int[] c;
public final MediaCodec.CryptoInfo d;
public final C0084a e;
@TargetApi(24)
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.decoder.a$a, reason: collision with other inner class name */
public static final class C0084a {
public final MediaCodec.CryptoInfo a;
public final MediaCodec.CryptoInfo.Pattern b;
public /* synthetic */ C0084a(MediaCodec.CryptoInfo cryptoInfo, int i) {
this(cryptoInfo);
}
public static void a(C0084a c0084a, int i, int i2) {
c0084a.b.set(i, i2);
c0084a.a.setPattern(c0084a.b);
}
public C0084a(MediaCodec.CryptoInfo cryptoInfo) {
this.a = cryptoInfo;
this.b = new MediaCodec.CryptoInfo.Pattern(0, 0);
}
}
public a() {
int i = s.a;
MediaCodec.CryptoInfo a = i >= 16 ? a() : null;
this.d = a;
this.e = i >= 24 ? new C0084a(a, 0) : null;
}
public final void a(int i, int[] iArr, int[] iArr2, byte[] bArr, byte[] bArr2) {
this.b = iArr;
this.c = iArr2;
this.a = bArr2;
int i2 = s.a;
if (i2 >= 16) {
MediaCodec.CryptoInfo cryptoInfo = this.d;
cryptoInfo.numSubSamples = i;
cryptoInfo.numBytesOfClearData = iArr;
cryptoInfo.numBytesOfEncryptedData = iArr2;
cryptoInfo.key = bArr;
cryptoInfo.iv = bArr2;
cryptoInfo.mode = 1;
if (i2 >= 24) {
C0084a.a(this.e, 0, 0);
}
}
}
@TargetApi(16)
public static MediaCodec.CryptoInfo a() {
return new MediaCodec.CryptoInfo();
}
}

View File

@@ -0,0 +1,28 @@
package com.fyber.inneractive.sdk.player.exoplayer2.decoder;
import java.nio.ByteBuffer;
/* loaded from: classes2.dex */
public final class b {
public int a;
public ByteBuffer c;
public long d;
public final a b = new a();
public final int e = 0;
public static b b() {
return new b();
}
public final boolean a(int i) {
return (this.a & i) == i;
}
public final void a() {
this.a = 0;
ByteBuffer byteBuffer = this.c;
if (byteBuffer != null) {
byteBuffer.clear();
}
}
}

View File

@@ -0,0 +1,159 @@
package com.fyber.inneractive.sdk.player.exoplayer2.drm;
import android.os.Parcel;
import android.os.Parcelable;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import java.util.Arrays;
import java.util.Comparator;
import java.util.UUID;
/* loaded from: classes2.dex */
public final class a implements Comparator<b>, Parcelable {
public static final Parcelable.Creator<a> CREATOR = new C0085a();
public final b[] a;
public int b;
public final int c;
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.drm.a$a, reason: collision with other inner class name */
public class C0085a implements Parcelable.Creator<a> {
@Override // android.os.Parcelable.Creator
public final a createFromParcel(Parcel parcel) {
return new a(parcel);
}
@Override // android.os.Parcelable.Creator
public final a[] newArray(int i) {
return new a[i];
}
}
public static final class b implements Parcelable {
public static final Parcelable.Creator<b> CREATOR = new C0086a();
public int a;
public final UUID b;
public final String c;
public final byte[] d;
public final boolean e;
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.drm.a$b$a, reason: collision with other inner class name */
public class C0086a implements Parcelable.Creator<b> {
@Override // android.os.Parcelable.Creator
public final b createFromParcel(Parcel parcel) {
return new b(parcel);
}
@Override // android.os.Parcelable.Creator
public final b[] newArray(int i) {
return new b[i];
}
}
public b() {
throw null;
}
public b(UUID uuid, String str, byte[] bArr) {
this.b = (UUID) com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(uuid);
this.c = (String) com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(str);
this.d = (byte[]) com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(bArr);
this.e = false;
}
@Override // android.os.Parcelable
public final int describeContents() {
return 0;
}
public final boolean equals(Object obj) {
if (!(obj instanceof b)) {
return false;
}
if (obj == this) {
return true;
}
b bVar = (b) obj;
return this.c.equals(bVar.c) && s.a(this.b, bVar.b) && Arrays.equals(this.d, bVar.d);
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
parcel.writeLong(this.b.getMostSignificantBits());
parcel.writeLong(this.b.getLeastSignificantBits());
parcel.writeString(this.c);
parcel.writeByteArray(this.d);
parcel.writeByte(this.e ? (byte) 1 : (byte) 0);
}
public final int hashCode() {
if (this.a == 0) {
this.a = Arrays.hashCode(this.d) + ((this.c.hashCode() + (this.b.hashCode() * 31)) * 31);
}
return this.a;
}
public b(Parcel parcel) {
this.b = new UUID(parcel.readLong(), parcel.readLong());
this.c = parcel.readString();
this.d = parcel.createByteArray();
this.e = parcel.readByte() != 0;
}
}
public a() {
throw null;
}
public a(boolean z, b... bVarArr) {
bVarArr = z ? (b[]) bVarArr.clone() : bVarArr;
Arrays.sort(bVarArr, this);
for (int i = 1; i < bVarArr.length; i++) {
if (bVarArr[i - 1].b.equals(bVarArr[i].b)) {
throw new IllegalArgumentException("Duplicate data for uuid: " + bVarArr[i].b);
}
}
this.a = bVarArr;
this.c = bVarArr.length;
}
@Override // java.util.Comparator
public final int compare(b bVar, b bVar2) {
b bVar3 = bVar;
b bVar4 = bVar2;
UUID uuid = com.fyber.inneractive.sdk.player.exoplayer2.b.b;
return uuid.equals(bVar3.b) ? uuid.equals(bVar4.b) ? 0 : 1 : bVar3.b.compareTo(bVar4.b);
}
@Override // android.os.Parcelable
public final int describeContents() {
return 0;
}
@Override // java.util.Comparator
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj == null || a.class != obj.getClass()) {
return false;
}
return Arrays.equals(this.a, ((a) obj).a);
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
parcel.writeTypedArray(this.a, 0);
}
public final int hashCode() {
if (this.b == 0) {
this.b = Arrays.hashCode(this.a);
}
return this.b;
}
public a(Parcel parcel) {
b[] bVarArr = (b[]) parcel.createTypedArray(b.CREATOR);
this.a = bVarArr;
this.c = bVarArr.length;
}
}

View File

@@ -0,0 +1,37 @@
package com.fyber.inneractive.sdk.player.exoplayer2;
/* loaded from: classes2.dex */
public interface e {
public interface a {
void a();
void a(int i, boolean z);
void a(d dVar);
void b();
void c();
void d();
void e();
}
public interface b {
void a(int i, Object obj) throws d;
}
public static final class c {
public final b a;
public final int b;
public final Object c;
public c(o oVar, int i, Object obj) {
this.a = oVar;
this.b = i;
this.c = obj;
}
}
}

View File

@@ -0,0 +1,37 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
/* loaded from: classes2.dex */
public final class a implements l {
public final long[] a;
public final long[] b;
public final long c;
public a(int[] iArr, long[] jArr, long[] jArr2, long[] jArr3) {
this.a = jArr;
this.b = jArr3;
int length = iArr.length;
if (length <= 0) {
this.c = 0L;
} else {
int i = length - 1;
this.c = jArr2[i] + jArr3[i];
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final boolean b() {
return true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long c() {
return this.c;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long a(long j) {
return this.a[s.a(this.b, j, true)];
}
}

View File

@@ -0,0 +1,109 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import java.io.EOFException;
import java.io.IOException;
import java.util.Arrays;
/* loaded from: classes2.dex */
public final class b {
public static final byte[] g = new byte[4096];
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.f a;
public final long b;
public long c;
public byte[] d = new byte[65536];
public int e;
public int f;
public b(com.fyber.inneractive.sdk.player.exoplayer2.upstream.f fVar, long j, long j2) {
this.a = fVar;
this.c = j;
this.b = j2;
}
public final boolean a(byte[] bArr, int i, int i2, boolean z) throws IOException, InterruptedException {
if (!a(i2, z)) {
return false;
}
System.arraycopy(this.d, this.e - i2, bArr, i, i2);
return true;
}
public final boolean b(byte[] bArr, int i, int i2, boolean z) throws IOException, InterruptedException {
int i3;
int i4 = this.f;
if (i4 == 0) {
i3 = 0;
} else {
int min = Math.min(i4, i2);
System.arraycopy(this.d, 0, bArr, i, min);
int i5 = this.f - min;
this.f = i5;
this.e = 0;
byte[] bArr2 = this.d;
byte[] bArr3 = i5 < bArr2.length - 524288 ? new byte[65536 + i5] : bArr2;
System.arraycopy(bArr2, min, bArr3, 0, i5);
this.d = bArr3;
i3 = min;
}
while (i3 < i2 && i3 != -1) {
i3 = a(bArr, i, i2, i3, z);
}
if (i3 != -1) {
this.c += i3;
}
return i3 != -1;
}
public final boolean a(int i, boolean z) throws IOException, InterruptedException {
int i2 = this.e + i;
byte[] bArr = this.d;
if (i2 > bArr.length) {
int i3 = s.a;
this.d = Arrays.copyOf(this.d, Math.max(65536 + i2, Math.min(bArr.length * 2, i2 + 524288)));
}
int min = Math.min(this.f - this.e, i);
while (min < i) {
min = a(this.d, this.e, i, min, z);
if (min == -1) {
return false;
}
}
int i4 = this.e + i;
this.e = i4;
this.f = Math.max(this.f, i4);
return true;
}
public final void a(int i) throws IOException, InterruptedException {
int min = Math.min(this.f, i);
int i2 = this.f - min;
this.f = i2;
this.e = 0;
byte[] bArr = this.d;
byte[] bArr2 = i2 < bArr.length - 524288 ? new byte[65536 + i2] : bArr;
System.arraycopy(bArr, min, bArr2, 0, i2);
this.d = bArr2;
int i3 = min;
while (i3 < i && i3 != -1) {
i3 = a(g, -i3, Math.min(i, i3 + 4096), i3, false);
}
if (i3 != -1) {
this.c += i3;
}
}
public final int a(byte[] bArr, int i, int i2, int i3, boolean z) throws InterruptedException, IOException {
if (!Thread.interrupted()) {
int read = this.a.read(bArr, i + i3, i2 - i3);
if (read != -1) {
return i3 + read;
}
if (i3 == 0 && z) {
return -1;
}
throw new EOFException();
}
throw new InterruptedException();
}
}

View File

@@ -0,0 +1,47 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.p;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.u;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.lang.reflect.Constructor;
/* loaded from: classes2.dex */
public final class c implements h {
public static final Constructor<? extends f> a;
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.h
public final synchronized f[] a() {
f[] fVarArr;
Constructor<? extends f> constructor = a;
fVarArr = new f[constructor == null ? 11 : 12];
fVarArr[0] = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv.d();
fVarArr[1] = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.d(null);
fVarArr[2] = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.f();
fVarArr[3] = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3.b(C.TIME_UNSET);
fVarArr[4] = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.c(0L);
fVarArr[5] = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.a(0L);
fVarArr[6] = new u(0);
fVarArr[7] = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.flv.b();
fVarArr[8] = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.c();
fVarArr[9] = new p();
fVarArr[10] = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.wav.a();
if (constructor != null) {
try {
fVarArr[11] = constructor.newInstance(new Object[0]);
} catch (Exception e) {
throw new IllegalStateException("Unexpected error creating FLAC extractor", e);
}
}
return fVarArr;
}
static {
Constructor<? extends f> constructor;
try {
constructor = Class.forName("com.fyber.inneractive.sdk.player.exoplayer2.ext.flac.FlacExtractor").asSubclass(f.class).getConstructor(new Class[0]);
} catch (ClassNotFoundException | NoSuchMethodException unused) {
constructor = null;
}
a = constructor;
}
}

View File

@@ -0,0 +1,691 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import java.io.EOFException;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.atomic.AtomicInteger;
import kotlin.jvm.internal.ByteCompanionObject;
/* loaded from: classes2.dex */
public final class d implements m {
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.b a;
public final int b;
public final b c;
public final LinkedBlockingDeque<com.fyber.inneractive.sdk.player.exoplayer2.upstream.a> d;
public final a e;
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k f;
public final AtomicInteger g;
public long h;
public com.fyber.inneractive.sdk.player.exoplayer2.j i;
public long j;
public com.fyber.inneractive.sdk.player.exoplayer2.upstream.a k;
public int l;
public boolean m;
public c n;
public static final class a {
public int a;
public long b;
public long c;
public byte[] d;
public a() {
}
public /* synthetic */ a(int i) {
this();
}
}
public interface c {
void g();
}
public d(com.fyber.inneractive.sdk.player.exoplayer2.upstream.b bVar) {
this.a = bVar;
int a2 = ((com.fyber.inneractive.sdk.player.exoplayer2.upstream.j) bVar).a();
this.b = a2;
this.c = new b();
this.d = new LinkedBlockingDeque<>();
this.e = new a(0);
this.f = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(32);
this.g = new AtomicInteger();
this.l = a2;
}
public final void a(boolean z) {
int andSet = this.g.getAndSet(z ? 0 : 2);
a();
b bVar = this.c;
bVar.m = Long.MIN_VALUE;
bVar.n = Long.MIN_VALUE;
if (andSet == 2) {
this.i = null;
}
}
public final void b() {
if (this.g.getAndSet(2) == 0) {
a();
}
}
public final void c() {
if (this.g.compareAndSet(1, 0)) {
return;
}
a();
}
public final long d() {
long max;
b bVar = this.c;
synchronized (bVar) {
max = Math.max(bVar.m, bVar.n);
}
return max;
}
public final com.fyber.inneractive.sdk.player.exoplayer2.j e() {
com.fyber.inneractive.sdk.player.exoplayer2.j jVar;
b bVar = this.c;
synchronized (bVar) {
jVar = bVar.p ? null : bVar.q;
}
return jVar;
}
public final void f() {
long j;
b bVar = this.c;
synchronized (bVar) {
int i = bVar.i;
if (i == 0) {
j = -1;
} else {
int i2 = bVar.k + i;
int i3 = bVar.a;
int i4 = (i2 - 1) % i3;
bVar.k = i2 % i3;
bVar.j += i;
bVar.i = 0;
j = bVar.c[i4] + bVar.d[i4];
}
}
if (j != -1) {
a(j);
}
}
public final boolean a(boolean z, long j) {
long j2;
b bVar = this.c;
synchronized (bVar) {
try {
if (bVar.i != 0) {
long[] jArr = bVar.f;
int i = bVar.k;
if (j >= jArr[i] && (j <= bVar.n || z)) {
int i2 = -1;
int i3 = 0;
while (i != bVar.l && bVar.f[i] <= j) {
if ((bVar.e[i] & 1) != 0) {
i2 = i3;
}
i = (i + 1) % bVar.a;
i3++;
}
if (i2 != -1) {
int i4 = (bVar.k + i2) % bVar.a;
bVar.k = i4;
bVar.j += i2;
bVar.i -= i2;
j2 = bVar.c[i4];
}
}
}
j2 = -1;
} catch (Throwable th) {
throw th;
}
}
if (j2 == -1) {
return false;
}
a(j2);
return true;
}
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.k kVar, com.fyber.inneractive.sdk.player.exoplayer2.decoder.b bVar, boolean z, boolean z2, long j) {
long j2;
char c2;
ByteBuffer allocateDirect;
ByteBuffer allocateDirect2;
int i;
b bVar2 = this.c;
com.fyber.inneractive.sdk.player.exoplayer2.j jVar = this.i;
a aVar = this.e;
synchronized (bVar2) {
try {
if (bVar2.i != 0) {
if (!z) {
com.fyber.inneractive.sdk.player.exoplayer2.j[] jVarArr = bVar2.h;
int i2 = bVar2.k;
if (jVarArr[i2] == jVar) {
if (bVar.c != null || bVar.e != 0) {
long j3 = bVar2.f[i2];
bVar.d = j3;
bVar.a = bVar2.e[i2];
aVar.a = bVar2.d[i2];
aVar.b = bVar2.c[i2];
aVar.d = bVar2.g[i2];
bVar2.m = Math.max(bVar2.m, j3);
int i3 = bVar2.i - 1;
bVar2.i = i3;
int i4 = bVar2.k + 1;
bVar2.k = i4;
bVar2.j++;
if (i4 == bVar2.a) {
bVar2.k = 0;
}
if (i3 > 0) {
j2 = bVar2.c[bVar2.k];
} else {
j2 = aVar.b + aVar.a;
}
aVar.c = j2;
c2 = 65532;
}
c2 = 65533;
}
}
kVar.a = bVar2.h[bVar2.k];
c2 = 65531;
} else if (z2) {
bVar.a = 4;
c2 = 65532;
} else {
com.fyber.inneractive.sdk.player.exoplayer2.j jVar2 = bVar2.q;
if (jVar2 != null && (z || jVar2 != jVar)) {
kVar.a = jVar2;
c2 = 65531;
}
c2 = 65533;
}
} catch (Throwable th) {
throw th;
}
}
if (c2 == 65531) {
this.i = kVar.a;
return -5;
}
if (c2 != 65532) {
if (c2 == 65533) {
return -3;
}
throw new IllegalStateException();
}
if (bVar.a(4)) {
return -4;
}
if (bVar.d < j) {
bVar.a |= Integer.MIN_VALUE;
}
if (bVar.a(1073741824)) {
a aVar2 = this.e;
long j4 = aVar2.b;
this.f.c(1);
a(1, j4, this.f.a);
long j5 = j4 + 1;
byte b2 = this.f.a[0];
boolean z3 = (b2 & ByteCompanionObject.MIN_VALUE) != 0;
int i5 = b2 & Byte.MAX_VALUE;
com.fyber.inneractive.sdk.player.exoplayer2.decoder.a aVar3 = bVar.b;
if (aVar3.a == null) {
aVar3.a = new byte[16];
}
a(i5, j5, aVar3.a);
long j6 = j5 + i5;
if (z3) {
this.f.c(2);
a(2, j6, this.f.a);
j6 += 2;
i = this.f.o();
} else {
i = 1;
}
com.fyber.inneractive.sdk.player.exoplayer2.decoder.a aVar4 = bVar.b;
int[] iArr = aVar4.b;
if (iArr == null || iArr.length < i) {
iArr = new int[i];
}
int[] iArr2 = iArr;
int[] iArr3 = aVar4.c;
if (iArr3 == null || iArr3.length < i) {
iArr3 = new int[i];
}
int[] iArr4 = iArr3;
if (z3) {
int i6 = i * 6;
this.f.c(i6);
a(i6, j6, this.f.a);
j6 += i6;
this.f.e(0);
for (int i7 = 0; i7 < i; i7++) {
iArr2[i7] = this.f.o();
iArr4[i7] = this.f.m();
}
} else {
iArr2[0] = 0;
iArr4[0] = aVar2.a - ((int) (j6 - aVar2.b));
}
com.fyber.inneractive.sdk.player.exoplayer2.decoder.a aVar5 = bVar.b;
aVar5.a(i, iArr2, iArr4, aVar2.d, aVar5.a);
long j7 = aVar2.b;
int i8 = (int) (j6 - j7);
aVar2.b = j7 + i8;
aVar2.a -= i8;
}
int i9 = this.e.a;
ByteBuffer byteBuffer = bVar.c;
if (byteBuffer == null) {
int i10 = bVar.e;
if (i10 == 1) {
allocateDirect2 = ByteBuffer.allocate(i9);
} else if (i10 == 2) {
allocateDirect2 = ByteBuffer.allocateDirect(i9);
} else {
throw new IllegalStateException("Buffer too small (" + (byteBuffer != null ? byteBuffer.capacity() : 0) + " < " + i9 + ")");
}
bVar.c = allocateDirect2;
} else {
int capacity = byteBuffer.capacity();
int position = bVar.c.position();
int i11 = i9 + position;
if (capacity < i11) {
int i12 = bVar.e;
if (i12 == 1) {
allocateDirect = ByteBuffer.allocate(i11);
} else if (i12 == 2) {
allocateDirect = ByteBuffer.allocateDirect(i11);
} else {
ByteBuffer byteBuffer2 = bVar.c;
throw new IllegalStateException("Buffer too small (" + (byteBuffer2 != null ? byteBuffer2.capacity() : 0) + " < " + i11 + ")");
}
if (position > 0) {
bVar.c.position(0);
bVar.c.limit(position);
allocateDirect.put(bVar.c);
}
bVar.c = allocateDirect;
}
}
a aVar6 = this.e;
long j8 = aVar6.b;
ByteBuffer byteBuffer3 = bVar.c;
int i13 = aVar6.a;
while (i13 > 0) {
a(j8);
int i14 = (int) (j8 - this.h);
int min = Math.min(i13, this.b - i14);
com.fyber.inneractive.sdk.player.exoplayer2.upstream.a peek = this.d.peek();
byteBuffer3.put(peek.a, peek.b + i14, min);
j8 += min;
i13 -= min;
}
a(this.e.c);
return -4;
}
public static final class b {
public int i;
public int j;
public int k;
public int l;
public com.fyber.inneractive.sdk.player.exoplayer2.j q;
public int r;
public int a = 1000;
public int[] b = new int[1000];
public long[] c = new long[1000];
public long[] f = new long[1000];
public int[] e = new int[1000];
public int[] d = new int[1000];
public byte[][] g = new byte[1000][];
public com.fyber.inneractive.sdk.player.exoplayer2.j[] h = new com.fyber.inneractive.sdk.player.exoplayer2.j[1000];
public long m = Long.MIN_VALUE;
public long n = Long.MIN_VALUE;
public boolean p = true;
public boolean o = true;
public final synchronized void a(long j, int i, long j2, int i2, byte[] bArr) {
try {
if (this.o) {
if ((i & 1) == 0) {
return;
} else {
this.o = false;
}
}
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(!this.p);
b(j);
long[] jArr = this.f;
int i3 = this.l;
jArr[i3] = j;
long[] jArr2 = this.c;
jArr2[i3] = j2;
this.d[i3] = i2;
this.e[i3] = i;
this.g[i3] = bArr;
this.h[i3] = this.q;
this.b[i3] = this.r;
int i4 = this.i + 1;
this.i = i4;
int i5 = this.a;
if (i4 == i5) {
int i6 = i5 + 1000;
int[] iArr = new int[i6];
long[] jArr3 = new long[i6];
long[] jArr4 = new long[i6];
int[] iArr2 = new int[i6];
int[] iArr3 = new int[i6];
byte[][] bArr2 = new byte[i6][];
com.fyber.inneractive.sdk.player.exoplayer2.j[] jVarArr = new com.fyber.inneractive.sdk.player.exoplayer2.j[i6];
int i7 = this.k;
int i8 = i5 - i7;
System.arraycopy(jArr2, i7, jArr3, 0, i8);
System.arraycopy(this.f, this.k, jArr4, 0, i8);
System.arraycopy(this.e, this.k, iArr2, 0, i8);
System.arraycopy(this.d, this.k, iArr3, 0, i8);
System.arraycopy(this.g, this.k, bArr2, 0, i8);
System.arraycopy(this.h, this.k, jVarArr, 0, i8);
System.arraycopy(this.b, this.k, iArr, 0, i8);
int i9 = this.k;
System.arraycopy(this.c, 0, jArr3, i8, i9);
System.arraycopy(this.f, 0, jArr4, i8, i9);
System.arraycopy(this.e, 0, iArr2, i8, i9);
System.arraycopy(this.d, 0, iArr3, i8, i9);
System.arraycopy(this.g, 0, bArr2, i8, i9);
System.arraycopy(this.h, 0, jVarArr, i8, i9);
System.arraycopy(this.b, 0, iArr, i8, i9);
this.c = jArr3;
this.f = jArr4;
this.e = iArr2;
this.d = iArr3;
this.g = bArr2;
this.h = jVarArr;
this.b = iArr;
this.k = 0;
int i10 = this.a;
this.l = i10;
this.i = i10;
this.a = i6;
} else {
int i11 = i3 + 1;
this.l = i11;
if (i11 == i5) {
this.l = 0;
}
}
} catch (Throwable th) {
throw th;
}
}
public final synchronized void b(long j) {
this.n = Math.max(this.n, j);
}
public final synchronized boolean a(long j) {
try {
boolean z = false;
if (this.m >= j) {
return false;
}
int i = this.i;
while (i > 0 && this.f[((this.k + i) - 1) % this.a] >= j) {
i--;
}
int i2 = this.j;
int i3 = this.i;
int i4 = (i2 + i3) - (i + i2);
if (i4 >= 0 && i4 <= i3) {
z = true;
}
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(z);
if (i4 != 0) {
int i5 = this.i - i4;
this.i = i5;
int i6 = this.l;
int i7 = this.a;
this.l = ((i6 + i7) - i4) % i7;
this.n = Long.MIN_VALUE;
for (int i8 = i5 - 1; i8 >= 0; i8--) {
int i9 = (this.k + i8) % this.a;
this.n = Math.max(this.n, this.f[i9]);
if ((this.e[i9] & 1) != 0) {
break;
}
}
long j2 = this.c[this.l];
} else if (this.j != 0) {
int i10 = this.l;
if (i10 == 0) {
i10 = this.a;
}
int i11 = i10 - 1;
long j3 = this.c[i11];
int i12 = this.d[i11];
}
return true;
} catch (Throwable th) {
throw th;
}
}
}
public final void a(int i, long j, byte[] bArr) {
int i2 = 0;
while (i2 < i) {
a(j);
int i3 = (int) (j - this.h);
int min = Math.min(i - i2, this.b - i3);
com.fyber.inneractive.sdk.player.exoplayer2.upstream.a peek = this.d.peek();
System.arraycopy(peek.a, peek.b + i3, bArr, i2, min);
j += min;
i2 += min;
}
}
public final void a(long j) {
int i = ((int) (j - this.h)) / this.b;
for (int i2 = 0; i2 < i; i2++) {
com.fyber.inneractive.sdk.player.exoplayer2.upstream.b bVar = this.a;
com.fyber.inneractive.sdk.player.exoplayer2.upstream.a remove = this.d.remove();
com.fyber.inneractive.sdk.player.exoplayer2.upstream.j jVar = (com.fyber.inneractive.sdk.player.exoplayer2.upstream.j) bVar;
synchronized (jVar) {
com.fyber.inneractive.sdk.player.exoplayer2.upstream.a[] aVarArr = jVar.d;
aVarArr[0] = remove;
jVar.a(aVarArr);
}
this.h += this.b;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.m
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.j jVar) {
boolean z;
if (jVar == null) {
jVar = null;
}
b bVar = this.c;
synchronized (bVar) {
z = true;
if (jVar == null) {
bVar.p = true;
} else {
bVar.p = false;
if (!s.a(jVar, bVar.q)) {
bVar.q = jVar;
}
}
z = false;
}
c cVar = this.n;
if (cVar == null || !z) {
return;
}
cVar.g();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.m
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar, int i, boolean z) throws IOException, InterruptedException {
int i2 = 0;
if (!this.g.compareAndSet(0, 1)) {
int min = Math.min(bVar.f, i);
int i3 = bVar.f - min;
bVar.f = i3;
bVar.e = 0;
byte[] bArr = bVar.d;
byte[] bArr2 = i3 < bArr.length - 524288 ? new byte[65536 + i3] : bArr;
System.arraycopy(bArr, min, bArr2, 0, i3);
bVar.d = bArr2;
if (min == 0) {
min = bVar.a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b.g, 0, Math.min(i, 4096), 0, true);
}
if (min != -1) {
bVar.c += min;
}
if (min != -1) {
return min;
}
if (z) {
return -1;
}
throw new EOFException();
}
try {
int a2 = a(i);
com.fyber.inneractive.sdk.player.exoplayer2.upstream.a aVar = this.k;
byte[] bArr3 = aVar.a;
int i4 = this.l + aVar.b;
int i5 = bVar.f;
if (i5 != 0) {
int min2 = Math.min(i5, a2);
System.arraycopy(bVar.d, 0, bArr3, i4, min2);
int i6 = bVar.f - min2;
bVar.f = i6;
bVar.e = 0;
byte[] bArr4 = bVar.d;
byte[] bArr5 = i6 < bArr4.length - 524288 ? new byte[65536 + i6] : bArr4;
System.arraycopy(bArr4, min2, bArr5, 0, i6);
bVar.d = bArr5;
i2 = min2;
}
if (i2 == 0) {
i2 = bVar.a(bArr3, i4, a2, 0, true);
}
if (i2 != -1) {
bVar.c += i2;
}
if (i2 == -1) {
if (z) {
c();
return -1;
}
throw new EOFException();
}
this.l += i2;
this.j += i2;
c();
return i2;
} catch (Throwable th) {
c();
throw th;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.m
public final void a(int i, com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
if (!this.g.compareAndSet(0, 1)) {
kVar.f(i);
return;
}
while (i > 0) {
int a2 = a(i);
com.fyber.inneractive.sdk.player.exoplayer2.upstream.a aVar = this.k;
kVar.a(aVar.a, aVar.b + this.l, a2);
this.l += a2;
this.j += a2;
i -= a2;
}
c();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.m
public final void a(long j, int i, int i2, int i3, byte[] bArr) {
if (!this.g.compareAndSet(0, 1)) {
this.c.b(j);
return;
}
try {
if (this.m) {
if ((i & 1) != 0 && this.c.a(j)) {
this.m = false;
}
return;
}
this.c.a(j, i, (this.j - i2) - i3, i2, bArr);
} finally {
c();
}
}
public final void a() {
b bVar = this.c;
bVar.j = 0;
bVar.k = 0;
bVar.l = 0;
bVar.i = 0;
bVar.o = true;
com.fyber.inneractive.sdk.player.exoplayer2.upstream.b bVar2 = this.a;
LinkedBlockingDeque<com.fyber.inneractive.sdk.player.exoplayer2.upstream.a> linkedBlockingDeque = this.d;
((com.fyber.inneractive.sdk.player.exoplayer2.upstream.j) bVar2).a((com.fyber.inneractive.sdk.player.exoplayer2.upstream.a[]) linkedBlockingDeque.toArray(new com.fyber.inneractive.sdk.player.exoplayer2.upstream.a[linkedBlockingDeque.size()]));
this.d.clear();
((com.fyber.inneractive.sdk.player.exoplayer2.upstream.j) this.a).b();
this.h = 0L;
this.j = 0L;
this.k = null;
this.l = this.b;
}
public final int a(int i) {
com.fyber.inneractive.sdk.player.exoplayer2.upstream.a aVar;
if (this.l == this.b) {
this.l = 0;
com.fyber.inneractive.sdk.player.exoplayer2.upstream.j jVar = (com.fyber.inneractive.sdk.player.exoplayer2.upstream.j) this.a;
synchronized (jVar) {
try {
jVar.f++;
int i2 = jVar.g;
if (i2 > 0) {
com.fyber.inneractive.sdk.player.exoplayer2.upstream.a[] aVarArr = jVar.h;
int i3 = i2 - 1;
jVar.g = i3;
aVar = aVarArr[i3];
aVarArr[i3] = null;
} else {
aVar = new com.fyber.inneractive.sdk.player.exoplayer2.upstream.a(new byte[jVar.b], 0);
}
} catch (Throwable th) {
throw th;
}
}
this.k = aVar;
this.d.add(aVar);
}
return Math.min(i, this.b - this.l);
}
}

View File

@@ -0,0 +1,45 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
import java.io.EOFException;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class e implements m {
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.m
public final void a(int i, com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
kVar.f(i);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.m
public final void a(long j, int i, int i2, int i3, byte[] bArr) {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.m
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.j jVar) {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.m
public final int a(b bVar, int i, boolean z) throws IOException, InterruptedException {
int min = Math.min(bVar.f, i);
int i2 = bVar.f - min;
bVar.f = i2;
bVar.e = 0;
byte[] bArr = bVar.d;
byte[] bArr2 = i2 < bArr.length - 524288 ? new byte[65536 + i2] : bArr;
System.arraycopy(bArr, min, bArr2, 0, i2);
bVar.d = bArr2;
if (min == 0) {
min = bVar.a(b.g, 0, Math.min(i, 4096), 0, true);
}
if (min != -1) {
bVar.c += min;
}
if (min != -1) {
return min;
}
if (z) {
return -1;
}
throw new EOFException();
}
}

View File

@@ -0,0 +1,16 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
import java.io.IOException;
/* loaded from: classes2.dex */
public interface f {
int a(b bVar, k kVar) throws IOException, InterruptedException;
void a();
void a(long j, long j2);
void a(g gVar);
boolean a(b bVar) throws IOException, InterruptedException;
}

View File

@@ -0,0 +1,67 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.flv;
import android.util.Pair;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.flv.d;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.m;
import com.fyber.inneractive.sdk.player.exoplayer2.j;
import com.fyber.inneractive.sdk.player.exoplayer2.util.k;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.util.Collections;
/* loaded from: classes2.dex */
public final class a extends d {
public static final int[] e = {5512, 11025, 22050, 44100};
public boolean b;
public boolean c;
public int d;
public a(m mVar) {
super(mVar);
}
public final boolean a(k kVar) throws d.a {
if (this.b) {
kVar.f(1);
} else {
int j = kVar.j();
int i = (j >> 4) & 15;
this.d = i;
if (i == 2) {
this.a.a(j.a(null, MimeTypes.AUDIO_MPEG, -1, -1, 1, e[(j >> 2) & 3], -1, null, null, 0, null));
this.c = true;
} else if (i == 7 || i == 8) {
this.a.a(j.a(null, i == 7 ? MimeTypes.AUDIO_ALAW : MimeTypes.AUDIO_MLAW, -1, -1, 1, 8000, (j & 1) == 1 ? 2 : 3, null, null, 0, null));
this.c = true;
} else if (i != 10) {
throw new d.a("Audio format not supported: " + this.d);
}
this.b = true;
}
return true;
}
public final void a(long j, k kVar) {
if (this.d == 2) {
int a = kVar.a();
this.a.a(a, kVar);
this.a.a(j, 1, a, 0, null);
return;
}
int j2 = kVar.j();
if (j2 != 0 || this.c) {
if (this.d != 10 || j2 == 1) {
int a2 = kVar.a();
this.a.a(a2, kVar);
this.a.a(j, 1, a2, 0, null);
return;
}
return;
}
int a3 = kVar.a();
byte[] bArr = new byte[a3];
kVar.a(bArr, 0, a3);
Pair<Integer, Integer> a4 = com.fyber.inneractive.sdk.player.exoplayer2.util.c.a(bArr);
this.a.a(j.a(null, MimeTypes.AUDIO_AAC, -1, -1, ((Integer) a4.second).intValue(), ((Integer) a4.first).intValue(), -1, Collections.singletonList(bArr), null, 0, null));
this.c = true;
}
}

View File

@@ -0,0 +1,174 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.flv;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.f;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.g;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.l;
import com.fyber.inneractive.sdk.player.exoplayer2.util.k;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class b implements f, l {
public static final int n = s.a("FLV");
public g e;
public int g;
public int h;
public int i;
public long j;
public a k;
public e l;
public c m;
public final k a = new k(4);
public final k b = new k(9);
public final k c = new k(11);
public final k d = new k();
public int f = 1;
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long a(long j) {
return 0L;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(long j, long j2) {
this.f = 1;
this.g = 0;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(g gVar) {
this.e = gVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
bVar.a(this.a.a, 0, 3, false);
this.a.e(0);
if (this.a.l() != n) {
return false;
}
bVar.a(this.a.a, 0, 2, false);
this.a.e(0);
if ((this.a.o() & 250) != 0) {
return false;
}
bVar.a(this.a.a, 0, 4, false);
this.a.e(0);
int c = this.a.c();
bVar.e = 0;
bVar.a(c, false);
bVar.a(this.a.a, 0, 4, false);
this.a.e(0);
return this.a.c() == 0;
}
public final k b(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
if (this.i > this.d.b()) {
k kVar = this.d;
kVar.a(new byte[Math.max(kVar.b() * 2, this.i)], 0);
} else {
this.d.e(0);
}
this.d.d(this.i);
bVar.b(this.d.a, 0, this.i, false);
return this.d;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final boolean b() {
return false;
}
public final boolean c(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
boolean z;
c cVar;
e eVar;
a aVar;
int i = this.h;
if (i == 8 && (aVar = this.k) != null) {
k b = b(bVar);
long j = this.j;
aVar.a(b);
aVar.a(j, b);
} else if (i == 9 && (eVar = this.l) != null) {
k b2 = b(bVar);
long j2 = this.j;
if (eVar.a(b2)) {
eVar.a(j2, b2);
}
} else {
if (i != 18 || (cVar = this.m) == null) {
bVar.a(this.i);
z = false;
this.g = 4;
this.f = 2;
return z;
}
cVar.a(this.j, b(bVar));
}
z = true;
this.g = 4;
this.f = 2;
return z;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long c() {
return this.m.b;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar, com.fyber.inneractive.sdk.player.exoplayer2.extractor.k kVar) throws IOException, InterruptedException {
while (true) {
int i = this.f;
if (i != 1) {
if (i == 2) {
bVar.a(this.g);
this.g = 0;
this.f = 3;
} else if (i != 3) {
if (i == 4 && c(bVar)) {
return 0;
}
} else {
if (!bVar.b(this.c.a, 0, 11, true)) {
return -1;
}
this.c.e(0);
this.h = this.c.j();
this.i = this.c.l();
this.j = this.c.l();
this.j = ((this.c.j() << 24) | this.j) * 1000;
this.c.f(3);
this.f = 4;
}
} else {
if (!bVar.b(this.b.a, 0, 9, true)) {
return -1;
}
this.b.e(0);
this.b.f(4);
int j = this.b.j();
boolean z = (j & 4) != 0;
boolean z2 = (j & 1) != 0;
if (z && this.k == null) {
this.k = new a(this.e.a(8, 1));
}
if (z2 && this.l == null) {
this.l = new e(this.e.a(9, 2));
}
if (this.m == null) {
this.m = new c();
}
this.e.b();
this.e.a(this);
this.g = this.b.c() - 5;
this.f = 2;
}
}
}
}

View File

@@ -0,0 +1,96 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.flv;
import com.fyber.inneractive.sdk.player.exoplayer2.m;
import com.fyber.inneractive.sdk.player.exoplayer2.util.k;
import com.ironsource.mediationsdk.utils.IronSourceConstants;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
/* loaded from: classes2.dex */
public final class c extends d {
public long b;
public c() {
super(null);
this.b = C.TIME_UNSET;
}
public final void a(long j, k kVar) throws m {
if (kVar.j() != 2) {
throw new m();
}
int o = kVar.o();
int i = kVar.b;
kVar.f(o);
if ("onMetaData".equals(new String(kVar.a, i, o)) && kVar.j() == 8) {
HashMap<String, Object> a = a(kVar);
if (a.containsKey(IronSourceConstants.EVENTS_DURATION)) {
double doubleValue = ((Double) a.get(IronSourceConstants.EVENTS_DURATION)).doubleValue();
if (doubleValue > 0.0d) {
this.b = (long) (doubleValue * 1000000.0d);
}
}
}
}
public static Serializable a(int i, k kVar) {
if (i == 8) {
return a(kVar);
}
if (i == 10) {
int m = kVar.m();
ArrayList arrayList = new ArrayList(m);
for (int i2 = 0; i2 < m; i2++) {
arrayList.add(a(kVar.j(), kVar));
}
return arrayList;
}
if (i == 11) {
Date date = new Date((long) Double.valueOf(Double.longBitsToDouble(kVar.h())).doubleValue());
kVar.f(2);
return date;
}
if (i == 0) {
return Double.valueOf(Double.longBitsToDouble(kVar.h()));
}
if (i == 1) {
return Boolean.valueOf(kVar.j() == 1);
}
if (i == 2) {
int o = kVar.o();
int i3 = kVar.b;
kVar.f(o);
return new String(kVar.a, i3, o);
}
if (i != 3) {
return null;
}
HashMap hashMap = new HashMap();
while (true) {
int o2 = kVar.o();
int i4 = kVar.b;
kVar.f(o2);
String str = new String(kVar.a, i4, o2);
int j = kVar.j();
if (j == 9) {
return hashMap;
}
hashMap.put(str, a(j, kVar));
}
}
public static HashMap<String, Object> a(k kVar) {
int m = kVar.m();
HashMap<String, Object> hashMap = new HashMap<>(m);
for (int i = 0; i < m; i++) {
int o = kVar.o();
int i2 = kVar.b;
kVar.f(o);
hashMap.put(new String(kVar.a, i2, o), a(kVar.j(), kVar));
}
return hashMap;
}
}

View File

@@ -0,0 +1,18 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.flv;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.m;
/* loaded from: classes2.dex */
public abstract class d {
public final m a;
public static final class a extends com.fyber.inneractive.sdk.player.exoplayer2.m {
public a(String str) {
super(str);
}
}
public d(m mVar) {
this.a = mVar;
}
}

View File

@@ -0,0 +1,65 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.flv;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.flv.d;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.m;
import com.fyber.inneractive.sdk.player.exoplayer2.j;
import com.fyber.inneractive.sdk.player.exoplayer2.util.i;
import com.fyber.inneractive.sdk.player.exoplayer2.util.k;
/* loaded from: classes2.dex */
public final class e extends d {
public final k b;
public final k c;
public int d;
public boolean e;
public int f;
public e(m mVar) {
super(mVar);
this.b = new k(i.a);
this.c = new k(4);
}
public final boolean a(k kVar) throws d.a {
int j = kVar.j();
int i = (j >> 4) & 15;
int i2 = j & 15;
if (i2 != 7) {
throw new d.a(com.fyber.inneractive.sdk.player.exoplayer2.i.a("Video format not supported: ", i2));
}
this.f = i;
return i != 5;
}
public final void a(long j, k kVar) throws com.fyber.inneractive.sdk.player.exoplayer2.m {
int j2 = kVar.j();
long l = (kVar.l() * 1000) + j;
if (j2 == 0 && !this.e) {
k kVar2 = new k(new byte[kVar.a()]);
kVar.a(kVar2.a, 0, kVar.a());
com.fyber.inneractive.sdk.player.exoplayer2.video.a a = com.fyber.inneractive.sdk.player.exoplayer2.video.a.a(kVar2);
this.d = a.b;
this.a.a(new j(null, null, "video/avc", null, -1, -1, a.c, a.d, -1.0f, -1, a.e, null, -1, null, -1, -1, -1, -1, -1, 0, null, -1, Long.MAX_VALUE, a.a, null, null));
this.e = true;
return;
}
if (j2 == 1 && this.e) {
byte[] bArr = this.c.a;
bArr[0] = 0;
bArr[1] = 0;
bArr[2] = 0;
int i = 4 - this.d;
int i2 = 0;
while (kVar.a() > 0) {
kVar.a(this.c.a, i, this.d);
this.c.e(0);
int m = this.c.m();
this.b.e(0);
this.a.a(4, this.b);
this.a.a(m, kVar);
i2 = i2 + 4 + m;
}
this.a.a(l, this.f == 1 ? 1 : 0, i2, 0, null);
}
}
}

View File

@@ -0,0 +1,10 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
/* loaded from: classes2.dex */
public interface g {
d a(int i, int i2);
void a(l lVar);
void b();
}

View File

@@ -0,0 +1,6 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
/* loaded from: classes2.dex */
public interface h {
f[] a();
}

View File

@@ -0,0 +1,63 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls;
import android.net.Uri;
import java.io.IOException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.Cipher;
import javax.crypto.CipherInputStream;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.SecretKeySpec;
/* loaded from: classes2.dex */
public final class a implements com.fyber.inneractive.sdk.player.exoplayer2.upstream.f {
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.f a;
public final byte[] b;
public final byte[] c;
public CipherInputStream d;
public a(com.fyber.inneractive.sdk.player.exoplayer2.upstream.f fVar, byte[] bArr, byte[] bArr2) {
this.a = fVar;
this.b = bArr;
this.c = bArr2;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.upstream.i iVar) throws IOException {
try {
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS7Padding");
try {
cipher.init(2, new SecretKeySpec(this.b, "AES"), new IvParameterSpec(this.c));
this.d = new CipherInputStream(new com.fyber.inneractive.sdk.player.exoplayer2.upstream.h(this.a, iVar), cipher);
return -1L;
} catch (InvalidAlgorithmParameterException | InvalidKeyException e) {
throw new RuntimeException(e);
}
} catch (NoSuchAlgorithmException | NoSuchPaddingException e2) {
throw new RuntimeException(e2);
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final int read(byte[] bArr, int i, int i2) throws IOException {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.d != null);
int read = this.d.read(bArr, i, i2);
if (read < 0) {
return -1;
}
return read;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final void close() throws IOException {
this.d = null;
this.a.close();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.f
public final Uri a() {
return this.a.a();
}
}

View File

@@ -0,0 +1,16 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.f;
/* loaded from: classes2.dex */
public final class b implements d {
public final f.a a;
public b(f.a aVar) {
this.a = aVar;
}
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.f a() {
return this.a.a();
}
}

View File

@@ -0,0 +1,124 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls;
import android.net.Uri;
import android.os.SystemClock;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a;
import com.fyber.inneractive.sdk.player.exoplayer2.source.t;
import java.math.BigInteger;
import java.util.List;
import java.util.Locale;
/* loaded from: classes2.dex */
public final class c {
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.f a;
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.f b;
public final k c;
public final a.C0088a[] d;
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e e;
public final t f;
public final List<com.fyber.inneractive.sdk.player.exoplayer2.j> g;
public boolean h;
public byte[] i;
public com.fyber.inneractive.sdk.player.exoplayer2.source.g j;
public a.C0088a k;
public Uri l;
public byte[] m;
public String n;
public byte[] o;
public com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e p;
public static final class a extends com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.c {
public final String l;
public byte[] m;
public a(com.fyber.inneractive.sdk.player.exoplayer2.upstream.f fVar, com.fyber.inneractive.sdk.player.exoplayer2.upstream.i iVar, com.fyber.inneractive.sdk.player.exoplayer2.j jVar, int i, Object obj, byte[] bArr, String str) {
super(fVar, iVar, jVar, i, obj, bArr);
this.l = str;
}
}
public static final class b {
public com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.a a;
public boolean b;
public a.C0088a c;
public b() {
a();
}
public final void a() {
this.a = null;
this.b = false;
this.c = null;
}
}
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.c$c, reason: collision with other inner class name */
public static final class C0087c extends com.fyber.inneractive.sdk.player.exoplayer2.trackselection.a {
public int g;
public C0087c(t tVar, int[] iArr) {
super(tVar, iArr);
this.g = a(tVar.a(0));
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e
public final void a() {
long elapsedRealtime = SystemClock.elapsedRealtime();
if (this.e[this.g] > elapsedRealtime) {
for (int i = this.b - 1; i >= 0; i--) {
if (this.e[i] <= elapsedRealtime) {
this.g = i;
return;
}
}
throw new IllegalStateException();
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e
public final int e() {
return 0;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e
public final int f() {
return this.g;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e
public final Object g() {
return null;
}
}
public c(com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e eVar, a.C0088a[] c0088aArr, d dVar, k kVar, List<com.fyber.inneractive.sdk.player.exoplayer2.j> list) {
this.e = eVar;
this.d = c0088aArr;
this.c = kVar;
this.g = list;
com.fyber.inneractive.sdk.player.exoplayer2.j[] jVarArr = new com.fyber.inneractive.sdk.player.exoplayer2.j[c0088aArr.length];
int[] iArr = new int[c0088aArr.length];
for (int i = 0; i < c0088aArr.length; i++) {
jVarArr[i] = c0088aArr[i].b;
iArr[i] = i;
}
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.b bVar = (com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.b) dVar;
this.a = bVar.a();
this.b = bVar.a();
t tVar = new t(jVarArr);
this.f = tVar;
this.p = new C0087c(tVar, iArr);
}
public final void a(Uri uri, String str, byte[] bArr) {
byte[] byteArray = new BigInteger(str.toLowerCase(Locale.getDefault()).startsWith("0x") ? str.substring(2) : str, 16).toByteArray();
byte[] bArr2 = new byte[16];
int length = byteArray.length > 16 ? byteArray.length - 16 : 0;
System.arraycopy(byteArray, length, bArr2, (16 - byteArray.length) + length, byteArray.length - length);
this.l = uri;
this.m = bArr;
this.n = str;
this.o = bArr2;
}
}

View File

@@ -0,0 +1,5 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls;
/* loaded from: classes2.dex */
public interface d {
}

View File

@@ -0,0 +1,5 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls;
/* loaded from: classes2.dex */
public final class e {
}

View File

@@ -0,0 +1,155 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a;
import com.fyber.inneractive.sdk.player.exoplayer2.metadata.a;
import com.fyber.inneractive.sdk.player.exoplayer2.util.p;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.io.IOException;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
/* loaded from: classes2.dex */
public final class f extends com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.d {
public static final AtomicInteger G = new AtomicInteger();
public int A;
public int B;
public boolean C;
public j D;
public volatile boolean E;
public volatile boolean F;
public final int j;
public final int k;
public final a.C0088a l;
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.f m;
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.i n;
public final boolean o;
public final boolean p;
public final p q;
public final String r;
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.f s;
public final boolean t;
public final boolean u;
public final List<com.fyber.inneractive.sdk.player.exoplayer2.j> v;
public final boolean w;
public final com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.g x;
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k y;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.f z;
public f(com.fyber.inneractive.sdk.player.exoplayer2.upstream.f fVar, com.fyber.inneractive.sdk.player.exoplayer2.upstream.i iVar, com.fyber.inneractive.sdk.player.exoplayer2.upstream.i iVar2, a.C0088a c0088a, List<com.fyber.inneractive.sdk.player.exoplayer2.j> list, int i, Object obj, long j, long j2, int i2, int i3, boolean z, p pVar, f fVar2, byte[] bArr, byte[] bArr2) {
super(i, i2, j, j2, c0088a.b, a(fVar, bArr, bArr2), iVar, obj);
this.k = i3;
this.n = iVar2;
this.l = c0088a;
this.v = list;
this.p = z;
this.q = pVar;
this.o = this.h instanceof a;
String lastPathSegment = iVar.a.getLastPathSegment();
this.r = lastPathSegment;
boolean z2 = lastPathSegment.endsWith(".aac") || lastPathSegment.endsWith(".ac3") || lastPathSegment.endsWith(".ec3") || lastPathSegment.endsWith(".mp3");
this.w = z2;
if (fVar2 != null) {
this.x = fVar2.x;
this.y = fVar2.y;
this.s = fVar2.z;
boolean z3 = fVar2.l != c0088a;
this.t = z3;
this.u = fVar2.k != i3 || z3;
} else {
this.x = z2 ? new com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.g() : null;
this.y = z2 ? new com.fyber.inneractive.sdk.player.exoplayer2.util.k(10) : null;
this.s = null;
this.t = false;
this.u = true;
}
this.m = fVar;
this.j = G.getAndIncrement();
}
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
com.fyber.inneractive.sdk.player.exoplayer2.metadata.a a;
bVar.e = 0;
if (!bVar.a(this.y.a, 0, 10, true)) {
return C.TIME_UNSET;
}
this.y.c(10);
if (this.y.l() != com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.g.b) {
return C.TIME_UNSET;
}
this.y.f(3);
int i = this.y.i();
int i2 = i + 10;
if (i2 > this.y.b()) {
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = this.y;
byte[] bArr = kVar.a;
kVar.c(i2);
System.arraycopy(bArr, 0, this.y.a, 0, 10);
}
if (!bVar.a(this.y.a, 10, i, true) || (a = this.x.a(this.y.a, i)) == null) {
return C.TIME_UNSET;
}
int length = a.a.length;
for (int i3 = 0; i3 < length; i3++) {
a.b bVar2 = a.a[i3];
if (bVar2 instanceof com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.i) {
com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.i iVar = (com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.i) bVar2;
if ("com.apple.streaming.transportStreamTimestamp".equals(iVar.b)) {
System.arraycopy(iVar.c, 0, this.y.a, 0, 8);
this.y.c(8);
return this.y.h();
}
}
}
return C.TIME_UNSET;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.c
public final boolean a() {
return this.E;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.c
public final void b() {
this.E = true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.a
public final long c() {
return this.B;
}
/* JADX WARN: Removed duplicated region for block: B:15:0x00e8 */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.c
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void load() throws java.io.IOException, java.lang.InterruptedException {
/*
Method dump skipped, instructions count: 573
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f.load():void");
}
public static com.fyber.inneractive.sdk.player.exoplayer2.upstream.f a(com.fyber.inneractive.sdk.player.exoplayer2.upstream.f fVar, byte[] bArr, byte[] bArr2) {
return (bArr == null || bArr2 == null) ? fVar : new a(fVar, bArr, bArr2);
}
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.f a(long j) {
com.fyber.inneractive.sdk.player.exoplayer2.extractor.f aVar;
if (this.r.endsWith(".aac")) {
aVar = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.c(j);
} else if (!this.r.endsWith(".ac3") && !this.r.endsWith(".ec3")) {
if (this.r.endsWith(".mp3")) {
aVar = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3.b(j);
} else {
throw new IllegalArgumentException("Unkown extension for audio file: " + this.r);
}
} else {
aVar = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.a(j);
}
aVar.a(this.D);
return aVar;
}
}

View File

@@ -0,0 +1,466 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls;
import android.os.Handler;
import android.text.TextUtils;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.j;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e;
import com.fyber.inneractive.sdk.player.exoplayer2.source.f;
import com.fyber.inneractive.sdk.player.exoplayer2.source.o;
import com.fyber.inneractive.sdk.player.exoplayer2.source.q;
import com.fyber.inneractive.sdk.player.exoplayer2.source.t;
import com.fyber.inneractive.sdk.player.exoplayer2.source.u;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.v;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.List;
/* loaded from: classes2.dex */
public final class g implements o, j.b, e.b {
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e a;
public final d b;
public final int c;
public final f.a d;
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.b e;
public final IdentityHashMap<q, Integer> f = new IdentityHashMap<>();
public final k g = new k();
public final Handler h = new Handler();
public final long i;
public o.a j;
public int k;
public boolean l;
public u m;
public j[] n;
public j[] o;
public com.fyber.inneractive.sdk.player.exoplayer2.source.h p;
public g(com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e eVar, d dVar, int i, f.a aVar, com.fyber.inneractive.sdk.player.exoplayer2.upstream.j jVar, long j) {
this.a = eVar;
this.b = dVar;
this.c = i;
this.d = aVar;
this.e = jVar;
this.i = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.o
public final long c() {
return C.TIME_UNSET;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.o
public final u d() {
return this.m;
}
/* JADX ERROR: NullPointerException in pass: LoopRegionVisitor
java.lang.NullPointerException
*/
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.o
public final long e() {
/*
r16 = this;
r1 = r16
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.j[] r0 = r1.o
int r2 = r0.length
r6 = 0
r7 = 9223372036854775807(0x7fffffffffffffff, double:NaN)
Lb:
if (r6 >= r2) goto L88
r11 = r0[r6]
boolean r12 = r11.y
if (r12 == 0) goto L18
r3 = -9223372036854775808
r12 = -9223372036854775808
goto L7d
L18:
long r12 = r11.x
r14 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)
int r14 = (r12 > r14 ? 1 : (r12 == r14 ? 0 : -1))
if (r14 == 0) goto L24
goto L7b
L24:
long r12 = r11.w
java.util.LinkedList<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f> r14 = r11.k
java.lang.Object r14 = r14.getLast()
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f r14 = (com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f) r14
boolean r15 = r14.F
if (r15 == 0) goto L33
goto L4c
L33:
java.util.LinkedList<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f> r14 = r11.k
int r14 = r14.size()
r15 = 1
if (r14 <= r15) goto L4b
java.util.LinkedList<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f> r14 = r11.k
int r15 = r14.size()
int r15 = r15 + (-2)
java.lang.Object r14 = r14.get(r15)
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f r14 = (com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f) r14
goto L4c
L4b:
r14 = 0
L4c:
if (r14 == 0) goto L54
long r14 = r14.g
long r12 = java.lang.Math.max(r12, r14)
L54:
android.util.SparseArray<com.fyber.inneractive.sdk.player.exoplayer2.extractor.d> r14 = r11.j
int r14 = r14.size()
r15 = 0
L5b:
if (r15 >= r14) goto L7b
android.util.SparseArray<com.fyber.inneractive.sdk.player.exoplayer2.extractor.d> r5 = r11.j
java.lang.Object r5 = r5.valueAt(r15)
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d r5 = (com.fyber.inneractive.sdk.player.exoplayer2.extractor.d) r5
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d$b r5 = r5.c
monitor-enter(r5)
long r3 = r5.m // Catch: java.lang.Throwable -> L78
long r9 = r5.n // Catch: java.lang.Throwable -> L78
long r3 = java.lang.Math.max(r3, r9) // Catch: java.lang.Throwable -> L78
monitor-exit(r5)
long r12 = java.lang.Math.max(r12, r3)
int r15 = r15 + 1
goto L5b
L78:
r0 = move-exception
monitor-exit(r5)
throw r0
L7b:
r3 = -9223372036854775808
L7d:
int r3 = (r12 > r3 ? 1 : (r12 == r3 ? 0 : -1))
if (r3 == 0) goto L85
long r7 = java.lang.Math.min(r7, r12)
L85:
int r6 = r6 + 1
goto Lb
L88:
r3 = -9223372036854775808
r5 = 9223372036854775807(0x7fffffffffffffff, double:NaN)
int r0 = (r7 > r5 ? 1 : (r7 == r5 ? 0 : -1))
if (r0 != 0) goto L94
r7 = r3
L94:
return r7
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.g.e():long");
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.o
public final void h() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.o
public final void a(o.a aVar) {
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d dVar;
this.a.g.add(this);
this.j = aVar;
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a aVar2 = this.a.j;
ArrayList arrayList = new ArrayList(aVar2.b);
ArrayList arrayList2 = new ArrayList();
ArrayList arrayList3 = new ArrayList();
for (int i = 0; i < arrayList.size(); i++) {
a.C0088a c0088a = (a.C0088a) arrayList.get(i);
com.fyber.inneractive.sdk.player.exoplayer2.j jVar = c0088a.b;
if (jVar.k <= 0) {
String str = jVar.c;
if (!TextUtils.isEmpty(str)) {
for (String str2 : str.split("(\\s*,\\s*)|(\\s*$)")) {
if (!str2.startsWith("avc")) {
}
}
}
String str3 = c0088a.b.c;
if (!TextUtils.isEmpty(str3)) {
String[] split = str3.split("(\\s*,\\s*)|(\\s*$)");
int length = split.length;
int i2 = 0;
while (true) {
if (i2 >= length) {
break;
}
if (split[i2].startsWith("mp4a")) {
arrayList3.add(c0088a);
break;
}
i2++;
}
}
}
arrayList2.add(c0088a);
}
if (!arrayList2.isEmpty()) {
arrayList = arrayList2;
} else if (arrayList3.size() < arrayList.size()) {
arrayList.removeAll(arrayList3);
}
List<a.C0088a> list = aVar2.c;
List<a.C0088a> list2 = aVar2.d;
int size = list2.size() + list.size() + 1;
this.n = new j[size];
this.k = size;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(!arrayList.isEmpty());
a.C0088a[] c0088aArr = new a.C0088a[arrayList.size()];
arrayList.toArray(c0088aArr);
com.fyber.inneractive.sdk.player.exoplayer2.j jVar2 = aVar2.e;
c cVar = new c(this.a, c0088aArr, this.b, this.g, aVar2.f);
j jVar3 = new j(0, this, cVar, this.e, this.i, jVar2, this.c, this.d);
this.n[0] = jVar3;
cVar.h = true;
if (!jVar3.o) {
jVar3.a(jVar3.w);
}
int i3 = 0;
int i4 = 1;
while (i3 < list.size()) {
j jVar4 = new j(1, this, new c(this.a, new a.C0088a[]{list.get(i3)}, this.b, this.g, Collections.emptyList()), this.e, this.i, null, this.c, this.d);
int i5 = i4 + 1;
this.n[i4] = jVar4;
if (!jVar4.o) {
jVar4.a(jVar4.w);
}
i3++;
i4 = i5;
}
int i6 = 0;
while (i6 < list2.size()) {
a.C0088a c0088a2 = list2.get(i6);
c cVar2 = new c(this.a, new a.C0088a[]{c0088a2}, this.b, this.g, Collections.emptyList());
com.fyber.inneractive.sdk.player.exoplayer2.upstream.b bVar = this.e;
List<a.C0088a> list3 = list2;
j jVar5 = new j(3, this, cVar2, bVar, this.i, null, this.c, this.d);
com.fyber.inneractive.sdk.player.exoplayer2.j jVar6 = c0088a2.b;
if (jVar5.j.indexOfKey(0) >= 0) {
dVar = jVar5.j.get(0);
} else {
dVar = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.d(bVar);
dVar.n = jVar5;
dVar.c.r = jVar5.r;
jVar5.j.put(0, dVar);
}
dVar.a(jVar6);
jVar5.n = true;
jVar5.i();
this.n[i4] = jVar5;
i6++;
i4++;
list2 = list3;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.o
public final long b(long j) {
this.g.a.clear();
for (j jVar : this.o) {
jVar.w = j;
jVar.x = j;
jVar.y = false;
jVar.k.clear();
if (jVar.g.a()) {
v.b<? extends v.c> bVar = jVar.g.b;
bVar.h = false;
bVar.e = null;
if (bVar.hasMessages(0)) {
bVar.removeMessages(0);
bVar.sendEmptyMessage(1);
} else {
bVar.a.b();
if (bVar.g != null) {
bVar.g.interrupt();
}
}
} else {
int size = jVar.j.size();
for (int i = 0; i < size; i++) {
jVar.j.valueAt(i).a(jVar.v[i]);
}
}
}
return j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.o
public final void f() throws IOException {
j[] jVarArr = this.n;
if (jVarArr != null) {
for (j jVar : jVarArr) {
jVar.g.b();
c cVar = jVar.c;
com.fyber.inneractive.sdk.player.exoplayer2.source.g gVar = cVar.j;
if (gVar != null) {
throw gVar;
}
a.C0088a c0088a = cVar.k;
if (c0088a != null) {
e.a aVar = cVar.e.d.get(c0088a);
aVar.b.b();
IOException iOException = aVar.j;
if (iOException != null) {
throw iOException;
}
}
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e.b
public final void b() {
if (this.m != null) {
com.fyber.inneractive.sdk.player.exoplayer2.h hVar = (com.fyber.inneractive.sdk.player.exoplayer2.h) this.j;
hVar.getClass();
hVar.f.obtainMessage(9, this).sendToTarget();
return;
}
for (j jVar : this.n) {
if (!jVar.o) {
jVar.a(jVar.w);
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.o
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e[] eVarArr, boolean[] zArr, q[] qVarArr, boolean[] zArr2, long j) {
long j2;
int[] iArr = new int[eVarArr.length];
int[] iArr2 = new int[eVarArr.length];
for (int i = 0; i < eVarArr.length; i++) {
q qVar = qVarArr[i];
iArr[i] = qVar == null ? -1 : this.f.get(qVar).intValue();
iArr2[i] = -1;
com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e eVar = eVarArr[i];
if (eVar != null) {
t c = eVar.c();
int i2 = 0;
while (true) {
j[] jVarArr = this.n;
if (i2 < jVarArr.length) {
u uVar = jVarArr[i2].t;
int i3 = 0;
while (true) {
if (i3 >= uVar.a) {
break;
}
if (uVar.b[i3] == c) {
if (i3 != -1) {
iArr2[i] = i2;
break;
}
} else {
i3++;
}
}
i2++;
}
}
}
}
this.f.clear();
int length = eVarArr.length;
q[] qVarArr2 = new q[length];
q[] qVarArr3 = new q[eVarArr.length];
com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e[] eVarArr2 = new com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e[eVarArr.length];
ArrayList arrayList = new ArrayList(this.n.length);
int i4 = 0;
boolean z = false;
while (i4 < this.n.length) {
for (int i5 = 0; i5 < eVarArr.length; i5++) {
com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e eVar2 = null;
qVarArr3[i5] = iArr[i5] == i4 ? qVarArr[i5] : null;
if (iArr2[i5] == i4) {
eVar2 = eVarArr[i5];
}
eVarArr2[i5] = eVar2;
}
int i6 = i4;
ArrayList arrayList2 = arrayList;
com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e[] eVarArr3 = eVarArr2;
z |= this.n[i4].a(eVarArr2, zArr, qVarArr3, zArr2, !this.l);
boolean z2 = false;
for (int i7 = 0; i7 < eVarArr.length; i7++) {
if (iArr2[i7] == i6) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(qVarArr3[i7] != null);
qVarArr2[i7] = qVarArr3[i7];
this.f.put(qVarArr3[i7], Integer.valueOf(i6));
z2 = true;
} else if (iArr[i7] == i6) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(qVarArr3[i7] == null);
}
}
if (z2) {
arrayList2.add(this.n[i6]);
}
i4 = i6 + 1;
arrayList = arrayList2;
eVarArr2 = eVarArr3;
}
ArrayList arrayList3 = arrayList;
System.arraycopy(qVarArr2, 0, qVarArr, 0, length);
j[] jVarArr2 = new j[arrayList3.size()];
this.o = jVarArr2;
arrayList3.toArray(jVarArr2);
j[] jVarArr3 = this.o;
if (jVarArr3.length > 0) {
jVarArr3[0].c.h = true;
int i8 = 1;
while (true) {
j[] jVarArr4 = this.o;
if (i8 >= jVarArr4.length) {
break;
}
jVarArr4[i8].c.h = false;
i8++;
}
}
this.p = new com.fyber.inneractive.sdk.player.exoplayer2.source.h(this.o);
if (this.l && z) {
j2 = j;
b(j2);
for (int i9 = 0; i9 < eVarArr.length; i9++) {
if (qVarArr[i9] != null) {
zArr2[i9] = true;
}
}
} else {
j2 = j;
}
this.l = true;
return j2;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.o, com.fyber.inneractive.sdk.player.exoplayer2.source.r
public final boolean a(long j) {
return this.p.a(j);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.o, com.fyber.inneractive.sdk.player.exoplayer2.source.r
public final long a() {
return this.p.a();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e.b
public final void a(a.C0088a c0088a) {
int d;
for (j jVar : this.n) {
c cVar = jVar.c;
int a = cVar.f.a(c0088a.b);
if (a != -1 && (d = cVar.p.d(a)) != -1) {
cVar.p.c(d);
}
}
if (this.m != null) {
com.fyber.inneractive.sdk.player.exoplayer2.h hVar = (com.fyber.inneractive.sdk.player.exoplayer2.h) this.j;
hVar.getClass();
hVar.f.obtainMessage(9, this).sendToTarget();
return;
}
for (j jVar2 : this.n) {
if (!jVar2.o) {
jVar2.a(jVar2.w);
}
}
}
}

View File

@@ -0,0 +1,163 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import com.fyber.inneractive.sdk.player.controller.w;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e;
import com.fyber.inneractive.sdk.player.exoplayer2.source.f;
import com.fyber.inneractive.sdk.player.exoplayer2.source.o;
import com.fyber.inneractive.sdk.player.exoplayer2.source.p;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.f;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.v;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.b;
import java.io.IOException;
import java.util.Iterator;
/* loaded from: classes2.dex */
public final class h implements p, e.InterfaceC0089e {
public final Uri a;
public final d b;
public final f.a c;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e d;
public p.a e;
public h(Uri uri, f.a aVar, Handler handler, w wVar) {
this(uri, new b(aVar), handler, wVar);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.p
public final void a(p.a aVar) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.d == null);
Uri uri = this.a;
d dVar = this.b;
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e eVar = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e(uri, dVar, this.c, 3, this);
this.d = eVar;
this.e = aVar;
com.fyber.inneractive.sdk.player.exoplayer2.upstream.w wVar = new com.fyber.inneractive.sdk.player.exoplayer2.upstream.w(((b) dVar).a.a(), uri, eVar.b);
v vVar = eVar.h;
vVar.getClass();
Looper myLooper = Looper.myLooper();
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(myLooper != null);
v.b<? extends v.c> bVar = vVar.new b<>(myLooper, wVar, eVar, 3, SystemClock.elapsedRealtime());
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(vVar.b == null);
vVar.b = bVar;
bVar.e = null;
vVar.a.execute(bVar);
}
public h(Uri uri, b bVar, Handler handler, w wVar) {
this.a = uri;
this.b = bVar;
this.c = new f.a(handler, wVar);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.p
public final void b() {
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e eVar = this.d;
if (eVar != null) {
v vVar = eVar.h;
v.b<? extends v.c> bVar = vVar.b;
if (bVar != null) {
bVar.h = true;
bVar.e = null;
if (bVar.hasMessages(0)) {
bVar.removeMessages(0);
} else {
bVar.a.b();
if (bVar.g != null) {
bVar.g.interrupt();
}
}
v.this.b = null;
long elapsedRealtime = SystemClock.elapsedRealtime();
bVar.b.a((v.a<? extends v.c>) bVar.a, elapsedRealtime, elapsedRealtime - bVar.d, true);
}
vVar.a.shutdown();
Iterator<e.a> it = eVar.d.values().iterator();
while (it.hasNext()) {
v vVar2 = it.next().b;
v.b<? extends v.c> bVar2 = vVar2.b;
if (bVar2 != null) {
bVar2.h = true;
bVar2.e = null;
if (bVar2.hasMessages(0)) {
bVar2.removeMessages(0);
} else {
bVar2.a.b();
if (bVar2.g != null) {
bVar2.g.interrupt();
}
}
v.this.b = null;
long elapsedRealtime2 = SystemClock.elapsedRealtime();
bVar2.b.a((v.a<? extends v.c>) bVar2.a, elapsedRealtime2, elapsedRealtime2 - bVar2.d, true);
}
vVar2.a.shutdown();
}
eVar.e.removeCallbacksAndMessages(null);
eVar.d.clear();
this.d = null;
}
this.e = null;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.p
public final void a() throws IOException {
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e eVar = this.d;
eVar.h.b();
a.C0088a c0088a = eVar.k;
if (c0088a != null) {
e.a aVar = eVar.d.get(c0088a);
aVar.b.b();
IOException iOException = aVar.j;
if (iOException != null) {
throw iOException;
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.p
public final o a(int i, com.fyber.inneractive.sdk.player.exoplayer2.upstream.j jVar, long j) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(i == 0);
return new g(this.d, this.b, 3, this.c, jVar, j);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.p
public final void a(o oVar) {
g gVar = (g) oVar;
gVar.a.g.remove(gVar);
gVar.h.removeCallbacksAndMessages(null);
j[] jVarArr = gVar.n;
if (jVarArr != null) {
for (j jVar : jVarArr) {
int size = jVar.j.size();
for (int i = 0; i < size; i++) {
jVar.j.valueAt(i).b();
}
v vVar = jVar.g;
v.b<? extends v.c> bVar = vVar.b;
if (bVar != null) {
bVar.h = true;
bVar.e = null;
if (bVar.hasMessages(0)) {
bVar.removeMessages(0);
} else {
bVar.a.b();
if (bVar.g != null) {
bVar.g.interrupt();
}
}
v.this.b = null;
long elapsedRealtime = SystemClock.elapsedRealtime();
bVar.b.a((v.a<? extends v.c>) bVar.a, elapsedRealtime, elapsedRealtime - bVar.d, true);
}
vVar.a.shutdown();
jVar.m.removeCallbacksAndMessages(null);
jVar.s = true;
}
}
}
}

View File

@@ -0,0 +1,113 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.d;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e;
import com.fyber.inneractive.sdk.player.exoplayer2.source.f;
import com.fyber.inneractive.sdk.player.exoplayer2.source.q;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class i implements q {
public final int a;
public final j b;
public i(j jVar, int i) {
this.b = jVar;
this.a = i;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.q
public final void a() throws IOException {
j jVar = this.b;
jVar.g.b();
c cVar = jVar.c;
com.fyber.inneractive.sdk.player.exoplayer2.source.g gVar = cVar.j;
if (gVar != null) {
throw gVar;
}
a.C0088a c0088a = cVar.k;
if (c0088a != null) {
e.a aVar = cVar.e.d.get(c0088a);
aVar.b.b();
IOException iOException = aVar.j;
if (iOException != null) {
throw iOException;
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.q
public final boolean isReady() {
boolean z;
j jVar = this.b;
int i = this.a;
if (jVar.y) {
return true;
}
if (jVar.x == C.TIME_UNSET) {
d.b bVar = jVar.j.valueAt(i).c;
synchronized (bVar) {
z = bVar.i == 0;
}
if (!z) {
return true;
}
}
return false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.q
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.k kVar, com.fyber.inneractive.sdk.player.exoplayer2.decoder.b bVar, boolean z) {
j jVar = this.b;
int i = this.a;
if (jVar.x != C.TIME_UNSET) {
return -3;
}
loop0: while (jVar.k.size() > 1) {
int i2 = jVar.k.getFirst().j;
for (int i3 = 0; i3 < jVar.j.size(); i3++) {
if (jVar.v[i3]) {
d.b bVar2 = jVar.j.valueAt(i3).c;
if ((bVar2.i == 0 ? bVar2.r : bVar2.b[bVar2.k]) == i2) {
break loop0;
}
}
}
jVar.k.removeFirst();
}
f first = jVar.k.getFirst();
com.fyber.inneractive.sdk.player.exoplayer2.j jVar2 = first.c;
if (!jVar2.equals(jVar.q)) {
f.a aVar = jVar.h;
int i4 = jVar.a;
int i5 = first.d;
Object obj = first.e;
long j = first.f;
if (aVar.b != null) {
aVar.a.post(new com.fyber.inneractive.sdk.player.exoplayer2.source.e(aVar, i4, jVar2, i5, obj, j));
}
}
jVar.q = jVar2;
return jVar.j.valueAt(i).a(kVar, bVar, z, jVar.y, jVar.w);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.q
public final void a(long j) {
long max;
j jVar = this.b;
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d valueAt = jVar.j.valueAt(this.a);
if (jVar.y) {
d.b bVar = valueAt.c;
synchronized (bVar) {
max = Math.max(bVar.m, bVar.n);
}
if (j > max) {
valueAt.f();
return;
}
}
valueAt.a(true, j);
}
}

View File

@@ -0,0 +1,556 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls;
import android.os.Handler;
import android.text.TextUtils;
import android.util.SparseArray;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.d;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.c;
import com.fyber.inneractive.sdk.player.exoplayer2.source.f;
import com.fyber.inneractive.sdk.player.exoplayer2.source.q;
import com.fyber.inneractive.sdk.player.exoplayer2.source.r;
import com.fyber.inneractive.sdk.player.exoplayer2.source.t;
import com.fyber.inneractive.sdk.player.exoplayer2.source.u;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.v;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.util.LinkedList;
/* loaded from: classes2.dex */
public final class j implements v.a<com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.a>, r, com.fyber.inneractive.sdk.player.exoplayer2.extractor.g, d.c {
public final int a;
public final b b;
public final c c;
public final com.fyber.inneractive.sdk.player.exoplayer2.upstream.b d;
public final com.fyber.inneractive.sdk.player.exoplayer2.j e;
public final int f;
public final f.a h;
public boolean n;
public boolean o;
public int p;
public com.fyber.inneractive.sdk.player.exoplayer2.j q;
public int r;
public boolean s;
public u t;
public int u;
public boolean[] v;
public long w;
public long x;
public boolean y;
public final v g = new v("Loader:HlsSampleStreamWrapper");
public final c.b i = new c.b();
public final SparseArray<com.fyber.inneractive.sdk.player.exoplayer2.extractor.d> j = new SparseArray<>();
public final LinkedList<f> k = new LinkedList<>();
public final a l = new a();
public final Handler m = new Handler();
public class a implements Runnable {
public a() {
}
@Override // java.lang.Runnable
public final void run() {
j.this.i();
}
}
public interface b {
}
public j(int i, b bVar, c cVar, com.fyber.inneractive.sdk.player.exoplayer2.upstream.b bVar2, long j, com.fyber.inneractive.sdk.player.exoplayer2.j jVar, int i2, f.a aVar) {
this.a = i;
this.b = bVar;
this.c = cVar;
this.d = bVar2;
this.e = jVar;
this.f = i2;
this.h = aVar;
this.w = j;
this.x = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.g
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.l lVar) {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.a
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.a aVar, long j, long j2, boolean z) {
com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.a aVar2 = aVar;
f.a aVar3 = this.h;
com.fyber.inneractive.sdk.player.exoplayer2.upstream.i iVar = aVar2.a;
int i = aVar2.b;
int i2 = this.a;
com.fyber.inneractive.sdk.player.exoplayer2.j jVar = aVar2.c;
int i3 = aVar2.d;
Object obj = aVar2.e;
long j3 = aVar2.f;
long j4 = aVar2.g;
long c = aVar2.c();
if (aVar3.b != null) {
aVar3.a.post(new com.fyber.inneractive.sdk.player.exoplayer2.source.c(aVar3, iVar, i, i2, jVar, i3, obj, j3, j4, j, j2, c));
}
if (z) {
return;
}
int size = this.j.size();
for (int i4 = 0; i4 < size; i4++) {
this.j.valueAt(i4).a(this.v[i4]);
}
g gVar = (g) this.b;
gVar.getClass();
if (gVar.m == null) {
return;
}
com.fyber.inneractive.sdk.player.exoplayer2.h hVar = (com.fyber.inneractive.sdk.player.exoplayer2.h) gVar.j;
hVar.getClass();
hVar.f.obtainMessage(9, gVar).sendToTarget();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.d.c
public final void g() {
this.m.post(this.l);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.g
public final void b() {
this.n = true;
this.m.post(this.l);
}
public final void i() {
if (this.s || this.o || !this.n) {
return;
}
int size = this.j.size();
for (int i = 0; i < size; i++) {
if (this.j.valueAt(i).e() == null) {
return;
}
}
int size2 = this.j.size();
int i2 = 0;
char c = 0;
int i3 = -1;
while (true) {
String str = null;
char c2 = 3;
if (i2 < size2) {
String str2 = this.j.valueAt(i2).e().f;
if (!com.fyber.inneractive.sdk.player.exoplayer2.util.h.d(str2)) {
if (com.fyber.inneractive.sdk.player.exoplayer2.util.h.c(str2)) {
c2 = 2;
} else {
if (str2 != null) {
int indexOf = str2.indexOf(47);
if (indexOf != -1) {
str = str2.substring(0, indexOf);
} else {
throw new IllegalArgumentException("Invalid mime type: ".concat(str2));
}
}
c2 = "text".equals(str) ? (char) 1 : (char) 0;
}
}
if (c2 > c) {
i3 = i2;
c = c2;
} else if (c2 == c && i3 != -1) {
i3 = -1;
}
i2++;
} else {
t tVar = this.c.f;
int i4 = tVar.a;
this.u = -1;
this.v = new boolean[size2];
t[] tVarArr = new t[size2];
for (int i5 = 0; i5 < size2; i5++) {
com.fyber.inneractive.sdk.player.exoplayer2.j e = this.j.valueAt(i5).e();
if (i5 == i3) {
com.fyber.inneractive.sdk.player.exoplayer2.j[] jVarArr = new com.fyber.inneractive.sdk.player.exoplayer2.j[i4];
for (int i6 = 0; i6 < i4; i6++) {
jVarArr[i6] = a(tVar.b[i6], e);
}
tVarArr[i5] = new t(jVarArr);
this.u = i5;
} else {
tVarArr[i5] = new t(a((c == 3 && com.fyber.inneractive.sdk.player.exoplayer2.util.h.c(e.f)) ? this.e : null, e));
}
}
this.t = new u(tVarArr);
this.o = true;
g gVar = (g) this.b;
int i7 = gVar.k - 1;
gVar.k = i7;
if (i7 > 0) {
return;
}
int i8 = 0;
for (j jVar : gVar.n) {
i8 += jVar.t.a;
}
t[] tVarArr2 = new t[i8];
int i9 = 0;
for (j jVar2 : gVar.n) {
int i10 = jVar2.t.a;
int i11 = 0;
while (i11 < i10) {
tVarArr2[i9] = jVar2.t.b[i11];
i11++;
i9++;
}
}
gVar.m = new u(tVarArr2);
((com.fyber.inneractive.sdk.player.exoplayer2.h) gVar.j).f.obtainMessage(8, gVar).sendToTarget();
return;
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.a
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.a aVar, long j, long j2) {
com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.a aVar2 = aVar;
c cVar = this.c;
cVar.getClass();
if (aVar2 instanceof c.a) {
c.a aVar3 = (c.a) aVar2;
cVar.i = aVar3.i;
cVar.a(aVar3.a.a, aVar3.l, aVar3.m);
}
f.a aVar4 = this.h;
com.fyber.inneractive.sdk.player.exoplayer2.upstream.i iVar = aVar2.a;
int i = aVar2.b;
int i2 = this.a;
com.fyber.inneractive.sdk.player.exoplayer2.j jVar = aVar2.c;
int i3 = aVar2.d;
Object obj = aVar2.e;
long j3 = aVar2.f;
long j4 = aVar2.g;
long c = aVar2.c();
if (aVar4.b != null) {
aVar4.a.post(new com.fyber.inneractive.sdk.player.exoplayer2.source.b(aVar4, iVar, i, i2, jVar, i3, obj, j3, j4, j, j2, c));
}
if (!this.o) {
a(this.w);
return;
}
g gVar = (g) this.b;
gVar.getClass();
if (gVar.m == null) {
return;
}
com.fyber.inneractive.sdk.player.exoplayer2.h hVar = (com.fyber.inneractive.sdk.player.exoplayer2.h) gVar.j;
hVar.getClass();
hVar.f.obtainMessage(9, gVar).sendToTarget();
}
/* JADX WARN: Removed duplicated region for block: B:20:0x0072 */
/* JADX WARN: Removed duplicated region for block: B:22:0x008a */
/* JADX WARN: Removed duplicated region for block: B:30:0x00b4 A[ORIG_RETURN, RETURN] */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.a
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.a r28, long r29, long r31, java.io.IOException r33) {
/*
r27 = this;
r0 = r27
r1 = r28
com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.a r1 = (com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.a) r1
long r2 = r1.c()
boolean r4 = r1 instanceof com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f
r5 = 1
if (r4 == 0) goto L18
r7 = 0
int r2 = (r2 > r7 ? 1 : (r2 == r7 ? 0 : -1))
if (r2 != 0) goto L16
goto L18
L16:
r2 = 0
goto L19
L18:
r2 = r5
L19:
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.c r3 = r0.c
if (r2 == 0) goto L52
com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e r2 = r3.p
com.fyber.inneractive.sdk.player.exoplayer2.source.t r3 = r3.f
com.fyber.inneractive.sdk.player.exoplayer2.j r7 = r1.c
int r3 = r3.a(r7)
int r3 = r2.d(r3)
r15 = r33
boolean r2 = com.fyber.inneractive.sdk.player.exoplayer2.source.chunk.b.a(r2, r3, r15)
if (r2 == 0) goto L57
if (r4 == 0) goto L58
java.util.LinkedList<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f> r2 = r0.k
java.lang.Object r2 = r2.removeLast()
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f r2 = (com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f) r2
if (r2 != r1) goto L41
r2 = r5
goto L42
L41:
r2 = 0
L42:
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(r2)
java.util.LinkedList<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.f> r2 = r0.k
boolean r2 = r2.isEmpty()
if (r2 == 0) goto L58
long r2 = r0.w
r0.x = r2
goto L58
L52:
r15 = r33
r3.getClass()
L57:
r5 = 0
L58:
com.fyber.inneractive.sdk.player.exoplayer2.source.f$a r8 = r0.h
com.fyber.inneractive.sdk.player.exoplayer2.upstream.i r9 = r1.a
int r10 = r1.b
int r11 = r0.a
com.fyber.inneractive.sdk.player.exoplayer2.j r12 = r1.c
int r13 = r1.d
java.lang.Object r14 = r1.e
long r2 = r1.f
long r6 = r1.g
long r23 = r1.c()
com.fyber.inneractive.sdk.player.exoplayer2.source.f r1 = r8.b
if (r1 == 0) goto L88
android.os.Handler r1 = r8.a
com.fyber.inneractive.sdk.player.exoplayer2.source.d r4 = new com.fyber.inneractive.sdk.player.exoplayer2.source.d
r17 = r6
r7 = r4
r15 = r2
r19 = r29
r21 = r31
r25 = r33
r26 = r5
r7.<init>(r8, r9, r10, r11, r12, r13, r14, r15, r17, r19, r21, r23, r25, r26)
r1.post(r4)
L88:
if (r5 == 0) goto Lb4
boolean r1 = r0.o
if (r1 != 0) goto L94
long r1 = r0.w
r0.a(r1)
goto Lb2
L94:
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.j$b r1 = r0.b
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.g r1 = (com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.g) r1
r1.getClass()
com.fyber.inneractive.sdk.player.exoplayer2.source.u r2 = r1.m
if (r2 != 0) goto La0
goto Lb2
La0:
com.fyber.inneractive.sdk.player.exoplayer2.source.o$a r2 = r1.j
com.fyber.inneractive.sdk.player.exoplayer2.h r2 = (com.fyber.inneractive.sdk.player.exoplayer2.h) r2
r2.getClass()
android.os.Handler r2 = r2.f
r3 = 9
android.os.Message r1 = r2.obtainMessage(r3, r1)
r1.sendToTarget()
Lb2:
r6 = 2
goto Lb5
Lb4:
r6 = 0
Lb5:
return r6
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.j.a(com.fyber.inneractive.sdk.player.exoplayer2.upstream.v$c, long, long, java.io.IOException):int");
}
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e[] eVarArr, boolean[] zArr, q[] qVarArr, boolean[] zArr2, boolean z) {
com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e eVar;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.o);
for (int i = 0; i < eVarArr.length; i++) {
q qVar = qVarArr[i];
if (qVar != null && (eVarArr[i] == null || !zArr[i])) {
int i2 = ((i) qVar).a;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.v[i2]);
this.v[i2] = false;
this.p--;
this.j.valueAt(i2).b();
qVarArr[i] = null;
}
}
boolean z2 = false;
com.fyber.inneractive.sdk.player.exoplayer2.trackselection.e eVar2 = null;
for (int i3 = 0; i3 < eVarArr.length; i3++) {
if (qVarArr[i3] == null && (eVar = eVarArr[i3]) != null) {
u uVar = this.t;
t c = eVar.c();
int i4 = 0;
while (true) {
if (i4 >= uVar.a) {
i4 = -1;
break;
}
if (uVar.b[i4] == c) {
break;
}
i4++;
}
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(!this.v[i4]);
this.v[i4] = true;
this.p++;
if (i4 == this.u) {
this.c.p = eVar;
eVar2 = eVar;
}
qVarArr[i3] = new i(this, i4);
zArr2[i3] = true;
z2 = true;
}
}
if (z) {
int size = this.j.size();
for (int i5 = 0; i5 < size; i5++) {
if (!this.v[i5]) {
this.j.valueAt(i5).b();
}
}
if (eVar2 != null && !this.k.isEmpty()) {
eVar2.a();
if (eVar2.b() != this.c.f.a(this.k.getLast().c)) {
long j = this.w;
this.w = j;
this.x = j;
this.y = false;
this.k.clear();
if (this.g.a()) {
v.b<? extends v.c> bVar = this.g.b;
bVar.h = false;
bVar.e = null;
if (bVar.hasMessages(0)) {
bVar.removeMessages(0);
bVar.sendEmptyMessage(1);
} else {
bVar.a.b();
if (bVar.g != null) {
bVar.g.interrupt();
}
}
} else {
int size2 = this.j.size();
for (int i6 = 0; i6 < size2; i6++) {
this.j.valueAt(i6).a(this.v[i6]);
}
}
}
}
}
if (this.p == 0) {
this.c.j = null;
this.q = null;
this.k.clear();
if (this.g.a()) {
v.b<? extends v.c> bVar2 = this.g.b;
bVar2.h = false;
bVar2.e = null;
if (bVar2.hasMessages(0)) {
bVar2.removeMessages(0);
bVar2.sendEmptyMessage(1);
} else {
bVar2.a.b();
if (bVar2.g != null) {
bVar2.g.interrupt();
}
}
}
}
return z2;
}
/* JADX WARN: Removed duplicated region for block: B:23:0x0241 */
/* JADX WARN: Removed duplicated region for block: B:26:0x0244 */
/* JADX WARN: Removed duplicated region for block: B:64:0x00f5 */
/* JADX WARN: Removed duplicated region for block: B:65:0x00fe */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.r
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean a(long r43) {
/*
Method dump skipped, instructions count: 789
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.j.a(long):boolean");
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.g
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.d a(int i, int i2) {
if (this.j.indexOfKey(i) >= 0) {
return this.j.get(i);
}
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d dVar = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.d(this.d);
dVar.n = this;
dVar.c.r = this.r;
this.j.put(i, dVar);
return dVar;
}
public static com.fyber.inneractive.sdk.player.exoplayer2.j a(com.fyber.inneractive.sdk.player.exoplayer2.j jVar, com.fyber.inneractive.sdk.player.exoplayer2.j jVar2) {
if (jVar == null) {
return jVar2;
}
int b2 = com.fyber.inneractive.sdk.player.exoplayer2.util.h.b(jVar2.f);
int i = 0;
String str = null;
if (b2 == 1) {
String str2 = jVar.c;
if (!TextUtils.isEmpty(str2)) {
String[] split = str2.split("(\\s*,\\s*)|(\\s*$)");
StringBuilder sb = new StringBuilder();
int length = split.length;
while (i < length) {
String str3 = split[i];
if (1 == com.fyber.inneractive.sdk.player.exoplayer2.util.h.b(com.fyber.inneractive.sdk.player.exoplayer2.util.h.a(str3))) {
if (sb.length() > 0) {
sb.append(",");
}
sb.append(str3);
}
i++;
}
if (sb.length() > 0) {
str = sb.toString();
}
}
} else if (b2 == 2) {
String str4 = jVar.c;
if (!TextUtils.isEmpty(str4)) {
String[] split2 = str4.split("(\\s*,\\s*)|(\\s*$)");
StringBuilder sb2 = new StringBuilder();
int length2 = split2.length;
while (i < length2) {
String str5 = split2[i];
if (2 == com.fyber.inneractive.sdk.player.exoplayer2.util.h.b(com.fyber.inneractive.sdk.player.exoplayer2.util.h.a(str5))) {
if (sb2.length() > 0) {
sb2.append(",");
}
sb2.append(str5);
}
i++;
}
if (sb2.length() > 0) {
str = sb2.toString();
}
}
}
String str6 = str;
return new com.fyber.inneractive.sdk.player.exoplayer2.j(jVar.a, jVar2.e, jVar2.f, str6, jVar.b, jVar2.g, jVar.j, jVar.k, jVar2.l, jVar2.m, jVar2.n, jVar2.p, jVar2.o, jVar2.q, jVar2.r, jVar2.s, jVar2.t, jVar2.u, jVar2.v, jVar.x, jVar.y, jVar2.z, jVar2.w, jVar2.h, jVar2.i, jVar2.d);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.source.r
public final long a() {
long j = this.x;
if (j != C.TIME_UNSET) {
return j;
}
if (this.y) {
return Long.MIN_VALUE;
}
return this.k.getLast().g;
}
}

View File

@@ -0,0 +1,9 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls;
import android.util.SparseArray;
import com.fyber.inneractive.sdk.player.exoplayer2.util.p;
/* loaded from: classes2.dex */
public final class k {
public final SparseArray<p> a = new SparseArray<>();
}

View File

@@ -0,0 +1,150 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls;
import android.text.TextUtils;
import com.facebook.internal.security.CertificateUtil;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.l;
import com.fyber.inneractive.sdk.player.exoplayer2.m;
import com.fyber.inneractive.sdk.player.exoplayer2.util.p;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* loaded from: classes2.dex */
public final class l implements com.fyber.inneractive.sdk.player.exoplayer2.extractor.f {
public static final Pattern g = Pattern.compile("LOCAL:([^,]+)");
public static final Pattern h = Pattern.compile("MPEGTS:(\\d+)");
public final String a;
public final p b;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.g d;
public int f;
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k c = new com.fyber.inneractive.sdk.player.exoplayer2.util.k();
public byte[] e = new byte[1024];
public l(String str, p pVar) {
this.a = str;
this.b = pVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
throw new IllegalStateException();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar) {
this.d = gVar;
gVar.a(new l.a(C.TIME_UNSET));
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(long j, long j2) {
throw new IllegalStateException();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar, com.fyber.inneractive.sdk.player.exoplayer2.extractor.k kVar) throws IOException, InterruptedException {
int min;
int i = (int) bVar.b;
int i2 = this.f;
byte[] bArr = this.e;
if (i2 == bArr.length) {
this.e = Arrays.copyOf(bArr, ((i != -1 ? i : bArr.length) * 3) / 2);
}
byte[] bArr2 = this.e;
int i3 = this.f;
int length = bArr2.length - i3;
int i4 = bVar.f;
if (i4 == 0) {
min = 0;
} else {
min = Math.min(i4, length);
System.arraycopy(bVar.d, 0, bArr2, i3, min);
int i5 = bVar.f - min;
bVar.f = i5;
bVar.e = 0;
byte[] bArr3 = bVar.d;
byte[] bArr4 = i5 < bArr3.length - 524288 ? new byte[65536 + i5] : bArr3;
System.arraycopy(bArr3, min, bArr4, 0, i5);
bVar.d = bArr4;
}
if (min == 0) {
min = bVar.a(bArr2, i3, length, 0, true);
}
if (min != -1) {
bVar.c += min;
}
if (min != -1) {
int i6 = this.f + min;
this.f = i6;
if (i == -1 || i6 != i) {
return 0;
}
}
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar2 = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(this.e);
try {
Pattern pattern = com.fyber.inneractive.sdk.player.exoplayer2.text.webvtt.b.a;
String d = kVar2.d();
if (d == null || !com.fyber.inneractive.sdk.player.exoplayer2.text.webvtt.b.b.matcher(d).matches()) {
throw new com.fyber.inneractive.sdk.player.exoplayer2.text.a("Expected WEBVTT. Got " + d);
}
long j = 0;
long j2 = 0;
while (true) {
String d2 = kVar2.d();
if (!TextUtils.isEmpty(d2)) {
if (d2.startsWith("X-TIMESTAMP-MAP")) {
Matcher matcher = g.matcher(d2);
if (matcher.find()) {
Matcher matcher2 = h.matcher(d2);
if (matcher2.find()) {
String[] split = matcher.group(1).split("\\.", 2);
long j3 = 0;
for (String str : split[0].split(CertificateUtil.DELIMITER)) {
j3 = Long.parseLong(str) + (j3 * 60);
}
long parseLong = Long.parseLong(split[1]);
j2 = (Long.parseLong(matcher2.group(1)) * 1000000) / 90000;
j = (parseLong + (j3 * 1000)) * 1000;
} else {
throw new m("X-TIMESTAMP-MAP doesn't contain media timestamp: ".concat(d2));
}
} else {
throw new m("X-TIMESTAMP-MAP doesn't contain local timestamp: ".concat(d2));
}
}
} else {
Matcher a = com.fyber.inneractive.sdk.player.exoplayer2.text.webvtt.b.a(kVar2);
if (a == null) {
this.d.a(0, 3).a(com.fyber.inneractive.sdk.player.exoplayer2.j.a(null, MimeTypes.TEXT_VTT, 0, this.a, -1, null, 0L, Collections.emptyList()));
this.d.b();
return -1;
}
String[] split2 = a.group(1).split("\\.", 2);
long j4 = 0;
for (String str2 : split2[0].split(CertificateUtil.DELIMITER)) {
j4 = Long.parseLong(str2) + (j4 * 60);
}
long parseLong2 = (Long.parseLong(split2[1]) + (j4 * 1000)) * 1000;
long a2 = this.b.a((j2 + parseLong2) - j);
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d a3 = this.d.a(0, 3);
a3.a(com.fyber.inneractive.sdk.player.exoplayer2.j.a(null, MimeTypes.TEXT_VTT, 0, this.a, -1, null, a2 - parseLong2, Collections.emptyList()));
this.d.b();
this.c.a(this.e, this.f);
a3.a(this.f, this.c);
a3.a(a2, 1, this.f, 0, (byte[]) null);
return -1;
}
}
} catch (com.fyber.inneractive.sdk.player.exoplayer2.text.a e) {
throw new m(e);
}
}
}

View File

@@ -0,0 +1,34 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist;
import com.fyber.inneractive.sdk.player.exoplayer2.j;
import java.util.Collections;
import java.util.List;
/* loaded from: classes2.dex */
public final class a extends c {
public final List<C0088a> b;
public final List<C0088a> c;
public final List<C0088a> d;
public final j e;
public final List<j> f;
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a$a, reason: collision with other inner class name */
public static final class C0088a {
public final String a;
public final j b;
public C0088a(j jVar, String str) {
this.a = str;
this.b = jVar;
}
}
public a(String str, List<C0088a> list, List<C0088a> list2, List<C0088a> list3, j jVar, List<j> list4) {
super(str);
this.b = Collections.unmodifiableList(list);
this.c = Collections.unmodifiableList(list2);
this.d = Collections.unmodifiableList(list3);
this.e = jVar;
this.f = list4 != null ? Collections.unmodifiableList(list4) : null;
}
}

View File

@@ -0,0 +1,79 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.util.Collections;
import java.util.List;
/* loaded from: classes2.dex */
public final class b extends c {
public final int b;
public final long c;
public final long d;
public final boolean e;
public final int f;
public final int g;
public final int h;
public final long i;
public final boolean j;
public final boolean k;
public final a l;
public final List<a> m;
public final List<String> n;
public final long o;
public static final class a implements Comparable<Long> {
public final String a;
public final long b;
public final int c;
public final long d;
public final boolean e;
public final String f;
public final String g;
public final long h;
public final long i;
public a(String str, long j, int i, long j2, boolean z, String str2, String str3, long j3, long j4) {
this.a = str;
this.b = j;
this.c = i;
this.d = j2;
this.e = z;
this.f = str2;
this.g = str3;
this.h = j3;
this.i = j4;
}
@Override // java.lang.Comparable
public final int compareTo(Long l) {
Long l2 = l;
if (this.d > l2.longValue()) {
return 1;
}
return this.d < l2.longValue() ? -1 : 0;
}
}
public b(int i, String str, long j, long j2, boolean z, int i2, int i3, int i4, long j3, boolean z2, boolean z3, a aVar, List<a> list, List<String> list2) {
super(str);
this.b = i;
this.d = j2;
this.e = z;
this.f = i2;
this.g = i3;
this.h = i4;
this.i = j3;
this.j = z2;
this.k = z3;
this.l = aVar;
this.m = Collections.unmodifiableList(list);
if (list.isEmpty()) {
this.o = 0L;
} else {
a aVar2 = list.get(list.size() - 1);
this.o = aVar2.d + aVar2.b;
}
this.c = j == C.TIME_UNSET ? -9223372036854775807L : j >= 0 ? j : this.o + j;
this.n = Collections.unmodifiableList(list2);
}
}

View File

@@ -0,0 +1,10 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist;
/* loaded from: classes2.dex */
public abstract class c {
public final String a;
public c(String str) {
this.a = str;
}
}

View File

@@ -0,0 +1,375 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist;
import android.text.TextUtils;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b;
import com.fyber.inneractive.sdk.player.exoplayer2.m;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.w;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.mbridge.msdk.newreward.function.common.MBridgeCommon;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.io.BufferedReader;
import java.io.IOException;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.LinkedList;
import java.util.Queue;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* loaded from: classes2.dex */
public final class d implements w.a<c> {
public static final Pattern a = Pattern.compile("AVERAGE-BANDWIDTH=(\\d+)\\b");
public static final Pattern b = Pattern.compile("[^-]BANDWIDTH=(\\d+)\\b");
public static final Pattern c = Pattern.compile("CODECS=\"(.+?)\"");
public static final Pattern d = Pattern.compile("RESOLUTION=(\\d+x\\d+)");
public static final Pattern e = Pattern.compile("#EXT-X-TARGETDURATION:(\\d+)\\b");
public static final Pattern f = Pattern.compile("#EXT-X-VERSION:(\\d+)\\b");
public static final Pattern g = Pattern.compile("#EXT-X-PLAYLIST-TYPE:(.+)\\b");
public static final Pattern h = Pattern.compile("#EXT-X-MEDIA-SEQUENCE:(\\d+)\\b");
public static final Pattern i = Pattern.compile("#EXTINF:([\\d\\.]+)\\b");
public static final Pattern j = Pattern.compile("TIME-OFFSET=(-?[\\d\\.]+)\\b");
public static final Pattern k = Pattern.compile("#EXT-X-BYTERANGE:(\\d+(?:@\\d+)?)\\b");
public static final Pattern l = Pattern.compile("BYTERANGE=\"(\\d+(?:@\\d+)?)\\b\"");
public static final Pattern m = Pattern.compile("METHOD=(NONE|AES-128)");
public static final Pattern n = Pattern.compile("URI=\"(.+?)\"");
public static final Pattern o = Pattern.compile("IV=([^,.*]+)");
public static final Pattern p = Pattern.compile("TYPE=(AUDIO|VIDEO|SUBTITLES|CLOSED-CAPTIONS)");
public static final Pattern q = Pattern.compile("LANGUAGE=\"(.+?)\"");
public static final Pattern r = Pattern.compile("NAME=\"(.+?)\"");
public static final Pattern s = Pattern.compile("INSTREAM-ID=\"((?:CC|SERVICE)\\d+)\"");
public static final Pattern t = Pattern.compile("AUTOSELECT".concat("=(NO|YES)"));
public static final Pattern u = Pattern.compile("DEFAULT".concat("=(NO|YES)"));
public static final Pattern v = Pattern.compile("FORCED".concat("=(NO|YES)"));
/* JADX WARN: Multi-variable type inference failed */
public static b b(a aVar, String str) throws IOException {
String str2;
int i2;
ArrayList arrayList = new ArrayList();
ArrayList arrayList2 = new ArrayList();
int i3 = 0;
int i4 = 1;
String str3 = null;
long j2 = 0;
int i5 = 0;
int i6 = 0;
int i7 = 0;
int i8 = 0;
boolean z = false;
int i9 = 0;
int i10 = 0;
boolean z2 = false;
int i11 = 1;
b.a aVar2 = null;
String str4 = null;
String str5 = null;
long j3 = 0;
long j4 = 0;
long j5 = 0;
long j6 = 0;
long j7 = C.TIME_UNSET;
long j8 = C.TIME_UNSET;
while (true) {
long j9 = -1;
while (aVar.a()) {
if (aVar.a()) {
str2 = aVar.c;
aVar.c = str3;
} else {
str2 = str3;
}
if (str2.startsWith("#EXT-X-PLAYLIST-TYPE")) {
String c2 = c(str2, g);
if ("VOD".equals(c2)) {
i5 = i4;
} else if ("EVENT".equals(c2)) {
i5 = 2;
}
str3 = null;
} else {
if (str2.startsWith("#EXT-X-START")) {
j7 = (long) (Double.parseDouble(c(str2, j)) * 1000000.0d);
} else if (str2.startsWith("#EXT-X-MAP")) {
String c3 = c(str2, n);
String b2 = b(str2, l);
if (b2 != null) {
String[] split = b2.split("@");
j9 = Long.parseLong(split[i3]);
if (split.length > i4) {
j4 = Long.parseLong(split[i4]);
}
}
aVar2 = new b.a(c3, 0L, -1, C.TIME_UNSET, false, null, null, j4, j9);
j4 = j2;
str3 = null;
} else if (str2.startsWith("#EXT-X-TARGETDURATION")) {
j8 = Integer.parseInt(c(str2, e)) * 1000000;
} else if (str2.startsWith("#EXT-X-MEDIA-SEQUENCE")) {
i9 = Integer.parseInt(c(str2, h));
i8 = i9;
} else if (str2.startsWith("#EXT-X-VERSION")) {
i11 = Integer.parseInt(c(str2, f));
} else if (str2.startsWith("#EXTINF")) {
j6 = (long) (Double.parseDouble(c(str2, i)) * 1000000.0d);
} else if (str2.startsWith("#EXT-X-KEY")) {
z2 = "AES-128".equals(c(str2, m));
if (z2) {
str5 = c(str2, n);
str4 = b(str2, o);
} else {
str3 = null;
str4 = null;
str5 = null;
}
} else if (str2.startsWith("#EXT-X-BYTERANGE")) {
String[] split2 = c(str2, k).split("@");
j9 = Long.parseLong(split2[i3]);
if (split2.length > i4) {
j4 = Long.parseLong(split2[i4]);
}
} else if (str2.startsWith("#EXT-X-DISCONTINUITY-SEQUENCE")) {
i7 = Integer.parseInt(str2.substring(str2.indexOf(58) + i4));
i6 = i4;
} else if (str2.equals("#EXT-X-DISCONTINUITY")) {
i10++;
} else if (str2.startsWith("#EXT-X-PROGRAM-DATE-TIME")) {
if (j3 == j2) {
String substring = str2.substring(str2.indexOf(58) + i4);
Matcher matcher = s.f.matcher(substring);
if (!matcher.matches()) {
throw new m("Invalid date/time format: " + substring);
}
if (matcher.group(9) == null || matcher.group(9).equalsIgnoreCase("Z")) {
i2 = i3;
} else {
i2 = Integer.parseInt(matcher.group(13)) + (Integer.parseInt(matcher.group(12)) * 60);
if (matcher.group(11).equals("-")) {
i2 *= -1;
}
}
GregorianCalendar gregorianCalendar = new GregorianCalendar(TimeZone.getTimeZone("GMT"));
gregorianCalendar.clear();
gregorianCalendar.set(Integer.parseInt(matcher.group(i4)), Integer.parseInt(matcher.group(2)) - 1, Integer.parseInt(matcher.group(3)), Integer.parseInt(matcher.group(4)), Integer.parseInt(matcher.group(5)), Integer.parseInt(matcher.group(6)));
if (!TextUtils.isEmpty(matcher.group(8))) {
gregorianCalendar.set(14, new BigDecimal("0." + matcher.group(8)).movePointRight(3).intValue());
}
long timeInMillis = gregorianCalendar.getTimeInMillis();
if (i2 != 0) {
timeInMillis -= i2 * MBridgeCommon.DEFAULT_LOAD_TIMEOUT;
}
int i12 = com.fyber.inneractive.sdk.player.exoplayer2.b.a;
j3 = (timeInMillis == C.TIME_UNSET ? -9223372036854775807L : timeInMillis * 1000) - j5;
}
} else if (str2.startsWith("#EXT-X-DATERANGE")) {
arrayList2.add(str2);
} else if (!str2.startsWith("#")) {
String hexString = !z2 ? null : str4 != null ? str4 : Integer.toHexString(i9);
int i13 = i9 + 1;
if (j9 == -1) {
j4 = 0;
}
arrayList.add(new b.a(str2, j6, i10, j5, z2, str5, hexString, j4, j9));
j5 += j6;
if (j9 != -1) {
j4 += j9;
}
i9 = i13;
j9 = -1;
i3 = 0;
i4 = 1;
str3 = null;
j2 = 0;
j6 = 0;
} else if (str2.equals("#EXT-X-ENDLIST")) {
i3 = 0;
i4 = 1;
str3 = null;
j2 = 0;
z = true;
}
str3 = null;
}
i3 = 0;
i4 = 1;
str3 = null;
j2 = 0;
}
return new b(i5, str, j7, j3, i6, i7, i8, i11, j8, z, j3 != 0, aVar2, arrayList, arrayList2);
}
}
public static String c(String str, Pattern pattern) throws m {
Matcher matcher = pattern.matcher(str);
if (matcher.find() && matcher.groupCount() == 1) {
return matcher.group(1);
}
throw new m("Couldn't match " + pattern.pattern() + " in " + str);
}
/* JADX WARN: Code restructure failed: missing block: B:12:0x0074, code lost:
r1 = r0.readLine();
*/
/* JADX WARN: Code restructure failed: missing block: B:13:0x0078, code lost:
if (r1 == null) goto L76;
*/
/* JADX WARN: Code restructure failed: missing block: B:14:0x007a, code lost:
r1 = r1.trim();
*/
/* JADX WARN: Code restructure failed: missing block: B:15:0x0082, code lost:
if (r1.isEmpty() == false) goto L75;
*/
/* JADX WARN: Code restructure failed: missing block: B:18:0x008b, code lost:
if (r1.startsWith("#EXT-X-STREAM-INF") == false) goto L47;
*/
/* JADX WARN: Code restructure failed: missing block: B:20:0x00a4, code lost:
if (r1.startsWith("#EXT-X-TARGETDURATION") != false) goto L79;
*/
/* JADX WARN: Code restructure failed: missing block: B:22:0x00ac, code lost:
if (r1.startsWith("#EXT-X-MEDIA-SEQUENCE") != false) goto L82;
*/
/* JADX WARN: Code restructure failed: missing block: B:24:0x00b4, code lost:
if (r1.startsWith("#EXTINF") != false) goto L84;
*/
/* JADX WARN: Code restructure failed: missing block: B:26:0x00bc, code lost:
if (r1.startsWith("#EXT-X-KEY") != false) goto L86;
*/
/* JADX WARN: Code restructure failed: missing block: B:28:0x00c4, code lost:
if (r1.startsWith("#EXT-X-BYTERANGE") != false) goto L78;
*/
/* JADX WARN: Code restructure failed: missing block: B:30:0x00cc, code lost:
if (r1.equals("#EXT-X-DISCONTINUITY") != false) goto L81;
*/
/* JADX WARN: Code restructure failed: missing block: B:32:0x00d4, code lost:
if (r1.equals("#EXT-X-DISCONTINUITY-SEQUENCE") != false) goto L83;
*/
/* JADX WARN: Code restructure failed: missing block: B:34:0x00dc, code lost:
if (r1.equals("#EXT-X-ENDLIST") == false) goto L64;
*/
/* JADX WARN: Code restructure failed: missing block: B:35:0x00df, code lost:
r9.add(r1);
*/
/* JADX WARN: Code restructure failed: missing block: B:40:0x00e3, code lost:
r9.add(r1);
r8 = b(new com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.d.a(r9, r0), r8.toString());
*/
/* JADX WARN: Code restructure failed: missing block: B:41:0x00f3, code lost:
com.fyber.inneractive.sdk.player.exoplayer2.util.s.a(r0);
*/
/* JADX WARN: Code restructure failed: missing block: B:42:0x00f6, code lost:
return r8;
*/
/* JADX WARN: Code restructure failed: missing block: B:52:0x008d, code lost:
r9.add(r1);
r8 = a(new com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.d.a(r9, r0), r8.toString());
*/
/* JADX WARN: Code restructure failed: missing block: B:57:0x00f7, code lost:
com.fyber.inneractive.sdk.player.exoplayer2.util.s.a(r0);
*/
/* JADX WARN: Code restructure failed: missing block: B:58:0x0101, code lost:
throw new com.fyber.inneractive.sdk.player.exoplayer2.m("Failed to parse the playlist, could not identify any tags.");
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c a(android.net.Uri r8, com.fyber.inneractive.sdk.player.exoplayer2.upstream.h r9) throws java.io.IOException {
/*
Method dump skipped, instructions count: 270
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.d.a(android.net.Uri, com.fyber.inneractive.sdk.player.exoplayer2.upstream.h):com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c");
}
public static class a {
public final BufferedReader a;
public final Queue<String> b;
public String c;
public a(LinkedList linkedList, BufferedReader bufferedReader) {
this.b = linkedList;
this.a = bufferedReader;
}
public final boolean a() throws IOException {
String trim;
if (this.c != null) {
return true;
}
if (!this.b.isEmpty()) {
this.c = this.b.poll();
return true;
}
do {
String readLine = this.a.readLine();
this.c = readLine;
if (readLine == null) {
return false;
}
trim = readLine.trim();
this.c = trim;
} while (trim.isEmpty());
return true;
}
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARN: Code restructure failed: missing block: B:73:0x008b, code lost:
if (r14.equals("CLOSED-CAPTIONS") == false) goto L21;
*/
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:24:0x01ea */
/* JADX WARN: Removed duplicated region for block: B:27:0x01f6 A[SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:31:0x001b A[SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:32:0x01ef */
/* JADX WARN: Type inference failed for: r0v2, types: [java.util.List] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.d.a r45, java.lang.String r46) throws java.io.IOException {
/*
Method dump skipped, instructions count: 614
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.d.a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.d$a, java.lang.String):com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a");
}
public static String b(String str, Pattern pattern) {
Matcher matcher = pattern.matcher(str);
if (matcher.find()) {
return matcher.group(1);
}
return null;
}
public static boolean a(String str, Pattern pattern) {
Matcher matcher = pattern.matcher(str);
if (matcher.find()) {
return matcher.group(1).equals("YES");
}
return false;
}
}

View File

@@ -0,0 +1,342 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist;
import android.net.Uri;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemClock;
import androidx.work.WorkRequest;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.h;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b;
import com.fyber.inneractive.sdk.player.exoplayer2.j;
import com.fyber.inneractive.sdk.player.exoplayer2.m;
import com.fyber.inneractive.sdk.player.exoplayer2.source.f;
import com.fyber.inneractive.sdk.player.exoplayer2.source.p;
import com.fyber.inneractive.sdk.player.exoplayer2.source.s;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.i;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.t;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.v;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.b;
import com.fyber.inneractive.sdk.player.exoplayer2.upstream.w;
import com.fyber.inneractive.sdk.player.exoplayer2.util.r;
import com.mbridge.msdk.interstitial.view.MBInterstitialActivity;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.mbridge.msdk.playercommon.exoplayer2.source.chunk.ChunkedTrackBlacklistUtil;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.IdentityHashMap;
import java.util.List;
/* loaded from: classes2.dex */
public final class e implements v.a<w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c>> {
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.d a;
public final int c;
public final InterfaceC0089e f;
public final f.a i;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a j;
public a.C0088a k;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b l;
public boolean m;
public final ArrayList g = new ArrayList();
public final v h = new v("HlsPlaylistTracker:MasterPlaylist");
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.d b = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.d();
public final IdentityHashMap<a.C0088a, a> d = new IdentityHashMap<>();
public final Handler e = new Handler();
public final class a implements v.a<w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c>>, Runnable {
public final a.C0088a a;
public final v b = new v("HlsPlaylistTracker:MediaPlaylist");
public final w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> c;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b d;
public long e;
public long f;
public long g;
public long h;
public boolean i;
public IOException j;
public a(a.C0088a c0088a, long j) {
this.a = c0088a;
this.g = j;
this.c = new w<>(((com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.b) e.this.a).a(), r.a(e.this.j.a, c0088a.a), e.this.b);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.a
public final void a(w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar, long j, long j2, boolean z) {
w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar2 = wVar;
f.a aVar = e.this.i;
i iVar = wVar2.a;
long j3 = wVar2.f;
if (aVar.b != null) {
aVar.a.post(new com.fyber.inneractive.sdk.player.exoplayer2.source.c(aVar, iVar, 4, -1, null, 0, null, C.TIME_UNSET, C.TIME_UNSET, j, j2, j3));
}
}
@Override // java.lang.Runnable
public final void run() {
this.i = false;
a();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.a
public final void a(w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar, long j, long j2) {
w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar2 = wVar;
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c cVar = wVar2.d;
if (cVar instanceof com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b) {
a((com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b) cVar);
f.a aVar = e.this.i;
i iVar = wVar2.a;
long j3 = wVar2.f;
if (aVar.b != null) {
aVar.a.post(new com.fyber.inneractive.sdk.player.exoplayer2.source.b(aVar, iVar, 4, -1, null, 0, null, C.TIME_UNSET, C.TIME_UNSET, j, j2, j3));
return;
}
return;
}
this.j = new m("Loaded playlist has unexpected type.");
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.a
public final int a(w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar, long j, long j2, IOException iOException) {
boolean z;
int i;
w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar2 = wVar;
boolean z2 = iOException instanceof m;
f.a aVar = e.this.i;
i iVar = wVar2.a;
long j3 = wVar2.f;
if (aVar.b != null) {
z = z2;
aVar.a.post(new com.fyber.inneractive.sdk.player.exoplayer2.source.d(aVar, iVar, 4, -1, null, 0, null, C.TIME_UNSET, C.TIME_UNSET, j, j2, j3, iOException, z));
} else {
z = z2;
}
if (z) {
return 3;
}
if ((iOException instanceof t) && ((i = ((t) iOException).a) == 404 || i == 410)) {
this.h = SystemClock.elapsedRealtime() + ChunkedTrackBlacklistUtil.DEFAULT_TRACK_BLACKLIST_MS;
e eVar = e.this;
a.C0088a c0088a = this.a;
int size = eVar.g.size();
for (int i2 = 0; i2 < size; i2++) {
((b) eVar.g.get(i2)).a(c0088a);
}
e eVar2 = e.this;
if (eVar2.k != this.a || e.a(eVar2)) {
return 2;
}
}
return 0;
}
public final void a() {
this.h = 0L;
if (this.i || this.b.a()) {
return;
}
v vVar = this.b;
w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar = this.c;
int i = e.this.c;
vVar.getClass();
Looper myLooper = Looper.myLooper();
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(myLooper != null);
v.b<? extends v.c> bVar = vVar.new b<>(myLooper, wVar, this, i, SystemClock.elapsedRealtime());
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(vVar.b == null);
vVar.b = bVar;
bVar.e = null;
vVar.a.execute(bVar);
}
/* JADX WARN: Removed duplicated region for block: B:20:0x0134 */
/* JADX WARN: Removed duplicated region for block: B:25:0x01b5 */
/* JADX WARN: Removed duplicated region for block: B:28:? A[RETURN, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:30:0x0148 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b r27) {
/*
Method dump skipped, instructions count: 452
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e.a.a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b):void");
}
}
public interface b {
void a(a.C0088a c0088a);
void b();
}
public static final class c extends IOException {
}
public static final class d extends IOException {
}
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.e$e, reason: collision with other inner class name */
public interface InterfaceC0089e {
}
public e(Uri uri, com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.d dVar, f.a aVar, int i, InterfaceC0089e interfaceC0089e) {
this.a = dVar;
this.i = aVar;
this.c = i;
this.f = interfaceC0089e;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.a
public final void a(w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar, long j, long j2, boolean z) {
w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar2 = wVar;
f.a aVar = this.i;
i iVar = wVar2.a;
long j3 = wVar2.f;
if (aVar.b != null) {
aVar.a.post(new com.fyber.inneractive.sdk.player.exoplayer2.source.c(aVar, iVar, 4, -1, null, 0, null, C.TIME_UNSET, C.TIME_UNSET, j, j2, j3));
}
}
public final boolean b(a.C0088a c0088a) {
int i;
a aVar = this.d.get(c0088a);
if (aVar.d != null) {
long elapsedRealtime = SystemClock.elapsedRealtime();
long max = Math.max(WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS, com.fyber.inneractive.sdk.player.exoplayer2.b.a(aVar.d.o));
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b bVar = aVar.d;
if (bVar.j || (i = bVar.b) == 2 || i == 1 || aVar.e + max > elapsedRealtime) {
return true;
}
}
return false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.a
public final void a(w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar, long j, long j2) {
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a aVar;
w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar2 = wVar;
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c cVar = wVar2.d;
boolean z = cVar instanceof com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b;
if (z) {
List singletonList = Collections.singletonList(new a.C0088a(new j("0", MimeTypes.APPLICATION_M3U8, null, null, -1, -1, -1, -1, -1.0f, -1, -1.0f, null, -1, null, -1, -1, -1, -1, -1, 0, null, -1, Long.MAX_VALUE, null, null, null), cVar.a));
List emptyList = Collections.emptyList();
aVar = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a(null, singletonList, emptyList, emptyList, null, null);
} else {
aVar = (com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a) cVar;
}
this.j = aVar;
this.k = aVar.b.get(0);
ArrayList arrayList = new ArrayList();
arrayList.addAll(aVar.b);
arrayList.addAll(aVar.c);
arrayList.addAll(aVar.d);
int size = arrayList.size();
long elapsedRealtime = SystemClock.elapsedRealtime();
for (int i = 0; i < size; i++) {
a.C0088a c0088a = (a.C0088a) arrayList.get(i);
this.d.put(c0088a, new a(c0088a, elapsedRealtime));
}
a aVar2 = this.d.get(this.k);
if (z) {
aVar2.a((com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b) cVar);
} else {
aVar2.a();
}
f.a aVar3 = this.i;
i iVar = wVar2.a;
long j3 = wVar2.f;
if (aVar3.b != null) {
aVar3.a.post(new com.fyber.inneractive.sdk.player.exoplayer2.source.b(aVar3, iVar, 4, -1, null, 0, null, C.TIME_UNSET, C.TIME_UNSET, j, j2, j3));
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.upstream.v.a
public final int a(w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar, long j, long j2, IOException iOException) {
boolean z;
w<com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.c> wVar2 = wVar;
boolean z2 = iOException instanceof m;
f.a aVar = this.i;
i iVar = wVar2.a;
long j3 = wVar2.f;
if (aVar.b != null) {
z = z2;
aVar.a.post(new com.fyber.inneractive.sdk.player.exoplayer2.source.d(aVar, iVar, 4, -1, null, 0, null, C.TIME_UNSET, C.TIME_UNSET, j, j2, j3, iOException, z));
} else {
z = z2;
}
return z ? 3 : 0;
}
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b a(a.C0088a c0088a) {
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b bVar;
a aVar = this.d.get(c0088a);
aVar.getClass();
aVar.g = SystemClock.elapsedRealtime();
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b bVar2 = aVar.d;
if (bVar2 != null && this.j.b.contains(c0088a) && (((bVar = this.l) == null || !bVar.j) && this.d.get(this.k).g - SystemClock.elapsedRealtime() > MBInterstitialActivity.WEB_LOAD_TIME)) {
this.k = c0088a;
this.d.get(c0088a).a();
}
return bVar2;
}
public static boolean a(e eVar) {
List<a.C0088a> list = eVar.j.b;
int size = list.size();
long elapsedRealtime = SystemClock.elapsedRealtime();
for (int i = 0; i < size; i++) {
a aVar = eVar.d.get(list.get(i));
if (elapsedRealtime > aVar.h) {
eVar.k = aVar.a;
aVar.a();
return true;
}
}
return false;
}
public static boolean a(e eVar, a.C0088a c0088a, com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.b bVar) {
s sVar;
long j;
if (c0088a == eVar.k) {
if (eVar.l == null) {
eVar.m = !bVar.j;
}
eVar.l = bVar;
h hVar = (h) eVar.f;
hVar.getClass();
long j2 = bVar.c;
if (hVar.d.m) {
long j3 = bVar.j ? bVar.d + bVar.o : -9223372036854775807L;
List<b.a> list = bVar.m;
if (j2 == C.TIME_UNSET) {
if (!list.isEmpty()) {
j2 = list.get(Math.max(0, list.size() - 3)).d;
} else {
j = 0;
sVar = new s(j3, bVar.o, bVar.d, j, true, !bVar.j);
}
}
j = j2;
sVar = new s(j3, bVar.o, bVar.d, j, true, !bVar.j);
} else {
long j4 = j2 == C.TIME_UNSET ? 0L : j2;
long j5 = bVar.d;
long j6 = bVar.o;
sVar = new s(j5 + j6, j6, j5, j4, true, false);
}
p.a aVar = hVar.e;
com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.playlist.a aVar2 = hVar.d.j;
aVar.a(sVar, new com.fyber.inneractive.sdk.player.exoplayer2.extractor.hls.e());
}
int size = eVar.g.size();
for (int i = 0; i < size; i++) {
((b) eVar.g.get(i)).b();
}
return c0088a == eVar.k && !bVar.j;
}
}

View File

@@ -0,0 +1,58 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
import com.fyber.inneractive.sdk.player.exoplayer2.metadata.a;
import com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.g;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* loaded from: classes2.dex */
public final class i {
public static final Pattern c;
public int a = -1;
public int b = -1;
public class a implements g.a {
}
static {
new a();
c = Pattern.compile("^ [0-9a-fA-F]{8} ([0-9a-fA-F]{8}) ([0-9a-fA-F]{8})");
}
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.metadata.a aVar) {
int i = 0;
while (true) {
a.b[] bVarArr = aVar.a;
if (i >= bVarArr.length) {
return;
}
a.b bVar = bVarArr[i];
if (bVar instanceof com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.e) {
com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.e eVar = (com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.e) bVar;
String str = eVar.c;
String str2 = eVar.d;
if ("iTunSMPB".equals(str)) {
Matcher matcher = c.matcher(str2);
if (matcher.find()) {
try {
int parseInt = Integer.parseInt(matcher.group(1), 16);
int parseInt2 = Integer.parseInt(matcher.group(2), 16);
if (parseInt > 0 || parseInt2 > 0) {
this.a = parseInt;
this.b = parseInt2;
return;
}
} catch (NumberFormatException unused) {
continue;
}
} else {
continue;
}
} else {
continue;
}
}
i++;
}
}
}

View File

@@ -0,0 +1,97 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ogg.DefaultOggSeeker;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ts.PsExtractor;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import com.vungle.ads.internal.protos.Sdk;
import org.apache.http.HttpStatus;
/* loaded from: classes2.dex */
public final class j {
public static final String[] h = {MimeTypes.AUDIO_MPEG_L1, MimeTypes.AUDIO_MPEG_L2, MimeTypes.AUDIO_MPEG};
public static final int[] i = {44100, 48000, 32000};
public static final int[] j = {32, 64, 96, 128, 160, PsExtractor.AUDIO_STREAM, 224, 256, 288, Sdk.SDKError.Reason.WEBVIEW_ERROR_VALUE, 352, 384, HttpStatus.SC_REQUESTED_RANGE_NOT_SATISFIABLE, 448};
public static final int[] k = {32, 48, 56, 64, 80, 96, 112, 128, 144, 160, 176, PsExtractor.AUDIO_STREAM, 224, 256};
public static final int[] l = {32, 48, 56, 64, 80, 96, 112, 128, 160, PsExtractor.AUDIO_STREAM, 224, 256, Sdk.SDKError.Reason.WEBVIEW_ERROR_VALUE, 384};
public static final int[] m = {32, 40, 48, 56, 64, 80, 96, 112, 128, 160, PsExtractor.AUDIO_STREAM, 224, 256, Sdk.SDKError.Reason.WEBVIEW_ERROR_VALUE};
public static final int[] n = {8, 16, 24, 32, 40, 48, 56, 64, 80, 96, 112, 128, 144, 160};
public int a;
public String b;
public int c;
public int d;
public int e;
public int f;
public int g;
public static int a(int i2) {
int i3;
int i4;
int i5;
int i6;
if ((i2 & (-2097152)) != -2097152 || (i3 = (i2 >>> 19) & 3) == 1 || (i4 = (i2 >>> 17) & 3) == 0 || (i5 = (i2 >>> 12) & 15) == 0 || i5 == 15 || (i6 = (i2 >>> 10) & 3) == 3) {
return -1;
}
int i7 = i[i6];
if (i3 == 2) {
i7 /= 2;
} else if (i3 == 0) {
i7 /= 4;
}
int i8 = (i2 >>> 9) & 1;
if (i4 == 3) {
return ((((i3 == 3 ? j[i5 - 1] : k[i5 - 1]) * 12000) / i7) + i8) * 4;
}
int i9 = i3 == 3 ? i4 == 2 ? l[i5 - 1] : m[i5 - 1] : n[i5 - 1];
if (i3 == 3) {
return ((i9 * 144000) / i7) + i8;
}
return (((i4 == 1 ? DefaultOggSeeker.MATCH_RANGE : 144000) * i9) / i7) + i8;
}
public static boolean a(int i2, j jVar) {
int i3;
int i4;
int i5;
int i6;
int i7;
int i8;
int i9;
int i10;
if ((i2 & (-2097152)) != -2097152 || (i3 = (i2 >>> 19) & 3) == 1 || (i4 = (i2 >>> 17) & 3) == 0 || (i5 = (i2 >>> 12) & 15) == 0 || i5 == 15 || (i6 = (i2 >>> 10) & 3) == 3) {
return false;
}
int i11 = i[i6];
if (i3 == 2) {
i11 /= 2;
} else if (i3 == 0) {
i11 /= 4;
}
int i12 = (i2 >>> 9) & 1;
if (i4 == 3) {
i7 = i3 == 3 ? j[i5 - 1] : k[i5 - 1];
i9 = (((i7 * 12000) / i11) + i12) * 4;
i10 = 384;
} else {
if (i3 == 3) {
i7 = i4 == 2 ? l[i5 - 1] : m[i5 - 1];
i8 = (144000 * i7) / i11;
} else {
i7 = n[i5 - 1];
r9 = i4 == 1 ? 576 : 1152;
i8 = ((i4 == 1 ? DefaultOggSeeker.MATCH_RANGE : 144000) * i7) / i11;
}
i9 = i8 + i12;
i10 = r9;
}
String str = h[3 - i4];
int i13 = ((i2 >> 6) & 3) == 3 ? 1 : 2;
jVar.a = i3;
jVar.b = str;
jVar.c = i9;
jVar.d = i11;
jVar.e = i13;
jVar.f = i7 * 1000;
jVar.g = i10;
return true;
}
}

View File

@@ -0,0 +1,6 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
/* loaded from: classes2.dex */
public final class k {
public long a;
}

View File

@@ -0,0 +1,34 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
/* loaded from: classes2.dex */
public interface l {
public static final class a implements l {
public final long a;
public a(long j) {
this.a = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long a(long j) {
return 0L;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final boolean b() {
return false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long c() {
return this.a;
}
}
long a(long j);
boolean b();
long c();
}

View File

@@ -0,0 +1,14 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor;
import java.io.IOException;
/* loaded from: classes2.dex */
public interface m {
int a(b bVar, int i, boolean z) throws IOException, InterruptedException;
void a(int i, com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar);
void a(long j, int i, int i2, int i3, byte[] bArr);
void a(com.fyber.inneractive.sdk.player.exoplayer2.j jVar);
}

View File

@@ -0,0 +1,30 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv.d;
import java.util.Stack;
/* loaded from: classes2.dex */
public final class a implements b {
public final byte[] a = new byte[8];
public final Stack<C0090a> b = new Stack<>();
public final f c = new f();
public c d;
public int e;
public int f;
public long g;
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv.a$a, reason: collision with other inner class name */
public static final class C0090a {
public final int a;
public final long b;
public C0090a(int i, long j) {
this.a = i;
this.b = j;
}
}
public final void a(d.a aVar) {
this.d = aVar;
}
}

View File

@@ -0,0 +1,5 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv;
/* loaded from: classes2.dex */
public interface b {
}

View File

@@ -0,0 +1,5 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv;
/* loaded from: classes2.dex */
public interface c {
}

View File

@@ -0,0 +1,613 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv;
import android.support.v4.media.session.PlaybackStateCompat;
import android.util.SparseArray;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.g;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.m;
import com.fyber.inneractive.sdk.player.exoplayer2.util.i;
import com.fyber.inneractive.sdk.player.exoplayer2.util.k;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.util.Arrays;
import java.util.Locale;
import java.util.UUID;
import kotlin.jvm.internal.ByteCompanionObject;
/* loaded from: classes2.dex */
public final class d implements com.fyber.inneractive.sdk.player.exoplayer2.extractor.f {
public static final byte[] Z = {49, 10, 48, 48, 58, 48, 48, 58, 48, 48, 44, 48, 48, 48, 32, 45, 45, 62, 32, 48, 48, 58, 48, 48, 58, 48, 48, 44, 48, 48, 48, 10};
public static final byte[] a0 = {32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32};
public static final UUID b0 = new UUID(72057594037932032L, -9223371306706625679L);
public long A;
public com.fyber.inneractive.sdk.player.exoplayer2.util.f B;
public com.fyber.inneractive.sdk.player.exoplayer2.util.f C;
public boolean D;
public int E;
public long F;
public long G;
public int H;
public int I;
public int[] J;
public int K;
public int L;
public int M;
public int N;
public boolean O;
public boolean P;
public boolean Q;
public boolean R;
public byte S;
public int T;
public int U;
public int V;
public boolean W;
public boolean X;
public g Y;
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv.b a;
public final f b;
public final SparseArray<b> c;
public final boolean d;
public final k e;
public final k f;
public final k g;
public final k h;
public final k i;
public final k j;
public final k k;
public final k l;
public final k m;
public ByteBuffer n;
public long o;
public long p;
public long q;
public long r;
public long s;
public b t;
public boolean u;
public int v;
public long w;
public boolean x;
public long y;
public long z;
public final class a implements c {
public a() {
}
public final boolean a(int i) {
d.this.getClass();
return i == 357149030 || i == 524531317 || i == 475249515 || i == 374648427;
}
public /* synthetic */ a(d dVar, int i) {
this();
}
}
public static final class b {
public boolean L;
public m O;
public int P;
public String a;
public int b;
public int c;
public int d;
public boolean e;
public byte[] f;
public byte[] g;
public byte[] h;
public com.fyber.inneractive.sdk.player.exoplayer2.drm.a i;
public int j = -1;
public int k = -1;
public int l = -1;
public int m = -1;
public int n = 0;
public byte[] o = null;
public int p = -1;
public boolean q = false;
public int r = -1;
public int s = -1;
public int t = -1;
public int u = 1000;
public int v = 200;
public float w = -1.0f;
public float x = -1.0f;
public float y = -1.0f;
public float z = -1.0f;
public float A = -1.0f;
public float B = -1.0f;
public float C = -1.0f;
public float D = -1.0f;
public float E = -1.0f;
public float F = -1.0f;
public int G = 1;
public int H = -1;
public int I = 8000;
public long J = 0;
public long K = 0;
public boolean M = true;
public String N = "eng";
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
/* JADX WARN: Code restructure failed: missing block: B:191:0x03d4, code lost:
if (r1.h() == r2.getLeastSignificantBits()) goto L223;
*/
/* JADX WARN: Removed duplicated region for block: B:13:0x0428 */
/* JADX WARN: Removed duplicated region for block: B:16:0x0432 */
/* JADX WARN: Removed duplicated region for block: B:19:0x0459 */
/* JADX WARN: Removed duplicated region for block: B:77:0x042a */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g r46, int r47) throws com.fyber.inneractive.sdk.player.exoplayer2.m {
/*
Method dump skipped, instructions count: 1746
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv.d.b.a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g, int):void");
}
}
public d() {
this(new com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv.a());
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(g gVar) {
this.Y = gVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
e eVar = new e();
long j = bVar.b;
long j2 = PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID;
if (j != -1 && j <= PlaybackStateCompat.ACTION_PLAY_FROM_MEDIA_ID) {
j2 = j;
}
int i = (int) j2;
bVar.a(eVar.a.a, 0, 4, false);
eVar.b = 4;
for (long k = eVar.a.k(); k != 440786851; k = ((k << 8) & (-256)) | (eVar.a.a[0] & 255)) {
int i2 = eVar.b + 1;
eVar.b = i2;
if (i2 == i) {
return false;
}
bVar.a(eVar.a.a, 0, 1, false);
}
long a2 = eVar.a(bVar);
long j3 = eVar.b;
if (a2 == Long.MIN_VALUE) {
return false;
}
if (j != -1 && j3 + a2 >= j) {
return false;
}
while (true) {
long j4 = eVar.b;
long j5 = j3 + a2;
if (j4 >= j5) {
return j4 == j5;
}
if (eVar.a(bVar) == Long.MIN_VALUE) {
return false;
}
long a3 = eVar.a(bVar);
if (a3 < 0 || a3 > 2147483647L) {
return false;
}
if (a3 != 0) {
bVar.a((int) a3, false);
eVar.b = (int) (eVar.b + a3);
}
}
}
public d(com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv.a aVar) {
this.p = -1L;
this.q = C.TIME_UNSET;
this.r = C.TIME_UNSET;
this.s = C.TIME_UNSET;
this.y = -1L;
this.z = -1L;
this.A = C.TIME_UNSET;
this.a = aVar;
aVar.a(new a(this, 0));
this.d = true;
this.b = new f();
this.c = new SparseArray<>();
this.g = new k(4);
this.h = new k(ByteBuffer.allocate(4).putInt(-1).array());
this.i = new k(4);
this.e = new k(i.a);
this.f = new k(4);
this.j = new k();
this.k = new k();
this.l = new k(8);
this.m = new k();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(long j, long j2) {
this.A = C.TIME_UNSET;
this.E = 0;
com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv.a aVar = (com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv.a) this.a;
aVar.e = 0;
aVar.b.clear();
f fVar = aVar.c;
fVar.b = 0;
fVar.c = 0;
f fVar2 = this.b;
fVar2.b = 0;
fVar2.c = 0;
this.N = 0;
this.V = 0;
this.U = 0;
this.O = false;
this.P = false;
this.R = false;
this.T = 0;
this.S = (byte) 0;
this.Q = false;
this.j.p();
}
/* JADX WARN: Code restructure failed: missing block: B:130:0x01d6, code lost:
throw new com.fyber.inneractive.sdk.player.exoplayer2.m("Mandatory element SeekID or SeekPosition not found");
*/
/* JADX WARN: Code restructure failed: missing block: B:30:0x02f8, code lost:
r3 = r4;
*/
/* JADX WARN: Code restructure failed: missing block: B:31:0x02f9, code lost:
r5 = true;
r3 = r3;
*/
/* JADX WARN: Code restructure failed: missing block: B:32:0x0af5, code lost:
if (r5 == false) goto L631;
*/
/* JADX WARN: Code restructure failed: missing block: B:33:0x0af7, code lost:
r6 = r28.c;
*/
/* JADX WARN: Code restructure failed: missing block: B:34:0x0afb, code lost:
if (r27.x == false) goto L586;
*/
/* JADX WARN: Code restructure failed: missing block: B:36:0x0b09, code lost:
if (r27.u == false) goto L632;
*/
/* JADX WARN: Code restructure failed: missing block: B:37:0x0b0b, code lost:
r3 = r27.z;
*/
/* JADX WARN: Code restructure failed: missing block: B:38:0x0b11, code lost:
if (r3 == (-1)) goto L633;
*/
/* JADX WARN: Code restructure failed: missing block: B:395:0x069a, code lost:
throw new com.fyber.inneractive.sdk.player.exoplayer2.m("EBML lacing sample size out of range.");
*/
/* JADX WARN: Code restructure failed: missing block: B:40:0x0b13, code lost:
r29.a = r3;
r27.z = -1;
*/
/* JADX WARN: Code restructure failed: missing block: B:41:?, code lost:
return 1;
*/
/* JADX WARN: Code restructure failed: missing block: B:45:0x0b19, code lost:
continue;
*/
/* JADX WARN: Code restructure failed: missing block: B:476:0x0849, code lost:
if (r8 != 7) goto L419;
*/
/* JADX WARN: Code restructure failed: missing block: B:47:0x0afd, code lost:
r27.z = r6;
r29.a = r27.y;
r27.x = r3;
*/
/* JADX WARN: Code restructure failed: missing block: B:48:0x0b05, code lost:
return 1;
*/
/* JADX WARN: Code restructure failed: missing block: B:533:0x095e, code lost:
throw new com.fyber.inneractive.sdk.player.exoplayer2.m("DocTypeReadVersion " + r11 + " not supported");
*/
/* JADX WARN: Code restructure failed: missing block: B:630:0x0b31, code lost:
r7 = r3;
*/
/* JADX WARN: Code restructure failed: missing block: B:631:0x0b33, code lost:
if (r5 == false) goto L657;
*/
/* JADX WARN: Code restructure failed: missing block: B:633:0x0b36, code lost:
return r7;
*/
/* JADX WARN: Code restructure failed: missing block: B:634:?, code lost:
return -1;
*/
/* JADX WARN: Code restructure failed: missing block: B:76:0x00d0, code lost:
r2 = com.fyber.inneractive.sdk.bidder.h.a("Invalid index ", r11, ", size is ");
r2.append(r14.a);
*/
/* JADX WARN: Code restructure failed: missing block: B:77:0x00e6, code lost:
throw new java.lang.IndexOutOfBoundsException(r2.toString());
*/
/* JADX WARN: Code restructure failed: missing block: B:81:0x00ea, code lost:
r2 = com.fyber.inneractive.sdk.bidder.h.a("Invalid index ", r11, ", size is ");
r2.append(r12.a);
*/
/* JADX WARN: Code restructure failed: missing block: B:82:0x0100, code lost:
throw new java.lang.IndexOutOfBoundsException(r2.toString());
*/
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:316:0x06d6 */
/* JADX WARN: Removed duplicated region for block: B:325:0x06ed */
/* JADX WARN: Removed duplicated region for block: B:335:0x06f0 */
/* JADX WARN: Removed duplicated region for block: B:337:0x06d8 */
/* JADX WARN: Removed duplicated region for block: B:349:0x05ab */
/* JADX WARN: Removed duplicated region for block: B:350:0x05b7 */
/* JADX WARN: Type inference failed for: r4v0 */
/* JADX WARN: Type inference failed for: r4v90, types: [boolean, int] */
/* JADX WARN: Type inference failed for: r4v95 */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b r28, com.fyber.inneractive.sdk.player.exoplayer2.extractor.k r29) throws java.io.IOException, java.lang.InterruptedException {
/*
Method dump skipped, instructions count: 3334
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv.d.a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b, com.fyber.inneractive.sdk.player.exoplayer2.extractor.k):int");
}
public final void a(b bVar, long j) {
byte[] b2;
if ("S_TEXT/UTF8".equals(bVar.a)) {
byte[] bArr = this.k.a;
long j2 = this.G;
if (j2 == C.TIME_UNSET) {
b2 = a0;
} else {
int i = (int) (j2 / 3600000000L);
long j3 = j2 - (i * 3600000000L);
int i2 = (int) (j3 / 60000000);
long j4 = j3 - (60000000 * i2);
b2 = s.b(String.format(Locale.US, "%02d:%02d:%02d,%03d", Integer.valueOf(i), Integer.valueOf(i2), Integer.valueOf((int) (j4 / 1000000)), Integer.valueOf((int) ((j4 - (1000000 * r5)) / 1000))));
}
System.arraycopy(b2, 0, bArr, 19, 12);
m mVar = bVar.O;
k kVar = this.k;
mVar.a(kVar.c, kVar);
this.V += this.k.c;
}
bVar.O.a(j, this.M, this.V, 0, bVar.g);
this.W = true;
this.N = 0;
this.V = 0;
this.U = 0;
this.O = false;
this.P = false;
this.R = false;
this.T = 0;
this.S = (byte) 0;
this.Q = false;
this.j.p();
}
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar, int i) throws IOException, InterruptedException {
k kVar = this.g;
if (kVar.c >= i) {
return;
}
if (kVar.b() < i) {
k kVar2 = this.g;
byte[] bArr = kVar2.a;
kVar2.a(Arrays.copyOf(bArr, Math.max(bArr.length * 2, i)), this.g.c);
}
k kVar3 = this.g;
byte[] bArr2 = kVar3.a;
int i2 = kVar3.c;
bVar.b(bArr2, i2, i - i2, false);
this.g.d(i);
}
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar, b bVar2, int i) throws IOException, InterruptedException {
int a2;
int a3;
int i2;
if ("S_TEXT/UTF8".equals(bVar2.a)) {
byte[] bArr = Z;
int i3 = i + 32;
if (this.k.b() < i3) {
this.k.a = Arrays.copyOf(bArr, i3 + i);
}
bVar.b(this.k.a, 32, i, false);
this.k.e(0);
this.k.d(i3);
return;
}
m mVar = bVar2.O;
if (!this.O) {
if (bVar2.e) {
this.M &= -1073741825;
if (!this.P) {
bVar.b(this.g.a, 0, 1, false);
this.N++;
byte b2 = this.g.a[0];
if ((b2 & ByteCompanionObject.MIN_VALUE) == 128) {
throw new com.fyber.inneractive.sdk.player.exoplayer2.m("Extension bit is set in signal byte");
}
this.S = b2;
this.P = true;
}
byte b3 = this.S;
if ((b3 & 1) == 1) {
boolean z = (b3 & 2) == 2;
this.M |= 1073741824;
if (!this.Q) {
bVar.b(this.l.a, 0, 8, false);
this.N += 8;
this.Q = true;
k kVar = this.g;
kVar.a[0] = (byte) ((z ? 128 : 0) | 8);
kVar.e(0);
mVar.a(1, this.g);
this.V++;
this.l.e(0);
mVar.a(8, this.l);
this.V += 8;
}
if (z) {
if (!this.R) {
bVar.b(this.g.a, 0, 1, false);
this.N++;
this.g.e(0);
this.T = this.g.j();
this.R = true;
}
int i4 = this.T * 4;
this.g.c(i4);
bVar.b(this.g.a, 0, i4, false);
this.N += i4;
short s = (short) ((this.T / 2) + 1);
int i5 = (s * 6) + 2;
ByteBuffer byteBuffer = this.n;
if (byteBuffer == null || byteBuffer.capacity() < i5) {
this.n = ByteBuffer.allocate(i5);
}
this.n.position(0);
this.n.putShort(s);
int i6 = 0;
int i7 = 0;
while (true) {
i2 = this.T;
if (i6 >= i2) {
break;
}
int m = this.g.m();
if (i6 % 2 == 0) {
this.n.putShort((short) (m - i7));
} else {
this.n.putInt(m - i7);
}
i6++;
i7 = m;
}
int i8 = (i - this.N) - i7;
if (i2 % 2 == 1) {
this.n.putInt(i8);
} else {
this.n.putShort((short) i8);
this.n.putInt(0);
}
this.m.a(this.n.array(), i5);
mVar.a(i5, this.m);
this.V += i5;
}
}
} else {
byte[] bArr2 = bVar2.f;
if (bArr2 != null) {
this.j.a(bArr2, bArr2.length);
}
}
this.O = true;
}
int i9 = i + this.j.c;
if (!"V_MPEG4/ISO/AVC".equals(bVar2.a) && !"V_MPEGH/ISO/HEVC".equals(bVar2.a)) {
while (true) {
int i10 = this.N;
if (i10 >= i9) {
break;
}
int i11 = i9 - i10;
int a4 = this.j.a();
if (a4 > 0) {
a3 = Math.min(i11, a4);
mVar.a(a3, this.j);
} else {
a3 = mVar.a(bVar, i11, false);
}
this.N += a3;
this.V += a3;
}
} else {
byte[] bArr3 = this.f.a;
bArr3[0] = 0;
bArr3[1] = 0;
bArr3[2] = 0;
int i12 = bVar2.P;
int i13 = 4 - i12;
while (this.N < i9) {
int i14 = this.U;
if (i14 == 0) {
int min = Math.min(i12, this.j.a());
bVar.b(bArr3, i13 + min, i12 - min, false);
if (min > 0) {
this.j.a(bArr3, i13, min);
}
this.N += i12;
this.f.e(0);
this.U = this.f.m();
this.e.e(0);
mVar.a(4, this.e);
this.V += 4;
} else {
int a5 = this.j.a();
if (a5 > 0) {
a2 = Math.min(i14, a5);
mVar.a(a2, this.j);
} else {
a2 = mVar.a(bVar, i14, false);
}
this.N += a2;
this.V += a2;
this.U = i14 - a2;
}
}
}
if ("A_VORBIS".equals(bVar2.a)) {
this.h.e(0);
mVar.a(4, this.h);
this.V += 4;
}
}
public final long a(long j) throws com.fyber.inneractive.sdk.player.exoplayer2.m {
long j2 = this.q;
if (j2 != C.TIME_UNSET) {
return s.a(j, j2, 1000L);
}
throw new com.fyber.inneractive.sdk.player.exoplayer2.m("Can't scale timecode prior to timecodeScale being set.");
}
}

View File

@@ -0,0 +1,33 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv;
import com.fyber.inneractive.sdk.player.exoplayer2.util.k;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class e {
public final k a = new k(8);
public int b;
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
int i = 0;
bVar.a(this.a.a, 0, 1, false);
int i2 = this.a.a[0] & 255;
if (i2 == 0) {
return Long.MIN_VALUE;
}
int i3 = 128;
int i4 = 0;
while ((i2 & i3) == 0) {
i3 >>= 1;
i4++;
}
int i5 = i2 & (~i3);
bVar.a(this.a.a, 1, i4, false);
while (i < i4) {
i++;
i5 = (this.a.a[i] & 255) + (i5 << 8);
}
this.b = i4 + 1 + this.b;
return i5;
}
}

View File

@@ -0,0 +1,58 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mkv;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class f {
public static final long[] d = {128, 64, 32, 16, 8, 4, 2, 1};
public final byte[] a = new byte[8];
public int b;
public int c;
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar, boolean z, boolean z2, int i) throws IOException, InterruptedException {
int i2;
if (this.b == 0) {
if (!bVar.b(this.a, 0, 1, z)) {
return -1L;
}
int i3 = this.a[0] & 255;
int i4 = 0;
while (true) {
long[] jArr = d;
if (i4 >= 8) {
i2 = -1;
break;
}
if ((jArr[i4] & i3) != 0) {
i2 = i4 + 1;
break;
}
i4++;
}
this.c = i2;
if (i2 == -1) {
throw new IllegalStateException("No valid varint length mask found");
}
this.b = 1;
}
int i5 = this.c;
if (i5 > i) {
this.b = 0;
return -2L;
}
if (i5 != 1) {
bVar.b(this.a, 1, i5 - 1, false);
}
this.b = 0;
byte[] bArr = this.a;
int i6 = this.c;
long j = bArr[0] & 255;
if (z2) {
j &= ~d[i6 - 1];
}
for (int i7 = 1; i7 < i6; i7++) {
j = (bArr[i7] & 255) | (j << 8);
}
return j;
}
}

View File

@@ -0,0 +1,43 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3.b;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.mbridge.msdk.playercommon.exoplayer2.C;
/* loaded from: classes2.dex */
public final class a implements b.a {
public final long a;
public final int b;
public final long c;
public a(int i, long j, long j2) {
this.a = j;
this.b = i;
this.c = j2 == -1 ? C.TIME_UNSET : b(j2);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final boolean b() {
return this.c != C.TIME_UNSET;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long c() {
return this.c;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3.b.a
public final long b(long j) {
return (Math.max(0L, j - this.a) * 8000000) / this.b;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long a(long j) {
long j2 = this.c;
if (j2 == C.TIME_UNSET) {
return 0L;
}
int i = s.a;
return ((Math.max(0L, Math.min(j, j2)) * this.b) / 8000000) + this.a;
}
}

View File

@@ -0,0 +1,120 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.f;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.g;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.i;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.j;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.l;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.m;
import com.fyber.inneractive.sdk.player.exoplayer2.util.k;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class b implements f {
public static final int m = s.a("Xing");
public static final int n = s.a("Info");
public static final int o = s.a("VBRI");
public final long a;
public g e;
public m f;
public int g;
public com.fyber.inneractive.sdk.player.exoplayer2.metadata.a h;
public a i;
public long k;
public int l;
public final k b = new k(10);
public final j c = new j();
public final i d = new i();
public long j = C.TIME_UNSET;
public interface a extends l {
long b(long j);
}
public b(long j) {
this.a = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(long j, long j2) {
this.g = 0;
this.j = C.TIME_UNSET;
this.k = 0L;
this.l = 0;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
return a(bVar, true);
}
/* JADX WARN: Code restructure failed: missing block: B:59:0x00e0, code lost:
if (r20 == false) goto L53;
*/
/* JADX WARN: Code restructure failed: missing block: B:60:0x00e2, code lost:
r19.a(r4 + r7);
*/
/* JADX WARN: Code restructure failed: missing block: B:61:0x00e9, code lost:
r18.g = r6;
*/
/* JADX WARN: Code restructure failed: missing block: B:62:0x00eb, code lost:
return true;
*/
/* JADX WARN: Code restructure failed: missing block: B:63:0x00e7, code lost:
r19.e = 0;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b r19, boolean r20) throws java.io.IOException, java.lang.InterruptedException {
/*
Method dump skipped, instructions count: 242
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3.b.a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b, boolean):boolean");
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(g gVar) {
this.e = gVar;
this.f = gVar.a(0, 1);
this.e.b();
}
/* JADX WARN: Code restructure failed: missing block: B:15:0x0054, code lost:
if (r12 != com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3.b.n) goto L25;
*/
/* JADX WARN: Removed duplicated region for block: B:108:0x01f1 */
/* JADX WARN: Removed duplicated region for block: B:121:0x005d */
/* JADX WARN: Removed duplicated region for block: B:12:0x0047 */
/* JADX WARN: Removed duplicated region for block: B:18:0x006f */
/* JADX WARN: Removed duplicated region for block: B:55:0x0226 */
/* JADX WARN: Removed duplicated region for block: B:85:0x022a */
/* JADX WARN: Removed duplicated region for block: B:92:0x0154 */
/* JADX WARN: Removed duplicated region for block: B:98:0x01b0 */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b r52, com.fyber.inneractive.sdk.player.exoplayer2.extractor.k r53) throws java.io.IOException, java.lang.InterruptedException {
/*
Method dump skipped, instructions count: 870
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3.b.a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b, com.fyber.inneractive.sdk.player.exoplayer2.extractor.k):int");
}
}

View File

@@ -0,0 +1,37 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3.b;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
/* loaded from: classes2.dex */
public final class c implements b.a {
public final long[] a;
public final long[] b;
public final long c;
public c(long[] jArr, long[] jArr2, long j) {
this.a = jArr;
this.b = jArr2;
this.c = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long a(long j) {
return this.b[s.a(this.a, j, true)];
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3.b.a
public final long b(long j) {
return this.a[s.a(this.b, j, true)];
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final boolean b() {
return true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long c() {
return this.c;
}
}

View File

@@ -0,0 +1,71 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3.b;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
/* loaded from: classes2.dex */
public final class d implements b.a {
public final long a;
public final long b;
public final long c;
public final long[] d;
public final long e;
public final int f;
public d(long j, long j2, long j3, long[] jArr, long j4, int i) {
this.a = j;
this.b = j2;
this.c = j3;
this.d = jArr;
this.e = j4;
this.f = i;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long a(long j) {
if (!b()) {
return this.a;
}
float f = (j * 100.0f) / this.b;
if (f > 0.0f) {
if (f >= 100.0f) {
r0 = 256.0f;
} else {
int i = (int) f;
r0 = i != 0 ? this.d[i - 1] : 0.0f;
r0 += (f - i) * ((i < 99 ? this.d[i] : 256.0f) - r0);
}
}
long round = Math.round(r0 * 0.00390625d * this.e);
long j2 = this.a;
long j3 = round + j2;
long j4 = this.c;
return Math.min(j3, j4 != -1 ? j4 - 1 : ((j2 - this.f) + this.e) - 1);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final boolean b() {
return this.d != null;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long c() {
return this.b;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp3.b.a
public final long b(long j) {
if (!b()) {
return 0L;
}
if (j < this.a) {
return 0L;
}
double d = ((j - r4) * 256.0d) / this.e;
int a = s.a(this.d, (long) d, false);
int i = a + 1;
long j2 = (i * this.b) / 100;
long j3 = i == 0 ? 0L : this.d[a];
return j2 + ((i == 99 ? 256L : this.d[i]) == j3 ? 0L : (long) (((d - j3) * (((r7 * (a + 2)) / 100) - j2)) / (r16 - j3)));
}
}

View File

@@ -0,0 +1,202 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import java.util.ArrayList;
import java.util.Arrays;
/* loaded from: classes2.dex */
public abstract class a {
public static final int A0;
public static final int B0;
public static final int C0;
public static final int D0;
public static final int E0;
public static final int F0;
public static final int G0;
public static final int H0;
public static final int I0;
public static final int J0;
public static final int K0;
public static final int L0;
public static final int M0;
public static final int N0;
public static final int O0;
public static final int l0;
public static final int m0;
public static final int n0;
public static final int o0;
public static final int p0;
public static final int q0;
public static final int r0;
public static final int s0;
public static final int t0;
public static final int u0;
public static final int v0;
public static final int w0;
public static final int x0;
public static final int y0;
public static final int z0;
public final int a;
public static final int b = s.a("ftyp");
public static final int c = s.a("avc1");
public static final int d = s.a("avc3");
public static final int e = s.a("hvc1");
public static final int f = s.a("hev1");
public static final int g = s.a("s263");
public static final int h = s.a("d263");
public static final int i = s.a("mdat");
public static final int j = s.a("mp4a");
public static final int k = s.a(".mp3");
public static final int l = s.a("wave");
public static final int m = s.a("lpcm");
public static final int n = s.a("sowt");
public static final int o = s.a("ac-3");
public static final int p = s.a("dac3");
public static final int q = s.a("ec-3");
public static final int r = s.a("dec3");
public static final int s = s.a("dtsc");
public static final int t = s.a("dtsh");
public static final int u = s.a("dtsl");
public static final int v = s.a("dtse");
public static final int w = s.a("ddts");
public static final int x = s.a("tfdt");
public static final int y = s.a("tfhd");
public static final int z = s.a("trex");
public static final int A = s.a("trun");
public static final int B = s.a("sidx");
public static final int C = s.a("moov");
public static final int D = s.a("mvhd");
public static final int E = s.a("trak");
public static final int F = s.a("mdia");
public static final int G = s.a("minf");
public static final int H = s.a("stbl");
public static final int I = s.a("avcC");
public static final int J = s.a("hvcC");
public static final int K = s.a("esds");
public static final int L = s.a("moof");
public static final int M = s.a("traf");
public static final int N = s.a("mvex");
public static final int O = s.a("mehd");
public static final int P = s.a("tkhd");
public static final int Q = s.a("edts");
public static final int R = s.a("elst");
public static final int S = s.a("mdhd");
public static final int T = s.a("hdlr");
public static final int U = s.a("stsd");
public static final int V = s.a("pssh");
public static final int W = s.a("sinf");
public static final int X = s.a("schm");
public static final int Y = s.a("schi");
public static final int Z = s.a("tenc");
public static final int a0 = s.a("encv");
public static final int b0 = s.a("enca");
public static final int c0 = s.a("frma");
public static final int d0 = s.a("saiz");
public static final int e0 = s.a("saio");
public static final int f0 = s.a("sbgp");
public static final int g0 = s.a("sgpd");
public static final int h0 = s.a("uuid");
public static final int i0 = s.a("senc");
public static final int j0 = s.a("pasp");
public static final int k0 = s.a("TTML");
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a$a, reason: collision with other inner class name */
public static final class C0091a extends a {
public final long P0;
public final ArrayList Q0;
public final ArrayList R0;
public C0091a(int i, long j) {
super(i);
this.P0 = j;
this.Q0 = new ArrayList();
this.R0 = new ArrayList();
}
public final C0091a c(int i) {
int size = this.R0.size();
for (int i2 = 0; i2 < size; i2++) {
C0091a c0091a = (C0091a) this.R0.get(i2);
if (c0091a.a == i) {
return c0091a;
}
}
return null;
}
public final b d(int i) {
int size = this.Q0.size();
for (int i2 = 0; i2 < size; i2++) {
b bVar = (b) this.Q0.get(i2);
if (bVar.a == i) {
return bVar;
}
}
return null;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a
public final String toString() {
return a.a(this.a) + " leaves: " + Arrays.toString(this.Q0.toArray()) + " containers: " + Arrays.toString(this.R0.toArray());
}
}
public static final class b extends a {
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k P0;
public b(int i, com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
super(i);
this.P0 = kVar;
}
}
static {
s.a("vmhd");
l0 = s.a("mp4v");
m0 = s.a("stts");
n0 = s.a("stss");
o0 = s.a("ctts");
p0 = s.a("stsc");
q0 = s.a("stsz");
r0 = s.a("stz2");
s0 = s.a("stco");
t0 = s.a("co64");
u0 = s.a("tx3g");
v0 = s.a("wvtt");
w0 = s.a("stpp");
x0 = s.a("c608");
y0 = s.a("samr");
z0 = s.a("sawb");
A0 = s.a("udta");
B0 = s.a("meta");
C0 = s.a("ilst");
D0 = s.a("mean");
E0 = s.a("name");
F0 = s.a("data");
G0 = s.a("emsg");
H0 = s.a("st3d");
I0 = s.a("sv3d");
J0 = s.a("proj");
K0 = s.a("vp08");
L0 = s.a("vp09");
M0 = s.a("vpcC");
N0 = s.a("camm");
O0 = s.a("alac");
}
public a(int i2) {
this.a = i2;
}
public static String a(int i2) {
return "" + ((char) ((i2 >> 24) & 255)) + ((char) ((i2 >> 16) & 255)) + ((char) ((i2 >> 8) & 255)) + ((char) (i2 & 255));
}
public static int b(int i2) {
return (i2 >> 24) & 255;
}
public String toString() {
return a(this.a);
}
}

View File

@@ -0,0 +1,266 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4;
import android.util.Pair;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ts.PsExtractor;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
/* loaded from: classes2.dex */
public final class b {
public static final int a = s.a("vide");
public static final int b = s.a("soun");
public static final int c = s.a("text");
public static final int d = s.a("sbtl");
public static final int e = s.a("subt");
public static final int f = s.a("clcp");
public static final int g = s.a(C.CENC_TYPE_cenc);
public static final int h = s.a("meta");
public interface a {
boolean a();
int b();
int c();
}
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.b$b, reason: collision with other inner class name */
public static final class C0092b {
public final j[] a;
public com.fyber.inneractive.sdk.player.exoplayer2.j b;
public int c;
public int d = 0;
public C0092b(int i) {
this.a = new j[i];
}
}
public static final class c implements a {
public final int a;
public final int b;
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k c;
public c(a.b bVar) {
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = bVar.P0;
this.c = kVar;
kVar.e(12);
this.a = kVar.m();
this.b = kVar.m();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.b.a
public final boolean a() {
return this.a != 0;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.b.a
public final int b() {
return this.b;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.b.a
public final int c() {
int i = this.a;
return i == 0 ? this.c.m() : i;
}
}
public static final class d implements a {
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k a;
public final int b;
public final int c;
public int d;
public int e;
public d(a.b bVar) {
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = bVar.P0;
this.a = kVar;
kVar.e(12);
this.c = kVar.m() & 255;
this.b = kVar.m();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.b.a
public final boolean a() {
return false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.b.a
public final int b() {
return this.b;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.b.a
public final int c() {
int i = this.c;
if (i == 8) {
return this.a.j();
}
if (i == 16) {
return this.a.o();
}
int i2 = this.d;
this.d = i2 + 1;
if (i2 % 2 != 0) {
return this.e & 15;
}
int j = this.a.j();
this.e = j;
return (j & PsExtractor.VIDEO_STREAM_MASK) >> 4;
}
}
/* JADX WARN: Code restructure failed: missing block: B:24:0x008f, code lost:
if (r14 == 0) goto L43;
*/
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.i a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.C0091a r59, com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.b r60, long r61, com.fyber.inneractive.sdk.player.exoplayer2.drm.a r63, boolean r64) throws com.fyber.inneractive.sdk.player.exoplayer2.m {
/*
Method dump skipped, instructions count: 1987
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.b.a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a$a, com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a$b, long, com.fyber.inneractive.sdk.player.exoplayer2.drm.a, boolean):com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.i");
}
public static int a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar, int i, int i2, C0092b c0092b, int i3) {
int i4 = kVar.b;
while (true) {
if (i4 - i >= i2) {
return 0;
}
kVar.e(i4);
int c2 = kVar.c();
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(c2 > 0, "childAtomSize should be positive");
if (kVar.c() == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.W) {
int i5 = i4 + 8;
Pair pair = null;
boolean z = false;
Integer num = null;
j jVar = null;
while (i5 - i4 < c2) {
kVar.e(i5);
int c3 = kVar.c();
int c4 = kVar.c();
if (c4 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.c0) {
num = Integer.valueOf(kVar.c());
} else if (c4 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.X) {
kVar.f(4);
z = kVar.c() == g;
} else if (c4 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.Y) {
int i6 = i5 + 8;
while (true) {
if (i6 - i5 >= c3) {
jVar = null;
break;
}
kVar.e(i6);
int c5 = kVar.c();
if (kVar.c() == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.Z) {
kVar.f(6);
kVar.j();
int j = kVar.j();
byte[] bArr = new byte[16];
kVar.a(bArr, 0, 16);
jVar = new j(j, bArr);
break;
}
i6 += c5;
}
}
i5 += c3;
}
if (z) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(num != null, "frma atom is mandatory");
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(jVar != null, "schi->tenc atom is mandatory");
pair = Pair.create(num, jVar);
}
if (pair != null) {
c0092b.a[i3] = (j) pair.second;
return ((Integer) pair.first).intValue();
}
}
i4 += c2;
}
}
public static Pair a(int i, com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
String str;
kVar.e(i + 12);
kVar.f(1);
int j = kVar.j();
while ((j & 128) == 128) {
j = kVar.j();
}
kVar.f(2);
int j2 = kVar.j();
if ((j2 & 128) != 0) {
kVar.f(2);
}
if ((j2 & 64) != 0) {
kVar.f(kVar.o());
}
if ((j2 & 32) != 0) {
kVar.f(2);
}
kVar.f(1);
int j3 = kVar.j();
while ((j3 & 128) == 128) {
j3 = kVar.j();
}
int j4 = kVar.j();
if (j4 == 32) {
str = MimeTypes.VIDEO_MP4V;
} else if (j4 == 33) {
str = "video/avc";
} else if (j4 != 35) {
if (j4 != 64) {
str = null;
if (j4 == 107) {
return Pair.create(MimeTypes.AUDIO_MPEG, null);
}
if (j4 == 165) {
str = MimeTypes.AUDIO_AC3;
} else if (j4 != 166) {
switch (j4) {
case 102:
case 103:
case 104:
break;
default:
switch (j4) {
case 169:
case 172:
return Pair.create(MimeTypes.AUDIO_DTS, null);
case 170:
case 171:
return Pair.create(MimeTypes.AUDIO_DTS_HD, null);
}
}
} else {
str = MimeTypes.AUDIO_E_AC3;
}
}
str = MimeTypes.AUDIO_AAC;
} else {
str = "video/hevc";
}
kVar.f(12);
kVar.f(1);
int j5 = kVar.j();
int i2 = j5 & 127;
while ((j5 & 128) == 128) {
j5 = kVar.j();
i2 = (i2 << 7) | (j5 & 127);
}
byte[] bArr = new byte[i2];
kVar.a(bArr, 0, i2);
return Pair.create(str, bArr);
}
}

View File

@@ -0,0 +1,16 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4;
/* loaded from: classes2.dex */
public final class c {
public final int a;
public final int b;
public final int c;
public final int d;
public c(int i, int i2, int i3, int i4) {
this.a = i;
this.b = i2;
this.c = i3;
this.d = i4;
}
}

View File

@@ -0,0 +1,552 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4;
import android.util.Log;
import android.util.SparseArray;
import com.applovin.exoplayer2.common.base.Ascii;
import com.fyber.inneractive.sdk.player.exoplayer2.drm.a;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.m;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a;
import com.fyber.inneractive.sdk.player.exoplayer2.util.p;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.Stack;
import java.util.UUID;
/* loaded from: classes2.dex */
public final class d implements com.fyber.inneractive.sdk.player.exoplayer2.extractor.f {
public static final int D = s.a("seig");
public static final byte[] E = {-94, 57, 79, 82, 90, -101, 79, Ascii.DC4, -94, 68, 108, 66, 124, 100, -115, -12};
public m A;
public m[] B;
public boolean C;
public final p g;
public int l;
public int m;
public long n;
public int o;
public com.fyber.inneractive.sdk.player.exoplayer2.util.k p;
public long q;
public int r;
public b u;
public int v;
public int w;
public int x;
public boolean y;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.g z;
public final int a = 0;
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k h = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(16);
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k c = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(com.fyber.inneractive.sdk.player.exoplayer2.util.i.a);
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k d = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(5);
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k e = new com.fyber.inneractive.sdk.player.exoplayer2.util.k();
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k f = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(1);
public final byte[] i = new byte[16];
public final Stack<a.C0091a> j = new Stack<>();
public final LinkedList<a> k = new LinkedList<>();
public final SparseArray<b> b = new SparseArray<>();
public long s = C.TIME_UNSET;
public long t = C.TIME_UNSET;
public static final class a {
public final long a;
public final int b;
public a(int i, long j) {
this.a = j;
this.b = i;
}
}
public static final class b {
public final k a = new k();
public final m b;
public i c;
public c d;
public int e;
public int f;
public int g;
public b(m mVar) {
this.b = mVar;
}
public final void a() {
k kVar = this.a;
kVar.d = 0;
kVar.r = 0L;
kVar.l = false;
kVar.q = false;
kVar.n = null;
this.e = 0;
this.g = 0;
this.f = 0;
}
}
public d(p pVar) {
this.g = pVar;
b();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar) {
this.z = gVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
return h.a(bVar, true);
}
public final void b() {
this.l = 0;
this.o = 0;
}
public final void c() {
if ((this.a & 4) != 0 && this.A == null) {
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d a2 = this.z.a(this.b.size(), 4);
this.A = a2;
a2.a(new com.fyber.inneractive.sdk.player.exoplayer2.j(null, null, MimeTypes.APPLICATION_EMSG, null, -1, -1, -1, -1, -1.0f, -1, -1.0f, null, -1, null, -1, -1, -1, -1, -1, 0, null, -1, Long.MAX_VALUE, null, null, null));
}
if ((this.a & 8) == 0 || this.B != null) {
return;
}
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d a3 = this.z.a(this.b.size() + 1, 3);
a3.a(com.fyber.inneractive.sdk.player.exoplayer2.j.a(null, MimeTypes.APPLICATION_CEA608, 0, null, null));
this.B = new m[]{a3};
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(long j, long j2) {
int size = this.b.size();
for (int i = 0; i < size; i++) {
this.b.valueAt(i).a();
}
this.k.clear();
this.r = 0;
this.j.clear();
b();
}
/* JADX WARN: Code restructure failed: missing block: B:273:0x0079, code lost:
r2 = r26.u;
r4 = r2.a;
r5 = r4.h;
r8 = r2.e;
r26.v = r5[r8];
*/
/* JADX WARN: Code restructure failed: missing block: B:274:0x0087, code lost:
if (r4.l == false) goto L46;
*/
/* JADX WARN: Code restructure failed: missing block: B:275:0x0089, code lost:
r5 = r4.p;
r9 = r4.a.a;
r10 = r4.n;
*/
/* JADX WARN: Code restructure failed: missing block: B:276:0x0091, code lost:
if (r10 == null) goto L36;
*/
/* JADX WARN: Code restructure failed: missing block: B:277:0x0094, code lost:
r10 = r2.c.h[r9];
*/
/* JADX WARN: Code restructure failed: missing block: B:278:0x009a, code lost:
r9 = r10.a;
r4 = r4.m[r8];
r8 = r26.f;
r10 = r8.a;
*/
/* JADX WARN: Code restructure failed: missing block: B:279:0x00a4, code lost:
if (r4 == false) goto L40;
*/
/* JADX WARN: Code restructure failed: missing block: B:280:0x00a6, code lost:
r11 = 128;
*/
/* JADX WARN: Code restructure failed: missing block: B:281:0x00aa, code lost:
r10[0] = (byte) (r11 | r9);
r8.e(0);
r2 = r2.b;
r2.a(1, r26.f);
r2.a(r9, r5);
*/
/* JADX WARN: Code restructure failed: missing block: B:282:0x00bb, code lost:
if (r4 != false) goto L44;
*/
/* JADX WARN: Code restructure failed: missing block: B:283:0x00bd, code lost:
r9 = r9 + 1;
*/
/* JADX WARN: Code restructure failed: missing block: B:284:0x00ce, code lost:
r26.w = r9;
r26.v += r9;
*/
/* JADX WARN: Code restructure failed: missing block: B:286:0x00de, code lost:
if (r26.u.c.g != 1) goto L50;
*/
/* JADX WARN: Code restructure failed: missing block: B:287:0x00e0, code lost:
r26.v -= 8;
r27.a(8);
*/
/* JADX WARN: Code restructure failed: missing block: B:288:0x00ea, code lost:
r26.l = 4;
r26.x = 0;
*/
/* JADX WARN: Code restructure failed: missing block: B:289:0x00ef, code lost:
r2 = r26.u;
r4 = r2.a;
r5 = r2.c;
r8 = r2.b;
r2 = r2.e;
r9 = r5.k;
*/
/* JADX WARN: Code restructure failed: missing block: B:290:0x00fb, code lost:
if (r9 == 0) goto L76;
*/
/* JADX WARN: Code restructure failed: missing block: B:291:0x00fd, code lost:
r13 = r26.d.a;
r13[0] = 0;
r13[1] = 0;
r13[2] = 0;
r3 = r9 + 1;
r9 = 4 - r9;
*/
/* JADX WARN: Code restructure failed: missing block: B:293:0x0110, code lost:
if (r26.w >= r26.v) goto L354;
*/
/* JADX WARN: Code restructure failed: missing block: B:294:0x0112, code lost:
r14 = r26.x;
*/
/* JADX WARN: Code restructure failed: missing block: B:295:0x0116, code lost:
if (r14 != 0) goto L355;
*/
/* JADX WARN: Code restructure failed: missing block: B:298:0x0171, code lost:
if (r26.y == false) goto L74;
*/
/* JADX WARN: Code restructure failed: missing block: B:299:0x0173, code lost:
r26.e.c(r14);
r27.b(r26.e.a, 0, r26.x, false);
r8.a(r26.x, r26.e);
r10 = r26.x;
r11 = r26.e;
r11 = com.fyber.inneractive.sdk.player.exoplayer2.util.i.a(r11.a, r11.c);
r26.e.e("video/hevc".equals(r5.f.f) ? 1 : 0);
r26.e.d(r11);
com.fyber.inneractive.sdk.player.exoplayer2.text.cea.a.a((r4.j[r2] + r4.i[r2]) * 1000, r26.e, r26.B);
*/
/* JADX WARN: Code restructure failed: missing block: B:300:0x01bf, code lost:
r26.w += r10;
r26.x -= r10;
r12 = 6;
*/
/* JADX WARN: Code restructure failed: missing block: B:303:0x01bb, code lost:
r10 = r8.a(r27, r14, false);
*/
/* JADX WARN: Code restructure failed: missing block: B:305:0x0118, code lost:
r27.b(r13, r9, r3, false);
r26.d.e(0);
r26.x = r26.d.m() - 1;
r26.c.e(0);
r8.a(4, r26.c);
r8.a(1, r26.d);
*/
/* JADX WARN: Code restructure failed: missing block: B:306:0x013b, code lost:
if (r26.B == null) goto L69;
*/
/* JADX WARN: Code restructure failed: missing block: B:307:0x013d, code lost:
r11 = r5.f.f;
r14 = r13[4];
r10 = com.fyber.inneractive.sdk.player.exoplayer2.util.i.a;
*/
/* JADX WARN: Code restructure failed: missing block: B:308:0x014b, code lost:
if ("video/avc".equals(r11) == false) goto L64;
*/
/* JADX WARN: Code restructure failed: missing block: B:310:0x014f, code lost:
if ((r14 & com.applovin.exoplayer2.common.base.Ascii.US) == r12) goto L68;
*/
/* JADX WARN: Code restructure failed: missing block: B:311:0x015e, code lost:
r10 = true;
*/
/* JADX WARN: Code restructure failed: missing block: B:312:0x0161, code lost:
r26.y = r10;
r26.w += 5;
r26.v += r9;
*/
/* JADX WARN: Code restructure failed: missing block: B:315:0x0155, code lost:
if ("video/hevc".equals(r11) == false) goto L69;
*/
/* JADX WARN: Code restructure failed: missing block: B:317:0x015c, code lost:
if (((r14 & 126) >> 1) != 39) goto L69;
*/
/* JADX WARN: Code restructure failed: missing block: B:318:0x0160, code lost:
r10 = false;
*/
/* JADX WARN: Code restructure failed: missing block: B:320:0x01dd, code lost:
r9 = (r4.j[r2] + r4.i[r2]) * 1000;
r1 = r4.l;
*/
/* JADX WARN: Code restructure failed: missing block: B:321:0x01ec, code lost:
if (r1 == false) goto L82;
*/
/* JADX WARN: Code restructure failed: missing block: B:322:0x01ee, code lost:
r3 = 1073741824;
*/
/* JADX WARN: Code restructure failed: missing block: B:323:0x01f2, code lost:
r21 = r3 | (r4.k[r2] ? 1 : 0);
r2 = r4.a.a;
*/
/* JADX WARN: Code restructure failed: missing block: B:324:0x01fc, code lost:
if (r1 == false) goto L90;
*/
/* JADX WARN: Code restructure failed: missing block: B:325:0x01fe, code lost:
r1 = r4.n;
*/
/* JADX WARN: Code restructure failed: missing block: B:326:0x0200, code lost:
if (r1 == null) goto L89;
*/
/* JADX WARN: Code restructure failed: missing block: B:327:0x0202, code lost:
r1 = r1.b;
*/
/* JADX WARN: Code restructure failed: missing block: B:328:0x0204, code lost:
r24 = r1;
*/
/* JADX WARN: Code restructure failed: missing block: B:329:0x0210, code lost:
r1 = r26.g;
*/
/* JADX WARN: Code restructure failed: missing block: B:330:0x0212, code lost:
if (r1 == null) goto L94;
*/
/* JADX WARN: Code restructure failed: missing block: B:331:0x0214, code lost:
r9 = r1.a(r9);
*/
/* JADX WARN: Code restructure failed: missing block: B:332:0x0218, code lost:
r8.a(r9, r21, r26.v, 0, r24);
*/
/* JADX WARN: Code restructure failed: missing block: B:334:0x022b, code lost:
if (r26.k.isEmpty() != false) goto L360;
*/
/* JADX WARN: Code restructure failed: missing block: B:335:0x022d, code lost:
r1 = r26.k.removeFirst();
r2 = r26.r;
r3 = r1.b;
r2 = r2 - r3;
r26.r = r2;
r26.A.a(r9 + r1.a, 1, r3, r2, null);
*/
/* JADX WARN: Code restructure failed: missing block: B:337:0x0250, code lost:
r1 = r26.u;
r1.e++;
r2 = r1.f + 1;
r1.f = r2;
r3 = r4.g;
r4 = r1.g;
*/
/* JADX WARN: Code restructure failed: missing block: B:338:0x0262, code lost:
if (r2 != r3[r4]) goto L101;
*/
/* JADX WARN: Code restructure failed: missing block: B:339:0x0264, code lost:
r1.g = r4 + 1;
r1.f = 0;
r26.u = null;
*/
/* JADX WARN: Code restructure failed: missing block: B:340:0x026c, code lost:
r26.l = 3;
*/
/* JADX WARN: Code restructure failed: missing block: B:341:0x026f, code lost:
return 0;
*/
/* JADX WARN: Code restructure failed: missing block: B:342:0x0207, code lost:
r1 = r5.h[r2].b;
*/
/* JADX WARN: Code restructure failed: missing block: B:343:0x020e, code lost:
r24 = null;
*/
/* JADX WARN: Code restructure failed: missing block: B:344:0x01f1, code lost:
r3 = 0;
*/
/* JADX WARN: Code restructure failed: missing block: B:345:0x01cc, code lost:
r3 = r26.w;
r9 = r26.v;
*/
/* JADX WARN: Code restructure failed: missing block: B:346:0x01d0, code lost:
if (r3 >= r9) goto L361;
*/
/* JADX WARN: Code restructure failed: missing block: B:347:0x01d2, code lost:
r26.w += r8.a(r27, r9 - r3, false);
*/
/* JADX WARN: Code restructure failed: missing block: B:349:0x00bf, code lost:
r4 = r5.o();
r5.f(-2);
r4 = (r4 * 6) + 2;
r2.a(r4, r5);
r9 = (r9 + 1) + r4;
*/
/* JADX WARN: Code restructure failed: missing block: B:350:0x00a9, code lost:
r11 = 0;
*/
/* JADX WARN: Code restructure failed: missing block: B:351:0x00d6, code lost:
r26.w = 0;
*/
/* JADX WARN: Multi-variable type inference failed */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b r27, com.fyber.inneractive.sdk.player.exoplayer2.extractor.k r28) throws java.io.IOException, java.lang.InterruptedException {
/*
Method dump skipped, instructions count: 1500
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.d.a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b, com.fyber.inneractive.sdk.player.exoplayer2.extractor.k):int");
}
/* JADX WARN: Code restructure failed: missing block: B:328:0x06f5, code lost:
b();
*/
/* JADX WARN: Code restructure failed: missing block: B:329:0x06f8, code lost:
return;
*/
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:203:0x05f5 */
/* JADX WARN: Type inference failed for: r3v12 */
/* JADX WARN: Type inference failed for: r3v13 */
/* JADX WARN: Type inference failed for: r3v42 */
/* JADX WARN: Type inference failed for: r3v43 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(long r55) throws com.fyber.inneractive.sdk.player.exoplayer2.m {
/*
Method dump skipped, instructions count: 1785
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.d.a(long):void");
}
public static void a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar, int i, k kVar2) throws com.fyber.inneractive.sdk.player.exoplayer2.m {
kVar.e(i + 8);
int c = kVar.c();
int i2 = com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.b;
if ((c & 1) == 0) {
boolean z = (c & 2) != 0;
int m = kVar.m();
if (m == kVar2.e) {
Arrays.fill(kVar2.m, 0, m, z);
int a2 = kVar.a();
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar3 = kVar2.p;
if (kVar3 == null || kVar3.c < a2) {
kVar2.p = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(a2);
}
kVar2.o = a2;
kVar2.l = true;
kVar2.q = true;
kVar.a(kVar2.p.a, 0, a2);
kVar2.p.e(0);
kVar2.q = false;
return;
}
StringBuilder a3 = com.fyber.inneractive.sdk.bidder.h.a("Length mismatch: ", m, ", ");
a3.append(kVar2.e);
throw new com.fyber.inneractive.sdk.player.exoplayer2.m(a3.toString());
}
throw new com.fyber.inneractive.sdk.player.exoplayer2.m("Overriding TrackEncryptionBox parameters is unsupported.");
}
public static com.fyber.inneractive.sdk.player.exoplayer2.drm.a a(ArrayList arrayList) {
int size = arrayList.size();
ArrayList arrayList2 = null;
for (int i = 0; i < size; i++) {
a.b bVar = (a.b) arrayList.get(i);
if (bVar.a == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.V) {
if (arrayList2 == null) {
arrayList2 = new ArrayList();
}
byte[] bArr = bVar.P0.a;
UUID a2 = g.a(bArr);
if (a2 == null) {
Log.w("FragmentedMp4Extractor", "Skipped pssh atom (failed to extract uuid)");
} else {
arrayList2.add(new a.b(a2, MimeTypes.VIDEO_MP4, bArr));
}
}
}
if (arrayList2 == null) {
return null;
}
return new com.fyber.inneractive.sdk.player.exoplayer2.drm.a(false, (a.b[]) arrayList2.toArray(new a.b[arrayList2.size()]));
}
}

View File

@@ -0,0 +1,156 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4;
import android.util.Log;
import androidx.core.view.ViewCompat;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.ironsource.mediationsdk.IronSourceSegment;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.mbridge.msdk.playercommon.exoplayer2.metadata.id3.InternalFrame;
/* loaded from: classes2.dex */
public final class e {
public static final int a = s.a("nam");
public static final int b = s.a("trk");
public static final int c = s.a("cmt");
public static final int d = s.a("day");
public static final int e = s.a("ART");
public static final int f = s.a("too");
public static final int g = s.a("alb");
public static final int h = s.a("com");
public static final int i = s.a("wrt");
public static final int j = s.a("lyr");
public static final int k = s.a(IronSourceSegment.GENDER);
public static final int l = s.a("covr");
public static final int m = s.a("gnre");
public static final int n = s.a("grp");
public static final int o = s.a("disk");
public static final int p = s.a("trkn");
public static final int q = s.a("tmpo");
public static final int r = s.a("cpil");
public static final int s = s.a("aART");
public static final int t = s.a("sonm");
public static final int u = s.a("soal");
public static final int v = s.a("soar");
public static final int w = s.a("soaa");
public static final int x = s.a("soco");
public static final int y = s.a("rtng");
public static final int z = s.a("pgap");
public static final int A = s.a("sosn");
public static final int B = s.a("tvsh");
public static final int C = s.a(InternalFrame.ID);
public static final String[] D = {"Blues", "Classic Rock", "Country", "Dance", "Disco", "Funk", "Grunge", "Hip-Hop", "Jazz", "Metal", "New Age", "Oldies", "Other", "Pop", "R&B", "Rap", "Reggae", "Rock", "Techno", "Industrial", "Alternative", "Ska", "Death Metal", "Pranks", "Soundtrack", "Euro-Techno", "Ambient", "Trip-Hop", "Vocal", "Jazz+Funk", "Fusion", "Trance", "Classical", "Instrumental", "Acid", "House", "Game", "Sound Clip", "Gospel", "Noise", "AlternRock", "Bass", "Soul", "Punk", "Space", "Meditative", "Instrumental Pop", "Instrumental Rock", "Ethnic", "Gothic", "Darkwave", "Techno-Industrial", "Electronic", "Pop-Folk", "Eurodance", "Dream", "Southern Rock", "Comedy", "Cult", "Gangsta", "Top 40", "Christian Rap", "Pop/Funk", "Jungle", "Native American", "Cabaret", "New Wave", "Psychadelic", "Rave", "Showtunes", "Trailer", "Lo-Fi", "Tribal", "Acid Punk", "Acid Jazz", "Polka", "Retro", "Musical", "Rock & Roll", "Hard Rock", "Folk", "Folk-Rock", "National Folk", "Swing", "Fast Fusion", "Bebob", "Latin", "Revival", "Celtic", "Bluegrass", "Avantgarde", "Gothic Rock", "Progressive Rock", "Psychedelic Rock", "Symphonic Rock", "Slow Rock", "Big Band", "Chorus", "Easy Listening", "Acoustic", "Humour", "Speech", "Chanson", "Opera", "Chamber Music", "Sonata", "Symphony", "Booty Bass", "Primus", "Porn Groove", "Satire", "Slow Jam", "Club", "Tango", "Samba", "Folklore", "Ballad", "Power Ballad", "Rhythmic Soul", "Freestyle", "Duet", "Punk Rock", "Drum Solo", "A capella", "Euro-House", "Dance Hall", "Goa", "Drum & Bass", "Club-House", "Hardcore", "Terror", "Indie", "BritPop", "Negerpunk", "Polsk Punk", "Beat", "Christian Gangsta Rap", "Heavy Metal", "Black Metal", "Crossover", "Contemporary Christian", "Christian Rock", "Merengue", "Salsa", "Thrash Metal", "Anime", "Jpop", "Synthpop"};
public static com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.e a(int i2, com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
int c2 = kVar.c();
if (kVar.c() == a.F0) {
kVar.f(8);
String a2 = kVar.a(c2 - 16);
return new com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.e(C.LANGUAGE_UNDETERMINED, a2, a2);
}
Log.w("MetadataUtil", "Failed to parse comment attribute: " + a.a(i2));
return null;
}
public static com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.e b(int i2, com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
String str = null;
String str2 = null;
int i3 = -1;
int i4 = -1;
while (true) {
int i5 = kVar.b;
if (i5 >= i2) {
break;
}
int c2 = kVar.c();
int c3 = kVar.c();
kVar.f(4);
if (c3 == a.D0) {
str = kVar.a(c2 - 12);
} else if (c3 == a.E0) {
str2 = kVar.a(c2 - 12);
} else {
if (c3 == a.F0) {
i3 = i5;
i4 = c2;
}
kVar.f(c2 - 12);
}
}
if (!"com.apple.iTunes".equals(str) || !"iTunSMPB".equals(str2) || i3 == -1) {
return null;
}
kVar.e(i3);
kVar.f(16);
return new com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.e(C.LANGUAGE_UNDETERMINED, str2, kVar.a(i4 - 16));
}
public static com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j a(int i2, com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar, String str) {
int c2 = kVar.c();
if (kVar.c() == a.F0 && c2 >= 22) {
kVar.f(10);
int o2 = kVar.o();
if (o2 > 0) {
String a2 = com.fyber.inneractive.sdk.player.exoplayer2.i.a("", o2);
int o3 = kVar.o();
if (o3 > 0) {
a2 = a2 + "/" + o3;
}
return new com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j(str, null, a2);
}
}
Log.w("MetadataUtil", "Failed to parse index/count attribute: " + a.a(i2));
return null;
}
public static com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j b(int i2, com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar, String str) {
int c2 = kVar.c();
if (kVar.c() == a.F0) {
kVar.f(8);
return new com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j(str, null, kVar.a(c2 - 16));
}
Log.w("MetadataUtil", "Failed to parse text attribute: " + a.a(i2));
return null;
}
public static com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.a a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
int c2 = kVar.c();
if (kVar.c() == a.F0) {
int c3 = kVar.c() & ViewCompat.MEASURED_SIZE_MASK;
String str = c3 == 13 ? "image/jpeg" : c3 == 14 ? "image/png" : null;
if (str == null) {
Log.w("MetadataUtil", "Unrecognized cover art flags: " + c3);
return null;
}
kVar.f(4);
int i2 = c2 - 16;
byte[] bArr = new byte[i2];
kVar.a(bArr, 0, i2);
return new com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.a(str, null, 3, bArr);
}
Log.w("MetadataUtil", "Failed to parse cover art attribute");
return null;
}
public static com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.h a(int i2, String str, com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar, boolean z2, boolean z3) {
int i3;
kVar.f(4);
if (kVar.c() == a.F0) {
kVar.f(8);
i3 = kVar.j();
} else {
Log.w("MetadataUtil", "Failed to parse uint8 attribute value");
i3 = -1;
}
if (z3) {
i3 = Math.min(1, i3);
}
if (i3 >= 0) {
if (z2) {
return new com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j(str, null, Integer.toString(i3));
}
return new com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.e(C.LANGUAGE_UNDETERMINED, str, Integer.toString(i3));
}
Log.w("MetadataUtil", "Failed to parse uint8 attribute: " + a.a(i2));
return null;
}
}

View File

@@ -0,0 +1,406 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4;
import android.support.v4.media.session.PlaybackStateCompat;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.m;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import java.io.IOException;
import java.util.Stack;
/* loaded from: classes2.dex */
public final class f implements com.fyber.inneractive.sdk.player.exoplayer2.extractor.f, com.fyber.inneractive.sdk.player.exoplayer2.extractor.l {
public static final int p = s.a("qt ");
public int e;
public int f;
public long g;
public int h;
public com.fyber.inneractive.sdk.player.exoplayer2.util.k i;
public int j;
public int k;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.g l;
public a[] m;
public long n;
public boolean o;
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k c = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(16);
public final Stack<a.C0091a> d = new Stack<>();
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k a = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(com.fyber.inneractive.sdk.player.exoplayer2.util.i.a);
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k b = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(4);
public static final class a {
public final i a;
public final l b;
public final m c;
public int d;
public a(i iVar, l lVar, m mVar) {
this.a = iVar;
this.b = lVar;
this.c = mVar;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar) {
this.l = gVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
return h.a(bVar, false);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final boolean b() {
return true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long c() {
return this.n;
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:223:0x03b9 */
/* JADX WARN: Removed duplicated region for block: B:231:0x03d6 */
/* JADX WARN: Removed duplicated region for block: B:305:0x0607 */
/* JADX WARN: Removed duplicated region for block: B:427:0x0832 */
/* JADX WARN: Removed duplicated region for block: B:431:0x0559 */
/* JADX WARN: Removed duplicated region for block: B:463:0x03cf */
/* JADX WARN: Removed duplicated region for block: B:54:0x00d5 A[Catch: all -> 0x00bd, TryCatch #0 {all -> 0x00bd, blocks: (B:43:0x00a4, B:45:0x00a8, B:48:0x00b5, B:50:0x00c8, B:52:0x00cd, B:54:0x00d5, B:62:0x00dc, B:64:0x00c0, B:65:0x00e4, B:67:0x00e8, B:69:0x00f0, B:71:0x00f4, B:72:0x00fc, B:74:0x0100, B:75:0x010a, B:77:0x010e, B:78:0x0117, B:80:0x011b, B:82:0x0124, B:84:0x0128, B:85:0x012f, B:87:0x0133, B:88:0x013a, B:90:0x013e, B:91:0x0145, B:93:0x0149, B:94:0x0150, B:96:0x0154, B:97:0x015b, B:99:0x015f, B:100:0x0166, B:102:0x016a, B:103:0x0172, B:105:0x0176, B:106:0x0181, B:108:0x0185, B:109:0x018c, B:111:0x0190, B:112:0x0197, B:114:0x019b, B:115:0x020d, B:123:0x01a0, B:125:0x01a8, B:126:0x01ad, B:128:0x01b1, B:131:0x01b7, B:133:0x01bb, B:136:0x01c0, B:138:0x01c4, B:139:0x01cb, B:141:0x01cf, B:142:0x01d6, B:144:0x01da, B:145:0x01e1, B:147:0x01e5, B:148:0x01ec, B:150:0x01f0, B:151:0x01f7, B:153:0x01fb, B:154:0x0201, B:156:0x0205, B:157:0x021e, B:158:0x0226), top: B:42:0x00a4 }] */
/* JADX WARN: Removed duplicated region for block: B:58:0x0234 */
/* JADX WARN: Removed duplicated region for block: B:61:0x0237 A[SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:62:0x00dc A[Catch: all -> 0x00bd, TryCatch #0 {all -> 0x00bd, blocks: (B:43:0x00a4, B:45:0x00a8, B:48:0x00b5, B:50:0x00c8, B:52:0x00cd, B:54:0x00d5, B:62:0x00dc, B:64:0x00c0, B:65:0x00e4, B:67:0x00e8, B:69:0x00f0, B:71:0x00f4, B:72:0x00fc, B:74:0x0100, B:75:0x010a, B:77:0x010e, B:78:0x0117, B:80:0x011b, B:82:0x0124, B:84:0x0128, B:85:0x012f, B:87:0x0133, B:88:0x013a, B:90:0x013e, B:91:0x0145, B:93:0x0149, B:94:0x0150, B:96:0x0154, B:97:0x015b, B:99:0x015f, B:100:0x0166, B:102:0x016a, B:103:0x0172, B:105:0x0176, B:106:0x0181, B:108:0x0185, B:109:0x018c, B:111:0x0190, B:112:0x0197, B:114:0x019b, B:115:0x020d, B:123:0x01a0, B:125:0x01a8, B:126:0x01ad, B:128:0x01b1, B:131:0x01b7, B:133:0x01bb, B:136:0x01c0, B:138:0x01c4, B:139:0x01cb, B:141:0x01cf, B:142:0x01d6, B:144:0x01da, B:145:0x01e1, B:147:0x01e5, B:148:0x01ec, B:150:0x01f0, B:151:0x01f7, B:153:0x01fb, B:154:0x0201, B:156:0x0205, B:157:0x021e, B:158:0x0226), top: B:42:0x00a4 }] */
/* JADX WARN: Type inference failed for: r3v29, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v31, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v33, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v34, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v36, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v38, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v40, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v42, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v44, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v45, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.e] */
/* JADX WARN: Type inference failed for: r3v48 */
/* JADX WARN: Type inference failed for: r3v70, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.e] */
/* JADX WARN: Type inference failed for: r3v72, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v74, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v76, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.h] */
/* JADX WARN: Type inference failed for: r3v78, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.h] */
/* JADX WARN: Type inference failed for: r3v80, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v82, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v84, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v86, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v88, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v90, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v93, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.h] */
/* JADX WARN: Type inference failed for: r3v95, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.h] */
/* JADX WARN: Type inference failed for: r3v97, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r3v99, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/* JADX WARN: Type inference failed for: r8v61, types: [com.fyber.inneractive.sdk.player.exoplayer2.metadata.id3.j] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void c(long r72) throws com.fyber.inneractive.sdk.player.exoplayer2.m {
/*
Method dump skipped, instructions count: 2635
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.f.c(long):void");
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(long j, long j2) {
int i;
this.d.clear();
this.h = 0;
this.j = 0;
this.k = 0;
if (j == 0) {
this.e = 0;
this.h = 0;
return;
}
a[] aVarArr = this.m;
if (aVarArr != null) {
for (a aVar : aVarArr) {
l lVar = aVar.b;
int a2 = s.a(lVar.e, j2, false);
while (true) {
i = -1;
if (a2 < 0) {
a2 = -1;
break;
} else if ((lVar.f[a2] & 1) != 0) {
break;
} else {
a2--;
}
}
if (a2 == -1) {
a2 = s.a(lVar.e, j2, true, false);
while (a2 < lVar.e.length) {
if ((lVar.f[a2] & 1) == 0) {
a2++;
}
}
aVar.d = i;
}
i = a2;
aVar.d = i;
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar, com.fyber.inneractive.sdk.player.exoplayer2.extractor.k kVar) throws IOException, InterruptedException {
a[] aVarArr;
int i;
boolean z;
boolean z2;
while (true) {
int i2 = this.e;
if (i2 == 0) {
if (this.h == 0) {
if (!bVar.b(this.c.a, 0, 8, true)) {
return -1;
}
this.h = 8;
this.c.e(0);
this.g = this.c.k();
this.f = this.c.c();
}
if (this.g == 1) {
bVar.b(this.c.a, 8, 8, false);
this.h += 8;
this.g = this.c.n();
}
int i3 = this.f;
if (i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.C || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.E || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.F || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.G || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.H || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.Q) {
long j = (bVar.c + this.g) - this.h;
this.d.add(new a.C0091a(this.f, j));
if (this.g == this.h) {
c(j);
} else {
this.e = 0;
this.h = 0;
}
} else if (i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.S || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.D || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.T || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.U || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.m0 || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.n0 || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.o0 || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.R || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.p0 || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.q0 || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.r0 || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.s0 || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.t0 || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.P || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.b || i3 == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.A0) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.h == 8);
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(this.g <= 2147483647L);
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar2 = new com.fyber.inneractive.sdk.player.exoplayer2.util.k((int) this.g);
this.i = kVar2;
System.arraycopy(this.c.a, 0, kVar2.a, 0, 8);
this.e = 1;
} else {
this.i = null;
this.e = 1;
}
} else {
if (i2 != 1) {
if (i2 != 2) {
throw new IllegalStateException();
}
long j2 = Long.MAX_VALUE;
int i4 = -1;
int i5 = 0;
while (true) {
aVarArr = this.m;
if (i5 >= aVarArr.length) {
break;
}
a aVar = aVarArr[i5];
int i6 = aVar.d;
l lVar = aVar.b;
if (i6 != lVar.a) {
long j3 = lVar.b[i6];
if (j3 < j2) {
i4 = i5;
j2 = j3;
}
}
i5++;
}
if (i4 == -1) {
return -1;
}
a aVar2 = aVarArr[i4];
m mVar = aVar2.c;
int i7 = aVar2.d;
l lVar2 = aVar2.b;
long j4 = lVar2.b[i7];
int i8 = lVar2.c[i7];
if (aVar2.a.g == 1) {
j4 += 8;
i8 -= 8;
}
int i9 = i8;
long j5 = (j4 - bVar.c) + this.j;
if (j5 >= 0 && j5 < PlaybackStateCompat.ACTION_SET_REPEAT_MODE) {
bVar.a((int) j5);
int i10 = aVar2.a.k;
if (i10 == 0) {
while (true) {
int i11 = this.j;
i = i9;
if (i11 >= i) {
break;
}
int a2 = mVar.a(bVar, i - i11, false);
this.j += a2;
this.k -= a2;
i9 = i;
}
} else {
byte[] bArr = this.b.a;
boolean z3 = false;
bArr[0] = 0;
bArr[1] = 0;
bArr[2] = 0;
int i12 = 4 - i10;
i = i9;
while (this.j < i) {
int i13 = this.k;
if (i13 == 0) {
bVar.b(this.b.a, i12, i10, z3);
this.b.e(z3 ? 1 : 0);
this.k = this.b.m();
this.a.e(z3 ? 1 : 0);
mVar.a(4, this.a);
this.j += 4;
i += i12;
} else {
int a3 = mVar.a(bVar, i13, z3);
this.j += a3;
this.k -= a3;
z3 = false;
}
}
}
int i14 = i;
l lVar3 = aVar2.b;
mVar.a(lVar3.e[i7], lVar3.f[i7], i14, 0, null);
aVar2.d++;
this.j = 0;
this.k = 0;
return 0;
}
kVar.a = j4;
return 1;
}
long j6 = this.g;
int i15 = this.h;
long j7 = j6 - i15;
long j8 = bVar.c + j7;
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar3 = this.i;
if (kVar3 != null) {
bVar.b(kVar3.a, i15, (int) j7, false);
if (this.f == com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.b) {
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar4 = this.i;
kVar4.e(8);
if (kVar4.c() != p) {
kVar4.f(4);
while (kVar4.a() > 0) {
if (kVar4.c() == p) {
}
}
z2 = false;
this.o = z2;
}
z2 = true;
this.o = z2;
} else if (!this.d.isEmpty()) {
this.d.peek().Q0.add(new a.b(this.f, this.i));
}
} else if (j7 < PlaybackStateCompat.ACTION_SET_REPEAT_MODE) {
bVar.a((int) j7);
} else {
kVar.a = j8;
z = true;
c(j8);
if (z && this.e != 2) {
return 1;
}
}
z = false;
c(j8);
if (z) {
return 1;
}
continue;
}
}
}
/* JADX WARN: Removed duplicated region for block: B:21:0x0047 */
/* JADX WARN: Removed duplicated region for block: B:24:0x0048 A[SYNTHETIC] */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final long a(long r12) {
/*
r11 = this;
com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.f$a[] r0 = r11.m
int r1 = r0.length
r2 = 9223372036854775807(0x7fffffffffffffff, double:NaN)
r4 = 0
r5 = r4
La:
if (r5 >= r1) goto L4b
r6 = r0[r5]
com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.l r6 = r6.b
long[] r7 = r6.e
int r7 = com.fyber.inneractive.sdk.player.exoplayer2.util.s.a(r7, r12, r4)
L16:
r8 = -1
r9 = 1
if (r7 < 0) goto L25
int[] r10 = r6.f
r10 = r10[r7]
r10 = r10 & r9
if (r10 == 0) goto L22
goto L26
L22:
int r7 = r7 + (-1)
goto L16
L25:
r7 = r8
L26:
if (r7 != r8) goto L3a
long[] r7 = r6.e
int r7 = com.fyber.inneractive.sdk.player.exoplayer2.util.s.a(r7, r12, r9, r4)
L2e:
long[] r10 = r6.e
int r10 = r10.length
if (r7 >= r10) goto L3f
int[] r10 = r6.f
r10 = r10[r7]
r10 = r10 & r9
if (r10 == 0) goto L3c
L3a:
r8 = r7
goto L3f
L3c:
int r7 = r7 + 1
goto L2e
L3f:
long[] r6 = r6.b
r7 = r6[r8]
int r6 = (r7 > r2 ? 1 : (r7 == r2 ? 0 : -1))
if (r6 >= 0) goto L48
r2 = r7
L48:
int r5 = r5 + 1
goto La
L4b:
return r2
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.f.a(long):long");
}
}

View File

@@ -0,0 +1,77 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4;
/* loaded from: classes2.dex */
public final class g {
/* JADX WARN: Removed duplicated region for block: B:17:0x0075 A[RETURN] */
/* JADX WARN: Removed duplicated region for block: B:19:0x0076 */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public static java.util.UUID a(byte[] r9) {
/*
com.fyber.inneractive.sdk.player.exoplayer2.util.k r0 = new com.fyber.inneractive.sdk.player.exoplayer2.util.k
r0.<init>(r9)
int r9 = r0.c
r1 = 32
r2 = 0
if (r9 >= r1) goto Ld
goto L69
Ld:
r9 = 0
r0.e(r9)
int r1 = r0.c()
int r3 = r0.a()
int r3 = r3 + 4
if (r1 == r3) goto L1e
goto L69
L1e:
int r1 = r0.c()
int r3 = com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.V
if (r1 == r3) goto L27
goto L69
L27:
int r1 = r0.c()
int r1 = com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.a.b(r1)
r3 = 1
if (r1 <= r3) goto L47
java.lang.StringBuilder r9 = new java.lang.StringBuilder
java.lang.String r0 = "Unsupported pssh version: "
r9.<init>(r0)
r9.append(r1)
java.lang.String r9 = r9.toString()
java.lang.String r0 = "PsshAtomUtil"
android.util.Log.w(r0, r9)
L45:
r9 = r2
goto L73
L47:
java.util.UUID r4 = new java.util.UUID
long r5 = r0.h()
long r7 = r0.h()
r4.<init>(r5, r7)
if (r1 != r3) goto L5f
int r1 = r0.m()
int r1 = r1 * 16
r0.f(r1)
L5f:
int r1 = r0.m()
int r3 = r0.a()
if (r1 == r3) goto L6a
L69:
goto L45
L6a:
byte[] r3 = new byte[r1]
r0.a(r3, r9, r1)
android.util.Pair r9 = android.util.Pair.create(r4, r3)
L73:
if (r9 != 0) goto L76
return r2
L76:
java.lang.Object r9 = r9.first
java.util.UUID r9 = (java.util.UUID) r9
return r9
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4.g.a(byte[]):java.util.UUID");
}
}

View File

@@ -0,0 +1,88 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4;
import android.support.v4.media.session.PlaybackStateCompat;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class h {
public static final int[] a = {s.a("isom"), s.a("iso2"), s.a("iso3"), s.a("iso4"), s.a("iso5"), s.a("iso6"), s.a("avc1"), s.a("hvc1"), s.a("hev1"), s.a("mp41"), s.a("mp42"), s.a("3g2a"), s.a("3g2b"), s.a("3gr6"), s.a("3gs6"), s.a("3ge6"), s.a("3gg6"), s.a("M4V "), s.a("M4A "), s.a("f4v "), s.a("kddi"), s.a("M4VP"), s.a("qt "), s.a("MSNV")};
public static boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar, boolean z) throws IOException, InterruptedException {
boolean z2;
boolean z3;
int i;
long j = bVar.b;
if (j == -1 || j > PlaybackStateCompat.ACTION_SKIP_TO_QUEUE_ITEM) {
j = 4096;
}
int i2 = (int) j;
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(64);
int i3 = 0;
boolean z4 = false;
while (i3 < i2) {
kVar.c(8);
bVar.a(kVar.a, 0, 8, false);
long k = kVar.k();
int c = kVar.c();
if (k == 1) {
bVar.a(kVar.a, 8, 8, false);
kVar.d(16);
i = 16;
k = kVar.n();
} else {
i = 8;
}
long j2 = i;
if (k < j2) {
return false;
}
i3 += i;
if (c != a.C) {
if (c == a.L || c == a.N) {
z2 = true;
z3 = true;
break;
}
if ((i3 + k) - j2 >= i2) {
break;
}
int i4 = (int) (k - j2);
i3 += i4;
if (c == a.b) {
if (i4 < 8) {
return false;
}
kVar.c(i4);
bVar.a(kVar.a, 0, i4, false);
int i5 = i4 / 4;
for (int i6 = 0; i6 < i5; i6++) {
if (i6 != 1) {
int c2 = kVar.c();
if ((c2 >>> 8) != s.a("3gp")) {
for (int i7 : a) {
if (i7 != c2) {
}
}
}
z4 = true;
break;
}
kVar.f(4);
}
if (!z4) {
return false;
}
} else if (i4 != 0) {
bVar.a(i4, false);
}
}
}
z2 = true;
z3 = false;
if (z4 && z == z3) {
return z2;
}
return false;
}
}

View File

@@ -0,0 +1,30 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4;
/* loaded from: classes2.dex */
public final class i {
public final int a;
public final int b;
public final long c;
public final long d;
public final long e;
public final com.fyber.inneractive.sdk.player.exoplayer2.j f;
public final int g;
public final j[] h;
public final long[] i;
public final long[] j;
public final int k;
public i(int i, int i2, long j, long j2, long j3, com.fyber.inneractive.sdk.player.exoplayer2.j jVar, int i3, j[] jVarArr, int i4, long[] jArr, long[] jArr2) {
this.a = i;
this.b = i2;
this.c = j;
this.d = j2;
this.e = j3;
this.f = jVar;
this.g = i3;
this.h = jVarArr;
this.k = i4;
this.i = jArr;
this.j = jArr2;
}
}

View File

@@ -0,0 +1,12 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4;
/* loaded from: classes2.dex */
public final class j {
public final int a;
public final byte[] b;
public j(int i, byte[] bArr) {
this.a = i;
this.b = bArr;
}
}

View File

@@ -0,0 +1,23 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4;
/* loaded from: classes2.dex */
public final class k {
public c a;
public long b;
public long c;
public int d;
public int e;
public long[] f;
public int[] g;
public int[] h;
public int[] i;
public long[] j;
public boolean[] k;
public boolean l;
public boolean[] m;
public j n;
public int o;
public com.fyber.inneractive.sdk.player.exoplayer2.util.k p;
public boolean q;
public long r;
}

View File

@@ -0,0 +1,23 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.mp4;
/* loaded from: classes2.dex */
public final class l {
public final int a;
public final long[] b;
public final int[] c;
public final int d;
public final long[] e;
public final int[] f;
public l(long[] jArr, int[] iArr, int i, long[] jArr2, int[] iArr2) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(iArr.length == jArr2.length);
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(jArr.length == jArr2.length);
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(iArr2.length == jArr2.length);
this.b = jArr;
this.c = iArr;
this.d = i;
this.e = jArr2;
this.f = iArr2;
this.a = jArr.length;
}
}

View File

@@ -0,0 +1,237 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg;
import androidx.work.WorkRequest;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.l;
import java.io.EOFException;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class a implements f {
public final e a = new e();
public final long b;
public final long c;
public final h d;
public int e;
public long f;
public long g;
public long h;
public long i;
public long j;
public long k;
public long l;
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.a$a, reason: collision with other inner class name */
public class C0093a implements l {
public C0093a() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final boolean b() {
return true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long a(long j) {
if (j == 0) {
return a.this.b;
}
a aVar = a.this;
long j2 = (aVar.d.i * j) / 1000000;
long j3 = aVar.b;
long j4 = aVar.c;
long j5 = ((((j4 - j3) * j2) / aVar.f) - WorkRequest.DEFAULT_BACKOFF_DELAY_MILLIS) + j3;
if (j5 >= j3) {
j3 = j5;
}
return j3 >= j4 ? j4 - 1 : j3;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long c() {
return (a.this.f * 1000000) / r0.d.i;
}
}
public a(long j, long j2, h hVar, int i, long j3) {
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(j >= 0 && j2 > j);
this.d = hVar;
this.b = j;
this.c = j2;
if (i != j2 - j) {
this.e = 0;
} else {
this.f = j3;
this.e = 3;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.f
public final long c(long j) {
int i = this.e;
com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(i == 3 || i == 2);
long j2 = j == 0 ? 0L : (this.d.i * j) / 1000000;
this.h = j2;
this.e = 2;
this.i = this.b;
this.j = this.c;
this.k = 0L;
this.l = this.f;
return j2;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.f
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
e eVar;
long j;
int i;
int i2 = this.e;
long j2 = 0;
if (i2 == 0) {
long j3 = bVar.c;
this.g = j3;
this.e = 1;
long j4 = this.c - 65307;
if (j4 > j3) {
return j4;
}
} else if (i2 != 1) {
if (i2 != 2) {
if (i2 == 3) {
return -1L;
}
throw new IllegalStateException();
}
long j5 = this.h;
if (j5 == 0) {
i = 3;
} else {
long j6 = this.i;
long j7 = this.j;
if (j6 == j7) {
j = -(this.k + 2);
} else {
long j8 = bVar.c;
if (a(j7, bVar)) {
this.a.a(bVar, false);
bVar.e = 0;
e eVar2 = this.a;
long j9 = eVar2.b;
long j10 = j5 - j9;
int i3 = eVar2.d + eVar2.e;
if (j10 < 0 || j10 > 72000) {
if (j10 < 0) {
this.j = j8;
this.l = j9;
} else {
long j11 = i3;
long j12 = bVar.c + j11;
this.i = j12;
this.k = j9;
if ((this.j - j12) + j11 < 100000) {
bVar.a(i3);
j = -(this.k + 2);
j2 = 0;
}
}
long j13 = this.j;
long j14 = this.i;
long j15 = j13 - j14;
if (j15 < 100000) {
this.j = j14;
j = j14;
} else {
j = Math.min(Math.max(((j15 * j10) / (this.l - this.k)) + (bVar.c - (i3 * (j10 <= 0 ? 2 : 1))), j14), this.j - 1);
}
j2 = 0;
} else {
bVar.a(i3);
j = -(this.a.b + 2);
}
} else {
j = this.i;
if (j == j8) {
throw new IOException("No ogg page can be found.");
}
}
}
if (j >= j2) {
return j;
}
long j16 = this.h;
long j17 = -(j + 2);
this.a.a(bVar, false);
while (true) {
e eVar3 = this.a;
if (eVar3.b >= j16) {
break;
}
bVar.a(eVar3.d + eVar3.e);
e eVar4 = this.a;
long j18 = eVar4.b;
eVar4.a(bVar, false);
j17 = j18;
}
bVar.e = 0;
j2 = j17;
i = 3;
}
this.e = i;
return -(j2 + 2);
}
if (a(this.c, bVar)) {
e eVar5 = this.a;
eVar5.a = 0;
eVar5.b = 0L;
eVar5.c = 0;
eVar5.d = 0;
eVar5.e = 0;
while (true) {
eVar = this.a;
if ((eVar.a & 4) == 4 || bVar.c >= this.c) {
break;
}
eVar.a(bVar, false);
e eVar6 = this.a;
bVar.a(eVar6.d + eVar6.e);
}
this.f = eVar.b;
this.e = 3;
return this.g;
}
throw new EOFException();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.f
public final l a() {
if (this.f != 0) {
return new C0093a();
}
return null;
}
public final boolean a(long j, com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
int i;
long min = Math.min(j + 3, this.c);
int i2 = 2048;
byte[] bArr = new byte[2048];
while (true) {
long j2 = bVar.c;
int i3 = 0;
if (i2 + j2 > min && (i2 = (int) (min - j2)) < 4) {
return false;
}
bVar.a(bArr, 0, i2, false);
while (true) {
i = i2 - 3;
if (i3 < i) {
if (bArr[i3] == 79 && bArr[i3 + 1] == 103 && bArr[i3 + 2] == 103 && bArr[i3 + 3] == 83) {
bVar.a(i3);
return true;
}
i3++;
}
}
bVar.a(i);
}
}
}

View File

@@ -0,0 +1,194 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.l;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ts.PsExtractor;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import kotlin.jvm.internal.ByteCompanionObject;
/* loaded from: classes2.dex */
public final class b extends h {
public com.fyber.inneractive.sdk.player.exoplayer2.util.e n;
public a o;
public class a implements f, l {
public long[] a;
public long[] b;
public long c = -1;
public long d = -1;
public a() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.f
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
long j = this.d;
if (j < 0) {
return -1L;
}
long j2 = -(j + 2);
this.d = -1L;
return j2;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.f
public final l a() {
return this;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final boolean b() {
return true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.f
public final long c(long j) {
long j2 = (b.this.i * j) / 1000000;
this.d = this.a[s.a(this.a, j2, true)];
return j2;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long a(long j) {
return this.c + this.b[s.a(this.a, (b.this.i * j) / 1000000, true)];
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.l
public final long c() {
return (b.this.n.d * 1000000) / r0.a;
}
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
int i;
int i2;
int i3;
byte[] bArr = kVar.a;
int i4 = -1;
if (bArr[0] != -1) {
return -1L;
}
int i5 = (bArr[2] & 255) >> 4;
switch (i5) {
case 1:
i4 = PsExtractor.AUDIO_STREAM;
return i4;
case 2:
case 3:
case 4:
case 5:
i = i5 - 2;
i2 = 576;
i4 = i2 << i;
return i4;
case 6:
case 7:
kVar.f(4);
long j = kVar.a[kVar.b];
int i6 = 7;
while (true) {
if (i6 >= 0) {
if (((1 << i6) & j) != 0) {
i6--;
} else if (i6 < 6) {
j &= r8 - 1;
i3 = 7 - i6;
} else if (i6 == 7) {
i3 = 1;
}
}
}
i3 = 0;
if (i3 == 0) {
throw new NumberFormatException("Invalid UTF-8 sequence first byte: " + j);
}
for (int i7 = 1; i7 < i3; i7++) {
if ((kVar.a[kVar.b + i7] & 192) != 128) {
throw new NumberFormatException("Invalid UTF-8 sequence continuation byte: " + j);
}
j = (j << 6) | (r8 & 63);
}
kVar.b += i3;
int j2 = i5 == 6 ? kVar.j() : kVar.o();
kVar.e(0);
i4 = j2 + 1;
return i4;
case 8:
case 9:
case 10:
case 11:
case 12:
case 13:
case 14:
case 15:
i = i5 - 8;
i2 = 256;
i4 = i2 << i;
return i4;
default:
return i4;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar, long j, h.a aVar) throws IOException, InterruptedException {
byte[] bArr = kVar.a;
if (this.n == null) {
this.n = new com.fyber.inneractive.sdk.player.exoplayer2.util.e(bArr);
byte[] copyOfRange = Arrays.copyOfRange(bArr, 9, kVar.c);
copyOfRange[4] = ByteCompanionObject.MIN_VALUE;
List singletonList = Collections.singletonList(copyOfRange);
com.fyber.inneractive.sdk.player.exoplayer2.util.e eVar = this.n;
int i = eVar.c;
int i2 = eVar.a;
aVar.a = com.fyber.inneractive.sdk.player.exoplayer2.j.a(null, MimeTypes.AUDIO_FLAC, -1, i * i2, eVar.b, i2, -1, singletonList, null, 0, null);
} else {
byte b = bArr[0];
if ((b & Byte.MAX_VALUE) == 3) {
a aVar2 = new a();
this.o = aVar2;
kVar.f(1);
int l = kVar.l() / 18;
aVar2.a = new long[l];
aVar2.b = new long[l];
for (int i3 = 0; i3 < l; i3++) {
aVar2.a[i3] = kVar.h();
aVar2.b[i3] = kVar.h();
kVar.f(2);
}
} else if (b == -1) {
a aVar3 = this.o;
if (aVar3 != null) {
aVar3.c = j;
aVar.b = aVar3;
}
return false;
}
}
return true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h
public final void a(boolean z) {
if (z) {
this.j = new h.a();
this.f = 0L;
this.h = 0;
} else {
this.h = 1;
}
this.e = -1L;
this.g = 0L;
if (z) {
this.n = null;
this.o = null;
}
}
}

View File

@@ -0,0 +1,164 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.b;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h;
import com.fyber.inneractive.sdk.player.exoplayer2.m;
import java.io.IOException;
import java.util.Arrays;
/* loaded from: classes2.dex */
public final class c implements com.fyber.inneractive.sdk.player.exoplayer2.extractor.f {
public h a;
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
try {
e eVar = new e();
if (eVar.a(bVar, true) && (eVar.a & 2) == 2) {
int min = Math.min(eVar.e, 8);
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(min);
bVar.a(kVar.a, 0, min, false);
kVar.e(0);
if (kVar.a() >= 5 && kVar.j() == 127 && kVar.k() == 1179402563) {
this.a = new b();
} else {
kVar.e(0);
try {
if (k.a(1, kVar, true)) {
this.a = new j();
}
} catch (m unused) {
}
kVar.e(0);
int i = g.o;
int a = kVar.a();
byte[] bArr = g.p;
if (a >= bArr.length) {
byte[] bArr2 = new byte[bArr.length];
kVar.a(bArr2, 0, bArr.length);
if (Arrays.equals(bArr2, bArr)) {
this.a = new g();
}
}
}
return true;
}
} catch (m unused2) {
}
return false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar) {
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d a = gVar.a(0, 1);
gVar.b();
h hVar = this.a;
hVar.c = gVar;
hVar.b = a;
hVar.a = new d();
hVar.a(true);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(long j, long j2) {
h hVar = this.a;
d dVar = hVar.a;
e eVar = dVar.a;
eVar.a = 0;
eVar.b = 0L;
eVar.c = 0;
eVar.d = 0;
eVar.e = 0;
dVar.b.p();
dVar.c = -1;
dVar.e = false;
if (j == 0) {
hVar.a(!hVar.l);
} else if (hVar.h != 0) {
hVar.e = hVar.d.c(j2);
hVar.h = 2;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar, com.fyber.inneractive.sdk.player.exoplayer2.extractor.k kVar) throws IOException, InterruptedException {
h hVar = this.a;
int i = hVar.h;
if (i == 0) {
while (hVar.a.a(bVar)) {
long j = bVar.c;
long j2 = hVar.f;
hVar.k = j - j2;
boolean a = hVar.a(hVar.a.b, j2, hVar.j);
if (a) {
hVar.f = bVar.c;
}
if (!a) {
com.fyber.inneractive.sdk.player.exoplayer2.j jVar = hVar.j.a;
hVar.i = jVar.s;
if (!hVar.m) {
hVar.b.a(jVar);
hVar.m = true;
}
b.a aVar = hVar.j.b;
if (aVar != null) {
hVar.d = aVar;
} else {
long j3 = bVar.b;
if (j3 == -1) {
hVar.d = new h.b();
} else {
e eVar = hVar.a.a;
hVar.d = new a(hVar.f, j3, hVar, eVar.d + eVar.e, eVar.b);
}
}
hVar.j = null;
hVar.h = 2;
hVar.a.a();
}
}
hVar.h = 3;
return -1;
}
if (i == 1) {
bVar.a((int) hVar.f);
hVar.h = 2;
} else if (i == 2) {
long a2 = hVar.d.a(bVar);
if (a2 >= 0) {
kVar.a = a2;
return 1;
}
if (a2 < -1) {
hVar.a(-(a2 + 2));
}
if (!hVar.l) {
hVar.c.a(hVar.d.a());
hVar.l = true;
}
if (hVar.k <= 0 && !hVar.a.a(bVar)) {
hVar.h = 3;
return -1;
}
hVar.k = 0L;
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar2 = hVar.a.b;
long a3 = hVar.a(kVar2);
if (a3 >= 0) {
long j4 = hVar.g;
if (j4 + a3 >= hVar.e) {
hVar.b.a(kVar2.c, kVar2);
hVar.b.a((j4 * 1000000) / hVar.i, 1, kVar2.c, 0, null);
hVar.e = -1L;
}
}
hVar.g += a3;
} else {
throw new IllegalStateException();
}
return 0;
}
}

View File

@@ -0,0 +1,99 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ogg.OggPageHeader;
import java.io.IOException;
import java.util.Arrays;
/* loaded from: classes2.dex */
public final class d {
public final e a = new e();
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k b = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(new byte[OggPageHeader.MAX_PAGE_PAYLOAD], 0);
public int c = -1;
public int d;
public boolean e;
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
int i;
int i2;
int i3;
if (this.e) {
this.e = false;
this.b.p();
}
while (true) {
if (this.e) {
return true;
}
if (this.c < 0) {
if (!this.a.a(bVar, true)) {
return false;
}
e eVar = this.a;
int i4 = eVar.d;
if ((eVar.a & 1) == 1 && this.b.c == 0) {
this.d = 0;
int i5 = 0;
do {
int i6 = this.d;
e eVar2 = this.a;
if (i6 >= eVar2.c) {
break;
}
int[] iArr = eVar2.f;
this.d = i6 + 1;
i3 = iArr[i6];
i5 += i3;
} while (i3 == 255);
i4 += i5;
i2 = this.d;
} else {
i2 = 0;
}
bVar.a(i4);
this.c = i2;
}
int i7 = this.c;
this.d = 0;
int i8 = 0;
do {
int i9 = this.d;
int i10 = i7 + i9;
e eVar3 = this.a;
if (i10 >= eVar3.c) {
break;
}
int[] iArr2 = eVar3.f;
this.d = i9 + 1;
i = iArr2[i10];
i8 += i;
} while (i == 255);
int i11 = this.c + this.d;
if (i8 > 0) {
int b = this.b.b();
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = this.b;
int i12 = kVar.c + i8;
if (b < i12) {
kVar.a = Arrays.copyOf(kVar.a, i12);
}
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar2 = this.b;
bVar.b(kVar2.a, kVar2.c, i8, false);
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar3 = this.b;
kVar3.d(kVar3.c + i8);
this.e = this.a.f[i11 + (-1)] != 255;
}
if (i11 == this.a.c) {
i11 = -1;
}
this.c = i11;
}
}
public final void a() {
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = this.b;
byte[] bArr = kVar.a;
if (bArr.length == 65025) {
return;
}
kVar.a = Arrays.copyOf(bArr, Math.max(OggPageHeader.MAX_PAGE_PAYLOAD, kVar.c));
}
}

View File

@@ -0,0 +1,64 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg;
import com.fyber.inneractive.sdk.player.exoplayer2.m;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import java.io.EOFException;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class e {
public static final int h = s.a("OggS");
public int a;
public long b;
public int c;
public int d;
public int e;
public final int[] f = new int[255];
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k g = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(255);
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar, boolean z) throws IOException, InterruptedException {
this.g.p();
this.a = 0;
this.b = 0L;
this.c = 0;
this.d = 0;
this.e = 0;
long j = bVar.b;
if ((j != -1 && j - (bVar.c + bVar.e) < 27) || !bVar.a(this.g.a, 0, 27, true)) {
if (z) {
return false;
}
throw new EOFException();
}
if (this.g.k() != h) {
if (z) {
return false;
}
throw new m("expected OggS capture pattern at begin of page");
}
if (this.g.j() != 0) {
if (z) {
return false;
}
throw new m("unsupported bit stream revision");
}
this.a = this.g.j();
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = this.g;
byte[] bArr = kVar.a;
kVar.b = kVar.b + 8;
this.b = ((bArr[r7 + 2] & 255) << 16) | (bArr[r7] & 255) | ((bArr[r7 + 1] & 255) << 8) | ((bArr[r7 + 3] & 255) << 24) | ((bArr[r7 + 4] & 255) << 32) | ((bArr[r7 + 5] & 255) << 40) | ((bArr[r7 + 6] & 255) << 48) | ((bArr[r7 + 7] & 255) << 56);
kVar.f();
this.g.f();
this.g.f();
int j2 = this.g.j();
this.c = j2;
this.d = j2 + 27;
this.g.p();
bVar.a(this.g.a, 0, this.c, false);
for (int i = 0; i < this.c; i++) {
this.f[i] = this.g.j();
this.e += this.f[i];
}
return true;
}
}

View File

@@ -0,0 +1,13 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.l;
import java.io.IOException;
/* loaded from: classes2.dex */
public interface f {
long a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException;
l a();
long c(long j);
}

View File

@@ -0,0 +1,73 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.mbridge.msdk.newreward.function.common.MBridgeCommon;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.util.ArrayList;
import java.util.Arrays;
/* loaded from: classes2.dex */
public final class g extends h {
public static final int o = s.a("Opus");
public static final byte[] p = {79, 112, 117, 115, 72, 101, 97, 100};
public boolean n;
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
int i;
byte[] bArr = kVar.a;
byte b = bArr[0];
int i2 = b & 255;
int i3 = b & 3;
if (i3 != 0) {
i = 2;
if (i3 != 1 && i3 != 2) {
i = bArr[1] & 63;
}
} else {
i = 1;
}
int i4 = i2 >> 3;
return (this.i * (i * (i4 >= 16 ? 2500 << r0 : i4 >= 12 ? 10000 << (i4 & 1) : (i4 & 3) == 3 ? MBridgeCommon.DEFAULT_LOAD_TIMEOUT : 10000 << r0))) / 1000000;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar, long j, h.a aVar) throws IOException, InterruptedException {
if (!this.n) {
byte[] copyOf = Arrays.copyOf(kVar.a, kVar.c);
int i = copyOf[9] & 255;
int i2 = ((copyOf[11] & 255) << 8) | (copyOf[10] & 255);
ArrayList arrayList = new ArrayList(3);
arrayList.add(copyOf);
arrayList.add(ByteBuffer.allocate(8).order(ByteOrder.nativeOrder()).putLong((i2 * C.NANOS_PER_SECOND) / 48000).array());
arrayList.add(ByteBuffer.allocate(8).order(ByteOrder.nativeOrder()).putLong((3840 * C.NANOS_PER_SECOND) / 48000).array());
aVar.a = com.fyber.inneractive.sdk.player.exoplayer2.j.a(null, MimeTypes.AUDIO_OPUS, -1, -1, i, 48000, -1, arrayList, null, 0, null);
this.n = true;
return true;
}
boolean z = kVar.c() == o;
kVar.e(0);
return z;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h
public final void a(boolean z) {
if (z) {
this.j = new h.a();
this.f = 0L;
this.h = 0;
} else {
this.h = 1;
}
this.e = -1L;
this.g = 0L;
if (z) {
this.n = false;
}
}
}

View File

@@ -0,0 +1,56 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.l;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.m;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.b;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.io.IOException;
/* loaded from: classes2.dex */
public abstract class h {
public d a;
public m b;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.g c;
public f d;
public long e;
public long f;
public long g;
public int h;
public int i;
public a j;
public long k;
public boolean l;
public boolean m;
public static class a {
public com.fyber.inneractive.sdk.player.exoplayer2.j a;
public b.a b;
}
public static final class b implements f {
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.f
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
return -1L;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.f
public final l a() {
return new l.a(C.TIME_UNSET);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.f
public final long c(long j) {
return 0L;
}
}
public abstract long a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar);
public void a(long j) {
this.g = j;
}
public abstract void a(boolean z);
public abstract boolean a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar, long j, a aVar) throws IOException, InterruptedException;
}

View File

@@ -0,0 +1,54 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg;
/* loaded from: classes2.dex */
public final class i {
public final byte[] a;
public final int b;
public int c;
public int d;
public i(byte[] bArr) {
this.a = bArr;
this.b = bArr.length;
}
public final boolean a() {
boolean z = (((this.a[this.c] & 255) >> this.d) & 1) == 1;
b(1);
return z;
}
public final void b(int i) {
int i2;
int i3 = i / 8;
int i4 = this.c + i3;
this.c = i4;
int i5 = (i - (i3 * 8)) + this.d;
this.d = i5;
boolean z = true;
if (i5 > 7) {
this.c = i4 + 1;
this.d = i5 - 8;
}
int i6 = this.c;
if (i6 < 0 || (i6 >= (i2 = this.b) && (i6 != i2 || this.d != 0))) {
z = false;
}
com.fyber.inneractive.sdk.player.exoplayer2.util.a.b(z);
}
public final int a(int i) {
int i2 = this.c;
int min = Math.min(i, 8 - this.d);
int i3 = i2 + 1;
int i4 = ((this.a[i2] & 255) >> this.d) & (255 >> (8 - min));
while (min < i) {
i4 |= (this.a[i3] & 255) << min;
min += 8;
i3++;
}
int i5 = i4 & ((-1) >>> (32 - i));
b(i);
return i5;
}
}

View File

@@ -0,0 +1,355 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg;
import android.util.Log;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.k;
import com.fyber.inneractive.sdk.player.exoplayer2.m;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.io.IOException;
import java.util.ArrayList;
/* loaded from: classes2.dex */
public final class j extends h {
public a n;
public int o;
public boolean p;
public k.c q;
public k.a r;
public static final class a {
public final k.c a;
public final byte[] b;
public final k.b[] c;
public final int d;
public a(k.c cVar, byte[] bArr, k.b[] bVarArr, int i) {
this.a = cVar;
this.b = bArr;
this.c = bVarArr;
this.d = i;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h
public final long a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
byte b = kVar.a[0];
if ((b & 1) == 1) {
return -1L;
}
a aVar = this.n;
int i = !aVar.c[(b >> 1) & (255 >>> (8 - aVar.d))].a ? aVar.a.d : aVar.a.e;
long j = this.p ? (this.o + i) / 4 : 0;
kVar.d(kVar.c + 4);
byte[] bArr = kVar.a;
int i2 = kVar.c;
bArr[i2 - 4] = (byte) (j & 255);
bArr[i2 - 3] = (byte) ((j >>> 8) & 255);
bArr[i2 - 2] = (byte) ((j >>> 16) & 255);
bArr[i2 - 1] = (byte) ((j >>> 24) & 255);
this.p = true;
this.o = i;
return j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h
public final void a(boolean z) {
if (z) {
this.j = new h.a();
this.f = 0L;
this.h = 0;
} else {
this.h = 1;
}
this.e = -1L;
this.g = 0L;
if (z) {
this.n = null;
this.q = null;
this.r = null;
}
this.o = 0;
this.p = false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar, long j, h.a aVar) throws IOException, InterruptedException {
long j2;
if (this.n != null) {
return false;
}
a aVar2 = null;
if (this.q == null) {
this.q = k.a(kVar);
} else if (this.r == null) {
k.a(3, kVar, false);
kVar.b((int) kVar.f());
long f = kVar.f();
String[] strArr = new String[(int) f];
for (int i = 0; i < f; i++) {
strArr[i] = kVar.b((int) kVar.f());
}
if ((kVar.j() & 1) != 0) {
this.r = new k.a();
} else {
throw new m("framing bit expected to be set");
}
} else {
int i2 = kVar.c;
byte[] bArr = new byte[i2];
System.arraycopy(kVar.a, 0, bArr, 0, i2);
int i3 = this.q.a;
int i4 = 5;
k.a(5, kVar, false);
int j3 = kVar.j() + 1;
i iVar = new i(kVar.a);
iVar.b(kVar.b * 8);
int i5 = 0;
while (i5 < j3) {
if (iVar.a(24) == 5653314) {
int a2 = iVar.a(16);
int a3 = iVar.a(24);
long[] jArr = new long[a3];
long j4 = 0;
if (!iVar.a()) {
boolean a4 = iVar.a();
for (int i6 = 0; i6 < a3; i6++) {
if (a4) {
if (iVar.a()) {
jArr[i6] = iVar.a(i4) + 1;
} else {
jArr[i6] = 0;
}
} else {
jArr[i6] = iVar.a(i4) + 1;
}
}
} else {
int a5 = iVar.a(i4) + 1;
int i7 = 0;
while (i7 < a3) {
int i8 = 0;
for (int i9 = a3 - i7; i9 > 0; i9 >>>= 1) {
i8++;
}
int a6 = iVar.a(i8);
int i10 = 0;
while (i10 < a6 && i7 < a3) {
jArr[i7] = a5;
i7++;
i10++;
j3 = j3;
}
a5++;
j3 = j3;
}
}
int i11 = j3;
int a7 = iVar.a(4);
if (a7 > 2) {
throw new m(com.fyber.inneractive.sdk.player.exoplayer2.i.a("lookup type greater than 2 not decodable: ", a7));
}
if (a7 == 1 || a7 == 2) {
iVar.b(32);
iVar.b(32);
int a8 = iVar.a(4) + 1;
iVar.b(1);
if (a7 == 1) {
if (a2 != 0) {
j2 = (long) Math.floor(Math.pow(a3, 1.0d / a2));
}
iVar.b((int) (a8 * j4));
} else {
j2 = a3 * a2;
}
j4 = j2;
iVar.b((int) (a8 * j4));
}
i5++;
j3 = i11;
i4 = 5;
} else {
throw new m("expected code book to start with [0x56, 0x43, 0x42] at " + ((iVar.c * 8) + iVar.d));
}
}
int i12 = 6;
int a9 = iVar.a(6) + 1;
for (int i13 = 0; i13 < a9; i13++) {
if (iVar.a(16) != 0) {
throw new m("placeholder of time domain transforms not zeroed out");
}
}
int a10 = iVar.a(6) + 1;
int i14 = 0;
while (i14 < a10) {
int a11 = iVar.a(16);
if (a11 == 0) {
int i15 = 8;
iVar.b(8);
iVar.b(16);
iVar.b(16);
iVar.b(6);
iVar.b(8);
int a12 = iVar.a(4) + 1;
int i16 = 0;
while (i16 < a12) {
iVar.b(i15);
i16++;
i15 = 8;
}
} else if (a11 == 1) {
int a13 = iVar.a(5);
int[] iArr = new int[a13];
int i17 = -1;
for (int i18 = 0; i18 < a13; i18++) {
int a14 = iVar.a(4);
iArr[i18] = a14;
if (a14 > i17) {
i17 = a14;
}
}
int i19 = i17 + 1;
int[] iArr2 = new int[i19];
for (int i20 = 0; i20 < i19; i20++) {
iArr2[i20] = iVar.a(3) + 1;
int a15 = iVar.a(2);
int i21 = 8;
if (a15 > 0) {
iVar.b(8);
}
int i22 = 0;
while (i22 < (1 << a15)) {
iVar.b(i21);
i22++;
i21 = 8;
}
}
iVar.b(2);
int a16 = iVar.a(4);
int i23 = 0;
int i24 = 0;
for (int i25 = 0; i25 < a13; i25++) {
i23 += iArr2[iArr[i25]];
while (i24 < i23) {
iVar.b(a16);
i24++;
}
}
} else {
throw new m(com.fyber.inneractive.sdk.player.exoplayer2.i.a("floor type greater than 1 not decodable: ", a11));
}
i14++;
i12 = 6;
}
int a17 = iVar.a(i12) + 1;
int i26 = 0;
while (i26 < a17) {
if (iVar.a(16) <= 2) {
iVar.b(24);
iVar.b(24);
iVar.b(24);
int a18 = iVar.a(i12) + 1;
int i27 = 8;
iVar.b(8);
int[] iArr3 = new int[a18];
for (int i28 = 0; i28 < a18; i28++) {
iArr3[i28] = ((iVar.a() ? iVar.a(5) : 0) * 8) + iVar.a(3);
}
int i29 = 0;
while (i29 < a18) {
int i30 = 0;
while (i30 < i27) {
if ((iArr3[i29] & (1 << i30)) != 0) {
iVar.b(i27);
}
i30++;
i27 = 8;
}
i29++;
i27 = 8;
}
i26++;
i12 = 6;
} else {
throw new m("residueType greater than 2 is not decodable");
}
}
int a19 = iVar.a(i12) + 1;
for (int i31 = 0; i31 < a19; i31++) {
int a20 = iVar.a(16);
if (a20 != 0) {
Log.e("VorbisUtil", "mapping type other than 0 not supported: " + a20);
} else {
int a21 = iVar.a() ? iVar.a(4) + 1 : 1;
if (iVar.a()) {
int a22 = iVar.a(8) + 1;
for (int i32 = 0; i32 < a22; i32++) {
int i33 = i3 - 1;
int i34 = 0;
for (int i35 = i33; i35 > 0; i35 >>>= 1) {
i34++;
}
iVar.b(i34);
int i36 = 0;
while (i33 > 0) {
i36++;
i33 >>>= 1;
}
iVar.b(i36);
}
}
if (iVar.a(2) != 0) {
throw new m("to reserved bits must be zero after mapping coupling steps");
}
if (a21 > 1) {
for (int i37 = 0; i37 < i3; i37++) {
iVar.b(4);
}
}
for (int i38 = 0; i38 < a21; i38++) {
iVar.b(8);
iVar.b(8);
iVar.b(8);
}
}
}
int a23 = iVar.a(6);
int i39 = a23 + 1;
k.b[] bVarArr = new k.b[i39];
for (int i40 = 0; i40 < i39; i40++) {
boolean a24 = iVar.a();
iVar.a(16);
iVar.a(16);
iVar.a(8);
bVarArr[i40] = new k.b(a24);
}
if (iVar.a()) {
int i41 = 0;
while (a23 > 0) {
i41++;
a23 >>>= 1;
}
aVar2 = new a(this.q, bArr, bVarArr, i41);
} else {
throw new m("framing bit after modes not set as expected");
}
}
this.n = aVar2;
if (aVar2 == null) {
return true;
}
ArrayList arrayList = new ArrayList();
arrayList.add(this.n.a.f);
arrayList.add(this.n.b);
k.c cVar = this.n.a;
aVar.a = com.fyber.inneractive.sdk.player.exoplayer2.j.a(null, MimeTypes.AUDIO_VORBIS, cVar.c, -1, cVar.a, (int) cVar.b, -1, arrayList, null, 0, null);
return true;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg.h
public final void a(long j) {
this.g = j;
this.p = j != 0;
k.c cVar = this.q;
this.o = cVar != null ? cVar.d : 0;
}
}

View File

@@ -0,0 +1,75 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ogg;
import com.fyber.inneractive.sdk.player.exoplayer2.m;
import com.mbridge.msdk.playercommon.exoplayer2.extractor.ts.PsExtractor;
import java.util.Arrays;
/* loaded from: classes2.dex */
public final class k {
public static final class a {
}
public static final class b {
public final boolean a;
public b(boolean z) {
this.a = z;
}
}
public static final class c {
public final int a;
public final long b;
public final int c;
public final int d;
public final int e;
public final byte[] f;
public c(int i, long j, int i2, int i3, int i4, byte[] bArr) {
this.a = i;
this.b = j;
this.c = i2;
this.d = i3;
this.e = i4;
this.f = bArr;
}
}
public static c a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) throws m {
a(1, kVar, false);
kVar.f();
int j = kVar.j();
long f = kVar.f();
kVar.e();
int e = kVar.e();
kVar.e();
int j2 = kVar.j();
int pow = (int) Math.pow(2.0d, j2 & 15);
int pow2 = (int) Math.pow(2.0d, (j2 & PsExtractor.VIDEO_STREAM_MASK) >> 4);
kVar.j();
return new c(j, f, e, pow, pow2, Arrays.copyOf(kVar.a, kVar.c));
}
public static boolean a(int i, com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar, boolean z) throws m {
if (kVar.a() < 7) {
if (z) {
return false;
}
throw new m("too short header: " + kVar.a());
}
if (kVar.j() != i) {
if (z) {
return false;
}
throw new m("expected header type " + Integer.toHexString(i));
}
if (kVar.j() == 118 && kVar.j() == 111 && kVar.j() == 114 && kVar.j() == 98 && kVar.j() == 105 && kVar.j() == 115) {
return true;
}
if (z) {
return false;
}
throw new m("expected characters 'vorbis'");
}
}

View File

@@ -0,0 +1,126 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.l;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class a implements com.fyber.inneractive.sdk.player.exoplayer2.extractor.f {
public static final int e = com.fyber.inneractive.sdk.player.exoplayer2.util.s.a("ID3");
public final long a;
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k b = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(2786);
public b c;
public boolean d;
public a(long j) {
this.a = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
int a;
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(10);
int i = 0;
while (true) {
bVar.a(kVar.a, 0, 10, false);
kVar.e(0);
if (kVar.l() != e) {
break;
}
kVar.f(3);
int i2 = kVar.i();
i += i2 + 10;
bVar.a(i2, false);
}
bVar.e = 0;
bVar.a(i, false);
int i3 = 0;
int i4 = i;
while (true) {
bVar.a(kVar.a, 0, 5, false);
kVar.e(0);
if (kVar.o() != 2935) {
bVar.e = 0;
i4++;
if (i4 - i >= 8192) {
return false;
}
bVar.a(i4, false);
i3 = 0;
} else {
i3++;
if (i3 >= 4) {
return true;
}
byte[] bArr = kVar.a;
if (bArr.length < 5) {
a = -1;
} else {
byte b = bArr[4];
a = com.fyber.inneractive.sdk.player.exoplayer2.audio.a.a((b & 192) >> 6, b & 63);
}
if (a == -1) {
return false;
}
bVar.a(a - 5, false);
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar) {
b bVar = new b(null);
this.c = bVar;
bVar.d = "0";
bVar.e = gVar.a(0, 1);
gVar.b();
gVar.a(new l.a(C.TIME_UNSET));
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(long j, long j2) {
this.d = false;
this.c.a();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar, com.fyber.inneractive.sdk.player.exoplayer2.extractor.k kVar) throws IOException, InterruptedException {
int min;
byte[] bArr = this.b.a;
int i = bVar.f;
if (i == 0) {
min = 0;
} else {
min = Math.min(i, 2786);
System.arraycopy(bVar.d, 0, bArr, 0, min);
int i2 = bVar.f - min;
bVar.f = i2;
bVar.e = 0;
byte[] bArr2 = bVar.d;
byte[] bArr3 = i2 < bArr2.length - 524288 ? new byte[65536 + i2] : bArr2;
System.arraycopy(bArr2, min, bArr3, 0, i2);
bVar.d = bArr3;
}
if (min == 0) {
min = bVar.a(bArr, 0, 2786, 0, true);
}
if (min != -1) {
bVar.c += min;
}
if (min == -1) {
return -1;
}
this.b.e(0);
this.b.d(min);
if (!this.d) {
this.c.l = this.a;
this.d = true;
}
this.c.a(this.b);
return 0;
}
}

View File

@@ -0,0 +1,161 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import com.applovin.exoplayer2.common.base.Ascii;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
/* loaded from: classes2.dex */
public final class b implements h {
public final com.fyber.inneractive.sdk.player.exoplayer2.util.j a;
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k b;
public final String c;
public String d;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.m e;
public int f = 0;
public int g;
public boolean h;
public long i;
public com.fyber.inneractive.sdk.player.exoplayer2.j j;
public int k;
public long l;
public b(String str) {
byte[] bArr = new byte[8];
this.a = new com.fyber.inneractive.sdk.player.exoplayer2.util.j(bArr);
this.b = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(bArr);
this.c = str;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a() {
this.f = 0;
this.g = 0;
this.h = false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(boolean z, long j) {
this.l = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void b() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar, v.d dVar) {
dVar.a();
dVar.b();
this.d = dVar.e;
dVar.b();
this.e = gVar.a(dVar.d, 1);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
int a;
int i;
String str;
int i2;
int i3;
int i4;
while (kVar.a() > 0) {
int i5 = this.f;
if (i5 == 0) {
while (true) {
if (kVar.a() <= 0) {
break;
}
if (!this.h) {
this.h = kVar.j() == 11;
} else {
int j = kVar.j();
if (j == 119) {
this.h = false;
this.f = 1;
byte[] bArr = this.b.a;
bArr[0] = Ascii.VT;
bArr[1] = 119;
this.g = 2;
break;
}
this.h = j == 11;
}
}
} else if (i5 == 1) {
byte[] bArr2 = this.b.a;
int min = Math.min(kVar.a(), 8 - this.g);
kVar.a(bArr2, this.g, min);
int i6 = this.g + min;
this.g = i6;
if (i6 == 8) {
this.a.b(0);
com.fyber.inneractive.sdk.player.exoplayer2.util.j jVar = this.a;
int i7 = (jVar.b * 8) + jVar.c;
jVar.c(40);
Object[] objArr = jVar.a(5) == 16;
jVar.b(i7);
int i8 = 6;
if (objArr != false) {
jVar.c(21);
i3 = (jVar.a(11) + 1) * 2;
int a2 = jVar.a(2);
if (a2 == 3) {
i4 = com.fyber.inneractive.sdk.player.exoplayer2.audio.a.c[jVar.a(2)];
} else {
i8 = com.fyber.inneractive.sdk.player.exoplayer2.audio.a.a[jVar.a(2)];
i4 = com.fyber.inneractive.sdk.player.exoplayer2.audio.a.b[a2];
}
i2 = i8 * 256;
a = jVar.a(3);
i = i4;
str = MimeTypes.AUDIO_E_AC3;
} else {
jVar.c(32);
int a3 = jVar.a(2);
int a4 = com.fyber.inneractive.sdk.player.exoplayer2.audio.a.a(a3, jVar.a(6));
jVar.c(8);
a = jVar.a(3);
if ((a & 1) != 0 && a != 1) {
jVar.c(2);
}
if ((a & 4) != 0) {
jVar.c(2);
}
if (a == 2) {
jVar.c(2);
}
i = com.fyber.inneractive.sdk.player.exoplayer2.audio.a.b[a3];
str = MimeTypes.AUDIO_AC3;
i2 = 1536;
i3 = a4;
}
int i9 = com.fyber.inneractive.sdk.player.exoplayer2.audio.a.d[a] + (jVar.a() ? 1 : 0);
com.fyber.inneractive.sdk.player.exoplayer2.j jVar2 = this.j;
if (jVar2 == null || i9 != jVar2.r || i != jVar2.s || str != jVar2.f) {
com.fyber.inneractive.sdk.player.exoplayer2.j a5 = com.fyber.inneractive.sdk.player.exoplayer2.j.a(this.d, str, -1, -1, i9, i, -1, null, null, 0, this.c);
this.j = a5;
this.e.a(a5);
}
this.k = i3;
this.i = (i2 * 1000000) / this.j.s;
this.b.e(0);
this.e.a(8, this.b);
this.f = 2;
}
} else if (i5 == 2) {
int min2 = Math.min(kVar.a(), this.k - this.g);
this.e.a(min2, kVar);
int i10 = this.g + min2;
this.g = i10;
int i11 = this.k;
if (i10 == i11) {
this.e.a(this.l, 1, i11, 0, null);
this.l += this.i;
this.f = 0;
}
}
}
}
}

View File

@@ -0,0 +1,126 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.l;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import java.io.IOException;
/* loaded from: classes2.dex */
public final class c implements com.fyber.inneractive.sdk.player.exoplayer2.extractor.f {
public static final int e = com.fyber.inneractive.sdk.player.exoplayer2.util.s.a("ID3");
public final long a;
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k b = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(200);
public d c;
public boolean d;
public c(long j) {
this.a = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final boolean a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar) throws IOException, InterruptedException {
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(10);
byte[] bArr = kVar.a;
com.fyber.inneractive.sdk.player.exoplayer2.util.j jVar = new com.fyber.inneractive.sdk.player.exoplayer2.util.j(bArr, bArr.length);
int i = 0;
while (true) {
bVar.a(kVar.a, 0, 10, false);
kVar.e(0);
if (kVar.l() != e) {
break;
}
kVar.f(3);
int i2 = kVar.i();
i += i2 + 10;
bVar.a(i2, false);
}
bVar.e = 0;
bVar.a(i, false);
int i3 = 0;
int i4 = 0;
int i5 = i;
while (true) {
bVar.a(kVar.a, 0, 2, false);
kVar.e(0);
if ((kVar.o() & 65526) != 65520) {
bVar.e = 0;
i5++;
if (i5 - i >= 8192) {
return false;
}
bVar.a(i5, false);
i3 = 0;
i4 = 0;
} else {
i3++;
if (i3 >= 4 && i4 > 188) {
return true;
}
bVar.a(kVar.a, 0, 4, false);
jVar.b(14);
int a = jVar.a(13);
if (a <= 6) {
return false;
}
bVar.a(a - 6, false);
i4 += a;
}
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar) {
d dVar = new d(true, null);
this.c = dVar;
dVar.a(gVar, new v.d(Integer.MIN_VALUE, 0, 1));
gVar.b();
gVar.a(new l.a(C.TIME_UNSET));
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final void a(long j, long j2) {
this.d = false;
this.c.c();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.f
public final int a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.b bVar, com.fyber.inneractive.sdk.player.exoplayer2.extractor.k kVar) throws IOException, InterruptedException {
int min;
byte[] bArr = this.b.a;
int i = bVar.f;
if (i == 0) {
min = 0;
} else {
min = Math.min(i, 200);
System.arraycopy(bVar.d, 0, bArr, 0, min);
int i2 = bVar.f - min;
bVar.f = i2;
bVar.e = 0;
byte[] bArr2 = bVar.d;
byte[] bArr3 = i2 < bArr2.length - 524288 ? new byte[65536 + i2] : bArr2;
System.arraycopy(bArr2, min, bArr3, 0, i2);
bVar.d = bArr3;
}
if (min == 0) {
min = bVar.a(bArr, 0, 200, 0, true);
}
if (min != -1) {
bVar.c += min;
}
if (min == -1) {
return -1;
}
this.b.e(0);
this.b.d(min);
if (!this.d) {
this.c.o = this.a;
this.d = true;
}
this.c.a(this.b);
return 0;
}
}

View File

@@ -0,0 +1,194 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import android.util.Log;
import android.util.Pair;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.util.Arrays;
import java.util.Collections;
/* loaded from: classes2.dex */
public final class d implements h {
public static final byte[] r = {73, 68, 51};
public final boolean a;
public final com.fyber.inneractive.sdk.player.exoplayer2.util.j b = new com.fyber.inneractive.sdk.player.exoplayer2.util.j(new byte[7]);
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k c = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(Arrays.copyOf(r, 10));
public final String d;
public String e;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.m f;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.m g;
public int h;
public int i;
public int j;
public boolean k;
public boolean l;
public long m;
public int n;
public long o;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.m p;
public long q;
public d(boolean z, String str) {
c();
this.a = z;
this.d = str;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a() {
c();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(boolean z, long j) {
this.o = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void b() {
}
public final void c() {
this.h = 0;
this.i = 0;
this.j = 256;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar, v.d dVar) {
dVar.a();
dVar.b();
this.e = dVar.e;
dVar.b();
this.f = gVar.a(dVar.d, 1);
if (!this.a) {
this.g = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.e();
return;
}
dVar.a();
dVar.b();
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d a = gVar.a(dVar.d, 4);
this.g = a;
dVar.b();
a.a(com.fyber.inneractive.sdk.player.exoplayer2.j.a(dVar.e, MimeTypes.APPLICATION_ID3, (com.fyber.inneractive.sdk.player.exoplayer2.drm.a) null));
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
while (kVar.a() > 0) {
int i = this.h;
if (i == 0) {
byte[] bArr = kVar.a;
int i2 = kVar.b;
int i3 = kVar.c;
while (true) {
if (i2 < i3) {
int i4 = i2 + 1;
byte b = bArr[i2];
int i5 = b & 255;
int i6 = this.j;
if (i6 != 512 || i5 < 240 || i5 == 255) {
int i7 = i6 | i5;
if (i7 == 329) {
this.j = 768;
} else if (i7 == 511) {
this.j = 512;
} else if (i7 == 836) {
this.j = 1024;
} else {
if (i7 == 1075) {
this.h = 1;
this.i = 3;
this.n = 0;
this.c.e(0);
kVar.e(i4);
break;
}
if (i6 != 256) {
this.j = 256;
}
}
i2 = i4;
} else {
this.k = (b & 1) == 0;
this.h = 2;
this.i = 0;
kVar.e(i4);
}
} else {
kVar.e(i2);
break;
}
}
} else if (i == 1) {
byte[] bArr2 = this.c.a;
int min = Math.min(kVar.a(), 10 - this.i);
kVar.a(bArr2, this.i, min);
int i8 = this.i + min;
this.i = i8;
if (i8 == 10) {
this.g.a(10, this.c);
this.c.e(6);
com.fyber.inneractive.sdk.player.exoplayer2.extractor.m mVar = this.g;
int i9 = this.c.i() + 10;
this.h = 3;
this.i = 10;
this.p = mVar;
this.q = 0L;
this.n = i9;
}
} else if (i == 2) {
int i10 = this.k ? 7 : 5;
byte[] bArr3 = this.b.a;
int min2 = Math.min(kVar.a(), i10 - this.i);
kVar.a(bArr3, this.i, min2);
int i11 = this.i + min2;
this.i = i11;
if (i11 == i10) {
this.b.b(0);
if (!this.l) {
int a = this.b.a(2) + 1;
if (a != 2) {
Log.w("AdtsReader", "Detected audio object type: " + a + ", but assuming AAC LC.");
a = 2;
}
int a2 = this.b.a(4);
this.b.c(1);
byte[] bArr4 = {(byte) (((a << 3) & 248) | ((a2 >> 1) & 7)), (byte) (((a2 << 7) & 128) | ((this.b.a(3) << 3) & 120))};
Pair<Integer, Integer> a3 = com.fyber.inneractive.sdk.player.exoplayer2.util.c.a(bArr4);
com.fyber.inneractive.sdk.player.exoplayer2.j a4 = com.fyber.inneractive.sdk.player.exoplayer2.j.a(this.e, MimeTypes.AUDIO_AAC, -1, -1, ((Integer) a3.second).intValue(), ((Integer) a3.first).intValue(), -1, Collections.singletonList(bArr4), null, 0, this.d);
this.m = 1024000000 / a4.s;
this.f.a(a4);
this.l = true;
} else {
this.b.c(10);
}
this.b.c(4);
int a5 = this.b.a(13);
int i12 = a5 - 7;
if (this.k) {
i12 = a5 - 9;
}
com.fyber.inneractive.sdk.player.exoplayer2.extractor.m mVar2 = this.f;
long j = this.m;
this.h = 3;
this.i = 0;
this.p = mVar2;
this.q = j;
this.n = i12;
}
} else if (i == 3) {
int min3 = Math.min(kVar.a(), this.n - this.i);
this.p.a(min3, kVar);
int i13 = this.i + min3;
this.i = i13;
int i14 = this.n;
if (i13 == i14) {
this.p.a(this.o, 1, i14, 0, null);
this.o += this.q;
c();
}
}
}
}
}

View File

@@ -0,0 +1,119 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import android.util.SparseArray;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/* loaded from: classes2.dex */
public final class e implements v.c {
public final int a;
public final List<com.fyber.inneractive.sdk.player.exoplayer2.j> b;
public e() {
this(0, Collections.emptyList());
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v.c
public final SparseArray<v> a() {
return new SparseArray<>();
}
public final boolean a(int i) {
return (i & this.a) != 0;
}
public e(int i, List<com.fyber.inneractive.sdk.player.exoplayer2.j> list) {
this.a = i;
if (!a(32) && list.isEmpty()) {
list = Collections.singletonList(com.fyber.inneractive.sdk.player.exoplayer2.j.a(null, MimeTypes.APPLICATION_CEA608, 0, null, null));
}
this.b = list;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v.c
public final v a(int i, v.b bVar) {
if (i == 2) {
return new o(new i());
}
if (i == 3 || i == 4) {
return new o(new m(bVar.a));
}
if (i == 15) {
if (a(2)) {
return null;
}
return new o(new d(false, bVar.a));
}
if (i == 21) {
return new o(new l());
}
if (i == 27) {
if (a(4)) {
return null;
}
return new o(new j(a(bVar), a(1), a(8)));
}
if (i == 36) {
return new o(new k(a(bVar)));
}
if (i == 89) {
return new o(new g(bVar.b));
}
if (i != 138) {
if (i != 129) {
if (i != 130) {
if (i == 134) {
if (a(16)) {
return null;
}
return new r(new t());
}
if (i != 135) {
return null;
}
}
}
return new o(new b(bVar.a));
}
return new o(new f(bVar.a));
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Type inference failed for: r15v4 */
public final s a(v.b bVar) {
int i;
String str;
if (a(32)) {
return new s(this.b);
}
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(bVar.c);
ArrayList arrayList = this.b;
while (kVar.a() > 0) {
int j = kVar.j();
int j2 = kVar.b + kVar.j();
if (j == 134) {
arrayList = new ArrayList();
int j3 = kVar.j() & 31;
for (int i2 = 0; i2 < j3; i2++) {
String b = kVar.b(3);
int j4 = kVar.j();
if ((j4 & 128) != 0) {
i = j4 & 63;
str = MimeTypes.APPLICATION_CEA708;
} else {
i = 1;
str = MimeTypes.APPLICATION_CEA608;
}
arrayList.add(com.fyber.inneractive.sdk.player.exoplayer2.j.a(null, str, 0, b, i, null, Long.MAX_VALUE, Collections.emptyList()));
kVar.f(2);
}
}
kVar.e(j2);
arrayList = arrayList;
}
return new s(arrayList);
}
}

View File

@@ -0,0 +1,119 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import kotlin.jvm.internal.ByteCompanionObject;
/* loaded from: classes2.dex */
public final class f implements h {
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k a;
public final String b;
public String c;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.m d;
public int e;
public int f;
public int g;
public long h;
public com.fyber.inneractive.sdk.player.exoplayer2.j i;
public int j;
public long k;
public f(String str) {
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(new byte[15]);
this.a = kVar;
byte[] bArr = kVar.a;
bArr[0] = Byte.MAX_VALUE;
bArr[1] = -2;
bArr[2] = ByteCompanionObject.MIN_VALUE;
bArr[3] = 1;
this.e = 0;
this.b = str;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a() {
this.e = 0;
this.f = 0;
this.g = 0;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(boolean z, long j) {
this.k = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void b() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar, v.d dVar) {
dVar.a();
dVar.b();
this.c = dVar.e;
dVar.b();
this.d = gVar.a(dVar.d, 1);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
while (kVar.a() > 0) {
int i = this.e;
if (i == 0) {
while (true) {
if (kVar.a() > 0) {
int i2 = this.g << 8;
this.g = i2;
int j = i2 | kVar.j();
this.g = j;
if (j == 2147385345) {
this.g = 0;
this.f = 4;
this.e = 1;
break;
}
}
}
} else if (i == 1) {
byte[] bArr = this.a.a;
int min = Math.min(kVar.a(), 15 - this.f);
kVar.a(bArr, this.f, min);
int i3 = this.f + min;
this.f = i3;
if (i3 == 15) {
byte[] bArr2 = this.a.a;
if (this.i == null) {
String str = this.c;
String str2 = this.b;
com.fyber.inneractive.sdk.player.exoplayer2.util.j jVar = new com.fyber.inneractive.sdk.player.exoplayer2.util.j(bArr2, bArr2.length);
jVar.c(60);
int i4 = com.fyber.inneractive.sdk.player.exoplayer2.audio.e.a[jVar.a(6)];
int i5 = com.fyber.inneractive.sdk.player.exoplayer2.audio.e.b[jVar.a(4)];
int a = jVar.a(5);
int i6 = a >= 29 ? -1 : (com.fyber.inneractive.sdk.player.exoplayer2.audio.e.c[a] * 1000) / 2;
jVar.c(10);
com.fyber.inneractive.sdk.player.exoplayer2.j a2 = com.fyber.inneractive.sdk.player.exoplayer2.j.a(str, MimeTypes.AUDIO_DTS, i6, -1, i4 + (jVar.a(2) > 0 ? 1 : 0), i5, -1, null, null, 0, str2);
this.i = a2;
this.d.a(a2);
}
this.j = (((bArr2[5] & 2) << 12) | ((bArr2[6] & 255) << 4) | ((bArr2[7] & 240) >> 4)) + 1;
this.h = (int) (((((((bArr2[4] & 1) << 6) | ((r7 & 252) >> 2)) + 1) * 32) * 1000000) / this.i.s);
this.a.e(0);
this.d.a(15, this.a);
this.e = 2;
}
} else if (i == 2) {
int min2 = Math.min(kVar.a(), this.j - this.f);
this.d.a(min2, kVar);
int i7 = this.f + min2;
this.f = i7;
int i8 = this.j;
if (i7 == i8) {
this.d.a(this.k, 1, i8, 0, null);
this.k += this.h;
this.e = 0;
}
}
}
}
}

View File

@@ -0,0 +1,96 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.util.Collections;
import java.util.List;
/* loaded from: classes2.dex */
public final class g implements h {
public final List<v.a> a;
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.m[] b;
public boolean c;
public int d;
public int e;
public long f;
public g(List<v.a> list) {
this.a = list;
this.b = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.m[list.size()];
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a() {
this.c = false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(boolean z, long j) {
if (z) {
this.c = true;
this.f = j;
this.e = 0;
this.d = 2;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar, v.d dVar) {
for (int i = 0; i < this.b.length; i++) {
v.a aVar = this.a.get(i);
dVar.a();
dVar.b();
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d a = gVar.a(dVar.d, 3);
dVar.b();
a.a(new com.fyber.inneractive.sdk.player.exoplayer2.j(dVar.e, null, MimeTypes.APPLICATION_DVBSUBS, null, -1, -1, -1, -1, -1.0f, -1, -1.0f, null, -1, null, -1, -1, -1, -1, -1, 0, aVar.a, -1, Long.MAX_VALUE, Collections.singletonList(aVar.b), null, null));
this.b[i] = a;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void b() {
if (this.c) {
for (com.fyber.inneractive.sdk.player.exoplayer2.extractor.m mVar : this.b) {
mVar.a(this.f, 1, this.e, 0, null);
}
this.c = false;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
if (this.c) {
if (this.d == 2) {
if (kVar.a() == 0) {
return;
}
if (kVar.j() != 32) {
this.c = false;
}
this.d--;
if (!this.c) {
return;
}
}
if (this.d == 1) {
if (kVar.a() == 0) {
return;
}
if (kVar.j() != 0) {
this.c = false;
}
this.d--;
if (!this.c) {
return;
}
}
int i = kVar.b;
int a = kVar.a();
for (com.fyber.inneractive.sdk.player.exoplayer2.extractor.m mVar : this.b) {
kVar.e(i);
mVar.a(a, kVar);
}
this.e += a;
}
}
}

View File

@@ -0,0 +1,16 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v;
/* loaded from: classes2.dex */
public interface h {
void a();
void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar, v.d dVar);
void a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar);
void a(boolean z, long j);
void b();
}

View File

@@ -0,0 +1,78 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v;
import com.mbridge.msdk.playercommon.exoplayer2.C;
/* loaded from: classes2.dex */
public final class i implements h {
public static final double[] n = {23.976023976023978d, 24.0d, 25.0d, 29.97002997002997d, 30.0d, 50.0d, 59.94005994005994d, 60.0d};
public String a;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.m b;
public boolean c;
public long d;
public final boolean[] e = new boolean[4];
public final a f = new a();
public boolean g;
public long h;
public long i;
public boolean j;
public boolean k;
public long l;
public long m;
public static final class a {
public boolean a;
public int b;
public int c;
public byte[] d = new byte[128];
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a() {
com.fyber.inneractive.sdk.player.exoplayer2.util.i.a(this.e);
a aVar = this.f;
aVar.a = false;
aVar.b = 0;
aVar.c = 0;
this.j = false;
this.g = false;
this.h = 0L;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(boolean z, long j) {
boolean z2 = j != C.TIME_UNSET;
this.j = z2;
if (z2) {
this.i = j;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void b() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar, v.d dVar) {
dVar.a();
dVar.b();
this.a = dVar.e;
dVar.b();
this.b = gVar.a(dVar.d, 2);
}
/* JADX WARN: Multi-variable type inference failed */
/* JADX WARN: Removed duplicated region for block: B:32:0x012d */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.util.k r43) {
/*
Method dump skipped, instructions count: 456
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.i.a(com.fyber.inneractive.sdk.player.exoplayer2.util.k):void");
}
}

View File

@@ -0,0 +1,205 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import android.util.SparseArray;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v;
import com.fyber.inneractive.sdk.player.exoplayer2.util.i;
/* loaded from: classes2.dex */
public final class j implements h {
public final s a;
public final boolean b;
public final boolean c;
public long g;
public String i;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.m j;
public a k;
public boolean l;
public long m;
public final boolean[] h = new boolean[3];
public final n d = new n(7);
public final n e = new n(8);
public final n f = new n(6);
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k n = new com.fyber.inneractive.sdk.player.exoplayer2.util.k();
public j(s sVar, boolean z, boolean z2) {
this.a = sVar;
this.b = z;
this.c = z2;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a() {
com.fyber.inneractive.sdk.player.exoplayer2.util.i.a(this.h);
this.d.a();
this.e.a();
this.f.a();
this.k.a();
this.g = 0L;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(boolean z, long j) {
this.m = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void b() {
}
public static final class a {
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.m a;
public final boolean b;
public final boolean c;
public final SparseArray<i.b> d = new SparseArray<>();
public final SparseArray<i.a> e = new SparseArray<>();
public final com.fyber.inneractive.sdk.player.exoplayer2.util.l f;
public byte[] g;
public int h;
public int i;
public long j;
public boolean k;
public long l;
public C0094a m;
public C0094a n;
public boolean o;
public long p;
public long q;
public boolean r;
/* renamed from: com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.j$a$a, reason: collision with other inner class name */
public static final class C0094a {
public boolean a;
public boolean b;
public i.b c;
public int d;
public int e;
public int f;
public int g;
public boolean h;
public boolean i;
public boolean j;
public boolean k;
public int l;
public int m;
public int n;
public int o;
public int p;
public C0094a() {
}
public /* synthetic */ C0094a(int i) {
this();
}
public static boolean a(C0094a c0094a, C0094a c0094a2) {
boolean z;
boolean z2;
if (c0094a.a) {
if (!c0094a2.a || c0094a.f != c0094a2.f || c0094a.g != c0094a2.g || c0094a.h != c0094a2.h) {
return true;
}
if (c0094a.i && c0094a2.i && c0094a.j != c0094a2.j) {
return true;
}
int i = c0094a.d;
int i2 = c0094a2.d;
if (i != i2 && (i == 0 || i2 == 0)) {
return true;
}
int i3 = c0094a.c.h;
if (i3 == 0 && c0094a2.c.h == 0 && (c0094a.m != c0094a2.m || c0094a.n != c0094a2.n)) {
return true;
}
if ((i3 == 1 && c0094a2.c.h == 1 && (c0094a.o != c0094a2.o || c0094a.p != c0094a2.p)) || (z = c0094a.k) != (z2 = c0094a2.k)) {
return true;
}
if (z && z2 && c0094a.l != c0094a2.l) {
return true;
}
}
return false;
}
}
public a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.m mVar, boolean z, boolean z2) {
this.a = mVar;
this.b = z;
this.c = z2;
int i = 0;
this.m = new C0094a(i);
this.n = new C0094a(i);
byte[] bArr = new byte[128];
this.g = bArr;
this.f = new com.fyber.inneractive.sdk.player.exoplayer2.util.l(bArr, 0, 0);
a();
}
public final void a() {
this.k = false;
this.o = false;
C0094a c0094a = this.n;
c0094a.b = false;
c0094a.a = false;
}
/* JADX WARN: Removed duplicated region for block: B:50:0x00f9 */
/* JADX WARN: Removed duplicated region for block: B:52:0x00fe */
/* JADX WARN: Removed duplicated region for block: B:58:0x0113 */
/* JADX WARN: Removed duplicated region for block: B:71:0x0142 */
/* JADX WARN: Removed duplicated region for block: B:86:0x010e */
/* JADX WARN: Removed duplicated region for block: B:87:0x00fb */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(byte[] r17, int r18, int r19) {
/*
Method dump skipped, instructions count: 416
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.j.a.a(byte[], int, int):void");
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar, v.d dVar) {
dVar.a();
dVar.b();
this.i = dVar.e;
dVar.b();
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d a2 = gVar.a(dVar.d, 2);
this.j = a2;
this.k = new a(a2, this.b, this.c);
this.a.a(gVar, dVar);
}
/* JADX WARN: Code restructure failed: missing block: B:39:0x0232, code lost:
if (r1 == 2) goto L70;
*/
/* JADX WARN: Code restructure failed: missing block: B:48:0x0263, code lost:
if (r6 != 1) goto L82;
*/
/* JADX WARN: Removed duplicated region for block: B:22:0x01b4 */
/* JADX WARN: Removed duplicated region for block: B:32:0x0221 */
/* JADX WARN: Removed duplicated region for block: B:43:0x0241 */
/* JADX WARN: Removed duplicated region for block: B:47:0x0262 */
/* JADX WARN: Removed duplicated region for block: B:54:0x026b */
/* JADX WARN: Removed duplicated region for block: B:58:0x0283 A[SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:59:0x0266 */
/* JADX WARN: Removed duplicated region for block: B:64:0x01f3 */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.util.k r46) {
/*
Method dump skipped, instructions count: 648
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.j.a(com.fyber.inneractive.sdk.player.exoplayer2.util.k):void");
}
}

View File

@@ -0,0 +1,123 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v;
import kotlin.jvm.internal.ByteCompanionObject;
/* loaded from: classes2.dex */
public final class k implements h {
public final s a;
public String b;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.m c;
public a d;
public boolean e;
public long l;
public long m;
public final boolean[] f = new boolean[3];
public final n g = new n(32);
public final n h = new n(33);
public final n i = new n(34);
public final n j = new n(39);
public final n k = new n(40);
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k n = new com.fyber.inneractive.sdk.player.exoplayer2.util.k();
public static final class a {
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.m a;
public long b;
public boolean c;
public int d;
public long e;
public boolean f;
public boolean g;
public boolean h;
public boolean i;
public boolean j;
public long k;
public long l;
public boolean m;
public a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.m mVar) {
this.a = mVar;
}
}
public k(s sVar) {
this.a = sVar;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a() {
com.fyber.inneractive.sdk.player.exoplayer2.util.i.a(this.f);
this.g.a();
this.h.a();
this.i.a();
this.j.a();
this.k.a();
a aVar = this.d;
aVar.f = false;
aVar.g = false;
aVar.h = false;
aVar.i = false;
aVar.j = false;
this.l = 0L;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(boolean z, long j) {
this.m = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void b() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar, v.d dVar) {
dVar.a();
dVar.b();
this.b = dVar.e;
dVar.b();
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d a2 = gVar.a(dVar.d, 2);
this.c = a2;
this.d = new a(a2);
this.a.a(gVar, dVar);
}
/* JADX WARN: Removed duplicated region for block: B:26:0x0331 */
/* JADX WARN: Removed duplicated region for block: B:29:0x035b */
/* JADX WARN: Removed duplicated region for block: B:32:0x0383 */
/* JADX WARN: Removed duplicated region for block: B:59:0x03e0 */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.util.k r55) {
/*
Method dump skipped, instructions count: 1030
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.k.a(com.fyber.inneractive.sdk.player.exoplayer2.util.k):void");
}
public final void a(byte[] bArr, int i, int i2) {
if (this.e) {
a aVar = this.d;
if (aVar.f) {
int i3 = aVar.d;
int i4 = (i + 2) - i3;
if (i4 < i2) {
aVar.g = (bArr[i4] & ByteCompanionObject.MIN_VALUE) != 0;
aVar.f = false;
} else {
aVar.d = (i2 - i) + i3;
}
}
} else {
this.g.a(bArr, i, i2);
this.h.a(bArr, i, i2);
this.i.a(bArr, i, i2);
}
this.j.a(bArr, i, i2);
this.k.a(bArr, i, i2);
}
}

View File

@@ -0,0 +1,75 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import android.util.Log;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
/* loaded from: classes2.dex */
public final class l implements h {
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k a = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(10);
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.m b;
public boolean c;
public long d;
public int e;
public int f;
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a() {
this.c = false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(boolean z, long j) {
if (z) {
this.c = true;
this.d = j;
this.e = 0;
this.f = 0;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar, v.d dVar) {
dVar.a();
dVar.b();
com.fyber.inneractive.sdk.player.exoplayer2.extractor.d a = gVar.a(dVar.d, 4);
this.b = a;
dVar.b();
a.a(com.fyber.inneractive.sdk.player.exoplayer2.j.a(dVar.e, MimeTypes.APPLICATION_ID3, (com.fyber.inneractive.sdk.player.exoplayer2.drm.a) null));
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void b() {
int i;
if (this.c && (i = this.e) != 0 && this.f == i) {
this.b.a(this.d, 1, i, 0, null);
this.c = false;
}
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
if (this.c) {
int a = kVar.a();
int i = this.f;
if (i < 10) {
int min = Math.min(a, 10 - i);
System.arraycopy(kVar.a, kVar.b, this.a.a, this.f, min);
if (this.f + min == 10) {
this.a.e(0);
if (73 == this.a.j() && 68 == this.a.j() && 51 == this.a.j()) {
this.a.f(3);
this.e = this.a.i() + 10;
} else {
Log.w("Id3Reader", "Discarding invalid ID3 tag");
this.c = false;
return;
}
}
}
int min2 = Math.min(a, this.e - this.f);
this.b.a(min2, kVar);
this.f += min2;
}
}
}

View File

@@ -0,0 +1,120 @@
package com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts;
import com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.v;
/* loaded from: classes2.dex */
public final class m implements h {
public final com.fyber.inneractive.sdk.player.exoplayer2.util.k a;
public final com.fyber.inneractive.sdk.player.exoplayer2.extractor.j b;
public final String c;
public String d;
public com.fyber.inneractive.sdk.player.exoplayer2.extractor.m e;
public int f = 0;
public int g;
public boolean h;
public boolean i;
public long j;
public int k;
public long l;
public m(String str) {
com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar = new com.fyber.inneractive.sdk.player.exoplayer2.util.k(4);
this.a = kVar;
kVar.a[0] = -1;
this.b = new com.fyber.inneractive.sdk.player.exoplayer2.extractor.j();
this.c = str;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a() {
this.f = 0;
this.g = 0;
this.i = false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(boolean z, long j) {
this.l = j;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void b() {
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.extractor.g gVar, v.d dVar) {
dVar.a();
dVar.b();
this.d = dVar.e;
dVar.b();
this.e = gVar.a(dVar.d, 1);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.extractor.ts.h
public final void a(com.fyber.inneractive.sdk.player.exoplayer2.util.k kVar) {
while (kVar.a() > 0) {
int i = this.f;
if (i == 0) {
byte[] bArr = kVar.a;
int i2 = kVar.b;
int i3 = kVar.c;
while (true) {
if (i2 < i3) {
byte b = bArr[i2];
boolean z = (b & 255) == 255;
boolean z2 = this.i && (b & 224) == 224;
this.i = z;
if (z2) {
kVar.e(i2 + 1);
this.i = false;
this.a.a[1] = bArr[i2];
this.g = 2;
this.f = 1;
break;
}
i2++;
} else {
kVar.e(i3);
break;
}
}
} else if (i == 1) {
int min = Math.min(kVar.a(), 4 - this.g);
kVar.a(this.a.a, this.g, min);
int i4 = this.g + min;
this.g = i4;
if (i4 >= 4) {
this.a.e(0);
if (com.fyber.inneractive.sdk.player.exoplayer2.extractor.j.a(this.a.c(), this.b)) {
com.fyber.inneractive.sdk.player.exoplayer2.extractor.j jVar = this.b;
this.k = jVar.c;
if (!this.h) {
int i5 = jVar.d;
this.j = (jVar.g * 1000000) / i5;
this.e.a(com.fyber.inneractive.sdk.player.exoplayer2.j.a(this.d, jVar.b, -1, 4096, jVar.e, i5, -1, null, null, 0, this.c));
this.h = true;
}
this.a.e(0);
this.e.a(4, this.a);
this.f = 2;
} else {
this.g = 0;
this.f = 1;
}
}
} else if (i == 2) {
int min2 = Math.min(kVar.a(), this.k - this.g);
this.e.a(min2, kVar);
int i6 = this.g + min2;
this.g = i6;
int i7 = this.k;
if (i6 >= i7) {
this.e.a(this.l, 1, i7, 0, null);
this.l += this.j;
this.g = 0;
this.f = 0;
}
}
}
}
}

Some files were not shown because too many files have changed in this diff Show More