Files
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- Added realracing3-community.apk (71.57 MB)
- Removed 32-bit support (armeabi-v7a)
- Only includes arm64-v8a libraries
- Decompiled source code included
- Added README-community.md with analysis
2026-02-18 15:48:36 -08:00

276 lines
9.1 KiB
Java

package com.applovin.impl;
import android.text.TextUtils;
import com.applovin.exoplayer2.common.base.Ascii;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import com.vungle.ads.internal.signals.SignalKey;
import java.util.ArrayList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/* renamed from: com.applovin.impl.if, reason: invalid class name */
/* loaded from: classes.dex */
public abstract class Cif {
private static final ArrayList a = new ArrayList();
private static final Pattern b = Pattern.compile("^mp4a\\.([a-zA-Z0-9]{2})(?:\\.([0-9]{1,2}))?$");
public static String a(int i) {
if (i == 32) {
return MimeTypes.VIDEO_MP4V;
}
if (i == 33) {
return "video/avc";
}
if (i == 35) {
return "video/hevc";
}
if (i == 64) {
return MimeTypes.AUDIO_AAC;
}
if (i == 163) {
return MimeTypes.VIDEO_VC1;
}
if (i == 177) {
return MimeTypes.VIDEO_VP9;
}
if (i == 165) {
return MimeTypes.AUDIO_AC3;
}
if (i == 166) {
return MimeTypes.AUDIO_E_AC3;
}
switch (i) {
case 96:
case 97:
case 98:
case 99:
case 100:
case 101:
return MimeTypes.VIDEO_MPEG2;
case 102:
case 103:
case 104:
return MimeTypes.AUDIO_AAC;
case 105:
case SignalKey.EVENT_ID /* 107 */:
return MimeTypes.AUDIO_MPEG;
case 106:
return MimeTypes.VIDEO_MPEG;
default:
switch (i) {
case 169:
case 172:
return MimeTypes.AUDIO_DTS;
case 170:
case 171:
return MimeTypes.AUDIO_DTS_HD;
case 173:
return MimeTypes.AUDIO_OPUS;
case 174:
return "audio/ac4";
default:
return null;
}
}
}
public static a c(String str) {
Matcher matcher = b.matcher(str);
if (!matcher.matches()) {
return null;
}
String str2 = (String) b1.a((Object) matcher.group(1));
String group = matcher.group(2);
try {
return new a(Integer.parseInt(str2, 16), group != null ? Integer.parseInt(group) : 0);
} catch (NumberFormatException unused) {
return null;
}
}
private static int f(String str) {
ArrayList arrayList = a;
if (arrayList.size() <= 0) {
return -1;
}
d8.a(arrayList.get(0));
throw null;
}
public static boolean g(String str) {
return "audio".equals(d(str));
}
public static boolean i(String str) {
return "video".equals(d(str));
}
public static boolean h(String str) {
return "text".equals(d(str)) || MimeTypes.APPLICATION_CEA608.equals(str) || MimeTypes.APPLICATION_CEA708.equals(str) || MimeTypes.APPLICATION_MP4CEA608.equals(str) || MimeTypes.APPLICATION_SUBRIP.equals(str) || MimeTypes.APPLICATION_TTML.equals(str) || MimeTypes.APPLICATION_TX3G.equals(str) || MimeTypes.APPLICATION_MP4VTT.equals(str) || MimeTypes.APPLICATION_RAWCC.equals(str) || MimeTypes.APPLICATION_VOBSUB.equals(str) || MimeTypes.APPLICATION_PGS.equals(str) || MimeTypes.APPLICATION_DVBSUBS.equals(str);
}
public static boolean a(String str, String str2) {
a c;
int a2;
if (str == null) {
return false;
}
switch (str) {
case "audio/mp4a-latm":
if (str2 != null && (c = c(str2)) != null && (a2 = c.a()) != 0 && a2 != 16) {
break;
}
break;
}
return false;
}
public static int e(String str) {
if (TextUtils.isEmpty(str)) {
return -1;
}
if (g(str)) {
return 1;
}
if (i(str)) {
return 2;
}
if (h(str)) {
return 3;
}
if (MimeTypes.APPLICATION_ID3.equals(str) || MimeTypes.APPLICATION_EMSG.equals(str) || MimeTypes.APPLICATION_SCTE35.equals(str)) {
return 5;
}
if (MimeTypes.APPLICATION_CAMERA_MOTION.equals(str)) {
return 6;
}
return f(str);
}
public static int b(String str, String str2) {
a c;
str.hashCode();
switch (str) {
case "audio/eac3-joc":
return 18;
case "audio/vnd.dts":
return 7;
case "audio/mp4a-latm":
if (str2 == null || (c = c(str2)) == null) {
return 0;
}
return c.a();
case "audio/ac3":
return 5;
case "audio/ac4":
return 17;
case "audio/eac3":
return 6;
case "audio/mpeg":
return 9;
case "audio/vnd.dts.hd":
return 8;
case "audio/true-hd":
return 14;
default:
return 0;
}
}
public static String j(String str) {
str.hashCode();
switch (str) {
case "audio/x-flac":
return MimeTypes.AUDIO_FLAC;
case "audio/x-wav":
return "audio/wav";
case "audio/mp3":
return MimeTypes.AUDIO_MPEG;
default:
return str;
}
}
private static String d(String str) {
int indexOf;
if (str == null || (indexOf = str.indexOf(47)) == -1) {
return null;
}
return str.substring(0, indexOf);
}
/* renamed from: com.applovin.impl.if$a */
public static final class a {
public final int a;
public final int b;
public int a() {
int i = this.b;
if (i == 2) {
return 10;
}
if (i == 5) {
return 11;
}
if (i == 29) {
return 12;
}
if (i == 42) {
return 16;
}
if (i != 22) {
return i != 23 ? 0 : 15;
}
return 1073741824;
}
public a(int i, int i2) {
this.a = i;
this.b = i2;
}
}
private static String a(String str) {
ArrayList arrayList = a;
if (arrayList.size() <= 0) {
return null;
}
d8.a(arrayList.get(0));
throw null;
}
public static String b(String str) {
a c;
String str2 = null;
if (str == null) {
return null;
}
String lowerCase = Ascii.toLowerCase(str.trim());
if (lowerCase.startsWith("avc1") || lowerCase.startsWith("avc3")) {
return "video/avc";
}
if (lowerCase.startsWith("hev1") || lowerCase.startsWith("hvc1")) {
return "video/hevc";
}
if (lowerCase.startsWith("dvav") || lowerCase.startsWith("dva1") || lowerCase.startsWith("dvhe") || lowerCase.startsWith("dvh1")) {
return "video/dolby-vision";
}
if (lowerCase.startsWith("av01")) {
return com.unity3d.services.core.device.MimeTypes.VIDEO_AV1;
}
if (lowerCase.startsWith("vp9") || lowerCase.startsWith("vp09")) {
return MimeTypes.VIDEO_VP9;
}
if (lowerCase.startsWith("vp8") || lowerCase.startsWith("vp08")) {
return MimeTypes.VIDEO_VP8;
}
if (!lowerCase.startsWith("mp4a")) {
return lowerCase.startsWith("mha1") ? "audio/mha1" : lowerCase.startsWith("mhm1") ? "audio/mhm1" : (lowerCase.startsWith("ac-3") || lowerCase.startsWith("dac3")) ? MimeTypes.AUDIO_AC3 : (lowerCase.startsWith("ec-3") || lowerCase.startsWith("dec3")) ? MimeTypes.AUDIO_E_AC3 : lowerCase.startsWith("ec+3") ? MimeTypes.AUDIO_E_AC3_JOC : (lowerCase.startsWith("ac-4") || lowerCase.startsWith("dac4")) ? "audio/ac4" : lowerCase.startsWith("dtsc") ? MimeTypes.AUDIO_DTS : lowerCase.startsWith("dtse") ? MimeTypes.AUDIO_DTS_EXPRESS : (lowerCase.startsWith("dtsh") || lowerCase.startsWith("dtsl")) ? MimeTypes.AUDIO_DTS_HD : lowerCase.startsWith("dtsx") ? "audio/vnd.dts.uhd;profile=p2" : lowerCase.startsWith("opus") ? MimeTypes.AUDIO_OPUS : lowerCase.startsWith("vorbis") ? MimeTypes.AUDIO_VORBIS : lowerCase.startsWith("flac") ? MimeTypes.AUDIO_FLAC : lowerCase.startsWith("stpp") ? MimeTypes.APPLICATION_TTML : lowerCase.startsWith("wvtt") ? MimeTypes.TEXT_VTT : lowerCase.contains("cea708") ? MimeTypes.APPLICATION_CEA708 : (lowerCase.contains("eia608") || lowerCase.contains("cea608")) ? MimeTypes.APPLICATION_CEA608 : a(lowerCase);
}
if (lowerCase.startsWith("mp4a.") && (c = c(lowerCase)) != null) {
str2 = a(c.a);
}
return str2 == null ? MimeTypes.AUDIO_AAC : str2;
}
}