.class public final Lcom/discord/stores/StoreMediaEngine; .super Lcom/discord/stores/Store; .source "StoreMediaEngine.kt" # annotations .annotation system Ldalvik/annotation/MemberClasses; value = { Lcom/discord/stores/StoreMediaEngine$EngineListener;, Lcom/discord/stores/StoreMediaEngine$Companion; } .end annotation # static fields .field public static final Companion:Lcom/discord/stores/StoreMediaEngine$Companion; .field public static final DEFAULT_OPENSLES_CONFIG:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig; .field public static final DEFAULT_VIDEO_DEVICE_GUID:Ljava/lang/String; = "" .field public static final LOCAL_VOICE_STATUS_DEFAULT:Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus; # instance fields .field public final isNativeEngineInitializedSubject:Lrx/subjects/SerializedSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/SerializedSubject<", "Ljava/lang/Boolean;", "Ljava/lang/Boolean;", ">;" } .end annotation .end field .field public final localVoiceStatus:Lrx/Observable; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/Observable<", "Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;", ">;" } .end annotation .end field .field public final localVoiceStatusSubject:Lrx/subjects/SerializedSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/SerializedSubject<", "Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;", "Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;", ">;" } .end annotation .end field .field public mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; .field public final mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings; .field public final openSLESConfigSubject:Lrx/subjects/SerializedSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/SerializedSubject<", "Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;", "Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;", ">;" } .end annotation .end field .field public preferredVideoInputDeviceGUID:Ljava/lang/String; .field public final preferredVideoInputDeviceGuidCache:Lcom/discord/utilities/persister/Persister; .annotation system Ldalvik/annotation/Signature; value = { "Lcom/discord/utilities/persister/Persister<", "Ljava/lang/String;", ">;" } .end annotation .end field .field public final pttActiveSubject:Lrx/subjects/SerializedSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/SerializedSubject<", "Ljava/lang/Boolean;", "Ljava/lang/Boolean;", ">;" } .end annotation .end field .field public selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription; .field public final selectedVideoInputDeviceSubject:Lrx/subjects/BehaviorSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/BehaviorSubject<", "Lco/discord/media_engine/VideoInputDeviceDescription;", ">;" } .end annotation .end field .field public subscriptionsPerConnection:Lrx/Subscription; .field public userId:J .field public videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription; .field public final videoInputDevicesSubject:Lrx/subjects/BehaviorSubject; .annotation system Ldalvik/annotation/Signature; value = { "Lrx/subjects/BehaviorSubject<", "Ljava/util/List<", "Lco/discord/media_engine/VideoInputDeviceDescription;", ">;>;" } .end annotation .end field # direct methods .method public static constructor ()V .locals 3 new-instance v0, Lcom/discord/stores/StoreMediaEngine$Companion; const/4 v1, 0x0 invoke-direct {v0, v1}, Lcom/discord/stores/StoreMediaEngine$Companion;->(Lkotlin/jvm/internal/DefaultConstructorMarker;)V sput-object v0, Lcom/discord/stores/StoreMediaEngine;->Companion:Lcom/discord/stores/StoreMediaEngine$Companion; new-instance v0, Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus; const/high16 v1, -0x3d380000 # -100.0f const/4 v2, 0x0 invoke-direct {v0, v1, v2}, Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;->(FZ)V sput-object v0, Lcom/discord/stores/StoreMediaEngine;->LOCAL_VOICE_STATUS_DEFAULT:Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus; sget-object v0, Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;->FORCE_DISABLED:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig; sput-object v0, Lcom/discord/stores/StoreMediaEngine;->DEFAULT_OPENSLES_CONFIG:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig; return-void .end method .method public constructor (Lcom/discord/stores/StoreMediaSettings;)V .locals 3 if-eqz p1, :cond_0 invoke-direct {p0}, Lcom/discord/stores/Store;->()V iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings; new-instance p1, Lrx/subjects/SerializedSubject; sget-object v0, Lcom/discord/stores/StoreMediaEngine;->LOCAL_VOICE_STATUS_DEFAULT:Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus; invoke-static {v0}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject; move-result-object v0 invoke-direct {p1, v0}, Lrx/subjects/SerializedSubject;->(Lrx/subjects/Subject;)V iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->localVoiceStatusSubject:Lrx/subjects/SerializedSubject; new-instance p1, Lrx/subjects/SerializedSubject; const/4 v0, 0x0 invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; move-result-object v1 invoke-static {v1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject; move-result-object v1 invoke-direct {p1, v1}, Lrx/subjects/SerializedSubject;->(Lrx/subjects/Subject;)V iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->pttActiveSubject:Lrx/subjects/SerializedSubject; const-string p1, "" iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String; new-instance p1, Lcom/discord/utilities/persister/Persister; iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String; const-string v2, "PREFERRED_VIDEO_INPUT_DEVICE_GUID" invoke-direct {p1, v2, v1}, Lcom/discord/utilities/persister/Persister;->(Ljava/lang/String;Ljava/lang/Object;)V iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGuidCache:Lcom/discord/utilities/persister/Persister; iget-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription; invoke-static {p1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject; move-result-object p1 iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDeviceSubject:Lrx/subjects/BehaviorSubject; new-array p1, v0, [Lco/discord/media_engine/VideoInputDeviceDescription; iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription; iget-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription; invoke-static {p1}, Le/k/a/c/e/p/g;->asList([Ljava/lang/Object;)Ljava/util/List; move-result-object p1 invoke-static {p1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject; move-result-object p1 iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevicesSubject:Lrx/subjects/BehaviorSubject; new-instance p1, Lrx/subjects/SerializedSubject; invoke-static {}, Lrx/subjects/BehaviorSubject;->p()Lrx/subjects/BehaviorSubject; move-result-object v1 invoke-direct {p1, v1}, Lrx/subjects/SerializedSubject;->(Lrx/subjects/Subject;)V iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->openSLESConfigSubject:Lrx/subjects/SerializedSubject; new-instance p1, Lrx/subjects/SerializedSubject; invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; move-result-object v0 invoke-static {v0}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject; move-result-object v0 invoke-direct {p1, v0}, Lrx/subjects/SerializedSubject;->(Lrx/subjects/Subject;)V iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->isNativeEngineInitializedSubject:Lrx/subjects/SerializedSubject; const-wide/16 v0, -0x1 iput-wide v0, p0, Lcom/discord/stores/StoreMediaEngine;->userId:J iget-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->localVoiceStatusSubject:Lrx/subjects/SerializedSubject; invoke-static {p1}, Lcom/discord/utilities/rx/ObservableExtensionsKt;->computationLatest(Lrx/Observable;)Lrx/Observable; move-result-object p1 invoke-virtual {p1}, Lrx/Observable;->a()Lrx/Observable; move-result-object p1 new-instance v0, Lcom/discord/stores/StoreMediaEngine$localVoiceStatus$1; invoke-direct {v0, p0}, Lcom/discord/stores/StoreMediaEngine$localVoiceStatus$1;->(Lcom/discord/stores/StoreMediaEngine;)V new-instance v1, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action0$0; invoke-direct {v1, v0}, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action0$0;->(Lkotlin/jvm/functions/Function0;)V invoke-virtual {p1, v1}, Lrx/Observable;->b(Lrx/functions/Action0;)Lrx/Observable; move-result-object p1 new-instance v0, Lcom/discord/stores/StoreMediaEngine$localVoiceStatus$2; invoke-direct {v0, p0}, Lcom/discord/stores/StoreMediaEngine$localVoiceStatus$2;->(Lcom/discord/stores/StoreMediaEngine;)V new-instance v1, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action0$0; invoke-direct {v1, v0}, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action0$0;->(Lkotlin/jvm/functions/Function0;)V invoke-virtual {p1, v1}, Lrx/Observable;->d(Lrx/functions/Action0;)Lrx/Observable; move-result-object p1 invoke-virtual {p1}, Lrx/Observable;->f()Lrx/Observable; move-result-object p1 const-string v0, "localVoiceStatusSubject\n\u2026ening)\n .share()" invoke-static {p1, v0}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->localVoiceStatus:Lrx/Observable; return-void :cond_0 const-string p1, "mediaSettingsStore" invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V const/4 p1, 0x0 throw p1 .end method .method public static final synthetic access$disableLocalVoiceStatusListening(Lcom/discord/stores/StoreMediaEngine;)V .locals 0 invoke-direct {p0}, Lcom/discord/stores/StoreMediaEngine;->disableLocalVoiceStatusListening()V return-void .end method .method public static final synthetic access$enableLocalVoiceStatusListening(Lcom/discord/stores/StoreMediaEngine;)V .locals 0 invoke-direct {p0}, Lcom/discord/stores/StoreMediaEngine;->enableLocalVoiceStatusListening()V return-void .end method .method public static final synthetic access$getPreferredVideoInputDeviceGUID$p(Lcom/discord/stores/StoreMediaEngine;)Ljava/lang/String; .locals 0 iget-object p0, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String; return-object p0 .end method .method public static final synthetic access$getSelectedVideoInputDevice$p(Lcom/discord/stores/StoreMediaEngine;)Lco/discord/media_engine/VideoInputDeviceDescription; .locals 0 iget-object p0, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription; return-object p0 .end method .method public static final synthetic access$getVideoInputDevicesNative(Lcom/discord/stores/StoreMediaEngine;Lkotlin/jvm/functions/Function1;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreMediaEngine;->getVideoInputDevicesNative(Lkotlin/jvm/functions/Function1;)V return-void .end method .method public static final synthetic access$handleNativeEngineInitialized(Lcom/discord/stores/StoreMediaEngine;)V .locals 0 invoke-direct {p0}, Lcom/discord/stores/StoreMediaEngine;->handleNativeEngineInitialized()V return-void .end method .method public static final synthetic access$handleNewConnection(Lcom/discord/stores/StoreMediaEngine;Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreMediaEngine;->handleNewConnection(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;)V return-void .end method .method public static final synthetic access$handleUsersMuted(Lcom/discord/stores/StoreMediaEngine;Ljava/util/Map;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreMediaEngine;->handleUsersMuted(Ljava/util/Map;)V return-void .end method .method public static final synthetic access$handleUsersVolume(Lcom/discord/stores/StoreMediaEngine;Ljava/util/Map;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreMediaEngine;->handleUsersVolume(Ljava/util/Map;)V return-void .end method .method public static final synthetic access$handleVideoInputDevices(Lcom/discord/stores/StoreMediaEngine;[Lco/discord/media_engine/VideoInputDeviceDescription;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V .locals 0 invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreMediaEngine;->handleVideoInputDevices([Lco/discord/media_engine/VideoInputDeviceDescription;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V return-void .end method .method public static final synthetic access$handleVoiceConfigChanged(Lcom/discord/stores/StoreMediaEngine;Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;)V .locals 0 invoke-direct {p0, p1}, Lcom/discord/stores/StoreMediaEngine;->handleVoiceConfigChanged(Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;)V return-void .end method .method public static final synthetic access$setPreferredVideoInputDeviceGUID$p(Lcom/discord/stores/StoreMediaEngine;Ljava/lang/String;)V .locals 0 iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String; return-void .end method .method public static final synthetic access$setSelectedVideoInputDevice$p(Lcom/discord/stores/StoreMediaEngine;Lco/discord/media_engine/VideoInputDeviceDescription;)V .locals 0 iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription; return-void .end method .method private final declared-synchronized disableLocalVoiceStatusListening()V .locals 2 monitor-enter p0 :try_start_0 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; const/4 v1, 0x0 if-eqz v0, :cond_0 invoke-interface {v0, v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->b(Lkotlin/jvm/functions/Function1;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-void :cond_0 :try_start_1 const-string v0, "mediaEngine" invoke-static {v0}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw v1 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method private final declared-synchronized enableLocalVoiceStatusListening()V .locals 3 monitor-enter p0 :try_start_0 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; if-eqz v0, :cond_0 new-instance v1, Lcom/discord/stores/StoreMediaEngine$enableLocalVoiceStatusListening$1; iget-object v2, p0, Lcom/discord/stores/StoreMediaEngine;->localVoiceStatusSubject:Lrx/subjects/SerializedSubject; invoke-direct {v1, v2}, Lcom/discord/stores/StoreMediaEngine$enableLocalVoiceStatusListening$1;->(Lrx/subjects/SerializedSubject;)V invoke-interface {v0, v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->b(Lkotlin/jvm/functions/Function1;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-void :cond_0 :try_start_1 const-string v0, "mediaEngine" invoke-static {v0}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 const/4 v0, 0x0 throw v0 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method private final declared-synchronized getVideoInputDevicesNative(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 monitor-enter p0 :try_start_0 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; if-eqz v0, :cond_0 new-instance v1, Lcom/discord/stores/StoreMediaEngine$getVideoInputDevicesNative$1; invoke-direct {v1, p1}, Lcom/discord/stores/StoreMediaEngine$getVideoInputDevicesNative$1;->(Lkotlin/jvm/functions/Function1;)V invoke-interface {v0, v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->a(Lkotlin/jvm/functions/Function1;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-void :cond_0 :try_start_1 const-string p1, "mediaEngine" invoke-static {p1}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 const/4 p1, 0x0 throw p1 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method private final declared-synchronized handleNativeEngineInitialized()V .locals 2 monitor-enter p0 :try_start_0 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->isNativeEngineInitializedSubject:Lrx/subjects/SerializedSubject; const/4 v1, 0x1 invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; move-result-object v1 invoke-virtual {v0, v1}, Lrx/subjects/SerializedSubject;->onNext(Ljava/lang/Object;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-void :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method private final declared-synchronized handleNewConnection(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;)V .locals 2 monitor-enter p0 :try_start_0 invoke-direct {p0}, Lcom/discord/stores/StoreMediaEngine;->setupPerConnectionSubscriptions()Lrx/Subscription; move-result-object v0 new-instance v1, Lcom/discord/stores/StoreMediaEngine$handleNewConnection$1; invoke-direct {v1, p0, v0}, Lcom/discord/stores/StoreMediaEngine$handleNewConnection$1;->(Lcom/discord/stores/StoreMediaEngine;Lrx/Subscription;)V invoke-interface {p1, v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->b(Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection$b;)V new-instance p1, Lcom/discord/stores/StoreMediaEngine$handleNewConnection$2; invoke-direct {p1, p0}, Lcom/discord/stores/StoreMediaEngine$handleNewConnection$2;->(Lcom/discord/stores/StoreMediaEngine;)V invoke-direct {p0, p1}, Lcom/discord/stores/StoreMediaEngine;->getVideoInputDevicesNative(Lkotlin/jvm/functions/Function1;)V :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 private final declared-synchronized handleUsersMuted(Ljava/util/Map;)V .locals 6 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Map<", "Ljava/lang/Long;", "Ljava/lang/Boolean;", ">;)V" } .end annotation monitor-enter p0 if-eqz p1, :cond_2 :try_start_0 invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set; move-result-object p1 invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object p1 :cond_0 invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_2 invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/Map$Entry; iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; if-eqz v1, :cond_1 invoke-interface {v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->getConnections()Ljava/util/List; move-result-object v1 invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v1 :goto_0 invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z move-result v2 if-eqz v2, :cond_0 invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v2 check-cast v2, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection; invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object; move-result-object v3 check-cast v3, Ljava/lang/Number; invoke-virtual {v3}, Ljava/lang/Number;->longValue()J move-result-wide v3 invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v5 check-cast v5, Ljava/lang/Boolean; invoke-virtual {v5}, Ljava/lang/Boolean;->booleanValue()Z move-result v5 invoke-interface {v2, v3, v4, v5}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->a(JZ)V goto :goto_0 :cond_1 const-string p1, "mediaEngine" invoke-static {p1}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 const/4 p1, 0x0 throw p1 :catchall_0 move-exception p1 monitor-exit p0 throw p1 :cond_2 monitor-exit p0 return-void .end method .method private final declared-synchronized handleUsersVolume(Ljava/util/Map;)V .locals 6 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/Map<", "Ljava/lang/Long;", "Ljava/lang/Float;", ">;)V" } .end annotation monitor-enter p0 if-eqz p1, :cond_2 :try_start_0 invoke-interface {p1}, Ljava/util/Map;->entrySet()Ljava/util/Set; move-result-object p1 invoke-interface {p1}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object p1 :cond_0 invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_2 invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/util/Map$Entry; iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; if-eqz v1, :cond_1 invoke-interface {v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->getConnections()Ljava/util/List; move-result-object v1 invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v1 :goto_0 invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z move-result v2 if-eqz v2, :cond_0 invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v2 check-cast v2, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection; invoke-interface {v0}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object; move-result-object v3 check-cast v3, Ljava/lang/Number; invoke-virtual {v3}, Ljava/lang/Number;->longValue()J move-result-wide v3 invoke-interface {v0}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object; move-result-object v5 check-cast v5, Ljava/lang/Number; invoke-virtual {v5}, Ljava/lang/Number;->floatValue()F move-result v5 invoke-interface {v2, v3, v4, v5}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->a(JF)V goto :goto_0 :cond_1 const-string p1, "mediaEngine" invoke-static {p1}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 const/4 p1, 0x0 throw p1 :catchall_0 move-exception p1 monitor-exit p0 throw p1 :cond_2 monitor-exit p0 return-void .end method .method private final declared-synchronized handleVideoInputDevices([Lco/discord/media_engine/VideoInputDeviceDescription;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V .locals 5 .annotation system Ldalvik/annotation/Signature; value = { "([", "Lco/discord/media_engine/VideoInputDeviceDescription;", "Ljava/lang/String;", "Lkotlin/jvm/functions/Function0<", "Lkotlin/Unit;", ">;)V" } .end annotation monitor-enter p0 :try_start_0 array-length v0, p1 const/4 v1, 0x0 const/4 v2, 0x0 :goto_0 const/4 v3, -0x1 if-ge v2, v0, :cond_1 aget-object v4, p1, v2 invoke-virtual {v4}, Lco/discord/media_engine/VideoInputDeviceDescription;->getGuid()Ljava/lang/String; move-result-object v4 invoke-static {v4, p2}, Lw/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z 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 v2, -0x1 :goto_1 if-ltz v2, :cond_2 const/4 p2, 0x1 goto :goto_2 :cond_2 const/4 p2, 0x0 :goto_2 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; const/4 v4, 0x0 if-eqz v0, :cond_a invoke-interface {v0, v3}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->a(I)V iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; if-eqz v0, :cond_9 invoke-interface {v0, v2}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->a(I)V iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; if-eqz v0, :cond_8 invoke-interface {v0}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->getConnections()Ljava/util/List; move-result-object v0 invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v0 :goto_3 invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z move-result v3 if-eqz v3, :cond_3 invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v3 check-cast v3, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection; invoke-interface {v3, p2}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->c(Z)V goto :goto_3 :cond_3 if-eqz p3, :cond_4 invoke-interface {p3}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object; move-result-object p3 check-cast p3, Lkotlin/Unit; :cond_4 if-eqz p2, :cond_5 aget-object p2, p1, v2 goto :goto_4 :cond_5 move-object p2, v4 :goto_4 iput-object p2, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription; iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription; iget-object p2, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDeviceSubject:Lrx/subjects/BehaviorSubject; iget-object p3, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription; invoke-virtual {p2, p3}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V iget-object p2, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevicesSubject:Lrx/subjects/BehaviorSubject; invoke-static {p1}, Le/k/a/c/e/p/g;->asList([Ljava/lang/Object;)Ljava/util/List; move-result-object p1 invoke-virtual {p2, p1}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V iget-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription; if-eqz p1, :cond_7 iget-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription; if-eqz p1, :cond_6 invoke-virtual {p1}, Lco/discord/media_engine/VideoInputDeviceDescription;->getGuid()Ljava/lang/String; move-result-object p1 if-eqz p1, :cond_6 goto :goto_5 :cond_6 const-string p1, "" :goto_5 iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String; iget-object p1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGuidCache:Lcom/discord/utilities/persister/Persister; iget-object p2, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String; const/4 p3, 0x2 invoke-static {p1, p2, v1, p3, v4}, Lcom/discord/utilities/persister/Persister;->set$default(Lcom/discord/utilities/persister/Persister;Ljava/lang/Object;ZILjava/lang/Object;)Ljava/lang/Object; move-result-object p1 check-cast p1, Ljava/lang/String; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 :cond_7 monitor-exit p0 return-void :cond_8 :try_start_1 const-string p1, "mediaEngine" invoke-static {p1}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 throw v4 :cond_9 :try_start_2 const-string p1, "mediaEngine" invoke-static {p1}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V :try_end_2 .catchall {:try_start_2 .. :try_end_2} :catchall_0 throw v4 :cond_a :try_start_3 const-string p1, "mediaEngine" invoke-static {p1}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V :try_end_3 .catchall {:try_start_3 .. :try_end_3} :catchall_0 throw v4 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public static synthetic handleVideoInputDevices$default(Lcom/discord/stores/StoreMediaEngine;[Lco/discord/media_engine/VideoInputDeviceDescription;Ljava/lang/String;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V .locals 0 and-int/lit8 p4, p4, 0x4 if-eqz p4, :cond_0 const/4 p3, 0x0 :cond_0 invoke-direct {p0, p1, p2, p3}, Lcom/discord/stores/StoreMediaEngine;->handleVideoInputDevices([Lco/discord/media_engine/VideoInputDeviceDescription;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V return-void .end method .method private final declared-synchronized handleVoiceConfigChanged(Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;)V .locals 2 monitor-enter p0 if-eqz p1, :cond_1 :try_start_0 sget-object v0, Lcom/discord/stores/StoreMediaEngine;->Companion:Lcom/discord/stores/StoreMediaEngine$Companion; iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; if-eqz v1, :cond_0 invoke-virtual {v0, v1, p1}, Lcom/discord/stores/StoreMediaEngine$Companion;->setVoiceConfig(Lcom/discord/rtcconnection/mediaengine/MediaEngine;Lcom/discord/stores/StoreMediaSettings$VoiceConfiguration;)V goto :goto_0 :cond_0 const-string p1, "mediaEngine" invoke-static {p1}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 const/4 p1, 0x0 throw p1 :catchall_0 move-exception p1 monitor-exit p0 throw p1 :cond_1 :goto_0 monitor-exit p0 return-void .end method .method public static synthetic selectDefaultVideoDevice$default(Lcom/discord/stores/StoreMediaEngine;Lkotlin/jvm/functions/Function0;ILjava/lang/Object;)V .locals 0 and-int/lit8 p2, p2, 0x1 if-eqz p2, :cond_0 const/4 p1, 0x0 :cond_0 invoke-virtual {p0, p1}, Lcom/discord/stores/StoreMediaEngine;->selectDefaultVideoDevice(Lkotlin/jvm/functions/Function0;)V return-void .end method .method private final declared-synchronized setupPerConnectionSubscriptions()Lrx/Subscription; .locals 6 monitor-enter p0 :try_start_0 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->subscriptionsPerConnection:Lrx/Subscription; if-eqz v0, :cond_0 invoke-interface {v0}, Lrx/Subscription;->unsubscribe()V :cond_0 new-instance v0, Lrx/subscriptions/CompositeSubscription; const/4 v1, 0x3 new-array v1, v1, [Lrx/Subscription; const/4 v2, 0x0 iget-object v3, p0, Lcom/discord/stores/StoreMediaEngine;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings; invoke-virtual {v3}, Lcom/discord/stores/StoreMediaSettings;->getVoiceConfig()Lrx/Observable; move-result-object v3 new-instance v4, Lcom/discord/stores/StoreMediaEngine$setupPerConnectionSubscriptions$subscriptionsPerConnection$1; invoke-direct {v4, p0}, Lcom/discord/stores/StoreMediaEngine$setupPerConnectionSubscriptions$subscriptionsPerConnection$1;->(Lcom/discord/stores/StoreMediaEngine;)V new-instance v5, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action1$0; invoke-direct {v5, v4}, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action1$0;->(Lkotlin/jvm/functions/Function1;)V sget-object v4, Lcom/discord/stores/StoreMediaEngine$setupPerConnectionSubscriptions$subscriptionsPerConnection$2;->INSTANCE:Lcom/discord/stores/StoreMediaEngine$setupPerConnectionSubscriptions$subscriptionsPerConnection$2; invoke-virtual {v3, v5, v4}, Lrx/Observable;->a(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription; move-result-object v3 aput-object v3, v1, v2 const/4 v2, 0x1 iget-object v3, p0, Lcom/discord/stores/StoreMediaEngine;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings; invoke-virtual {v3}, Lcom/discord/stores/StoreMediaSettings;->getUsersVolume()Lrx/Observable; move-result-object v3 new-instance v4, Lcom/discord/stores/StoreMediaEngine$setupPerConnectionSubscriptions$subscriptionsPerConnection$3; invoke-direct {v4, p0}, Lcom/discord/stores/StoreMediaEngine$setupPerConnectionSubscriptions$subscriptionsPerConnection$3;->(Lcom/discord/stores/StoreMediaEngine;)V new-instance v5, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action1$0; invoke-direct {v5, v4}, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action1$0;->(Lkotlin/jvm/functions/Function1;)V sget-object v4, Lcom/discord/stores/StoreMediaEngine$setupPerConnectionSubscriptions$subscriptionsPerConnection$4;->INSTANCE:Lcom/discord/stores/StoreMediaEngine$setupPerConnectionSubscriptions$subscriptionsPerConnection$4; invoke-virtual {v3, v5, v4}, Lrx/Observable;->a(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription; move-result-object v3 aput-object v3, v1, v2 const/4 v2, 0x2 iget-object v3, p0, Lcom/discord/stores/StoreMediaEngine;->mediaSettingsStore:Lcom/discord/stores/StoreMediaSettings; invoke-virtual {v3}, Lcom/discord/stores/StoreMediaSettings;->getUsersMuted()Lrx/Observable; move-result-object v3 new-instance v4, Lcom/discord/stores/StoreMediaEngine$setupPerConnectionSubscriptions$subscriptionsPerConnection$5; invoke-direct {v4, p0}, Lcom/discord/stores/StoreMediaEngine$setupPerConnectionSubscriptions$subscriptionsPerConnection$5;->(Lcom/discord/stores/StoreMediaEngine;)V new-instance v5, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action1$0; invoke-direct {v5, v4}, Lcom/discord/stores/StoreMediaEngine$sam$rx_functions_Action1$0;->(Lkotlin/jvm/functions/Function1;)V sget-object v4, Lcom/discord/stores/StoreMediaEngine$setupPerConnectionSubscriptions$subscriptionsPerConnection$6;->INSTANCE:Lcom/discord/stores/StoreMediaEngine$setupPerConnectionSubscriptions$subscriptionsPerConnection$6; invoke-virtual {v3, v5, v4}, Lrx/Observable;->a(Lrx/functions/Action1;Lrx/functions/Action1;)Lrx/Subscription; move-result-object v3 aput-object v3, v1, v2 invoke-direct {v0, v1}, Lrx/subscriptions/CompositeSubscription;->([Lrx/Subscription;)V iput-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->subscriptionsPerConnection:Lrx/Subscription; :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 # virtual methods .method public final declared-synchronized cycleVideoInputDevice()V .locals 2 monitor-enter p0 :try_start_0 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription; iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription; invoke-static {v0, v1}, Le/k/a/c/e/p/g;->indexOf([Ljava/lang/Object;Ljava/lang/Object;)I move-result v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 if-gez v0, :cond_0 monitor-exit p0 return-void :cond_0 :try_start_1 iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription; invoke-static {v1}, Le/k/a/c/e/p/g;->getLastIndex([Ljava/lang/Object;)I move-result v1 if-ne v0, v1, :cond_1 const/4 v0, 0x0 goto :goto_0 :cond_1 add-int/lit8 v0, v0, 0x1 :goto_0 iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevices:[Lco/discord/media_engine/VideoInputDeviceDescription; aget-object v0, v1, v0 invoke-virtual {v0}, Lco/discord/media_engine/VideoInputDeviceDescription;->getGuid()Ljava/lang/String; move-result-object v0 invoke-virtual {p0, v0}, Lcom/discord/stores/StoreMediaEngine;->selectVideoInputDevice(Ljava/lang/String;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 monitor-exit p0 return-void :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method public final getIsNativeEngineInitialized()Lrx/Observable; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Ljava/lang/Boolean;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->isNativeEngineInitializedSubject:Lrx/subjects/SerializedSubject; return-object v0 .end method .method public final getLocalVoiceStatus()Lrx/Observable; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Lcom/discord/rtcconnection/mediaengine/MediaEngine$LocalVoiceStatus;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->localVoiceStatus:Lrx/Observable; return-object v0 .end method .method public final getMediaEngine()Lcom/discord/rtcconnection/mediaengine/MediaEngine; .locals 1 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; if-eqz v0, :cond_0 return-object v0 :cond_0 const-string v0, "mediaEngine" invoke-static {v0}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V const/4 v0, 0x0 throw v0 .end method .method public final getOpenSLESConfig()Lrx/Observable; .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->openSLESConfigSubject:Lrx/subjects/SerializedSubject; return-object v0 .end method .method public final getSelectedVideoInputDevice()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Lco/discord/media_engine/VideoInputDeviceDescription;", ">;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDeviceSubject:Lrx/subjects/BehaviorSubject; invoke-virtual {v0}, Lrx/Observable;->a()Lrx/Observable; move-result-object v0 const-string v1, "selectedVideoInputDevice\u2026 .distinctUntilChanged()" invoke-static {v0, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final getSelectedVideoInputDeviceBlocking()Lco/discord/media_engine/VideoInputDeviceDescription; .locals 1 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->selectedVideoInputDevice:Lco/discord/media_engine/VideoInputDeviceDescription; return-object v0 .end method .method public final getVideoInputDevices()Lrx/Observable; .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "()", "Lrx/Observable<", "Ljava/util/List<", "Lco/discord/media_engine/VideoInputDeviceDescription;", ">;>;" } .end annotation iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->videoInputDevicesSubject:Lrx/subjects/BehaviorSubject; invoke-virtual {v0}, Lrx/Observable;->a()Lrx/Observable; move-result-object v0 const-string v1, "videoInputDevicesSubject\u2026 .distinctUntilChanged()" invoke-static {v0, v1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V return-object v0 .end method .method public final declared-synchronized getVoiceEngineNative()Lcom/hammerandchisel/libdiscord/Discord; .locals 1 monitor-enter p0 :try_start_0 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; if-eqz v0, :cond_0 invoke-interface {v0}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->a()Lcom/hammerandchisel/libdiscord/Discord; move-result-object v0 :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-object v0 :cond_0 :try_start_1 const-string v0, "mediaEngine" invoke-static {v0}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 const/4 v0, 0x0 throw v0 :catchall_0 move-exception v0 monitor-exit p0 throw v0 .end method .method public final declared-synchronized handleConnectionOpen(Lcom/discord/models/domain/ModelPayload;)V .locals 2 monitor-enter p0 :try_start_0 const-string v0, "payload" if-eqz p1, :cond_0 invoke-virtual {p1}, Lcom/discord/models/domain/ModelPayload;->getMe()Lcom/discord/models/domain/ModelUser; move-result-object p1 const-string v0, "payload.me" invoke-static {p1, v0}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual {p1}, Lcom/discord/models/domain/ModelUser;->getId()J move-result-wide v0 iput-wide v0, p0, Lcom/discord/stores/StoreMediaEngine;->userId:J :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-void :cond_0 :try_start_1 invoke-static {v0}, Lw/u/b/j;->a(Ljava/lang/String;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 const/4 p1, 0x0 throw p1 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public init(Landroid/content/Context;)V .locals 4 const/4 v0, 0x0 if-eqz p1, :cond_3 invoke-super {p0, p1}, Lcom/discord/stores/Store;->init(Landroid/content/Context;)V iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGuidCache:Lcom/discord/utilities/persister/Persister; invoke-virtual {v1}, Lcom/discord/utilities/persister/Persister;->get()Ljava/lang/Object; move-result-object v1 check-cast v1, Ljava/lang/String; iput-object v1, p0, Lcom/discord/stores/StoreMediaEngine;->preferredVideoInputDeviceGUID:Ljava/lang/String; invoke-virtual {p0}, Lcom/discord/stores/Store;->getPrefsSessionDurable()Landroid/content/SharedPreferences; move-result-object v1 sget-object v2, Lcom/discord/stores/StoreMediaEngine;->DEFAULT_OPENSLES_CONFIG:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig; invoke-virtual {v2}, Ljava/lang/Enum;->name()Ljava/lang/String; move-result-object v2 const-string v3, "OPEN_SLES" invoke-interface {v1, v3, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object v1 if-eqz v1, :cond_0 goto :goto_0 :cond_0 sget-object v1, Lcom/discord/stores/StoreMediaEngine;->DEFAULT_OPENSLES_CONFIG:Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig; invoke-virtual {v1}, Ljava/lang/Enum;->name()Ljava/lang/String; move-result-object v1 :goto_0 const-string v2, "prefsSessionDurable\n \u2026AULT_OPENSLES_CONFIG.name" invoke-static {v1, v2}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V invoke-static {v1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;->valueOf(Ljava/lang/String;)Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig; move-result-object v1 iget-object v2, p0, Lcom/discord/stores/StoreMediaEngine;->openSLESConfigSubject:Lrx/subjects/SerializedSubject; invoke-virtual {v2, v1}, Lrx/subjects/SerializedSubject;->onNext(Ljava/lang/Object;)V invoke-static {}, Ljava/util/concurrent/Executors;->newSingleThreadExecutor()Ljava/util/concurrent/ExecutorService; move-result-object v2 const-string v3, "Executors.newSingleThreadExecutor()" invoke-static {v2, v3}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V sget-object v3, Lcom/discord/app/AppLog;->c:Lcom/discord/app/AppLog; if-eqz v1, :cond_2 if-eqz v3, :cond_1 new-instance v0, Li; invoke-direct {v0, p1, v2, v1, v3}, Li;->(Landroid/content/Context;Ljava/util/concurrent/ExecutorService;Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;Lcom/discord/utilities/logging/Logger;)V new-instance p1, Lcom/discord/stores/StoreMediaEngine$EngineListener; invoke-direct {p1, p0}, Lcom/discord/stores/StoreMediaEngine$EngineListener;->(Lcom/discord/stores/StoreMediaEngine;)V invoke-interface {v0, p1}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->a(Lcom/discord/rtcconnection/mediaengine/MediaEngine$b;)V iput-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; return-void :cond_1 const-string p1, "logger" invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V throw v0 :cond_2 const-string p1, "openSLESConfig" invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V throw v0 :cond_3 const-string p1, "context" invoke-static {p1}, Lw/u/b/j;->a(Ljava/lang/String;)V throw v0 .end method .method public final selectDefaultVideoDevice(Lkotlin/jvm/functions/Function0;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lkotlin/jvm/functions/Function0<", "Lkotlin/Unit;", ">;)V" } .end annotation new-instance v0, Lcom/discord/stores/StoreMediaEngine$selectDefaultVideoDevice$1; invoke-direct {v0, p0, p1}, Lcom/discord/stores/StoreMediaEngine$selectDefaultVideoDevice$1;->(Lcom/discord/stores/StoreMediaEngine;Lkotlin/jvm/functions/Function0;)V invoke-direct {p0, v0}, Lcom/discord/stores/StoreMediaEngine;->getVideoInputDevicesNative(Lkotlin/jvm/functions/Function1;)V return-void .end method .method public final selectVideoInputDevice(Ljava/lang/String;)V .locals 1 new-instance v0, Lcom/discord/stores/StoreMediaEngine$selectVideoInputDevice$1; invoke-direct {v0, p0, p1}, Lcom/discord/stores/StoreMediaEngine$selectVideoInputDevice$1;->(Lcom/discord/stores/StoreMediaEngine;Ljava/lang/String;)V invoke-direct {p0, v0}, Lcom/discord/stores/StoreMediaEngine;->getVideoInputDevicesNative(Lkotlin/jvm/functions/Function1;)V return-void .end method .method public final declared-synchronized setOpenSLESConfig(Lcom/discord/rtcconnection/mediaengine/MediaEngine$OpenSLESConfig;)V .locals 2 .annotation build Landroid/annotation/SuppressLint; value = { "ApplySharedPref" } .end annotation monitor-enter p0 :try_start_0 const-string v0, "openSLESConfig" if-eqz p1, :cond_0 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->openSLESConfigSubject:Lrx/subjects/SerializedSubject; invoke-virtual {v0, p1}, Lrx/subjects/SerializedSubject;->onNext(Ljava/lang/Object;)V invoke-virtual {p0}, Lcom/discord/stores/Store;->getPrefsSessionDurable()Landroid/content/SharedPreferences; move-result-object v0 invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor; move-result-object v0 const-string v1, "OPEN_SLES" invoke-virtual {p1}, Ljava/lang/Enum;->name()Ljava/lang/String; move-result-object p1 invoke-interface {v0, v1, p1}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor; move-result-object p1 invoke-interface {p1}, Landroid/content/SharedPreferences$Editor;->commit()Z :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-void :cond_0 :try_start_1 invoke-static {v0}, Lw/u/b/j;->a(Ljava/lang/String;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 const/4 p1, 0x0 throw p1 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method .method public final declared-synchronized setPttActive(Z)V .locals 2 monitor-enter p0 :try_start_0 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->mediaEngine:Lcom/discord/rtcconnection/mediaengine/MediaEngine; if-eqz v0, :cond_1 invoke-interface {v0}, Lcom/discord/rtcconnection/mediaengine/MediaEngine;->getConnections()Ljava/util/List; move-result-object v0 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/MediaEngineConnection; invoke-interface {v1, p1}, Lcom/discord/rtcconnection/mediaengine/MediaEngineConnection;->b(Z)V goto :goto_0 :cond_0 iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine;->pttActiveSubject:Lrx/subjects/SerializedSubject; invoke-static {p1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean; move-result-object p1 invoke-virtual {v0, p1}, Lrx/subjects/SerializedSubject;->onNext(Ljava/lang/Object;)V :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit p0 return-void :cond_1 :try_start_1 const-string p1, "mediaEngine" invoke-static {p1}, Lw/u/b/j;->throwUninitializedPropertyAccessException(Ljava/lang/String;)V :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 const/4 p1, 0x0 throw p1 :catchall_0 move-exception p1 monitor-exit p0 throw p1 .end method