2020-07-08 16:44:49 +00:00
|
|
|
.class public final Lf/a/h/p;
|
|
|
|
.super Ljava/lang/Object;
|
|
|
|
.source "RtcConnection.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lf/a/h/s/a$c;
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final synthetic a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Lcom/discord/rtcconnection/RtcConnection;)V
|
|
|
|
.locals 0
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"()V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iput-object p1, p0, Lf/a/h/p;->a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public a(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lf/a/h/p;->a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/rtcconnection/RtcConnection;->k:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {v0, p1, p2}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->k(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
2020-07-23 01:06:17 +00:00
|
|
|
const-string/jumbo p1, "videoCodec"
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string p1, "audioCodec"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public b(ZLjava/lang/Integer;Ljava/lang/String;)V
|
|
|
|
.locals 9
|
|
|
|
|
|
|
|
iget-object v0, p0, Lf/a/h/p;->a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
|
|
|
|
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string v3, "Disconnected from RTC server. wasFatal: "
|
|
|
|
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Z)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p1, " -- code: "
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p1, " -- reason: "
|
|
|
|
|
|
|
|
invoke-virtual {v2, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
move-result-object p1
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
iget-object v2, v0, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-virtual {v1, p1, v2}, Lcom/discord/utilities/logging/Logger;->recordBreadcrumb(Ljava/lang/String;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
iget-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->k:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {p1}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->e()V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iget-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->k:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->u:Lf/a/h/j;
|
|
|
|
|
|
|
|
invoke-interface {p1, v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->h(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$b;)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const/16 p1, 0x3e8
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
if-nez p2, :cond_2
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eq v2, p1, :cond_3
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
iget-object v3, v0, Lcom/discord/rtcconnection/RtcConnection;->g:Lcom/discord/rtcconnection/RtcConnection$State;
|
|
|
|
|
|
|
|
instance-of v3, v3, Lcom/discord/rtcconnection/RtcConnection$State$d;
|
|
|
|
|
|
|
|
if-nez v3, :cond_4
|
|
|
|
|
|
|
|
invoke-virtual {v0, v2, p3}, Lcom/discord/rtcconnection/RtcConnection;->g(ZLjava/lang/String;)V
|
|
|
|
|
|
|
|
iget-object v3, v0, Lcom/discord/rtcconnection/RtcConnection;->d:Lf/a/h/t/d;
|
|
|
|
|
|
|
|
invoke-virtual {v3}, Lf/a/h/t/d;->a()V
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
iput v1, v0, Lcom/discord/rtcconnection/RtcConnection;->n:I
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
iput-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->p:Ljava/lang/Long;
|
|
|
|
|
|
|
|
new-instance v1, Lcom/discord/rtcconnection/RtcConnection$State$d;
|
|
|
|
|
|
|
|
invoke-direct {v1, v2}, Lcom/discord/rtcconnection/RtcConnection$State$d;-><init>(Z)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/rtcconnection/RtcConnection;->l(Lcom/discord/rtcconnection/RtcConnection$State;)V
|
|
|
|
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->e:Lcom/discord/utilities/networking/Backoff;
|
|
|
|
|
|
|
|
new-instance v2, Lf/a/h/m;
|
|
|
|
|
|
|
|
invoke-direct {v2, v0}, Lf/a/h/m;-><init>(Lcom/discord/rtcconnection/RtcConnection;)V
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2}, Lcom/discord/utilities/networking/Backoff;->fail(Lkotlin/jvm/functions/Function0;)J
|
|
|
|
|
|
|
|
move-result-wide v1
|
|
|
|
|
|
|
|
iget-object v3, v0, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
|
|
|
|
|
|
|
|
iget-object v4, v0, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
|
|
|
|
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
|
|
|
|
const-string v5, "Disconnect was not clean! Reason: "
|
|
|
|
|
|
|
|
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p3, ", code: "
|
|
|
|
|
|
|
|
invoke-virtual {v0, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p2, ". Reconnecting in "
|
|
|
|
|
|
|
|
invoke-virtual {v0, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
int-to-long p1, p1
|
|
|
|
|
|
|
|
div-long/2addr v1, p1
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1, v2}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
const-string p1, " seconds."
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
const/4 v6, 0x0
|
|
|
|
|
|
|
|
const/4 v7, 0x4
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
invoke-static/range {v3 .. v8}, Lcom/discord/utilities/logging/Logger;->w$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public c(JII)V
|
|
|
|
.locals 10
|
|
|
|
|
|
|
|
iget-object v0, p0, Lf/a/h/p;->a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
iget-wide v1, v0, Lcom/discord/rtcconnection/RtcConnection;->A:J
|
|
|
|
|
|
|
|
cmp-long v3, p1, v1
|
|
|
|
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
|
|
|
|
iget-object v4, v0, Lcom/discord/rtcconnection/RtcConnection;->k:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
|
|
|
|
if-eqz v4, :cond_1
|
|
|
|
|
|
|
|
invoke-static {p4}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
|
|
|
|
move-result-object v8
|
|
|
|
|
|
|
|
iget-object p4, v0, Lcom/discord/rtcconnection/RtcConnection;->F:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {p4, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p4
|
|
|
|
|
|
|
|
check-cast p4, Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p4}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
|
|
|
|
move-result p4
|
|
|
|
|
|
|
|
move v9, p4
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p4, 0x0
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
move-wide v5, p1
|
|
|
|
|
|
|
|
move v7, p3
|
|
|
|
|
|
|
|
invoke-interface/range {v4 .. v9}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->i(JILjava/lang/Integer;Z)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public d(Ljava/lang/String;Ljava/util/List;)V
|
|
|
|
.locals 1
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Ljava/lang/Integer;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lf/a/h/p;->a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
iget-object v0, v0, Lcom/discord/rtcconnection/RtcConnection;->k:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p2}, Lj0/i/l;->toIntArray(Ljava/util/Collection;)[I
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result-object p2
|
|
|
|
|
|
|
|
invoke-interface {v0, p1, p2}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->l(Ljava/lang/String;[I)V
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string p1, "secretKey"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string p1, "mode"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
throw v0
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public e(Ljava/lang/String;)V
|
|
|
|
.locals 1
|
|
|
|
|
|
|
|
iget-object v0, p0, Lf/a/h/p;->a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
iput-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->s:Ljava/lang/String;
|
|
|
|
|
|
|
|
iget-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->c:Ljava/util/List;
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
check-cast v0, Lcom/discord/rtcconnection/RtcConnection$b;
|
|
|
|
|
|
|
|
invoke-interface {v0}, Lcom/discord/rtcconnection/RtcConnection$b;->onMediaSessionIdReceived()V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public f(J)V
|
|
|
|
.locals 5
|
|
|
|
|
|
|
|
iget-object v0, p0, Lf/a/h/p;->a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->i:Ljava/util/LinkedList;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-virtual {v1, v2}, Ljava/util/LinkedList;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->i:Ljava/util/LinkedList;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/LinkedList;->size()I
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
const/4 v2, 0x5
|
|
|
|
|
|
|
|
if-le v1, v2, :cond_0
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->i:Ljava/util/LinkedList;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Ljava/util/LinkedList;->removeFirst()Ljava/lang/Object;
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/16 v1, 0x1f4
|
|
|
|
|
|
|
|
int-to-long v2, v1
|
|
|
|
|
|
|
|
cmp-long v4, p1, v2
|
|
|
|
|
|
|
|
if-lez v4, :cond_1
|
|
|
|
|
|
|
|
iget v2, v0, Lcom/discord/rtcconnection/RtcConnection;->n:I
|
|
|
|
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
|
|
|
|
iput v2, v0, Lcom/discord/rtcconnection/RtcConnection;->n:I
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
sget-object v2, Lcom/discord/rtcconnection/RtcConnection$Quality;->Companion:Lcom/discord/rtcconnection/RtcConnection$Quality$a;
|
|
|
|
|
|
|
|
long-to-double p1, p1
|
|
|
|
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Double;->isNaN(D)Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/rtcconnection/RtcConnection$Quality;->UNKNOWN:Lcom/discord/rtcconnection/RtcConnection$Quality;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const/16 v2, 0xfa
|
|
|
|
|
|
|
|
int-to-double v2, v2
|
|
|
|
|
|
|
|
cmpg-double v4, p1, v2
|
|
|
|
|
|
|
|
if-gez v4, :cond_3
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/rtcconnection/RtcConnection$Quality;->FINE:Lcom/discord/rtcconnection/RtcConnection$Quality;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
int-to-double v1, v1
|
|
|
|
|
|
|
|
cmpg-double v3, p1, v1
|
|
|
|
|
|
|
|
if-gez v3, :cond_4
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/rtcconnection/RtcConnection$Quality;->AVERAGE:Lcom/discord/rtcconnection/RtcConnection$Quality;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
sget-object p1, Lcom/discord/rtcconnection/RtcConnection$Quality;->BAD:Lcom/discord/rtcconnection/RtcConnection$Quality;
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
new-instance p2, Lf/a/h/o;
|
|
|
|
|
|
|
|
invoke-direct {p2, p1}, Lf/a/h/o;-><init>(Lcom/discord/rtcconnection/RtcConnection$Quality;)V
|
|
|
|
|
|
|
|
invoke-virtual {v0, p2}, Lcom/discord/rtcconnection/RtcConnection;->i(Lkotlin/jvm/functions/Function1;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public g()V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public h()V
|
2020-07-14 22:43:59 +00:00
|
|
|
.locals 4
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
iget-object v0, p0, Lf/a/h/p;->a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->e:Lcom/discord/utilities/networking/Backoff;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/networking/Backoff;->cancel()V
|
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
const-string v2, "Connecting to RTC server "
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-static {v2}, Lf/e/b/a/a;->D(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
move-result-object v2
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
iget-object v3, v0, Lcom/discord/rtcconnection/RtcConnection;->j:Lf/a/h/s/a;
|
|
|
|
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
|
|
|
|
iget-object v3, v3, Lf/a/h/s/a;->r:Ljava/lang/String;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
move-result-object v2
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
iget-object v3, v0, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-virtual {v1, v2, v3}, Lcom/discord/utilities/logging/Logger;->recordBreadcrumb(Ljava/lang/String;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/rtcconnection/RtcConnection$State$c;->a:Lcom/discord/rtcconnection/RtcConnection$State$c;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/rtcconnection/RtcConnection;->l(Lcom/discord/rtcconnection/RtcConnection$State;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public i()V
|
|
|
|
.locals 15
|
|
|
|
|
|
|
|
iget-object v0, p0, Lf/a/h/p;->a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->e:Lcom/discord/utilities/networking/Backoff;
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lcom/discord/utilities/networking/Backoff;->cancel()V
|
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
iget-object v2, v0, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
const-string v3, "Connected to RTC server."
|
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-virtual {v1, v3, v2}, Lcom/discord/utilities/logging/Logger;->recordBreadcrumb(Ljava/lang/String;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->j:Lf/a/h/s/a;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
|
|
|
|
iget-object v3, v0, Lcom/discord/rtcconnection/RtcConnection;->z:Ljava/lang/String;
|
|
|
|
|
|
|
|
iget-wide v4, v0, Lcom/discord/rtcconnection/RtcConnection;->A:J
|
|
|
|
|
|
|
|
iget-object v6, v0, Lcom/discord/rtcconnection/RtcConnection;->x:Ljava/lang/String;
|
|
|
|
|
|
|
|
iget-boolean v8, v0, Lcom/discord/rtcconnection/RtcConnection;->y:Z
|
|
|
|
|
|
|
|
const/4 v2, 0x0
|
|
|
|
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
|
|
|
|
if-eqz v6, :cond_1
|
|
|
|
|
|
|
|
iget-boolean v2, v1, Lf/a/h/s/a;->q:Z
|
|
|
|
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
|
|
|
|
iget-object v9, v1, Lf/a/h/s/a;->u:Lcom/discord/utilities/logging/Logger;
|
|
|
|
|
|
|
|
iget-object v10, v1, Lf/a/h/s/a;->a:Ljava/lang/String;
|
|
|
|
|
|
|
|
const/4 v12, 0x0
|
|
|
|
|
|
|
|
const/4 v13, 0x4
|
|
|
|
|
|
|
|
const/4 v14, 0x0
|
|
|
|
|
|
|
|
const-string v11, "identify called on canceled instance of RtcControlSocket"
|
|
|
|
|
|
|
|
invoke-static/range {v9 .. v14}, Lcom/discord/utilities/logging/Logger;->w$default(Lcom/discord/utilities/logging/Logger;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
iput-object v3, v1, Lf/a/h/s/a;->f:Ljava/lang/String;
|
|
|
|
|
|
|
|
iput-object v6, v1, Lf/a/h/s/a;->g:Ljava/lang/String;
|
|
|
|
|
|
|
|
sget-object v2, Lf/a/h/s/a$b;->f:Lf/a/h/s/a$b;
|
|
|
|
|
|
|
|
iput-object v2, v1, Lf/a/h/s/a;->i:Lf/a/h/s/a$b;
|
|
|
|
|
|
|
|
const/4 v9, 0x0
|
|
|
|
|
|
|
|
new-instance v10, Lcom/discord/rtcconnection/socket/io/Payloads$Identify;
|
|
|
|
|
|
|
|
iget-object v7, v1, Lf/a/h/s/a;->s:Ljava/lang/String;
|
|
|
|
|
|
|
|
move-object v2, v10
|
|
|
|
|
|
|
|
invoke-direct/range {v2 .. v8}, Lcom/discord/rtcconnection/socket/io/Payloads$Identify;-><init>(Ljava/lang/String;JLjava/lang/String;Ljava/lang/String;Z)V
|
|
|
|
|
|
|
|
invoke-virtual {v1, v9, v10}, Lf/a/h/s/a;->m(ILjava/lang/Object;)V
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
const-string v0, "sessionId"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
throw v2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const-string v0, "serverId"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {v0}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
throw v2
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
:goto_0
|
|
|
|
sget-object v1, Lcom/discord/rtcconnection/RtcConnection$State$a;->a:Lcom/discord/rtcconnection/RtcConnection$State$a;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/rtcconnection/RtcConnection;->l(Lcom/discord/rtcconnection/RtcConnection$State;)V
|
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public j(J)V
|
|
|
|
.locals 3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lf/a/h/p;->a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->E:Lcom/discord/rtcconnection/RtcConnection$c;
|
|
|
|
|
|
|
|
instance-of v1, v1, Lcom/discord/rtcconnection/RtcConnection$c$a;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->d:Lf/a/h/t/d;
|
|
|
|
|
|
|
|
iget-object v1, v1, Lf/a/h/t/d;->a:Lco/discord/media_engine/Stats;
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/Stats;->getInboundRtpVideo()Ljava/util/Map;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Lco/discord/media_engine/InboundRtpVideo;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1, p2, v1}, Lcom/discord/rtcconnection/RtcConnection;->f(JLco/discord/media_engine/InboundRtpVideo;)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public k(IILjava/lang/String;)V
|
|
|
|
.locals 8
|
|
|
|
|
|
|
|
if-eqz p3, :cond_3
|
|
|
|
|
|
|
|
iget-object v0, p0, Lf/a/h/p;->a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
iget-object v1, v0, Lcom/discord/rtcconnection/RtcConnection;->C:Lcom/discord/utilities/logging/Logger;
|
|
|
|
|
|
|
|
const-string v2, "Discovered dedicated UDP server on port "
|
|
|
|
|
|
|
|
invoke-static {v2, p1}, Lf/e/b/a/a;->h(Ljava/lang/String;I)Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
iget-object v3, v0, Lcom/discord/rtcconnection/RtcConnection;->b:Ljava/lang/String;
|
|
|
|
|
2020-07-14 22:43:59 +00:00
|
|
|
invoke-virtual {v1, v2, v3}, Lcom/discord/utilities/logging/Logger;->recordBreadcrumb(Ljava/lang/String;Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
sget-object v1, Lcom/discord/rtcconnection/RtcConnection$State$g;->a:Lcom/discord/rtcconnection/RtcConnection$State$g;
|
|
|
|
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/rtcconnection/RtcConnection;->l(Lcom/discord/rtcconnection/RtcConnection$State;)V
|
|
|
|
|
|
|
|
iget-object v2, v0, Lcom/discord/rtcconnection/RtcConnection;->B:Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
|
|
|
|
iget-wide v3, v0, Lcom/discord/rtcconnection/RtcConnection;->A:J
|
|
|
|
|
|
|
|
new-instance v5, Lcom/discord/rtcconnection/mediaengine/MediaEngine$a;
|
|
|
|
|
|
|
|
invoke-direct {v5, p2, p3, p1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine$a;-><init>(ILjava/lang/String;I)V
|
|
|
|
|
|
|
|
iget-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->E:Lcom/discord/rtcconnection/RtcConnection$c;
|
|
|
|
|
|
|
|
sget-object p2, Lcom/discord/rtcconnection/RtcConnection$c$a;->a:Lcom/discord/rtcconnection/RtcConnection$c$a;
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1, p2}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
move-result p2
|
|
|
|
|
|
|
|
if-eqz p2, :cond_0
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;->DEFAULT:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
move-object v6, p1
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
instance-of p1, p1, Lcom/discord/rtcconnection/RtcConnection$c$b;
|
|
|
|
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
|
|
|
|
sget-object p1, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;->STREAM:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:goto_1
|
|
|
|
new-instance v7, Lf/a/h/n;
|
|
|
|
|
|
|
|
invoke-direct {v7, v0}, Lf/a/h/n;-><init>(Lcom/discord/rtcconnection/RtcConnection;)V
|
|
|
|
|
|
|
|
invoke-interface/range {v2 .. v7}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->f(JLcom/discord/rtcconnection/mediaengine/MediaEngine$a;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$Type;Lkotlin/jvm/functions/Function1;)Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
|
|
|
|
move-result-object p1
|
|
|
|
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
|
|
|
|
iget-object p2, v0, Lcom/discord/rtcconnection/RtcConnection;->u:Lf/a/h/j;
|
|
|
|
|
|
|
|
invoke-interface {p1, p2}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->f(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$b;)V
|
|
|
|
|
|
|
|
iput-object p1, v0, Lcom/discord/rtcconnection/RtcConnection;->k:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
new-instance p1, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
|
|
|
|
invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
const-string p1, "ip"
|
|
|
|
|
2020-07-25 00:57:58 +00:00
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
2020-07-08 16:44:49 +00:00
|
|
|
|
|
|
|
const/4 p1, 0x0
|
|
|
|
|
|
|
|
throw p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public onSpeaking(JIZ)V
|
|
|
|
.locals 9
|
|
|
|
|
|
|
|
iget-object p4, p0, Lf/a/h/p;->a:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
|
|
|
|
iget-wide v0, p4, Lcom/discord/rtcconnection/RtcConnection;->A:J
|
|
|
|
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
|
|
|
|
iget-object v3, p4, Lcom/discord/rtcconnection/RtcConnection;->k:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
|
|
|
|
iget-object p4, p4, Lcom/discord/rtcconnection/RtcConnection;->F:Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-static {p1, p2}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
invoke-interface {p4, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p4
|
|
|
|
|
|
|
|
check-cast p4, Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
if-eqz p4, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {p4}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
|
|
|
|
move-result p4
|
|
|
|
|
|
|
|
move v8, p4
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
const/4 p4, 0x0
|
|
|
|
|
|
|
|
const/4 v8, 0x0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
|
|
|
|
move-wide v4, p1
|
|
|
|
|
|
|
|
move v6, p3
|
|
|
|
|
|
|
|
invoke-interface/range {v3 .. v8}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->i(JILjava/lang/Integer;Z)V
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
return-void
|
|
|
|
.end method
|