201 lines
5 KiB
Smali
201 lines
5 KiB
Smali
.class public final Lcom/discord/stores/StoreMediaEngine$selectDefaultVideoDevice$1;
|
|
.super Lj0/n/c/i;
|
|
.source "StoreMediaEngine.kt"
|
|
|
|
# interfaces
|
|
.implements Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
value = Lcom/discord/stores/StoreMediaEngine;->selectDefaultVideoDevice(Lkotlin/jvm/functions/Function0;)V
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
accessFlags = 0x19
|
|
name = null
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lj0/n/c/i;",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"[",
|
|
"Lco/discord/media_engine/VideoInputDeviceDescription;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public final synthetic $onSelected:Lkotlin/jvm/functions/Function0;
|
|
|
|
.field public final synthetic this$0:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lcom/discord/stores/StoreMediaEngine;Lkotlin/jvm/functions/Function0;)V
|
|
.locals 0
|
|
|
|
iput-object p1, p0, Lcom/discord/stores/StoreMediaEngine$selectDefaultVideoDevice$1;->this$0:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
iput-object p2, p0, Lcom/discord/stores/StoreMediaEngine$selectDefaultVideoDevice$1;->$onSelected:Lkotlin/jvm/functions/Function0;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
invoke-direct {p0, p1}, Lj0/n/c/i;-><init>(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public bridge synthetic invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 0
|
|
|
|
check-cast p1, [Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/stores/StoreMediaEngine$selectDefaultVideoDevice$1;->invoke([Lco/discord/media_engine/VideoInputDeviceDescription;)V
|
|
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final invoke([Lco/discord/media_engine/VideoInputDeviceDescription;)V
|
|
.locals 8
|
|
|
|
const/4 v0, 0x0
|
|
|
|
if-eqz p1, :cond_8
|
|
|
|
array-length v1, p1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_0
|
|
const/4 v4, 0x1
|
|
|
|
if-ge v3, v1, :cond_1
|
|
|
|
aget-object v5, p1, v3
|
|
|
|
invoke-virtual {v5}, Lco/discord/media_engine/VideoInputDeviceDescription;->getGuid()Ljava/lang/String;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object v6, p0, Lcom/discord/stores/StoreMediaEngine$selectDefaultVideoDevice$1;->this$0:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
invoke-static {v6}, Lcom/discord/stores/StoreMediaEngine;->access$getPreferredVideoInputDeviceGUID$p(Lcom/discord/stores/StoreMediaEngine;)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v5, v6}, Lj0/n/c/h;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v5
|
|
|
|
if-eqz v5, :cond_0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v1, 0x0
|
|
|
|
:goto_1
|
|
if-eqz v1, :cond_2
|
|
|
|
iget-object v0, p0, Lcom/discord/stores/StoreMediaEngine$selectDefaultVideoDevice$1;->this$0:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
invoke-static {v0}, Lcom/discord/stores/StoreMediaEngine;->access$getPreferredVideoInputDeviceGUID$p(Lcom/discord/stores/StoreMediaEngine;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_6
|
|
|
|
:cond_2
|
|
array-length v1, p1
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_2
|
|
if-ge v3, v1, :cond_5
|
|
|
|
aget-object v5, p1, v3
|
|
|
|
invoke-virtual {v5}, Lco/discord/media_engine/VideoInputDeviceDescription;->getFacing()Lco/discord/media_engine/VideoInputDeviceFacing;
|
|
|
|
move-result-object v6
|
|
|
|
sget-object v7, Lco/discord/media_engine/VideoInputDeviceFacing;->Front:Lco/discord/media_engine/VideoInputDeviceFacing;
|
|
|
|
if-ne v6, v7, :cond_3
|
|
|
|
const/4 v6, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_3
|
|
const/4 v6, 0x0
|
|
|
|
:goto_3
|
|
if-eqz v6, :cond_4
|
|
|
|
goto :goto_4
|
|
|
|
:cond_4
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_5
|
|
move-object v5, v0
|
|
|
|
:goto_4
|
|
if-eqz v5, :cond_6
|
|
|
|
goto :goto_5
|
|
|
|
:cond_6
|
|
invoke-static {p1}, Lf/n/a/k/a;->firstOrNull([Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
move-object v5, v1
|
|
|
|
check-cast v5, Lco/discord/media_engine/VideoInputDeviceDescription;
|
|
|
|
:goto_5
|
|
if-eqz v5, :cond_7
|
|
|
|
invoke-virtual {v5}, Lco/discord/media_engine/VideoInputDeviceDescription;->getGuid()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
:cond_7
|
|
:goto_6
|
|
iget-object v1, p0, Lcom/discord/stores/StoreMediaEngine$selectDefaultVideoDevice$1;->this$0:Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
iget-object v2, p0, Lcom/discord/stores/StoreMediaEngine$selectDefaultVideoDevice$1;->$onSelected:Lkotlin/jvm/functions/Function0;
|
|
|
|
invoke-static {v1, p1, v0, v2}, Lcom/discord/stores/StoreMediaEngine;->access$handleVideoInputDevices(Lcom/discord/stores/StoreMediaEngine;[Lco/discord/media_engine/VideoInputDeviceDescription;Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
|
|
|
|
return-void
|
|
|
|
:cond_8
|
|
const-string p1, "devices"
|
|
|
|
invoke-static {p1}, Lj0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|