2020-11-09 19:03:49 +00:00
|
|
|
.class public final Lcom/discord/utilities/analytics/hardware/DecoderList;
|
2020-10-19 23:59:54 +00:00
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "DecoderList.kt"
|
|
|
|
|
|
|
|
|
|
|
|
# static fields
|
|
|
|
.field public static final CODEC_LIST:Landroid/media/MediaCodecList;
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
.field public static final INSTANCE:Lcom/discord/utilities/analytics/hardware/DecoderList;
|
2020-10-19 23:59:54 +00:00
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public static constructor <clinit>()V
|
|
|
|
.locals 2
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
new-instance v0, Lcom/discord/utilities/analytics/hardware/DecoderList;
|
2020-10-19 23:59:54 +00:00
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-direct {v0}, Lcom/discord/utilities/analytics/hardware/DecoderList;-><init>()V
|
2020-10-19 23:59:54 +00:00
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
sput-object v0, Lcom/discord/utilities/analytics/hardware/DecoderList;->INSTANCE:Lcom/discord/utilities/analytics/hardware/DecoderList;
|
2020-10-19 23:59:54 +00:00
|
|
|
|
|
|
|
new-instance v0, Landroid/media/MediaCodecList;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
invoke-direct {v0, v1}, Landroid/media/MediaCodecList;-><init>(I)V
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
sput-object v0, Lcom/discord/utilities/analytics/hardware/DecoderList;->CODEC_LIST:Landroid/media/MediaCodecList;
|
2020-10-19 23:59:54 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public constructor <init>()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public final getCodecInfoForCodecName(Ljava/lang/String;)Landroid/media/MediaCodecInfo;
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
const-string v0, "codecName"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p1, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-10-19 23:59:54 +00:00
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
sget-object v0, Lcom/discord/utilities/analytics/hardware/DecoderList;->CODEC_LIST:Landroid/media/MediaCodecList;
|
2020-10-19 23:59:54 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroid/media/MediaCodecList;->getCodecInfos()[Landroid/media/MediaCodecInfo;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
const-string v1, "CODEC_LIST.codecInfos"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {v0, v1}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-10-19 23:59:54 +00:00
|
|
|
|
|
|
|
array-length v1, v0
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-ge v2, v1, :cond_1
|
|
|
|
|
|
|
|
aget-object v3, v0, v2
|
|
|
|
|
|
|
|
const-string v4, "it"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {v3, v4}, Ly/n/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-10-19 23:59:54 +00:00
|
|
|
|
|
|
|
invoke-virtual {v3}, Landroid/media/MediaCodecInfo;->getName()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {v4, p1}, Ly/n/c/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-10-19 23:59:54 +00:00
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
return-object v3
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getCodecInfoForMediaFormat(Landroid/media/MediaFormat;)Landroid/media/MediaCodecInfo;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "format"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p1, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-10-19 23:59:54 +00:00
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/utilities/analytics/hardware/DecoderList;->getCodecNameForMediaFormat(Landroid/media/MediaFormat;)Ljava/lang/String;
|
2020-10-19 23:59:54 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
sget-object v0, Lcom/discord/utilities/analytics/hardware/DecoderList;->INSTANCE:Lcom/discord/utilities/analytics/hardware/DecoderList;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/utilities/analytics/hardware/DecoderList;->getCodecInfoForCodecName(Ljava/lang/String;)Landroid/media/MediaCodecInfo;
|
2020-10-19 23:59:54 +00:00
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final getCodecNameForMediaFormat(Landroid/media/MediaFormat;)Ljava/lang/String;
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const-string v0, "format"
|
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
invoke-static {p1, v0}, Ly/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-10-19 23:59:54 +00:00
|
|
|
|
2020-11-09 19:03:49 +00:00
|
|
|
sget-object v0, Lcom/discord/utilities/analytics/hardware/DecoderList;->CODEC_LIST:Landroid/media/MediaCodecList;
|
2020-10-19 23:59:54 +00:00
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroid/media/MediaCodecList;->findDecoderForFormat(Landroid/media/MediaFormat;)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|