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,653 @@
package com.fyber.inneractive.sdk.player.exoplayer2.video;
import android.annotation.TargetApi;
import android.graphics.Point;
import android.media.MediaCodec;
import android.media.MediaCrypto;
import android.media.MediaFormat;
import android.os.Handler;
import android.os.SystemClock;
import android.util.Log;
import android.view.Surface;
import androidx.annotation.NonNull;
import com.fyber.inneractive.sdk.player.controller.w;
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.util.h;
import com.fyber.inneractive.sdk.player.exoplayer2.util.s;
import com.fyber.inneractive.sdk.player.exoplayer2.video.VideoRendererEventListener;
import com.ironsource.v8;
import com.mbridge.msdk.playercommon.exoplayer2.C;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
@TargetApi(16)
/* loaded from: classes2.dex */
public class MediaCodecVideoRenderer extends com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b {
public static final int[] q0 = {1920, 1600, 1440, 1280, 960, 854, 640, 540, 480};
public final d P;
public final VideoRendererEventListener.EventDispatcher Q;
public final long R;
public final int S;
public final boolean T;
public j[] U;
public a V;
public Surface W;
public int X;
public boolean Y;
public long Z;
public long a0;
public int b0;
public int c0;
public int d0;
public float e0;
public int f0;
public int g0;
public int h0;
public float i0;
public int j0;
public int k0;
public int l0;
public float m0;
public boolean n0;
public int o0;
public b p0;
public static final class a {
public final int a;
public final int b;
public final int c;
public a(int i, int i2, int i3) {
this.a = i;
this.b = i2;
this.c = i3;
}
}
@TargetApi(23)
public final class b implements MediaCodec.OnFrameRenderedListener {
public b(MediaCodec mediaCodec) {
mediaCodec.setOnFrameRenderedListener(this, new Handler());
}
@Override // android.media.MediaCodec.OnFrameRenderedListener
public final void onFrameRendered(@NonNull MediaCodec mediaCodec, long j, long j2) {
MediaCodecVideoRenderer mediaCodecVideoRenderer = MediaCodecVideoRenderer.this;
if (this == mediaCodecVideoRenderer.p0 && !mediaCodecVideoRenderer.Y) {
mediaCodecVideoRenderer.Y = true;
mediaCodecVideoRenderer.Q.renderedFirstFrame(mediaCodecVideoRenderer.W);
}
}
}
public MediaCodecVideoRenderer(Handler handler, w wVar) {
super(2, false);
this.R = 5000L;
this.S = -1;
this.P = new d();
this.Q = new VideoRendererEventListener.EventDispatcher(handler, wVar);
this.T = z();
this.Z = C.TIME_UNSET;
this.f0 = -1;
this.g0 = -1;
this.i0 = -1.0f;
this.e0 = -1.0f;
this.X = 1;
y();
}
public static boolean z() {
return s.a <= 22 && "foster".equals(s.b) && "NVIDIA".equals(s.c);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.a
public final void a(j[] jVarArr) throws com.fyber.inneractive.sdk.player.exoplayer2.d {
this.U = jVarArr;
}
@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 {
boolean z;
int i;
int i2;
String str = jVar.f;
if (!h.d(str)) {
return 0;
}
com.fyber.inneractive.sdk.player.exoplayer2.drm.a aVar = jVar.i;
if (aVar != null) {
z = false;
for (int i3 = 0; i3 < aVar.c; i3++) {
z |= aVar.a[i3].e;
}
} else {
z = false;
}
com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.a a2 = cVar.a(z, str);
if (a2 == null) {
return 1;
}
boolean a3 = a2.a(jVar.c);
if (a3 && (i = jVar.j) > 0 && (i2 = jVar.k) > 0) {
if (s.a >= 21) {
a3 = a2.a(i, i2, jVar.l);
} else {
boolean z2 = i * i2 <= com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.d.a();
if (!z2) {
StringBuilder sb = new StringBuilder("FalseCheck [legacyFrameSize, ");
sb.append(jVar.j);
sb.append("x");
sb.append(jVar.k);
sb.append("] [");
sb.append(s.e);
sb.append(v8.i.e);
}
a3 = z2;
}
}
return (a3 ? 3 : 2) | (a2.b ? 8 : 4) | (a2.c ? 16 : 0);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.o
public final boolean isReady() {
if ((this.Y || super.w()) && this.n != null) {
if ((this.f ? this.g : this.d.isReady()) || this.D >= 0 || (this.B != C.TIME_UNSET && SystemClock.elapsedRealtime() < this.B)) {
this.Z = C.TIME_UNSET;
return true;
}
}
if (this.Z == C.TIME_UNSET) {
return false;
}
if (SystemClock.elapsedRealtime() < this.Z) {
return true;
}
this.Z = C.TIME_UNSET;
return false;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final void s() {
if (s.a >= 23 || !this.n0 || this.Y) {
return;
}
this.Y = true;
this.Q.renderedFirstFrame(this.W);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final boolean w() {
Surface surface;
return super.w() && (surface = this.W) != null && surface.isValid();
}
public final void y() {
this.j0 = -1;
this.k0 = -1;
this.m0 = -1.0f;
this.l0 = -1;
}
@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);
x();
this.c0 = 0;
long j2 = C.TIME_UNSET;
if (!z) {
this.Z = C.TIME_UNSET;
return;
}
if (this.R > 0) {
j2 = SystemClock.elapsedRealtime() + this.R;
}
this.Z = j2;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.a
public final void o() {
this.b0 = 0;
this.a0 = SystemClock.elapsedRealtime();
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.a
public final void p() {
this.Z = C.TIME_UNSET;
if (this.b0 > 0) {
long elapsedRealtime = SystemClock.elapsedRealtime();
this.Q.droppedFrames(this.b0, elapsedRealtime - this.a0);
this.b0 = 0;
this.a0 = elapsedRealtime;
}
}
public final void A() {
int i = this.f0;
if (i == -1 && this.g0 == -1) {
return;
}
if (this.j0 == i && this.k0 == this.g0 && this.l0 == this.h0 && this.m0 == this.i0) {
return;
}
this.Q.videoSizeChanged(i, this.g0, this.h0, this.i0);
this.j0 = this.f0;
this.k0 = this.g0;
this.l0 = this.h0;
this.m0 = this.i0;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.a
public final void n() {
this.f0 = -1;
this.g0 = -1;
this.i0 = -1.0f;
this.e0 = -1.0f;
y();
x();
d dVar = this.P;
dVar.getClass();
dVar.a.b.sendEmptyMessage(2);
this.p0 = null;
try {
this.n = null;
u();
} finally {
this.N.ensureUpdated();
this.Q.disabled(this.N);
}
}
public final void x() {
MediaCodec mediaCodec;
this.Y = false;
if (s.a < 23 || !this.n0 || (mediaCodec = this.o) == null) {
return;
}
this.p0 = new b(mediaCodec);
}
@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 != 1) {
if (i == 4) {
int intValue = ((Integer) obj).intValue();
this.X = intValue;
MediaCodec mediaCodec = this.o;
if (mediaCodec != null) {
mediaCodec.setVideoScalingMode(intValue);
return;
}
return;
}
return;
}
Surface surface = (Surface) obj;
if (this.W == surface) {
if (surface != null) {
int i2 = this.j0;
if (i2 != -1 || this.k0 != -1) {
this.Q.videoSizeChanged(i2, this.k0, this.l0, this.m0);
}
if (this.Y) {
this.Q.renderedFirstFrame(this.W);
return;
}
return;
}
return;
}
this.W = surface;
int i3 = this.c;
if (i3 == 1 || i3 == 2) {
MediaCodec mediaCodec2 = this.o;
if (s.a >= 23 && mediaCodec2 != null && surface != null) {
mediaCodec2.setOutputSurface(surface);
} else {
u();
r();
}
}
if (surface != null) {
int i4 = this.j0;
if (i4 != -1 || this.k0 != -1) {
this.Q.videoSizeChanged(i4, this.k0, this.l0, this.m0);
}
x();
if (i3 == 2) {
this.Z = this.R > 0 ? SystemClock.elapsedRealtime() + this.R : C.TIME_UNSET;
return;
}
return;
}
y();
x();
}
@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) throws d.b {
a aVar2;
String str;
Point point;
int i;
j[] jVarArr = this.U;
int i2 = jVar.j;
int i3 = jVar.k;
int i4 = jVar.g;
if (i4 == -1) {
i4 = a(i2, i3, jVar.f);
}
if (jVarArr.length == 1) {
aVar2 = new a(i2, i3, i4);
} else {
boolean z = false;
for (j jVar2 : jVarArr) {
boolean z2 = aVar.b;
if (jVar.f.equals(jVar2.f)) {
int i5 = jVar.m;
if (i5 == -1) {
i5 = 0;
}
int i6 = jVar2.m;
if (i6 == -1) {
i6 = 0;
}
if (i5 == i6 && (z2 || (jVar.j == jVar2.j && jVar.k == jVar2.k))) {
int i7 = jVar2.j;
z |= i7 == -1 || jVar2.k == -1;
i2 = Math.max(i2, i7);
i3 = Math.max(i3, jVar2.k);
int i8 = jVar2.g;
if (i8 == -1) {
i8 = a(jVar2.j, jVar2.k, jVar2.f);
}
i4 = Math.max(i4, i8);
}
}
}
if (z) {
StringBuilder sb = new StringBuilder("Resolutions unknown. Codec max resolution: ");
sb.append(i2);
String str2 = "x";
sb.append("x");
sb.append(i3);
Log.w("MediaCodecVideoRenderer", sb.toString());
int i9 = jVar.k;
int i10 = jVar.j;
boolean z3 = i9 > i10;
int i11 = z3 ? i9 : i10;
if (z3) {
i9 = i10;
}
float f = i9 / i11;
int[] iArr = q0;
int i12 = 0;
while (i12 < 9) {
int i13 = iArr[i12];
int[] iArr2 = iArr;
int i14 = (int) (i13 * f);
if (i13 <= i11 || i14 <= i9) {
break;
}
int i15 = i9;
float f2 = f;
if (s.a >= 21) {
int i16 = z3 ? i14 : i13;
if (!z3) {
i13 = i14;
}
point = aVar.a(i16, i13);
str = str2;
if (aVar.a(point.x, point.y, jVar.l)) {
break;
}
i12++;
iArr = iArr2;
i9 = i15;
f = f2;
str2 = str;
} else {
str = str2;
int a2 = s.a(i13, 16) * 16;
int a3 = s.a(i14, 16) * 16;
if (a2 * a3 <= com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.d.a()) {
int i17 = z3 ? a3 : a2;
if (!z3) {
a2 = a3;
}
point = new Point(i17, a2);
} else {
i12++;
iArr = iArr2;
i9 = i15;
f = f2;
str2 = str;
}
}
}
str = str2;
point = null;
if (point != null) {
i2 = Math.max(i2, point.x);
i3 = Math.max(i3, point.y);
i4 = Math.max(i4, a(i2, i3, jVar.f));
Log.w("MediaCodecVideoRenderer", "Codec max resolution adjusted to: " + i2 + str + i3);
}
}
aVar2 = new a(i2, i3, i4);
}
this.V = aVar2;
boolean z4 = this.T;
int i18 = this.o0;
MediaFormat a4 = jVar.a();
a4.setInteger("max-width", aVar2.a);
a4.setInteger("max-height", aVar2.b);
int i19 = aVar2.c;
if (i19 != -1) {
a4.setInteger("max-input-size", i19);
}
if (z4) {
i = 0;
a4.setInteger("auto-frc", 0);
} else {
i = 0;
}
if (i18 != 0) {
a4.setFeatureEnabled("tunneled-playback", true);
a4.setInteger("audio-session-id", i18);
}
mediaCodec.configure(a4, this.W, (MediaCrypto) null, i);
if (s.a < 23 || !this.n0) {
return;
}
this.p0 = new b(mediaCodec);
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final void a(String str, long j, long j2) {
this.Q.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.Q.inputFormatChanged(jVar);
float f = jVar.n;
if (f == -1.0f) {
f = 1.0f;
}
this.e0 = f;
int i = jVar.m;
if (i == -1) {
i = 0;
}
this.d0 = i;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final void a(MediaCodec mediaCodec, MediaFormat mediaFormat) {
int integer;
int integer2;
boolean z = mediaFormat.containsKey("crop-right") && mediaFormat.containsKey("crop-left") && mediaFormat.containsKey("crop-bottom") && mediaFormat.containsKey("crop-top");
if (z) {
integer = (mediaFormat.getInteger("crop-right") - mediaFormat.getInteger("crop-left")) + 1;
} else {
integer = mediaFormat.getInteger("width");
}
this.f0 = integer;
if (z) {
integer2 = (mediaFormat.getInteger("crop-bottom") - mediaFormat.getInteger("crop-top")) + 1;
} else {
integer2 = mediaFormat.getInteger("height");
}
this.g0 = integer2;
float f = this.e0;
this.i0 = f;
if (s.a >= 21) {
int i = this.d0;
if (i == 90 || i == 270) {
int i2 = this.f0;
this.f0 = integer2;
this.g0 = i2;
this.i0 = 1.0f / f;
}
} else {
this.h0 = this.d0;
}
mediaCodec.setVideoScalingMode(this.X);
}
@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;
int i = this.b.a;
this.o0 = i;
this.n0 = i != 0;
this.Q.enabled(decoderCounters);
d dVar = this.P;
dVar.g = false;
dVar.a.b.sendEmptyMessage(1);
}
/* JADX WARN: Removed duplicated region for block: B:33:0x00f6 */
/* JADX WARN: Removed duplicated region for block: B:40:0x011d */
/* JADX WARN: Removed duplicated region for block: B:43:0x012b */
/* JADX WARN: Removed duplicated region for block: B:45:0x0120 */
/* JADX WARN: Removed duplicated region for block: B:48:0x013d */
/* JADX WARN: Removed duplicated region for block: B:55:0x0185 */
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public final boolean a(long r22, long r24, android.media.MediaCodec r26, java.nio.ByteBuffer r27, int r28, long r29, boolean r31) {
/*
Method dump skipped, instructions count: 512
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.fyber.inneractive.sdk.player.exoplayer2.video.MediaCodecVideoRenderer.a(long, long, android.media.MediaCodec, java.nio.ByteBuffer, int, long, boolean):boolean");
}
/* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
public static int a(int i, int i2, String str) {
char c;
int i3;
if (i == -1 || i2 == -1) {
return -1;
}
str.getClass();
int i4 = 4;
switch (str.hashCode()) {
case -1664118616:
if (str.equals(MimeTypes.VIDEO_H263)) {
c = 0;
break;
}
c = 65535;
break;
case -1662541442:
if (str.equals("video/hevc")) {
c = 1;
break;
}
c = 65535;
break;
case 1187890754:
if (str.equals(MimeTypes.VIDEO_MP4V)) {
c = 2;
break;
}
c = 65535;
break;
case 1331836730:
if (str.equals("video/avc")) {
c = 3;
break;
}
c = 65535;
break;
case 1599127256:
if (str.equals(MimeTypes.VIDEO_VP8)) {
c = 4;
break;
}
c = 65535;
break;
case 1599127257:
if (str.equals(MimeTypes.VIDEO_VP9)) {
c = 5;
break;
}
c = 65535;
break;
default:
c = 65535;
break;
}
switch (c) {
case 0:
case 2:
case 4:
i3 = i2 * i;
i4 = 2;
break;
case 1:
case 5:
i3 = i2 * i;
break;
case 3:
if (!"BRAVIA 4K 2015".equals(s.d)) {
i3 = s.a(i2, 16) * s.a(i, 16) * 256;
i4 = 2;
break;
}
break;
}
return -1;
}
@Override // com.fyber.inneractive.sdk.player.exoplayer2.mediacodec.b
public final boolean a(boolean z, j jVar, j jVar2) {
if (!jVar.f.equals(jVar2.f)) {
return false;
}
int i = jVar.m;
if (i == -1) {
i = 0;
}
int i2 = jVar2.m;
if (i2 == -1) {
i2 = 0;
}
if (i != i2) {
return false;
}
if (!z && (jVar.j != jVar2.j || jVar.k != jVar2.k)) {
return false;
}
int i3 = jVar2.j;
a aVar = this.V;
return i3 <= aVar.a && jVar2.k <= aVar.b && jVar2.g <= aVar.c;
}
}

View File

@@ -0,0 +1,180 @@
package com.fyber.inneractive.sdk.player.exoplayer2.video;
import android.os.Handler;
import android.view.Surface;
import com.fyber.inneractive.sdk.player.exoplayer2.decoder.DecoderCounters;
import com.fyber.inneractive.sdk.player.exoplayer2.j;
/* loaded from: classes2.dex */
public interface VideoRendererEventListener {
public static final class EventDispatcher {
private final Handler handler;
private final VideoRendererEventListener 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.onVideoEnabled(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.onVideoDecoderInitialized(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.onVideoInputFormatChanged(this.a);
}
}
public class d implements Runnable {
public final /* synthetic */ int a;
public final /* synthetic */ long b;
public d(int i, long j) {
this.a = i;
this.b = j;
}
@Override // java.lang.Runnable
public final void run() {
EventDispatcher.this.listener.onDroppedFrames(this.a, this.b);
}
}
public class e implements Runnable {
public final /* synthetic */ int a;
public final /* synthetic */ int b;
public final /* synthetic */ int c;
public final /* synthetic */ float d;
public e(int i, int i2, int i3, float f) {
this.a = i;
this.b = i2;
this.c = i3;
this.d = f;
}
@Override // java.lang.Runnable
public final void run() {
EventDispatcher.this.listener.onVideoSizeChanged(this.a, this.b, this.c, this.d);
}
}
public class f implements Runnable {
public final /* synthetic */ Surface a;
public f(Surface surface) {
this.a = surface;
}
@Override // java.lang.Runnable
public final void run() {
EventDispatcher.this.listener.onRenderedFirstFrame(this.a);
}
}
public class g implements Runnable {
public final /* synthetic */ DecoderCounters a;
public g(DecoderCounters decoderCounters) {
this.a = decoderCounters;
}
@Override // java.lang.Runnable
public final void run() {
this.a.ensureUpdated();
EventDispatcher.this.listener.onVideoDisabled(this.a);
}
}
public EventDispatcher(Handler handler, VideoRendererEventListener videoRendererEventListener) {
this.handler = videoRendererEventListener != null ? (Handler) com.fyber.inneractive.sdk.player.exoplayer2.util.a.a(handler) : null;
this.listener = videoRendererEventListener;
}
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 g(decoderCounters));
}
}
public void droppedFrames(int i, long j) {
if (this.listener != null) {
this.handler.post(new d(i, j));
}
}
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));
}
}
public void renderedFirstFrame(Surface surface) {
if (this.listener != null) {
this.handler.post(new f(surface));
}
}
public void videoSizeChanged(int i, int i2, int i3, float f2) {
if (this.listener != null) {
this.handler.post(new e(i, i2, i3, f2));
}
}
}
void onDroppedFrames(int i, long j);
void onRenderedFirstFrame(Surface surface);
void onVideoDecoderInitialized(String str, long j, long j2);
void onVideoDisabled(DecoderCounters decoderCounters);
void onVideoEnabled(DecoderCounters decoderCounters);
void onVideoInputFormatChanged(j jVar);
void onVideoSizeChanged(int i, int i2, int i3, float f);
}

View File

@@ -0,0 +1,75 @@
package com.fyber.inneractive.sdk.player.exoplayer2.video;
import com.fyber.inneractive.sdk.player.exoplayer2.m;
import com.fyber.inneractive.sdk.player.exoplayer2.util.i;
import com.fyber.inneractive.sdk.player.exoplayer2.util.k;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes2.dex */
public final class a {
public final List<byte[]> a;
public final int b;
public final int c;
public final int d;
public final float e;
public a(ArrayList arrayList, int i, int i2, int i3, float f) {
this.a = arrayList;
this.b = i;
this.c = i2;
this.d = i3;
this.e = f;
}
public static a a(k kVar) throws m {
int i;
int i2;
float f;
try {
kVar.f(4);
int j = (kVar.j() & 3) + 1;
if (j == 3) {
throw new IllegalStateException();
}
ArrayList arrayList = new ArrayList();
int j2 = kVar.j() & 31;
for (int i3 = 0; i3 < j2; i3++) {
int o = kVar.o();
int i4 = kVar.b;
kVar.f(o);
byte[] bArr = kVar.a;
byte[] bArr2 = new byte[o + 4];
System.arraycopy(com.fyber.inneractive.sdk.player.exoplayer2.util.c.a, 0, bArr2, 0, 4);
System.arraycopy(bArr, i4, bArr2, 4, o);
arrayList.add(bArr2);
}
int j3 = kVar.j();
for (int i5 = 0; i5 < j3; i5++) {
int o2 = kVar.o();
int i6 = kVar.b;
kVar.f(o2);
byte[] bArr3 = kVar.a;
byte[] bArr4 = new byte[o2 + 4];
System.arraycopy(com.fyber.inneractive.sdk.player.exoplayer2.util.c.a, 0, bArr4, 0, 4);
System.arraycopy(bArr3, i6, bArr4, 4, o2);
arrayList.add(bArr4);
}
if (j2 > 0) {
i.b a = i.a((byte[]) arrayList.get(0), j, ((byte[]) arrayList.get(0)).length);
int i7 = a.b;
int i8 = a.c;
f = a.d;
i = i7;
i2 = i8;
} else {
i = -1;
i2 = -1;
f = 1.0f;
}
return new a(arrayList, j, i, i2, f);
} catch (ArrayIndexOutOfBoundsException e) {
throw new m("Error parsing AVC config", e);
}
}
}

View File

@@ -0,0 +1,92 @@
package com.fyber.inneractive.sdk.player.exoplayer2.video;
import android.os.Parcel;
import android.os.Parcelable;
import com.ironsource.mediationsdk.logger.IronSourceError;
import java.util.Arrays;
/* loaded from: classes2.dex */
public final class b implements Parcelable {
public static final Parcelable.Creator<b> CREATOR = new a();
public final int a;
public final int b;
public final int c;
public final byte[] d;
public int e;
public class a 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[0];
}
}
public b(int i, int i2, int i3, byte[] bArr) {
this.a = i;
this.b = i2;
this.c = i3;
this.d = bArr;
}
@Override // android.os.Parcelable
public final int describeContents() {
return 0;
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj != null && b.class == obj.getClass()) {
b bVar = (b) obj;
if (this.a == bVar.a && this.b == bVar.b && this.c == bVar.c && Arrays.equals(this.d, bVar.d)) {
return true;
}
}
return false;
}
public final String toString() {
StringBuilder sb = new StringBuilder("ColorInfo(");
sb.append(this.a);
sb.append(", ");
sb.append(this.b);
sb.append(", ");
sb.append(this.c);
sb.append(", ");
sb.append(this.d != null);
sb.append(")");
return sb.toString();
}
@Override // android.os.Parcelable
public final void writeToParcel(Parcel parcel, int i) {
parcel.writeInt(this.a);
parcel.writeInt(this.b);
parcel.writeInt(this.c);
parcel.writeInt(this.d != null ? 1 : 0);
byte[] bArr = this.d;
if (bArr != null) {
parcel.writeByteArray(bArr);
}
}
public b(Parcel parcel) {
this.a = parcel.readInt();
this.b = parcel.readInt();
this.c = parcel.readInt();
this.d = parcel.readInt() != 0 ? parcel.createByteArray() : null;
}
public final int hashCode() {
if (this.e == 0) {
this.e = Arrays.hashCode(this.d) + ((((((this.a + IronSourceError.ERROR_NON_EXISTENT_INSTANCE) * 31) + this.b) * 31) + this.c) * 31);
}
return this.e;
}
}

View File

@@ -0,0 +1,55 @@
package com.fyber.inneractive.sdk.player.exoplayer2.video;
import com.fyber.inneractive.sdk.player.exoplayer2.m;
import com.fyber.inneractive.sdk.player.exoplayer2.util.i;
import com.fyber.inneractive.sdk.player.exoplayer2.util.k;
import java.util.Collections;
import java.util.List;
/* loaded from: classes2.dex */
public final class c {
public final List<byte[]> a;
public final int b;
public c(int i, List list) {
this.a = list;
this.b = i;
}
public static c a(k kVar) throws m {
try {
kVar.f(21);
int j = kVar.j() & 3;
int j2 = kVar.j();
int i = kVar.b;
int i2 = 0;
for (int i3 = 0; i3 < j2; i3++) {
kVar.f(1);
int o = kVar.o();
for (int i4 = 0; i4 < o; i4++) {
int o2 = kVar.o();
i2 += o2 + 4;
kVar.f(o2);
}
}
kVar.e(i);
byte[] bArr = new byte[i2];
int i5 = 0;
for (int i6 = 0; i6 < j2; i6++) {
kVar.f(1);
int o3 = kVar.o();
for (int i7 = 0; i7 < o3; i7++) {
int o4 = kVar.o();
System.arraycopy(i.a, 0, bArr, i5, 4);
int i8 = i5 + 4;
System.arraycopy(kVar.a, kVar.b, bArr, i8, o4);
i5 = i8 + o4;
kVar.f(o4);
}
}
return new c(j + 1, i2 == 0 ? null : Collections.singletonList(bArr));
} catch (ArrayIndexOutOfBoundsException e) {
throw new m("Error parsing HEVC config", e);
}
}
}

View File

@@ -0,0 +1,92 @@
package com.fyber.inneractive.sdk.player.exoplayer2.video;
import android.annotation.TargetApi;
import android.os.Handler;
import android.os.HandlerThread;
import android.os.Message;
import android.view.Choreographer;
import android.view.WindowManager;
import com.fyber.inneractive.sdk.config.IAConfigManager;
@TargetApi(16)
/* loaded from: classes2.dex */
public final class d {
public final a a;
public final long b;
public final long c;
public long d;
public long e;
public long f;
public boolean g;
public long h;
public long i;
public long j;
public static final class a implements Choreographer.FrameCallback, Handler.Callback {
public static final a e = new a();
public volatile long a;
public final Handler b;
public Choreographer c;
public int d;
public a() {
HandlerThread handlerThread = new HandlerThread("ChoreographerOwner:Handler");
handlerThread.start();
Handler handler = new Handler(handlerThread.getLooper(), this);
this.b = handler;
handler.sendEmptyMessage(0);
}
public static a a() {
return e;
}
@Override // android.os.Handler.Callback
public final boolean handleMessage(Message message) {
int i = message.what;
if (i == 0) {
this.c = Choreographer.getInstance();
return true;
}
if (i == 1) {
int i2 = this.d + 1;
this.d = i2;
if (i2 == 1) {
this.c.postFrameCallback(this);
}
return true;
}
if (i != 2) {
return false;
}
int i3 = this.d - 1;
this.d = i3;
if (i3 == 0) {
this.c.removeFrameCallback(this);
this.a = 0L;
}
return true;
}
@Override // android.view.Choreographer.FrameCallback
public final void doFrame(long j) {
this.a = j;
this.c.postFrameCallbackDelayed(this, 500L);
}
}
public d() {
this(a());
}
public static float a() {
return ((WindowManager) IAConfigManager.L.u.a().getSystemService("window")).getDefaultDisplay().getRefreshRate();
}
public d(double d) {
this.a = a.a();
long j = (long) (1.0E9d / d);
this.b = j;
this.c = (j * 80) / 100;
}
}