1034 lines
26 KiB
Smali
1034 lines
26 KiB
Smali
|
.class public final Ln;
|
||
|
.super Ljava/lang/Object;
|
||
|
.source "MediaEngineLegacy.kt"
|
||
|
|
||
|
# interfaces
|
||
|
.implements Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
||
|
|
||
|
|
||
|
# static fields
|
||
|
.field public static final i:Ljava/lang/String;
|
||
|
|
||
|
|
||
|
# instance fields
|
||
|
.field public final a:Ljava/util/ArrayList;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Ljava/util/ArrayList<",
|
||
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
.field public b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
.field public final c:Ljava/util/ArrayList;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Ljava/util/ArrayList<",
|
||
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$b;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
.field public d:Ljava/util/List;
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"Ljava/util/List<",
|
||
|
"Lf/a/h/r/a;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
.end field
|
||
|
|
||
|
.field public final e:Landroid/content/Context;
|
||
|
|
||
|
.field public final f:Ljava/util/concurrent/ExecutorService;
|
||
|
|
||
|
.field public final g:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
|
||
|
|
||
|
.field public final h:Lcom/discord/utilities/logging/Logger;
|
||
|
|
||
|
|
||
|
# direct methods
|
||
|
.method public static constructor <clinit>()V
|
||
|
.locals 2
|
||
|
|
||
|
const-class v0, Ln;
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v1, "MediaEngineLegacy::class.java.simpleName"
|
||
|
|
||
|
invoke-static {v0, v1}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
sput-object v0, Ln;->i:Ljava/lang/String;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public constructor <init>(Landroid/content/Context;Ljava/util/concurrent/ExecutorService;Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;Lcom/discord/utilities/logging/Logger;)V
|
||
|
.locals 0
|
||
|
|
||
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
||
|
|
||
|
iput-object p1, p0, Ln;->e:Landroid/content/Context;
|
||
|
|
||
|
iput-object p2, p0, Ln;->f:Ljava/util/concurrent/ExecutorService;
|
||
|
|
||
|
iput-object p3, p0, Ln;->g:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
|
||
|
|
||
|
iput-object p4, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
|
||
|
|
||
|
new-instance p1, Ljava/util/ArrayList;
|
||
|
|
||
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
||
|
|
||
|
iput-object p1, p0, Ln;->a:Ljava/util/ArrayList;
|
||
|
|
||
|
new-instance p1, Ljava/util/ArrayList;
|
||
|
|
||
|
invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V
|
||
|
|
||
|
iput-object p1, p0, Ln;->c:Ljava/util/ArrayList;
|
||
|
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public static final n(Ln;[Ljava/lang/String;)Ljava/util/List;
|
||
|
.locals 10
|
||
|
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
if-eqz p0, :cond_4
|
||
|
|
||
|
new-instance p0, Ljava/util/ArrayList;
|
||
|
|
||
|
array-length v1, p1
|
||
|
|
||
|
invoke-direct {p0, v1}, Ljava/util/ArrayList;-><init>(I)V
|
||
|
|
||
|
array-length v1, p1
|
||
|
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
const/4 v3, 0x0
|
||
|
|
||
|
:goto_0
|
||
|
if-ge v3, v1, :cond_1
|
||
|
|
||
|
aget-object v4, p1, v3
|
||
|
|
||
|
sget-object v5, Ljava/util/Locale;->ROOT:Ljava/util/Locale;
|
||
|
|
||
|
const-string v6, "Locale.ROOT"
|
||
|
|
||
|
invoke-static {v5, v6}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
if-eqz v4, :cond_0
|
||
|
|
||
|
invoke-virtual {v4, v5}, Ljava/lang/String;->toUpperCase(Ljava/util/Locale;)Ljava/lang/String;
|
||
|
|
||
|
move-result-object v4
|
||
|
|
||
|
const-string v5, "(this as java.lang.String).toUpperCase(locale)"
|
||
|
|
||
|
invoke-static {v4, v5}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
invoke-virtual {p0, v4}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
||
|
|
||
|
add-int/lit8 v3, v3, 0x1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
new-instance p0, Lkotlin/TypeCastException;
|
||
|
|
||
|
const-string p1, "null cannot be cast to non-null type java.lang.String"
|
||
|
|
||
|
invoke-direct {p0, p1}, Lkotlin/TypeCastException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
throw p0
|
||
|
|
||
|
:cond_1
|
||
|
new-instance p1, Lo;
|
||
|
|
||
|
invoke-direct {p1}, Lo;-><init>()V
|
||
|
|
||
|
invoke-static {p0, p1}, Lj0/j/l;->sortedWith(Ljava/lang/Iterable;Ljava/util/Comparator;)Ljava/util/List;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
new-instance p1, Ljava/util/ArrayList;
|
||
|
|
||
|
const/16 v1, 0xa
|
||
|
|
||
|
invoke-static {p0, v1}, Lj0/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
invoke-direct {p1, v1}, Ljava/util/ArrayList;-><init>(I)V
|
||
|
|
||
|
invoke-interface {p0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
:goto_1
|
||
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-eqz v1, :cond_3
|
||
|
|
||
|
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
add-int/lit8 v9, v2, 0x1
|
||
|
|
||
|
if-ltz v2, :cond_2
|
||
|
|
||
|
move-object v4, v1
|
||
|
|
||
|
check-cast v4, Ljava/lang/String;
|
||
|
|
||
|
mul-int/lit8 v2, v2, 0x2
|
||
|
|
||
|
add-int/lit8 v7, v2, 0x65
|
||
|
|
||
|
new-instance v1, Lf/a/h/r/a;
|
||
|
|
||
|
add-int/lit8 v2, v7, 0x1
|
||
|
|
||
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
||
|
|
||
|
move-result-object v8
|
||
|
|
||
|
const-string v6, "video"
|
||
|
|
||
|
move-object v3, v1
|
||
|
|
||
|
move v5, v9
|
||
|
|
||
|
invoke-direct/range {v3 .. v8}, Lf/a/h/r/a;-><init>(Ljava/lang/String;ILjava/lang/String;ILjava/lang/Integer;)V
|
||
|
|
||
|
invoke-virtual {p1, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
||
|
|
||
|
move v2, v9
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:cond_2
|
||
|
invoke-static {}, Lj0/f;->throwIndexOverflow()V
|
||
|
|
||
|
throw v0
|
||
|
|
||
|
:cond_3
|
||
|
return-object p1
|
||
|
|
||
|
:cond_4
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public static final o(Ln;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;)V
|
||
|
.locals 2
|
||
|
|
||
|
monitor-enter p0
|
||
|
|
||
|
:try_start_0
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
const/4 v1, 0x0
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lcom/hammerandchisel/libdiscord/Discord;->setLocalVoiceLevelChangedCallback(Lcom/hammerandchisel/libdiscord/Discord$LocalVoiceLevelChangedCallback;)V
|
||
|
|
||
|
:cond_0
|
||
|
iget-object v0, p0, Ln;->a:Ljava/util/ArrayList;
|
||
|
|
||
|
invoke-virtual {v0, p1}, Ljava/util/ArrayList;->remove(Ljava/lang/Object;)Z
|
||
|
:try_end_0
|
||
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:catchall_0
|
||
|
move-exception p1
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
throw p1
|
||
|
.end method
|
||
|
|
||
|
.method public static final p(Ln;Lkotlin/jvm/functions/Function0;)Ljava/util/concurrent/Future;
|
||
|
.locals 1
|
||
|
|
||
|
iget-object p0, p0, Ln;->f:Ljava/util/concurrent/ExecutorService;
|
||
|
|
||
|
new-instance v0, Lt;
|
||
|
|
||
|
invoke-direct {v0, p1}, Lt;-><init>(Lkotlin/jvm/functions/Function0;)V
|
||
|
|
||
|
invoke-interface {p0, v0}, Ljava/util/concurrent/ExecutorService;->submit(Ljava/lang/Runnable;)Ljava/util/concurrent/Future;
|
||
|
|
||
|
move-result-object p0
|
||
|
|
||
|
return-object p0
|
||
|
.end method
|
||
|
|
||
|
|
||
|
# virtual methods
|
||
|
.method public a()Lrx/Observable;
|
||
|
.locals 2
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"()",
|
||
|
"Lrx/Observable<",
|
||
|
"Lkotlin/Unit;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
iget-object v0, p0, Ln;->d:Ljava/util/List;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
const/4 v0, 0x1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
:goto_0
|
||
|
if-eqz v0, :cond_1
|
||
|
|
||
|
sget-object v0, Lkotlin/Unit;->a:Lkotlin/Unit;
|
||
|
|
||
|
new-instance v1, Lr0/l/e/j;
|
||
|
|
||
|
invoke-direct {v1, v0}, Lr0/l/e/j;-><init>(Ljava/lang/Object;)V
|
||
|
|
||
|
const-string v0, "Observable.just(Unit)"
|
||
|
|
||
|
invoke-static {v1, v0}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
return-object v1
|
||
|
|
||
|
:cond_1
|
||
|
invoke-virtual {p0}, Ln;->r()V
|
||
|
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-nez v0, :cond_2
|
||
|
|
||
|
new-instance v0, Ljava/lang/IllegalStateException;
|
||
|
|
||
|
const-string v1, "Failed to initialize native media engine"
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
invoke-static {v0}, Lrx/Observable;->u(Ljava/lang/Throwable;)Lrx/Observable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v1, "Observable.error(Illegal\u2026ze native media engine\"))"
|
||
|
|
||
|
invoke-static {v0, v1}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:cond_2
|
||
|
new-instance v0, Lr;
|
||
|
|
||
|
invoke-direct {v0, p0}, Lr;-><init>(Ln;)V
|
||
|
|
||
|
sget-object v1, Lrx/Emitter$BackpressureMode;->d:Lrx/Emitter$BackpressureMode;
|
||
|
|
||
|
invoke-static {v0, v1}, Lrx/Observable;->n(Lrx/functions/Action1;Lrx/Emitter$BackpressureMode;)Lrx/Observable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v1, "Observable.create({ emit\u2026er.BackpressureMode.NONE)"
|
||
|
|
||
|
invoke-static {v0, v1}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
new-instance v1, Ln$d;
|
||
|
|
||
|
invoke-direct {v1, p0}, Ln$d;-><init>(Ln;)V
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lrx/Observable;->s(Lrx/functions/Action1;)Lrx/Observable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
sget-object v1, Ln$e;->d:Ln$e;
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lrx/Observable;->D(Lr0/k/b;)Lrx/Observable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v1, "getSupportedVideoCodecs(\u2026s }\n .map { Unit }"
|
||
|
|
||
|
invoke-static {v0, v1}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public b(Z)V
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
invoke-virtual {v0, p1}, Lcom/hammerandchisel/libdiscord/Discord;->setEchoCancellation(Z)V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public c(Z)V
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
invoke-virtual {v0, p1}, Lcom/hammerandchisel/libdiscord/Discord;->setNoiseCancellation(Z)V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public d()Lrx/Observable;
|
||
|
.locals 2
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"()",
|
||
|
"Lrx/Observable<",
|
||
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$AudioInfo;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
new-instance v0, Ln$c;
|
||
|
|
||
|
invoke-direct {v0, p0}, Ln$c;-><init>(Ln;)V
|
||
|
|
||
|
sget-object v1, Lrx/Emitter$BackpressureMode;->h:Lrx/Emitter$BackpressureMode;
|
||
|
|
||
|
invoke-static {v0, v1}, Lrx/Observable;->n(Lrx/functions/Action1;Lrx/Emitter$BackpressureMode;)Lrx/Observable;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
const-string v1, "Observable.create({ emit\u2026.BackpressureMode.LATEST)"
|
||
|
|
||
|
invoke-static {v0, v1}, Lj0/o/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public e(I)V
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
invoke-virtual {v0, p1}, Lcom/hammerandchisel/libdiscord/Discord;->setVideoInputDevice(I)V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public declared-synchronized f(JLcom/discord/rtcconnection/mediaengine/MediaEngine$a;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;Lkotlin/jvm/functions/Function1;)Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
||
|
.locals 19
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(J",
|
||
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$a;",
|
||
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;",
|
||
|
"Lkotlin/jvm/functions/Function1<",
|
||
|
"-",
|
||
|
"Ljava/lang/Exception;",
|
||
|
"Lkotlin/Unit;",
|
||
|
">;)",
|
||
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
move-object/from16 v7, p0
|
||
|
|
||
|
monitor-enter p0
|
||
|
|
||
|
:try_start_0
|
||
|
const-string v0, "connectionType"
|
||
|
|
||
|
const/4 v8, 0x0
|
||
|
|
||
|
if-eqz p4, :cond_5
|
||
|
|
||
|
iget-object v0, v7, Ln;->d:Ljava/util/List;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
const/4 v0, 0x1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
:goto_0
|
||
|
if-nez v0, :cond_1
|
||
|
|
||
|
new-instance v0, Ljava/lang/IllegalStateException;
|
||
|
|
||
|
const-string v1, "connect called on unprepared media engine."
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
||
|
|
||
|
move-object/from16 v1, p5
|
||
|
|
||
|
invoke-interface {v1, v0}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
:try_end_0
|
||
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
return-object v8
|
||
|
|
||
|
:cond_1
|
||
|
:try_start_1
|
||
|
iget-object v12, v7, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v12, :cond_3
|
||
|
|
||
|
iget-object v0, v7, Ln;->h:Lcom/discord/utilities/logging/Logger;
|
||
|
|
||
|
sget-object v1, Ln;->i:Ljava/lang/String;
|
||
|
|
||
|
new-instance v2, Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
||
|
|
||
|
const-string v3, "Connecting with options: "
|
||
|
|
||
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-object/from16 v15, p3
|
||
|
|
||
|
invoke-virtual {v2, v15}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v2
|
||
|
|
||
|
const/4 v3, 0x0
|
||
|
|
||
|
const/4 v4, 0x4
|
||
|
|
||
|
const/4 v5, 0x0
|
||
|
|
||
|
invoke-static/range {v0 .. v5}, Lcom/discord/utilities/logging/Logger;->i$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
||
|
|
||
|
new-instance v0, Ln$a;
|
||
|
|
||
|
move-object v1, v0
|
||
|
|
||
|
move-object/from16 v2, p0
|
||
|
|
||
|
move-object/from16 v3, p3
|
||
|
|
||
|
move-object/from16 v4, p4
|
||
|
|
||
|
move-wide/from16 v5, p1
|
||
|
|
||
|
invoke-direct/range {v1 .. v6}, Ln$a;-><init>(Ln;Lcom/discord/rtcconnection/mediaengine/MediaEngine$a;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;J)V
|
||
|
|
||
|
new-instance v1, Lf/a/h/r/b/e;
|
||
|
|
||
|
iget-object v10, v7, Ln;->f:Ljava/util/concurrent/ExecutorService;
|
||
|
|
||
|
iget-object v11, v7, Ln;->h:Lcom/discord/utilities/logging/Logger;
|
||
|
|
||
|
iget-object v13, v7, Ln;->d:Ljava/util/List;
|
||
|
|
||
|
if-eqz v13, :cond_2
|
||
|
|
||
|
invoke-static {v0}, Lj0/f;->listOf(Ljava/lang/Object;)Ljava/util/List;
|
||
|
|
||
|
move-result-object v18
|
||
|
|
||
|
move-object v9, v1
|
||
|
|
||
|
move-object/from16 v14, p4
|
||
|
|
||
|
move-wide/from16 v15, p1
|
||
|
|
||
|
move-object/from16 v17, p3
|
||
|
|
||
|
invoke-direct/range {v9 .. v18}, Lf/a/h/r/b/e;-><init>(Ljava/util/concurrent/ExecutorService;Lcom/discord/utilities/logging/Logger;Lcom/hammerandchisel/libdiscord/Discord;Ljava/util/List;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;JLcom/discord/rtcconnection/mediaengine/MediaEngine$a;Ljava/util/List;)V
|
||
|
|
||
|
move-object v8, v1
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:cond_2
|
||
|
const-string v0, "supportedVideoCodecs"
|
||
|
|
||
|
invoke-static {v0}, Lj0/o/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
||
|
:try_end_1
|
||
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
||
|
|
||
|
throw v8
|
||
|
|
||
|
:cond_3
|
||
|
:goto_1
|
||
|
if-eqz v8, :cond_4
|
||
|
|
||
|
:try_start_2
|
||
|
iget-object v0, v7, Ln;->a:Ljava/util/ArrayList;
|
||
|
|
||
|
invoke-virtual {v0, v8}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
||
|
|
||
|
new-instance v0, Ln$b;
|
||
|
|
||
|
invoke-direct {v0, v8}, Ln$b;-><init>(Lf/a/h/r/b/e;)V
|
||
|
|
||
|
invoke-virtual {v7, v0}, Ln;->q(Lkotlin/jvm/functions/Function1;)V
|
||
|
:try_end_2
|
||
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
||
|
|
||
|
:cond_4
|
||
|
monitor-exit p0
|
||
|
|
||
|
return-object v8
|
||
|
|
||
|
:cond_5
|
||
|
:try_start_3
|
||
|
invoke-static {v0}, Lj0/o/c/h;->c(Ljava/lang/String;)V
|
||
|
:try_end_3
|
||
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
||
|
|
||
|
throw v8
|
||
|
|
||
|
:catchall_0
|
||
|
move-exception v0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public g(F)V
|
||
|
.locals 3
|
||
|
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
const/high16 v1, 0x43960000 # 300.0f
|
||
|
|
||
|
const/4 v2, 0x0
|
||
|
|
||
|
invoke-static {v2, p1}, Ljava/lang/Math;->max(FF)F
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
invoke-static {v1, p1}, Ljava/lang/Math;->min(FF)F
|
||
|
|
||
|
move-result p1
|
||
|
|
||
|
const/high16 v1, 0x42c80000 # 100.0f
|
||
|
|
||
|
div-float/2addr p1, v1
|
||
|
|
||
|
invoke-virtual {v0, p1}, Lcom/hammerandchisel/libdiscord/Discord;->setSpeakerVolume(F)V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public declared-synchronized getConnections()Ljava/util/List;
|
||
|
.locals 2
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"()",
|
||
|
"Ljava/util/List<",
|
||
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;",
|
||
|
">;"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
monitor-enter p0
|
||
|
|
||
|
:try_start_0
|
||
|
new-instance v0, Ljava/util/ArrayList;
|
||
|
|
||
|
iget-object v1, p0, Ln;->a:Ljava/util/ArrayList;
|
||
|
|
||
|
invoke-direct {v0, v1}, Ljava/util/ArrayList;-><init>(Ljava/util/Collection;)V
|
||
|
:try_end_0
|
||
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
return-object v0
|
||
|
|
||
|
:catchall_0
|
||
|
move-exception v0
|
||
|
|
||
|
monitor-exit p0
|
||
|
|
||
|
throw v0
|
||
|
.end method
|
||
|
|
||
|
.method public h(Z)V
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
invoke-virtual {v0, p1}, Lcom/hammerandchisel/libdiscord/Discord;->setNoiseSuppression(Z)V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public i()Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public j(Lkotlin/jvm/functions/Function1;)V
|
||
|
.locals 2
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Lkotlin/jvm/functions/Function1<",
|
||
|
"-[",
|
||
|
"Lco/discord/media_engine/VideoInputDeviceDescription;",
|
||
|
"Lkotlin/Unit;",
|
||
|
">;)V"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
invoke-virtual {p0}, Ln;->r()V
|
||
|
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
new-instance v1, Ls;
|
||
|
|
||
|
invoke-direct {v1, p1}, Ls;-><init>(Lkotlin/jvm/functions/Function1;)V
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lcom/hammerandchisel/libdiscord/Discord;->getVideoInputDevices(Lcom/hammerandchisel/libdiscord/Discord$GetVideoInputDevicesCallback;)V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public k()Ljava/util/concurrent/ExecutorService;
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Ln;->f:Ljava/util/concurrent/ExecutorService;
|
||
|
|
||
|
return-object v0
|
||
|
.end method
|
||
|
|
||
|
.method public l(Z)V
|
||
|
.locals 1
|
||
|
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
invoke-virtual {v0, p1}, Lcom/hammerandchisel/libdiscord/Discord;->setAutomaticGainControl(Z)V
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public m(Lkotlin/jvm/functions/Function1;)V
|
||
|
.locals 2
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Lkotlin/jvm/functions/Function1<",
|
||
|
"-",
|
||
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;",
|
||
|
"Lkotlin/Unit;",
|
||
|
">;)V"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
if-eqz p1, :cond_0
|
||
|
|
||
|
invoke-virtual {p0}, Ln;->r()V
|
||
|
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v0, :cond_1
|
||
|
|
||
|
new-instance v1, Ln$f;
|
||
|
|
||
|
invoke-direct {v1, p1}, Ln$f;-><init>(Lkotlin/jvm/functions/Function1;)V
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lcom/hammerandchisel/libdiscord/Discord;->setLocalVoiceLevelChangedCallback(Lcom/hammerandchisel/libdiscord/Discord$LocalVoiceLevelChangedCallback;)V
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
iget-object p1, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz p1, :cond_1
|
||
|
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
invoke-virtual {p1, v0}, Lcom/hammerandchisel/libdiscord/Discord;->setLocalVoiceLevelChangedCallback(Lcom/hammerandchisel/libdiscord/Discord$LocalVoiceLevelChangedCallback;)V
|
||
|
|
||
|
:cond_1
|
||
|
:goto_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public final q(Lkotlin/jvm/functions/Function1;)V
|
||
|
.locals 9
|
||
|
.annotation system Ldalvik/annotation/Signature;
|
||
|
value = {
|
||
|
"(",
|
||
|
"Lkotlin/jvm/functions/Function1<",
|
||
|
"-",
|
||
|
"Lcom/discord/rtcconnection/mediaengine/MediaEngine$b;",
|
||
|
"Lkotlin/Unit;",
|
||
|
">;)V"
|
||
|
}
|
||
|
.end annotation
|
||
|
|
||
|
iget-object v0, p0, Ln;->c:Ljava/util/ArrayList;
|
||
|
|
||
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
:goto_0
|
||
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
||
|
|
||
|
move-result v1
|
||
|
|
||
|
if-eqz v1, :cond_0
|
||
|
|
||
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
||
|
|
||
|
move-result-object v1
|
||
|
|
||
|
check-cast v1, Lcom/discord/rtcconnection/mediaengine/MediaEngine$b;
|
||
|
|
||
|
:try_start_0
|
||
|
invoke-interface {p1, v1}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
||
|
:try_end_0
|
||
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:catch_0
|
||
|
move-exception v5
|
||
|
|
||
|
iget-object v2, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
|
||
|
|
||
|
sget-object v3, Ln;->i:Ljava/lang/String;
|
||
|
|
||
|
const/4 v6, 0x0
|
||
|
|
||
|
const/16 v7, 0x8
|
||
|
|
||
|
const/4 v8, 0x0
|
||
|
|
||
|
const-string v4, "Error in listener"
|
||
|
|
||
|
invoke-static/range {v2 .. v8}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_0
|
||
|
return-void
|
||
|
.end method
|
||
|
|
||
|
.method public final r()V
|
||
|
.locals 9
|
||
|
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v0, :cond_0
|
||
|
|
||
|
return-void
|
||
|
|
||
|
:cond_0
|
||
|
iget-object v1, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
|
||
|
|
||
|
sget-object v2, Ln;->i:Ljava/lang/String;
|
||
|
|
||
|
const-string v0, "initializing voice engine. OpenSL ES: "
|
||
|
|
||
|
invoke-static {v0}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
move-result-object v0
|
||
|
|
||
|
iget-object v3, p0, Ln;->g:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
|
||
|
|
||
|
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
||
|
|
||
|
move-result-object v3
|
||
|
|
||
|
const/4 v4, 0x0
|
||
|
|
||
|
const/4 v5, 0x4
|
||
|
|
||
|
const/4 v6, 0x0
|
||
|
|
||
|
invoke-static/range {v1 .. v6}, Lcom/discord/utilities/logging/Logger;->i$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
||
|
|
||
|
iget-object v0, p0, Ln;->g:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;
|
||
|
|
||
|
invoke-virtual {v0}, Ljava/lang/Enum;->ordinal()I
|
||
|
|
||
|
move-result v0
|
||
|
|
||
|
const/4 v1, 0x1
|
||
|
|
||
|
if-eq v0, v1, :cond_2
|
||
|
|
||
|
const/4 v2, 0x2
|
||
|
|
||
|
if-eq v0, v2, :cond_1
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_1
|
||
|
invoke-static {v1}, Lorg/webrtc/voiceengine/WebRtcAudioManager;->setBlacklistDeviceForOpenSLESUsage(Z)V
|
||
|
|
||
|
goto :goto_0
|
||
|
|
||
|
:cond_2
|
||
|
const/4 v0, 0x0
|
||
|
|
||
|
invoke-static {v0}, Lorg/webrtc/voiceengine/WebRtcAudioManager;->setBlacklistDeviceForOpenSLESUsage(Z)V
|
||
|
|
||
|
:goto_0
|
||
|
new-instance v0, Ln$g;
|
||
|
|
||
|
invoke-direct {v0, p0}, Ln$g;-><init>(Ln;)V
|
||
|
|
||
|
sput-object v0, Lorg/webrtc/Logging;->externalReporter:Lorg/webrtc/Logging$ExternalReporter;
|
||
|
|
||
|
:try_start_0
|
||
|
new-instance v0, Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
iget-object v2, p0, Ln;->e:Landroid/content/Context;
|
||
|
|
||
|
invoke-direct {v0, v2}, Lcom/hammerandchisel/libdiscord/Discord;-><init>(Landroid/content/Context;)V
|
||
|
|
||
|
iput-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
:try_end_0
|
||
|
.catch Ljava/lang/ExceptionInInitializerError; {:try_start_0 .. :try_end_0} :catch_1
|
||
|
.catch Ljava/lang/UnsatisfiedLinkError; {:try_start_0 .. :try_end_0} :catch_0
|
||
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:catchall_0
|
||
|
move-exception v0
|
||
|
|
||
|
move-object v5, v0
|
||
|
|
||
|
iget-object v2, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
|
||
|
|
||
|
sget-object v3, Ln;->i:Ljava/lang/String;
|
||
|
|
||
|
const/4 v6, 0x0
|
||
|
|
||
|
const/16 v7, 0x8
|
||
|
|
||
|
const/4 v8, 0x0
|
||
|
|
||
|
const-string v4, "Unable to initialize voice engine, new error discovered"
|
||
|
|
||
|
invoke-static/range {v2 .. v8}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:catch_0
|
||
|
move-exception v0
|
||
|
|
||
|
move-object v5, v0
|
||
|
|
||
|
iget-object v2, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
|
||
|
|
||
|
sget-object v3, Ln;->i:Ljava/lang/String;
|
||
|
|
||
|
const/4 v6, 0x0
|
||
|
|
||
|
const/16 v7, 0x8
|
||
|
|
||
|
const/4 v8, 0x0
|
||
|
|
||
|
const-string v4, "Unable to initialize voice engine."
|
||
|
|
||
|
invoke-static/range {v2 .. v8}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
|
||
|
|
||
|
goto :goto_1
|
||
|
|
||
|
:catch_1
|
||
|
move-exception v0
|
||
|
|
||
|
move-object v5, v0
|
||
|
|
||
|
iget-object v2, p0, Ln;->h:Lcom/discord/utilities/logging/Logger;
|
||
|
|
||
|
sget-object v3, Ln;->i:Ljava/lang/String;
|
||
|
|
||
|
const/4 v6, 0x0
|
||
|
|
||
|
const/16 v7, 0x8
|
||
|
|
||
|
const/4 v8, 0x0
|
||
|
|
||
|
const-string v4, "Unable to initialize voice engine."
|
||
|
|
||
|
invoke-static/range {v2 .. v8}, Lcom/discord/utilities/logging/Logger;->e$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;Ljava/util/Map;ILjava/lang/Object;)V
|
||
|
|
||
|
:goto_1
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v0, :cond_3
|
||
|
|
||
|
invoke-virtual {v0, v1}, Lcom/hammerandchisel/libdiscord/Discord;->enableBuiltInAEC(Z)V
|
||
|
|
||
|
:cond_3
|
||
|
iget-object v0, p0, Ln;->b:Lcom/hammerandchisel/libdiscord/Discord;
|
||
|
|
||
|
if-eqz v0, :cond_4
|
||
|
|
||
|
sget-object v0, Ln$h;->d:Ln$h;
|
||
|
|
||
|
invoke-virtual {p0, v0}, Ln;->q(Lkotlin/jvm/functions/Function1;)V
|
||
|
|
||
|
:cond_4
|
||
|
return-void
|
||
|
.end method
|