437 lines
12 KiB
Smali
437 lines
12 KiB
Smali
.class public final Lcom/discord/views/video/AppVideoStreamRenderer;
|
|
.super Landroid/widget/RelativeLayout;
|
|
.source "AppVideoStreamRenderer.kt"
|
|
|
|
|
|
# instance fields
|
|
.field public d:Z
|
|
|
|
.field public final e:Lrx/subjects/BehaviorSubject;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lrx/subjects/BehaviorSubject<",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public f:Lrx/Subscription;
|
|
|
|
.field public g:Ljava/lang/Integer;
|
|
|
|
.field public h:Lco/discord/media_engine/VideoStreamRenderer;
|
|
|
|
.field public i:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
.field public j:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
.field public k:Lkotlin/jvm/functions/Function1;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Landroid/graphics/Point;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
.locals 6
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x6
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/views/video/AppVideoStreamRenderer;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
|
|
.locals 6
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v0, p0
|
|
|
|
move-object v1, p1
|
|
|
|
move-object v2, p2
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/discord/views/video/AppVideoStreamRenderer;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
.locals 0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
invoke-static {p1}, Lrx/subjects/BehaviorSubject;->a(Ljava/lang/Object;)Lrx/subjects/BehaviorSubject;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->e:Lrx/subjects/BehaviorSubject;
|
|
|
|
sget-object p1, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_BALANCED:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->i:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
iput-object p1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->j:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string p1, "context"
|
|
|
|
invoke-static {p1}, Ls/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public synthetic constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;IILkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
.locals 0
|
|
|
|
and-int/lit8 p5, p4, 0x2
|
|
|
|
if-eqz p5, :cond_0
|
|
|
|
const/4 p2, 0x0
|
|
|
|
:cond_0
|
|
and-int/lit8 p4, p4, 0x4
|
|
|
|
if-eqz p4, :cond_1
|
|
|
|
const/4 p3, 0x0
|
|
|
|
:cond_1
|
|
invoke-direct {p0, p1, p2, p3}, Lcom/discord/views/video/AppVideoStreamRenderer;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a()V
|
|
.locals 6
|
|
.annotation build Landroidx/annotation/UiThread;
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->h:Lco/discord/media_engine/VideoStreamRenderer;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->f:Lrx/Subscription;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
invoke-interface {v1}, Lrx/Subscription;->unsubscribe()V
|
|
|
|
:cond_0
|
|
sget-object v1, Lcom/discord/stores/StoreStream;->Companion:Lcom/discord/stores/StoreStream$Companion;
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreStream$Companion;->getMediaEngine()Lcom/discord/stores/StoreMediaEngine;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/discord/stores/StoreMediaEngine;->getVoiceEngineNative()Lcom/hammerandchisel/libdiscord/Discord;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
const/4 v4, 0x4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
invoke-static/range {v0 .. v5}, Lco/discord/media_engine/VideoStreamRenderer;->attachToStream$default(Lco/discord/media_engine/VideoStreamRenderer;Lcom/hammerandchisel/libdiscord/Discord;Ljava/lang/String;Lorg/webrtc/RendererCommon$RendererEvents;ILjava/lang/Object;)V
|
|
|
|
iget-object v0, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->h:Lco/discord/media_engine/VideoStreamRenderer;
|
|
|
|
invoke-virtual {p0, v0}, Landroid/widget/RelativeLayout;->removeView(Landroid/view/View;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->h:Lco/discord/media_engine/VideoStreamRenderer;
|
|
|
|
sget v0, Le/c/a/u;->c:I
|
|
|
|
add-int/lit8 v0, v0, -0x1
|
|
|
|
sput v0, Le/c/a/u;->c:I
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "destroyed renderer, bound count: "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
sget v1, Le/c/a/u;->c:I
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "AppVideoStreamRendere"
|
|
|
|
invoke-static {v1, v0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public final a(Ljava/lang/Integer;Lorg/webrtc/RendererCommon$ScalingType;Lorg/webrtc/RendererCommon$ScalingType;Z)V
|
|
.locals 5
|
|
|
|
new-instance v0, Lcom/discord/views/video/AppVideoStreamRenderer$a;
|
|
|
|
invoke-direct {v0, p0}, Lcom/discord/views/video/AppVideoStreamRenderer$a;-><init>(Lcom/discord/views/video/AppVideoStreamRenderer;)V
|
|
|
|
if-eqz p1, :cond_8
|
|
|
|
const/4 v1, 0x0
|
|
|
|
iget-object v2, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->h:Lco/discord/media_engine/VideoStreamRenderer;
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
const-string v1, "AppVideoStreamRendere"
|
|
|
|
const-string v2, "created renderer"
|
|
|
|
invoke-static {v1, v2}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
new-instance v1, Lco/discord/media_engine/VideoStreamRenderer;
|
|
|
|
invoke-virtual {p0}, Landroid/widget/RelativeLayout;->getContext()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v4, "context"
|
|
|
|
invoke-static {v2, v4}, Ls/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {v1, v2}, Lco/discord/media_engine/VideoStreamRenderer;-><init>(Landroid/content/Context;)V
|
|
|
|
iput-object v1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->h:Lco/discord/media_engine/VideoStreamRenderer;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:cond_0
|
|
iget-object v2, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->g:Ljava/lang/Integer;
|
|
|
|
invoke-static {p1, v2}, Ls/u/b/j;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
xor-int/2addr v2, v3
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v2
|
|
|
|
invoke-virtual {v0, v2}, Lcom/discord/views/video/AppVideoStreamRenderer$a;->invoke(I)V
|
|
|
|
iput-object p1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->g:Ljava/lang/Integer;
|
|
|
|
:cond_1
|
|
if-eqz v1, :cond_3
|
|
|
|
iget-object p1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->h:Lco/discord/media_engine/VideoStreamRenderer;
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
new-instance v0, Landroid/widget/RelativeLayout$LayoutParams;
|
|
|
|
const/4 v1, -0x2
|
|
|
|
invoke-direct {v0, v1, v1}, Landroid/widget/RelativeLayout$LayoutParams;-><init>(II)V
|
|
|
|
const/16 v1, 0xd
|
|
|
|
const/4 v2, -0x1
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/widget/RelativeLayout$LayoutParams;->addRule(II)V
|
|
|
|
invoke-virtual {p1, v0}, Landroid/view/SurfaceView;->setLayoutParams(Landroid/view/ViewGroup$LayoutParams;)V
|
|
|
|
:cond_2
|
|
iget-object p1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->h:Lco/discord/media_engine/VideoStreamRenderer;
|
|
|
|
invoke-virtual {p0, p1}, Landroid/widget/RelativeLayout;->addView(Landroid/view/View;)V
|
|
|
|
:cond_3
|
|
iget-object p1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->h:Lco/discord/media_engine/VideoStreamRenderer;
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
invoke-virtual {p1, p2, p3}, Lorg/webrtc/SurfaceViewRenderer;->setScalingType(Lorg/webrtc/RendererCommon$ScalingType;Lorg/webrtc/RendererCommon$ScalingType;)V
|
|
|
|
invoke-virtual {p1, p4}, Lorg/webrtc/SurfaceViewRenderer;->setMirror(Z)V
|
|
|
|
iget-boolean p4, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->d:Z
|
|
|
|
invoke-virtual {p1, p4}, Landroid/view/SurfaceView;->setZOrderMediaOverlay(Z)V
|
|
|
|
:cond_4
|
|
iget-object p1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->i:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
iget-object p4, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->j:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
if-eqz p2, :cond_5
|
|
|
|
move-object v0, p2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
sget-object v0, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_BALANCED:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
:goto_0
|
|
iput-object v0, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->i:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
if-eqz p3, :cond_6
|
|
|
|
move-object v0, p3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
sget-object v0, Lorg/webrtc/RendererCommon$ScalingType;->SCALE_ASPECT_BALANCED:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
:goto_1
|
|
iput-object v0, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->j:Lorg/webrtc/RendererCommon$ScalingType;
|
|
|
|
if-ne p2, p1, :cond_7
|
|
|
|
if-eq p4, p3, :cond_9
|
|
|
|
:cond_7
|
|
invoke-virtual {p0}, Landroid/widget/RelativeLayout;->requestLayout()V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_8
|
|
invoke-virtual {p0}, Lcom/discord/views/video/AppVideoStreamRenderer;->a()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
iput-object p1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->g:Ljava/lang/Integer;
|
|
|
|
:cond_9
|
|
:goto_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public final getOnFrameRenderedListener()Lkotlin/jvm/functions/Function1;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"Landroid/graphics/Point;",
|
|
"Lkotlin/Unit;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->k:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public onDetachedFromWindow()V
|
|
.locals 1
|
|
|
|
invoke-super {p0}, Landroid/widget/RelativeLayout;->onDetachedFromWindow()V
|
|
|
|
invoke-virtual {p0}, Lcom/discord/views/video/AppVideoStreamRenderer;->a()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-object v0, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->g:Ljava/lang/Integer;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onSizeChanged(IIII)V
|
|
.locals 0
|
|
|
|
invoke-super {p0, p1, p2, p3, p4}, Landroid/widget/RelativeLayout;->onSizeChanged(IIII)V
|
|
|
|
iget-object p1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->e:Lrx/subjects/BehaviorSubject;
|
|
|
|
sget-object p2, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
invoke-virtual {p1, p2}, Lrx/subjects/BehaviorSubject;->onNext(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setIsOverlay(Z)V
|
|
.locals 0
|
|
|
|
iput-boolean p1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->d:Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setMatchVideoOrientation(Z)V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final setOnFrameRenderedListener(Lkotlin/jvm/functions/Function1;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
"-",
|
|
"Landroid/graphics/Point;",
|
|
"Lkotlin/Unit;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
iput-object p1, p0, Lcom/discord/views/video/AppVideoStreamRenderer;->k:Lkotlin/jvm/functions/Function1;
|
|
|
|
return-void
|
|
.end method
|