864 lines
25 KiB
Smali
864 lines
25 KiB
Smali
.class public final Lcom/discord/stores/StoreStreamRtcConnection;
|
|
.super Ljava/lang/Object;
|
|
.source "StoreStreamRtcConnection.kt"
|
|
|
|
# interfaces
|
|
.implements Lcom/discord/stores/DispatchHandler;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/discord/stores/StoreStreamRtcConnection$State;,
|
|
Lcom/discord/stores/StoreStreamRtcConnection$RtcConnectionListener;,
|
|
Lcom/discord/stores/StoreStreamRtcConnection$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lcom/discord/stores/StoreStreamRtcConnection$Companion;
|
|
|
|
.field public static final STREAM_VOLUME:F = 300.0f
|
|
|
|
|
|
# instance fields
|
|
.field public final analyticsStore:Lcom/discord/stores/StoreAnalytics;
|
|
|
|
.field public final clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
.field public final dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
.field public isDirty:Z
|
|
|
|
.field public final mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
.field public networkMonitor:Lcom/discord/utilities/networking/NetworkMonitor;
|
|
|
|
.field public rtcConnection:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
.field public sessionId:Ljava/lang/String;
|
|
|
|
.field public state:Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
.field public final stateSubject:Lrx/subjects/BehaviorSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
"Lcom/discord/stores/StoreStreamRtcConnection$State;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
.field public streamOwner:Ljava/lang/Long;
|
|
|
|
.field public final userStore:Lcom/discord/stores/StoreUser;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lcom/discord/stores/StoreStreamRtcConnection$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lcom/discord/stores/StoreStreamRtcConnection$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lcom/discord/stores/StoreStreamRtcConnection;->Companion:Lcom/discord/stores/StoreStreamRtcConnection$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreUser;Lcom/discord/stores/StoreStream;Lcom/discord/stores/Dispatcher;Lcom/discord/utilities/time/Clock;Lcom/discord/stores/StoreAnalytics;)V
|
|
.locals 1
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_5
|
|
|
|
if-eqz p2, :cond_4
|
|
|
|
if-eqz p3, :cond_3
|
|
|
|
if-eqz p4, :cond_2
|
|
|
|
if-eqz p5, :cond_1
|
|
|
|
if-eqz p6, :cond_0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreStreamRtcConnection;->userStore:Lcom/discord/stores/StoreUser;
|
|
|
|
iput-object p3, p0, Lcom/discord/stores/StoreStreamRtcConnection;->storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
iput-object p4, p0, Lcom/discord/stores/StoreStreamRtcConnection;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
iput-object p5, p0, Lcom/discord/stores/StoreStreamRtcConnection;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
iput-object p6, p0, Lcom/discord/stores/StoreStreamRtcConnection;->analyticsStore:Lcom/discord/stores/StoreAnalytics;
|
|
|
|
new-instance p1, Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
new-instance p2, Lcom/discord/rtcconnection/RtcConnection$State$d;
|
|
|
|
const/4 p3, 0x0
|
|
|
|
invoke-direct {p2, p3}, Lcom/discord/rtcconnection/RtcConnection$State$d;-><init>(Z)V
|
|
|
|
invoke-direct {p1, p2, v0, v0}, Lcom/discord/stores/StoreStreamRtcConnection$State;-><init>(Lcom/discord/rtcconnection/RtcConnection$State;Lcom/discord/rtcconnection/RtcConnection$Quality;Ljava/lang/String;)V
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->state:Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
invoke-static {p1}, Lrx/subjects/BehaviorSubject;->g0(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->stateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "analyticsStore"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_1
|
|
const-string p1, "clock"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
const-string p1, "dispatcher"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_3
|
|
const-string p1, "storeStream"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_4
|
|
const-string p1, "userStore"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_5
|
|
const-string p1, "mediaEngineStore"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getDispatcher$p(Lcom/discord/stores/StoreStreamRtcConnection;)Lcom/discord/stores/Dispatcher;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->dispatcher:Lcom/discord/stores/Dispatcher;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getStoreStream$p(Lcom/discord/stores/StoreStreamRtcConnection;)Lcom/discord/stores/StoreStream;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->storeStream:Lcom/discord/stores/StoreStream;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleMediaSessionIdReceived(Lcom/discord/stores/StoreStreamRtcConnection;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreStreamRtcConnection;->handleMediaSessionIdReceived()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleQualityUpdate(Lcom/discord/stores/StoreStreamRtcConnection;Lcom/discord/rtcconnection/RtcConnection$Quality;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreStreamRtcConnection;->handleQualityUpdate(Lcom/discord/rtcconnection/RtcConnection$Quality;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$handleVideoStreamEndedAnalyticsEvent(Lcom/discord/stores/StoreStreamRtcConnection;Ljava/util/Map;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0, p1}, Lcom/discord/stores/StoreStreamRtcConnection;->handleVideoStreamEndedAnalyticsEvent(Ljava/util/Map;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final createRtcConnection(JLjava/lang/Long;JLjava/lang/String;Ljava/lang/String;J)Lcom/discord/rtcconnection/RtcConnection;
|
|
.locals 19
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
invoke-direct/range {p0 .. p0}, Lcom/discord/stores/StoreStreamRtcConnection;->destroyRtcConnection()V
|
|
|
|
new-instance v15, Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
iget-object v1, v0, Lcom/discord/stores/StoreStreamRtcConnection;->mediaEngineStore:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreMediaEngine;->getMediaEngine()Lcom/discord/rtcconnection/mediaengine/MediaEngine;
|
|
|
|
move-result-object v10
|
|
|
|
sget-object v11, Lcom/discord/app/AppLog;->d:Lcom/discord/app/AppLog;
|
|
|
|
iget-object v12, v0, Lcom/discord/stores/StoreStreamRtcConnection;->clock:Lcom/discord/utilities/time/Clock;
|
|
|
|
new-instance v13, Lcom/discord/rtcconnection/RtcConnection$c$b;
|
|
|
|
move-wide/from16 v1, p8
|
|
|
|
invoke-direct {v13, v1, v2}, Lcom/discord/rtcconnection/RtcConnection$c$b;-><init>(J)V
|
|
|
|
iget-object v14, v0, Lcom/discord/stores/StoreStreamRtcConnection;->networkMonitor:Lcom/discord/utilities/networking/NetworkMonitor;
|
|
|
|
if-eqz v14, :cond_0
|
|
|
|
const/16 v16, 0x0
|
|
|
|
const/16 v17, 0x800
|
|
|
|
const/4 v6, 0x1
|
|
|
|
move-object v1, v15
|
|
|
|
move-object/from16 v2, p3
|
|
|
|
move-wide/from16 v3, p4
|
|
|
|
move-object/from16 v5, p6
|
|
|
|
move-object/from16 v7, p7
|
|
|
|
move-wide/from16 v8, p1
|
|
|
|
move-object/from16 v18, v15
|
|
|
|
move-object/from16 v15, v16
|
|
|
|
move/from16 v16, v17
|
|
|
|
invoke-direct/range {v1 .. v16}, Lcom/discord/rtcconnection/RtcConnection;-><init>(Ljava/lang/Long;JLjava/lang/String;ZLjava/lang/String;JLcom/discord/rtcconnection/mediaengine/MediaEngine;Lcom/discord/utilities/logging/Logger;Lcom/discord/utilities/time/Clock;Lcom/discord/rtcconnection/RtcConnection$c;Lcom/discord/utilities/networking/NetworkMonitor;Ljava/util/Map;I)V
|
|
|
|
new-instance v1, Lcom/discord/stores/StoreStreamRtcConnection$RtcConnectionListener;
|
|
|
|
invoke-direct {v1, v0}, Lcom/discord/stores/StoreStreamRtcConnection$RtcConnectionListener;-><init>(Lcom/discord/stores/StoreStreamRtcConnection;)V
|
|
|
|
move-object/from16 v2, v18
|
|
|
|
iget-object v3, v2, Lcom/discord/rtcconnection/RtcConnection;->c:Ljava/util/List;
|
|
|
|
invoke-interface {v3, v1}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
return-object v2
|
|
|
|
:cond_0
|
|
const-string v1, "networkMonitor"
|
|
|
|
invoke-static {v1}, Lj0/n/c/h;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method private final destroyRtcConnection()V
|
|
.locals 7
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->rtcConnection:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
new-instance v1, Lf/a/h/h;
|
|
|
|
invoke-direct {v1, v0}, Lf/a/h/h;-><init>(Lcom/discord/rtcconnection/RtcConnection;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/discord/rtcconnection/RtcConnection;->k(Lkotlin/jvm/functions/Function0;)Ljava/util/concurrent/Future;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->rtcConnection:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->state:Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v5, 0x1
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v1 .. v6}, Lcom/discord/stores/StoreStreamRtcConnection$State;->copy$default(Lcom/discord/stores/StoreStreamRtcConnection$State;Lcom/discord/rtcconnection/RtcConnection$State;Lcom/discord/rtcconnection/RtcConnection$Quality;Ljava/lang/String;ILjava/lang/Object;)Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->state:Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleMediaSessionIdReceived()V
|
|
.locals 7
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->rtcConnection:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, v0, Lcom/discord/rtcconnection/RtcConnection;->s:Ljava/lang/String;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
move-object v4, v0
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->state:Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v5, 0x3
|
|
|
|
const/4 v6, 0x0
|
|
|
|
invoke-static/range {v1 .. v6}, Lcom/discord/stores/StoreStreamRtcConnection$State;->copy$default(Lcom/discord/stores/StoreStreamRtcConnection$State;Lcom/discord/rtcconnection/RtcConnection$State;Lcom/discord/rtcconnection/RtcConnection$Quality;Ljava/lang/String;ILjava/lang/Object;)Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->state:Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleQualityUpdate(Lcom/discord/rtcconnection/RtcConnection$Quality;)V
|
|
.locals 6
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->state:Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x5
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v2, p1
|
|
|
|
invoke-static/range {v0 .. v5}, Lcom/discord/stores/StoreStreamRtcConnection$State;->copy$default(Lcom/discord/stores/StoreStreamRtcConnection$State;Lcom/discord/rtcconnection/RtcConnection$State;Lcom/discord/rtcconnection/RtcConnection$Quality;Ljava/lang/String;ILjava/lang/Object;)Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->state:Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->isDirty:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final handleVideoStreamEndedAnalyticsEvent(Ljava/util/Map;)V
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/Map<",
|
|
"Ljava/lang/String;",
|
|
"Ljava/lang/Object;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->analyticsStore:Lcom/discord/stores/StoreAnalytics;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/discord/stores/StoreAnalytics;->trackVideoStreamEnded(Ljava/util/Map;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final getRtcConnection$app_productionDiscordExternalRelease()Lcom/discord/rtcconnection/RtcConnection;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->rtcConnection:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final getState()Lrx/Observable;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lrx/Observable<",
|
|
"Lcom/discord/stores/StoreStreamRtcConnection$State;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->stateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
const-string v1, "stateSubject"
|
|
|
|
invoke-static {v0, v1}, Lj0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V
|
|
.locals 0
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getSessionId()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->sessionId:Ljava/lang/String;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "payload"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final handleStreamCreate(Lcom/discord/models/domain/StreamCreateOrUpdate;)V
|
|
.locals 13
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_8
|
|
|
|
sget-object v1, Lcom/discord/models/domain/ModelApplicationStream;->Companion:Lcom/discord/models/domain/ModelApplicationStream$Companion;
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamCreateOrUpdate;->getStreamKey()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v1, v2}, Lcom/discord/models/domain/ModelApplicationStream$Companion;->decodeStreamKey(Ljava/lang/String;)Lcom/discord/models/domain/ModelApplicationStream;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreStreamRtcConnection;->userStore:Lcom/discord/stores/StoreUser;
|
|
|
|
invoke-virtual {v2}, Lcom/discord/stores/StoreUser;->getMeInternal$app_productionDiscordExternalRelease()Lcom/discord/models/domain/ModelUser$Me;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-virtual {v2}, Lcom/discord/models/domain/ModelUser;->getId()J
|
|
|
|
move-result-wide v2
|
|
|
|
invoke-static {v2, v3}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object v2, v0
|
|
|
|
:goto_0
|
|
iget-object v9, p0, Lcom/discord/stores/StoreStreamRtcConnection;->sessionId:Ljava/lang/String;
|
|
|
|
if-eqz v2, :cond_7
|
|
|
|
if-nez v9, :cond_1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_1
|
|
iget-object v3, p0, Lcom/discord/stores/StoreStreamRtcConnection;->rtcConnection:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
iget-wide v3, v3, Lcom/discord/rtcconnection/RtcConnection;->w:J
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelApplicationStream;->getChannelId()J
|
|
|
|
move-result-wide v5
|
|
|
|
cmp-long v7, v3, v5
|
|
|
|
if-nez v7, :cond_3
|
|
|
|
iget-object v3, p0, Lcom/discord/stores/StoreStreamRtcConnection;->rtcConnection:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
iget-object v3, v3, Lcom/discord/rtcconnection/RtcConnection;->x:Ljava/lang/String;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
move-object v3, v0
|
|
|
|
:goto_1
|
|
invoke-static {v3, v9}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
return-void
|
|
|
|
:cond_3
|
|
instance-of v3, v1, Lcom/discord/models/domain/ModelApplicationStream$GuildStream;
|
|
|
|
if-eqz v3, :cond_4
|
|
|
|
move-object v3, v1
|
|
|
|
check-cast v3, Lcom/discord/models/domain/ModelApplicationStream$GuildStream;
|
|
|
|
invoke-virtual {v3}, Lcom/discord/models/domain/ModelApplicationStream$GuildStream;->getGuildId()J
|
|
|
|
move-result-wide v3
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object v3
|
|
|
|
move-object v6, v3
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
instance-of v3, v1, Lcom/discord/models/domain/ModelApplicationStream$CallStream;
|
|
|
|
if-eqz v3, :cond_6
|
|
|
|
move-object v6, v0
|
|
|
|
:goto_2
|
|
invoke-virtual {v2}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v4
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelApplicationStream;->getChannelId()J
|
|
|
|
move-result-wide v7
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamCreateOrUpdate;->getRtcServerId()Ljava/lang/String;
|
|
|
|
move-result-object v10
|
|
|
|
if-eqz v10, :cond_5
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelApplicationStream;->getOwnerId()J
|
|
|
|
move-result-wide v11
|
|
|
|
move-object v3, p0
|
|
|
|
invoke-direct/range {v3 .. v12}, Lcom/discord/stores/StoreStreamRtcConnection;->createRtcConnection(JLjava/lang/Long;JLjava/lang/String;Ljava/lang/String;J)Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->rtcConnection:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/models/domain/ModelApplicationStream;->getOwnerId()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->streamOwner:Ljava/lang/Long;
|
|
|
|
return-void
|
|
|
|
:cond_5
|
|
invoke-static {}, Lj0/n/c/h;->throwNpe()V
|
|
|
|
throw v0
|
|
|
|
:cond_6
|
|
new-instance p1, Lkotlin/NoWhenBranchMatchedException;
|
|
|
|
invoke-direct {p1}, Lkotlin/NoWhenBranchMatchedException;-><init>()V
|
|
|
|
throw p1
|
|
|
|
:cond_7
|
|
:goto_3
|
|
return-void
|
|
|
|
:cond_8
|
|
const-string p1, "streamCreate"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final handleStreamDelete(Lcom/discord/models/domain/StreamDelete;)V
|
|
.locals 1
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0}, Lcom/discord/stores/StoreStreamRtcConnection;->destroyRtcConnection()V
|
|
|
|
iput-object v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->streamOwner:Ljava/lang/Long;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "streamDelete"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final handleStreamRtcConnectionStateChange(Lcom/discord/rtcconnection/RtcConnection$State;)V
|
|
.locals 10
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
sget-object v0, Lcom/discord/rtcconnection/RtcConnection$State$f;->a:Lcom/discord/rtcconnection/RtcConnection$State$f;
|
|
|
|
invoke-static {p1, v0}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->streamOwner:Ljava/lang/Long;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Number;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreStreamRtcConnection;->rtcConnection:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
const/high16 v3, 0x43960000 # 300.0f
|
|
|
|
iget-object v2, v2, Lcom/discord/rtcconnection/RtcConnection;->k:Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-interface {v2, v0, v1, v3}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->b(JF)V
|
|
|
|
:cond_0
|
|
iget-object v4, p0, Lcom/discord/stores/StoreStreamRtcConnection;->state:Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
const/4 v6, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
const/4 v8, 0x4
|
|
|
|
const/4 v9, 0x0
|
|
|
|
move-object v5, p1
|
|
|
|
invoke-static/range {v4 .. v9}, Lcom/discord/stores/StoreStreamRtcConnection$State;->copy$default(Lcom/discord/stores/StoreStreamRtcConnection$State;Lcom/discord/rtcconnection/RtcConnection$State;Lcom/discord/rtcconnection/RtcConnection$Quality;Ljava/lang/String;ILjava/lang/Object;)Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->state:Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput-boolean p1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->isDirty:Z
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
const-string p1, "state"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final handleStreamServerUpdate(Lcom/discord/models/domain/StreamServerUpdate;)V
|
|
.locals 4
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
sget-object v1, Lcom/discord/app/App;->e:Lcom/discord/app/App;
|
|
|
|
sget-boolean v1, Lcom/discord/app/App;->d:Z
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
move-object v1, v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {v0, v1, v0}, Lcom/discord/utilities/ssl/SecureSocketsLayerUtils;->createSocketFactory$default(Ljavax/net/ssl/TrustManagerFactory;ILjava/lang/Object;)Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_0
|
|
iget-object v2, p0, Lcom/discord/stores/StoreStreamRtcConnection;->rtcConnection:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamServerUpdate;->getEndpoint()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {p1}, Lcom/discord/models/domain/StreamServerUpdate;->getToken()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
new-instance v0, Lf/a/h/g;
|
|
|
|
invoke-direct {v0, v2, v3, p1, v1}, Lf/a/h/g;-><init>(Lcom/discord/rtcconnection/RtcConnection;Ljava/lang/String;Ljava/lang/String;Ljavax/net/ssl/SSLSocketFactory;)V
|
|
|
|
invoke-virtual {v2, v0}, Lcom/discord/rtcconnection/RtcConnection;->k(Lkotlin/jvm/functions/Function0;)Ljava/util/concurrent/Future;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
const-string p1, "endpoint"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
:goto_1
|
|
return-void
|
|
|
|
:cond_3
|
|
const-string p1, "streamServerUpdate"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final init(Lcom/discord/utilities/networking/NetworkMonitor;)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->networkMonitor:Lcom/discord/utilities/networking/NetworkMonitor;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "networkMonitor"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public onDispatchEnded()V
|
|
.locals 2
|
|
.annotation runtime Lcom/discord/stores/StoreThread;
|
|
.end annotation
|
|
|
|
iget-boolean v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->isDirty:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->stateSubject:Lrx/subjects/BehaviorSubject;
|
|
|
|
iget-object v1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->state:Lcom/discord/stores/StoreStreamRtcConnection$State;
|
|
|
|
invoke-virtual {v0, v1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, p0, Lcom/discord/stores/StoreStreamRtcConnection;->isDirty:Z
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setRtcConnection$app_productionDiscordExternalRelease(Lcom/discord/rtcconnection/RtcConnection;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreStreamRtcConnection;->rtcConnection:Lcom/discord/rtcconnection/RtcConnection;
|
|
|
|
return-void
|
|
.end method
|