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

203 lines
10 KiB
Java

package com.google.android.gms.internal.ads;
import android.annotation.SuppressLint;
import android.media.MediaCodecInfo;
import android.util.Pair;
import androidx.annotation.CheckResult;
import androidx.annotation.GuardedBy;
import androidx.annotation.Nullable;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
@SuppressLint({"InlinedApi"})
/* loaded from: classes3.dex */
public final class zzta {
public static final /* synthetic */ int zza = 0;
@GuardedBy("MediaCodecUtil.class")
private static final HashMap zzb = new HashMap();
@Nullable
public static zzsg zza() throws zzsu {
List zzd = zzd(MimeTypes.AUDIO_RAW, false, false);
if (zzd.isEmpty()) {
return null;
}
return (zzsg) zzd.get(0);
}
@Nullable
public static String zzb(zzab zzabVar) {
Pair zza2;
if (MimeTypes.AUDIO_E_AC3_JOC.equals(zzabVar.zzo)) {
return MimeTypes.AUDIO_E_AC3;
}
if ("video/dolby-vision".equals(zzabVar.zzo) && (zza2 = zzcy.zza(zzabVar)) != null) {
int intValue = ((Integer) zza2.first).intValue();
if (intValue == 16 || intValue == 256) {
return "video/hevc";
}
if (intValue == 512) {
return "video/avc";
}
if (intValue == 1024) {
return com.unity3d.services.core.device.MimeTypes.VIDEO_AV1;
}
}
if ("video/mv-hevc".equals(zzabVar.zzo)) {
return "video/hevc";
}
return null;
}
public static List zzc(zzsp zzspVar, zzab zzabVar, boolean z, boolean z2) throws zzsu {
String zzb2 = zzb(zzabVar);
return zzb2 == null ? zzfxn.zzn() : zzspVar.zza(zzb2, z, z2);
}
public static synchronized List zzd(String str, boolean z, boolean z2) throws zzsu {
synchronized (zzta.class) {
try {
zzst zzstVar = new zzst(str, z, z2);
HashMap hashMap = zzb;
List list = (List) hashMap.get(zzstVar);
if (list != null) {
return list;
}
ArrayList zzg = zzg(zzstVar, new zzsx(z, z2));
if (z && zzg.isEmpty() && zzei.zza <= 23) {
zzg = zzg(zzstVar, new zzsw(null));
if (!zzg.isEmpty()) {
zzdo.zzf("MediaCodecUtil", "MediaCodecList API didn't list secure decoder for: " + str + ". Assuming: " + ((zzsg) zzg.get(0)).zza);
}
}
if (MimeTypes.AUDIO_RAW.equals(str)) {
if (zzei.zza < 26 && zzei.zzb.equals("R9") && zzg.size() == 1 && ((zzsg) zzg.get(0)).zza.equals("OMX.MTK.AUDIO.DECODER.RAW")) {
zzg.add(zzsg.zzc("OMX.google.raw.decoder", MimeTypes.AUDIO_RAW, MimeTypes.AUDIO_RAW, null, false, true, false, false, false));
}
zzh(zzg, new zzsy() { // from class: com.google.android.gms.internal.ads.zzsr
@Override // com.google.android.gms.internal.ads.zzsy
public final int zza(Object obj) {
int i = zzta.zza;
String str2 = ((zzsg) obj).zza;
if (str2.startsWith("OMX.google") || str2.startsWith("c2.android")) {
return 1;
}
return (zzei.zza >= 26 || !str2.equals("OMX.MTK.AUDIO.DECODER.RAW")) ? 0 : -1;
}
});
}
if (zzei.zza < 32 && zzg.size() > 1 && "OMX.qti.audio.decoder.flac".equals(((zzsg) zzg.get(0)).zza)) {
zzg.add((zzsg) zzg.remove(0));
}
zzfxn zzl = zzfxn.zzl(zzg);
hashMap.put(zzstVar, zzl);
return zzl;
} catch (Throwable th) {
throw th;
}
}
}
public static List zze(zzsp zzspVar, zzab zzabVar, boolean z, boolean z2) throws zzsu {
List zza2 = zzspVar.zza(zzabVar.zzo, z, z2);
List zzc = zzc(zzspVar, zzabVar, z, z2);
zzfxk zzfxkVar = new zzfxk();
zzfxkVar.zzh(zza2);
zzfxkVar.zzh(zzc);
return zzfxkVar.zzi();
}
@CheckResult
public static List zzf(List list, final zzab zzabVar) {
ArrayList arrayList = new ArrayList(list);
zzh(arrayList, new zzsy() { // from class: com.google.android.gms.internal.ads.zzss
@Override // com.google.android.gms.internal.ads.zzsy
public final int zza(Object obj) {
int i = zzta.zza;
return ((zzsg) obj).zzd(zzab.this) ? 1 : 0;
}
});
return arrayList;
}
/* JADX WARN: Can't wrap try/catch for region: R(11:64|65|(1:67)(2:128|(1:130)(1:131))|68|(1:70)(2:120|(1:127)(1:126))|(4:(2:114|115)|94|(8:97|98|99|100|101|102|103|105)|11)|74|75|76|77|11) */
/* JADX WARN: Code restructure failed: missing block: B:116:0x01d2, code lost:
if (r1.zzb == false) goto L125;
*/
/* JADX WARN: Code restructure failed: missing block: B:41:0x00a9, code lost:
if ("SCV31".equals(r10) == false) goto L42;
*/
/* JADX WARN: Code restructure failed: missing block: B:78:0x01f0, code lost:
r0 = e;
*/
/* JADX WARN: Code restructure failed: missing block: B:85:0x023f, code lost:
com.google.android.gms.internal.ads.zzdo.zzc("MediaCodecUtil", "Skipping codec " + r1 + " (failed to query capabilities)");
*/
/* JADX WARN: Code restructure failed: missing block: B:8:0x002b, code lost:
if (r9 != false) goto L9;
*/
/* JADX WARN: Removed duplicated region for block: B:114:0x01d0 A[EXC_TOP_SPLITTER, SYNTHETIC] */
/* JADX WARN: Removed duplicated region for block: B:120:0x01a3 A[Catch: Exception -> 0x0182, TryCatch #5 {Exception -> 0x0182, blocks: (B:57:0x014b, B:61:0x0162, B:65:0x0177, B:67:0x017d, B:68:0x0196, B:70:0x019e, B:72:0x01ca, B:120:0x01a3, B:122:0x01b3, B:124:0x01bb, B:128:0x018b), top: B:56:0x014b }] */
/* JADX WARN: Removed duplicated region for block: B:128:0x018b A[Catch: Exception -> 0x0182, TryCatch #5 {Exception -> 0x0182, blocks: (B:57:0x014b, B:61:0x0162, B:65:0x0177, B:67:0x017d, B:68:0x0196, B:70:0x019e, B:72:0x01ca, B:120:0x01a3, B:122:0x01b3, B:124:0x01bb, B:128:0x018b), top: B:56:0x014b }] */
/* JADX WARN: Removed duplicated region for block: B:132:0x0173 */
/* JADX WARN: Removed duplicated region for block: B:63:0x0170 */
/* JADX WARN: Removed duplicated region for block: B:67:0x017d A[Catch: Exception -> 0x0182, TryCatch #5 {Exception -> 0x0182, blocks: (B:57:0x014b, B:61:0x0162, B:65:0x0177, B:67:0x017d, B:68:0x0196, B:70:0x019e, B:72:0x01ca, B:120:0x01a3, B:122:0x01b3, B:124:0x01bb, B:128:0x018b), top: B:56:0x014b }] */
/* JADX WARN: Removed duplicated region for block: B:70:0x019e A[Catch: Exception -> 0x0182, TryCatch #5 {Exception -> 0x0182, blocks: (B:57:0x014b, B:61:0x0162, B:65:0x0177, B:67:0x017d, B:68:0x0196, B:70:0x019e, B:72:0x01ca, B:120:0x01a3, B:122:0x01b3, B:124:0x01bb, B:128:0x018b), top: B:56:0x014b }] */
/* JADX WARN: Removed duplicated region for block: B:83:0x0239 A[Catch: Exception -> 0x0034, TRY_ENTER, TryCatch #4 {Exception -> 0x0034, blocks: (B:3:0x0008, B:5:0x001d, B:7:0x0027, B:12:0x0037, B:16:0x0045, B:20:0x004f, B:22:0x0057, B:24:0x005f, B:26:0x0069, B:28:0x0073, B:30:0x007b, B:32:0x0083, B:34:0x008b, B:36:0x0093, B:38:0x009b, B:40:0x00a3, B:44:0x00af, B:46:0x00b7, B:48:0x00bf, B:50:0x00c8, B:80:0x0231, B:83:0x0239, B:85:0x023f, B:88:0x0259, B:89:0x027a, B:52:0x00d2, B:140:0x00d5, B:142:0x00dd, B:145:0x00e8, B:147:0x00f0, B:152:0x00fe, B:154:0x0106, B:157:0x0111, B:159:0x0119, B:162:0x0124, B:164:0x012c, B:167:0x0137, B:169:0x013f), top: B:2:0x0008 }] */
/* JADX WARN: Removed duplicated region for block: B:92:0x0259 A[ADDED_TO_REGION, SYNTHETIC] */
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
private static java.util.ArrayList zzg(com.google.android.gms.internal.ads.zzst r23, com.google.android.gms.internal.ads.zzsv r24) throws com.google.android.gms.internal.ads.zzsu {
/*
Method dump skipped, instructions count: 654
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.google.android.gms.internal.ads.zzta.zzg(com.google.android.gms.internal.ads.zzst, com.google.android.gms.internal.ads.zzsv):java.util.ArrayList");
}
private static void zzh(List list, final zzsy zzsyVar) {
Collections.sort(list, new Comparator() { // from class: com.google.android.gms.internal.ads.zzsq
@Override // java.util.Comparator
public final int compare(Object obj, Object obj2) {
int i = zzta.zza;
zzsy zzsyVar2 = zzsy.this;
return zzsyVar2.zza(obj2) - zzsyVar2.zza(obj);
}
});
}
private static boolean zzi(MediaCodecInfo mediaCodecInfo, String str) {
boolean isSoftwareOnly;
if (zzei.zza >= 29) {
isSoftwareOnly = mediaCodecInfo.isSoftwareOnly();
return isSoftwareOnly;
}
if (zzbb.zzg(str)) {
return true;
}
String zza2 = zzftt.zza(mediaCodecInfo.getName());
if (zza2.startsWith("arc.")) {
return false;
}
if (zza2.startsWith("omx.google.") || zza2.startsWith("omx.ffmpeg.")) {
return true;
}
if ((zza2.startsWith("omx.sec.") && zza2.contains(".sw.")) || zza2.equals("omx.qcom.video.decoder.hevcswvdec") || zza2.startsWith("c2.android.") || zza2.startsWith("c2.google.")) {
return true;
}
return (zza2.startsWith("omx.") || zza2.startsWith("c2.")) ? false : true;
}
}