1018 lines
28 KiB
Smali
1018 lines
28 KiB
Smali
.class public final Lco/discord/media_engine/internal/TransformStats;
|
|
.super Ljava/lang/Object;
|
|
.source "TransformStats.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final INSTANCE:Lco/discord/media_engine/internal/TransformStats;
|
|
|
|
.field public static final gson:Lcom/google/gson/Gson;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
new-instance v0, Lco/discord/media_engine/internal/TransformStats;
|
|
|
|
invoke-direct {v0}, Lco/discord/media_engine/internal/TransformStats;-><init>()V
|
|
|
|
sput-object v0, Lco/discord/media_engine/internal/TransformStats;->INSTANCE:Lco/discord/media_engine/internal/TransformStats;
|
|
|
|
new-instance v0, Lcom/google/gson/Gson;
|
|
|
|
invoke-direct {v0}, Lcom/google/gson/Gson;-><init>()V
|
|
|
|
sput-object v0, Lco/discord/media_engine/internal/TransformStats;->gson:Lcom/google/gson/Gson;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final sumBytes(Lco/discord/media_engine/internal/RtpStats;)J
|
|
.locals 4
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/RtpStats;->getFec()Lco/discord/media_engine/internal/PacketStats;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/PacketStats;->getHeaderBytes()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/RtpStats;->getFec()Lco/discord/media_engine/internal/PacketStats;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/PacketStats;->getPayloadBytes()J
|
|
|
|
move-result-wide v2
|
|
|
|
add-long/2addr v2, v0
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/RtpStats;->getFec()Lco/discord/media_engine/internal/PacketStats;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/PacketStats;->getPaddingBytes()J
|
|
|
|
move-result-wide v0
|
|
|
|
add-long/2addr v0, v2
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/RtpStats;->getRetransmitted()Lco/discord/media_engine/internal/PacketStats;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/PacketStats;->getHeaderBytes()J
|
|
|
|
move-result-wide v2
|
|
|
|
add-long/2addr v2, v0
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/RtpStats;->getRetransmitted()Lco/discord/media_engine/internal/PacketStats;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/PacketStats;->getPayloadBytes()J
|
|
|
|
move-result-wide v0
|
|
|
|
add-long/2addr v0, v2
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/RtpStats;->getRetransmitted()Lco/discord/media_engine/internal/PacketStats;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/PacketStats;->getPaddingBytes()J
|
|
|
|
move-result-wide v2
|
|
|
|
add-long/2addr v2, v0
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/RtpStats;->getTransmitted()Lco/discord/media_engine/internal/PacketStats;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/PacketStats;->getHeaderBytes()J
|
|
|
|
move-result-wide v0
|
|
|
|
add-long/2addr v0, v2
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/RtpStats;->getTransmitted()Lco/discord/media_engine/internal/PacketStats;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/PacketStats;->getPayloadBytes()J
|
|
|
|
move-result-wide v2
|
|
|
|
add-long/2addr v2, v0
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/RtpStats;->getTransmitted()Lco/discord/media_engine/internal/PacketStats;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/PacketStats;->getPaddingBytes()J
|
|
|
|
move-result-wide v0
|
|
|
|
add-long/2addr v0, v2
|
|
|
|
return-wide v0
|
|
.end method
|
|
|
|
.method private final sumPackets(Lco/discord/media_engine/internal/RtpStats;)I
|
|
.locals 2
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/RtpStats;->getFec()Lco/discord/media_engine/internal/PacketStats;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/PacketStats;->getPackets()I
|
|
|
|
move-result v0
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/RtpStats;->getRetransmitted()Lco/discord/media_engine/internal/PacketStats;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/PacketStats;->getPackets()I
|
|
|
|
move-result v1
|
|
|
|
add-int/2addr v1, v0
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/RtpStats;->getTransmitted()Lco/discord/media_engine/internal/PacketStats;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lco/discord/media_engine/internal/PacketStats;->getPackets()I
|
|
|
|
move-result p1
|
|
|
|
add-int/2addr p1, v1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public static final transform(Ljava/lang/String;)Lco/discord/media_engine/Stats;
|
|
.locals 59
|
|
|
|
move-object/from16 v0, p0
|
|
|
|
if-eqz v0, :cond_e
|
|
|
|
sget-object v2, Lco/discord/media_engine/internal/TransformStats;->gson:Lcom/google/gson/Gson;
|
|
|
|
const-class v3, Lco/discord/media_engine/internal/NativeStats;
|
|
|
|
invoke-virtual {v2, v0, v3}, Lcom/google/gson/Gson;->a(Ljava/lang/String;Ljava/lang/Class;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lco/discord/media_engine/internal/NativeStats;
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/NativeStats;->getOutbound()Lco/discord/media_engine/internal/Outbound;
|
|
|
|
move-result-object v2
|
|
|
|
const/high16 v3, 0x47000000 # 32768.0f
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
const/4 v7, 0x0
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/Outbound;->getAudio()Lco/discord/media_engine/internal/OutboundAudio;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v8}, Lco/discord/media_engine/internal/OutboundAudio;->getBytesSent()I
|
|
|
|
move-result v8
|
|
|
|
int-to-long v8, v8
|
|
|
|
add-long/2addr v8, v4
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/Outbound;->getAudio()Lco/discord/media_engine/internal/OutboundAudio;
|
|
|
|
move-result-object v2
|
|
|
|
new-instance v21, Lco/discord/media_engine/OutboundRtpAudio;
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundAudio;->getSsrc()I
|
|
|
|
move-result v12
|
|
|
|
new-instance v13, Lco/discord/media_engine/StatsCodec;
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundAudio;->getCodecPayloadType()I
|
|
|
|
move-result v10
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundAudio;->getCodecName()Ljava/lang/String;
|
|
|
|
move-result-object v11
|
|
|
|
invoke-direct {v13, v10, v11}, Lco/discord/media_engine/StatsCodec;-><init>(ILjava/lang/String;)V
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundAudio;->getPacketsSent()I
|
|
|
|
move-result v16
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundAudio;->getPacketsLost()I
|
|
|
|
move-result v10
|
|
|
|
invoke-static {v7, v10}, Ljava/lang/Math;->max(II)I
|
|
|
|
move-result v17
|
|
|
|
const/16 v10, 0x64
|
|
|
|
int-to-float v10, v10
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundAudio;->getFractionLost()F
|
|
|
|
move-result v11
|
|
|
|
mul-float v18, v11, v10
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundAudio;->getAudioLevel()I
|
|
|
|
move-result v10
|
|
|
|
int-to-float v10, v10
|
|
|
|
div-float v19, v10, v3
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundAudio;->getSpeaking()I
|
|
|
|
move-result v2
|
|
|
|
if-lez v2, :cond_0
|
|
|
|
const/16 v20, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/16 v20, 0x0
|
|
|
|
:goto_0
|
|
const-string v11, "audio"
|
|
|
|
move-object/from16 v10, v21
|
|
|
|
move-wide v14, v8
|
|
|
|
invoke-direct/range {v10 .. v20}, Lco/discord/media_engine/OutboundRtpAudio;-><init>(Ljava/lang/String;ILco/discord/media_engine/StatsCodec;JIIFFZ)V
|
|
|
|
move-object/from16 v24, v21
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move-wide v8, v4
|
|
|
|
const/16 v24, 0x0
|
|
|
|
:goto_1
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/NativeStats;->getOutbound()Lco/discord/media_engine/internal/Outbound;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/Outbound;->getVideo()Lco/discord/media_engine/internal/OutboundVideo;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getSubstreams()[Lco/discord/media_engine/internal/Substream;
|
|
|
|
move-result-object v2
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
array-length v10, v2
|
|
|
|
const/4 v11, 0x0
|
|
|
|
:goto_2
|
|
if-ge v11, v10, :cond_4
|
|
|
|
aget-object v12, v2, v11
|
|
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/Substream;->isFlexFEC()Z
|
|
|
|
move-result v13
|
|
|
|
if-nez v13, :cond_2
|
|
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/Substream;->isRTX()Z
|
|
|
|
move-result v13
|
|
|
|
if-nez v13, :cond_2
|
|
|
|
const/4 v13, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
:cond_2
|
|
const/4 v13, 0x0
|
|
|
|
:goto_3
|
|
if-eqz v13, :cond_3
|
|
|
|
goto :goto_4
|
|
|
|
:cond_3
|
|
add-int/lit8 v11, v11, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
const/4 v12, 0x0
|
|
|
|
:goto_4
|
|
if-eqz v12, :cond_7
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/NativeStats;->getOutbound()Lco/discord/media_engine/internal/Outbound;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/Outbound;->getVideo()Lco/discord/media_engine/internal/OutboundVideo;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getSubstreams()[Lco/discord/media_engine/internal/Substream;
|
|
|
|
move-result-object v2
|
|
|
|
array-length v10, v2
|
|
|
|
move-wide/from16 v29, v4
|
|
|
|
const/4 v11, 0x0
|
|
|
|
:goto_5
|
|
if-ge v11, v10, :cond_5
|
|
|
|
aget-object v13, v2, v11
|
|
|
|
sget-object v14, Lco/discord/media_engine/internal/TransformStats;->INSTANCE:Lco/discord/media_engine/internal/TransformStats;
|
|
|
|
invoke-virtual {v13}, Lco/discord/media_engine/internal/Substream;->getRtpStats()Lco/discord/media_engine/internal/RtpStats;
|
|
|
|
move-result-object v13
|
|
|
|
invoke-direct {v14, v13}, Lco/discord/media_engine/internal/TransformStats;->sumBytes(Lco/discord/media_engine/internal/RtpStats;)J
|
|
|
|
move-result-wide v13
|
|
|
|
add-long v29, v29, v13
|
|
|
|
add-int/lit8 v11, v11, 0x1
|
|
|
|
goto :goto_5
|
|
|
|
:cond_5
|
|
add-long v8, v8, v29
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/NativeStats;->getOutbound()Lco/discord/media_engine/internal/Outbound;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/Outbound;->getVideo()Lco/discord/media_engine/internal/OutboundVideo;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/Substream;->getSsrc()I
|
|
|
|
move-result v27
|
|
|
|
new-instance v10, Lco/discord/media_engine/StatsCodec;
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getCodecPayloadType()I
|
|
|
|
move-result v11
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getCodecName()Ljava/lang/String;
|
|
|
|
move-result-object v13
|
|
|
|
invoke-direct {v10, v11, v13}, Lco/discord/media_engine/StatsCodec;-><init>(ILjava/lang/String;)V
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getSubstreams()[Lco/discord/media_engine/internal/Substream;
|
|
|
|
move-result-object v11
|
|
|
|
array-length v13, v11
|
|
|
|
const/4 v14, 0x0
|
|
|
|
const/16 v31, 0x0
|
|
|
|
:goto_6
|
|
if-ge v14, v13, :cond_6
|
|
|
|
aget-object v15, v11, v14
|
|
|
|
sget-object v4, Lco/discord/media_engine/internal/TransformStats;->INSTANCE:Lco/discord/media_engine/internal/TransformStats;
|
|
|
|
invoke-virtual {v15}, Lco/discord/media_engine/internal/Substream;->getRtpStats()Lco/discord/media_engine/internal/RtpStats;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-direct {v4, v5}, Lco/discord/media_engine/internal/TransformStats;->sumPackets(Lco/discord/media_engine/internal/RtpStats;)I
|
|
|
|
move-result v4
|
|
|
|
add-int v31, v31, v4
|
|
|
|
add-int/lit8 v14, v14, 0x1
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
goto :goto_6
|
|
|
|
:cond_6
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/Substream;->getRtcpStats()Lco/discord/media_engine/internal/RtcpStats;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lco/discord/media_engine/internal/RtcpStats;->getPacketsLost()I
|
|
|
|
move-result v32
|
|
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/Substream;->getRtcpStats()Lco/discord/media_engine/internal/RtcpStats;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lco/discord/media_engine/internal/RtcpStats;->getFractionLost()F
|
|
|
|
move-result v33
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getMediaBitrate()I
|
|
|
|
move-result v34
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getTargetMediaBitrate()I
|
|
|
|
move-result v35
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getEncodeUsage()I
|
|
|
|
move-result v36
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getEncoderImplementationName()Ljava/lang/String;
|
|
|
|
move-result-object v37
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getAvgEncodeTime()I
|
|
|
|
move-result v38
|
|
|
|
new-instance v4, Lco/discord/media_engine/Resolution;
|
|
|
|
move-object/from16 v39, v4
|
|
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/Substream;->getWidth()I
|
|
|
|
move-result v5
|
|
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/Substream;->getHeight()I
|
|
|
|
move-result v11
|
|
|
|
invoke-direct {v4, v5, v11}, Lco/discord/media_engine/Resolution;-><init>(II)V
|
|
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/Substream;->getFrameCounts()Lco/discord/media_engine/internal/FrameCounts;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lco/discord/media_engine/internal/FrameCounts;->getDeltaFrames()I
|
|
|
|
move-result v4
|
|
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/Substream;->getFrameCounts()Lco/discord/media_engine/internal/FrameCounts;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Lco/discord/media_engine/internal/FrameCounts;->getKeyFrames()I
|
|
|
|
move-result v5
|
|
|
|
add-int v40, v5, v4
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getFramesEncoded()I
|
|
|
|
move-result v41
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getInputFrameRate()I
|
|
|
|
move-result v42
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getEncodeFrameRate()I
|
|
|
|
move-result v43
|
|
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/Substream;->getRtcpStats()Lco/discord/media_engine/internal/RtcpStats;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lco/discord/media_engine/internal/RtcpStats;->getFirPackets()I
|
|
|
|
move-result v44
|
|
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/Substream;->getRtcpStats()Lco/discord/media_engine/internal/RtcpStats;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lco/discord/media_engine/internal/RtcpStats;->getNackPackets()I
|
|
|
|
move-result v45
|
|
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/Substream;->getRtcpStats()Lco/discord/media_engine/internal/RtcpStats;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lco/discord/media_engine/internal/RtcpStats;->getPliPackets()I
|
|
|
|
move-result v46
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getQpSum()I
|
|
|
|
move-result v47
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getBwLimitedResolution()Z
|
|
|
|
move-result v48
|
|
|
|
invoke-virtual {v2}, Lco/discord/media_engine/internal/OutboundVideo;->getCpuLimitedResolution()Z
|
|
|
|
move-result v49
|
|
|
|
new-instance v2, Lco/discord/media_engine/OutboundRtpVideo;
|
|
|
|
move-object/from16 v25, v2
|
|
|
|
const-string v26, "video"
|
|
|
|
move-object/from16 v28, v10
|
|
|
|
invoke-direct/range {v25 .. v49}, Lco/discord/media_engine/OutboundRtpVideo;-><init>(Ljava/lang/String;ILco/discord/media_engine/StatsCodec;JIIFIIILjava/lang/String;ILco/discord/media_engine/Resolution;IIIIIIIIZZ)V
|
|
|
|
move-wide/from16 v54, v8
|
|
|
|
goto :goto_7
|
|
|
|
:cond_7
|
|
move-wide/from16 v54, v8
|
|
|
|
const/16 v25, 0x0
|
|
|
|
:goto_7
|
|
new-instance v2, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-direct {v2}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
new-instance v4, Ljava/util/LinkedHashMap;
|
|
|
|
invoke-direct {v4}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/NativeStats;->getInbound()[Lco/discord/media_engine/internal/Inbound;
|
|
|
|
move-result-object v5
|
|
|
|
if-eqz v5, :cond_c
|
|
|
|
array-length v8, v5
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const-wide/16 v16, 0x0
|
|
|
|
:goto_8
|
|
if-ge v9, v8, :cond_b
|
|
|
|
aget-object v10, v5, v9
|
|
|
|
invoke-virtual {v10}, Lco/discord/media_engine/internal/Inbound;->getId()Ljava/lang/String;
|
|
|
|
move-result-object v11
|
|
|
|
invoke-virtual {v10}, Lco/discord/media_engine/internal/Inbound;->getAudio()Lco/discord/media_engine/internal/InboundAudio;
|
|
|
|
move-result-object v12
|
|
|
|
invoke-virtual {v12}, Lco/discord/media_engine/internal/InboundAudio;->getBytesReceived()I
|
|
|
|
move-result v12
|
|
|
|
int-to-long v12, v12
|
|
|
|
add-long v12, v16, v12
|
|
|
|
invoke-virtual {v10}, Lco/discord/media_engine/internal/Inbound;->getAudio()Lco/discord/media_engine/internal/InboundAudio;
|
|
|
|
move-result-object v14
|
|
|
|
new-instance v15, Lco/discord/media_engine/InboundRtpAudio;
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getSsrc()I
|
|
|
|
move-result v28
|
|
|
|
new-instance v6, Lco/discord/media_engine/StatsCodec;
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getCodecPayloadType()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getCodecName()Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-direct {v6, v1, v7}, Lco/discord/media_engine/StatsCodec;-><init>(ILjava/lang/String;)V
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getPacketsReceived()I
|
|
|
|
move-result v32
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getPacketsLost()I
|
|
|
|
move-result v33
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getFractionLost()F
|
|
|
|
move-result v34
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getAudioLevel()I
|
|
|
|
move-result v1
|
|
|
|
int-to-float v1, v1
|
|
|
|
div-float v35, v1, v3
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getSpeaking()I
|
|
|
|
move-result v1
|
|
|
|
if-lez v1, :cond_8
|
|
|
|
const/16 v36, 0x1
|
|
|
|
goto :goto_9
|
|
|
|
:cond_8
|
|
const/16 v36, 0x0
|
|
|
|
:goto_9
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getJitter()I
|
|
|
|
move-result v37
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getJitterBuffer()I
|
|
|
|
move-result v38
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getJitterBufferPreferred()I
|
|
|
|
move-result v39
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getDelayEstimate()I
|
|
|
|
move-result v40
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getDecodingCNG()I
|
|
|
|
move-result v41
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getDecodingMutedOutput()I
|
|
|
|
move-result v42
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getDecodingNormal()I
|
|
|
|
move-result v43
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getDecodingPLC()I
|
|
|
|
move-result v44
|
|
|
|
invoke-virtual {v14}, Lco/discord/media_engine/internal/InboundAudio;->getDecodingPLCCNG()I
|
|
|
|
move-result v45
|
|
|
|
const-string v27, "audio"
|
|
|
|
move-object/from16 v26, v15
|
|
|
|
move-object/from16 v29, v6
|
|
|
|
move-wide/from16 v30, v12
|
|
|
|
invoke-direct/range {v26 .. v45}, Lco/discord/media_engine/InboundRtpAudio;-><init>(Ljava/lang/String;ILco/discord/media_engine/StatsCodec;JIIFFZIIIIIIIII)V
|
|
|
|
invoke-interface {v2, v11, v15}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lco/discord/media_engine/InboundRtpAudio;
|
|
|
|
invoke-virtual {v10}, Lco/discord/media_engine/internal/Inbound;->getVideo()Lco/discord/media_engine/internal/InboundVideo;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_a
|
|
|
|
invoke-virtual {v10}, Lco/discord/media_engine/internal/Inbound;->getVideo()Lco/discord/media_engine/internal/InboundVideo;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v6, Lco/discord/media_engine/internal/TransformStats;->INSTANCE:Lco/discord/media_engine/internal/TransformStats;
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getRtpStats()Lco/discord/media_engine/internal/RtpStats;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-direct {v6, v7}, Lco/discord/media_engine/internal/TransformStats;->sumBytes(Lco/discord/media_engine/internal/RtpStats;)J
|
|
|
|
move-result-wide v30
|
|
|
|
add-long v12, v12, v30
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getCodecPayloadType()I
|
|
|
|
move-result v6
|
|
|
|
const/4 v7, -0x1
|
|
|
|
if-eq v6, v7, :cond_9
|
|
|
|
new-instance v6, Lco/discord/media_engine/StatsCodec;
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getCodecPayloadType()I
|
|
|
|
move-result v7
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getCodecName()Ljava/lang/String;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-direct {v6, v7, v10}, Lco/discord/media_engine/StatsCodec;-><init>(ILjava/lang/String;)V
|
|
|
|
move-object/from16 v29, v6
|
|
|
|
goto :goto_a
|
|
|
|
:cond_9
|
|
const/16 v29, 0x0
|
|
|
|
:goto_a
|
|
new-instance v6, Lco/discord/media_engine/InboundRtpVideo;
|
|
|
|
move-object/from16 v26, v6
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getSsrc()I
|
|
|
|
move-result v28
|
|
|
|
sget-object v7, Lco/discord/media_engine/internal/TransformStats;->INSTANCE:Lco/discord/media_engine/internal/TransformStats;
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getRtpStats()Lco/discord/media_engine/internal/RtpStats;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-direct {v7, v10}, Lco/discord/media_engine/internal/TransformStats;->sumPackets(Lco/discord/media_engine/internal/RtpStats;)I
|
|
|
|
move-result v32
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getRtcpStats()Lco/discord/media_engine/internal/RtcpStats;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v7}, Lco/discord/media_engine/internal/RtcpStats;->getPacketsLost()I
|
|
|
|
move-result v33
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getRtcpStats()Lco/discord/media_engine/internal/RtcpStats;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v7}, Lco/discord/media_engine/internal/RtcpStats;->getFractionLost()F
|
|
|
|
move-result v34
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getTotalBitrate()I
|
|
|
|
move-result v35
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getDecode()I
|
|
|
|
move-result v36
|
|
|
|
new-instance v7, Lco/discord/media_engine/Resolution;
|
|
|
|
move-object/from16 v37, v7
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getWidth()I
|
|
|
|
move-result v10
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getHeight()I
|
|
|
|
move-result v14
|
|
|
|
invoke-direct {v7, v10, v14}, Lco/discord/media_engine/Resolution;-><init>(II)V
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getDecoderImplementationName()Ljava/lang/String;
|
|
|
|
move-result-object v38
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getFramesDecoded()I
|
|
|
|
move-result v39
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getDiscardedPackets()I
|
|
|
|
move-result v40
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getFrameCounts()Lco/discord/media_engine/internal/FrameCounts;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v7}, Lco/discord/media_engine/internal/FrameCounts;->getDeltaFrames()I
|
|
|
|
move-result v7
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getFrameCounts()Lco/discord/media_engine/internal/FrameCounts;
|
|
|
|
move-result-object v10
|
|
|
|
invoke-virtual {v10}, Lco/discord/media_engine/internal/FrameCounts;->getKeyFrames()I
|
|
|
|
move-result v10
|
|
|
|
add-int v41, v10, v7
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getDecodeFrameRate()I
|
|
|
|
move-result v42
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getNetworkFrameRate()I
|
|
|
|
move-result v43
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getRenderFrameRate()I
|
|
|
|
move-result v44
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getRtcpStats()Lco/discord/media_engine/internal/RtcpStats;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v7}, Lco/discord/media_engine/internal/RtcpStats;->getFirPackets()I
|
|
|
|
move-result v45
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getRtcpStats()Lco/discord/media_engine/internal/RtcpStats;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v7}, Lco/discord/media_engine/internal/RtcpStats;->getNackPackets()I
|
|
|
|
move-result v46
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getRtcpStats()Lco/discord/media_engine/internal/RtcpStats;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v7}, Lco/discord/media_engine/internal/RtcpStats;->getPliPackets()I
|
|
|
|
move-result v47
|
|
|
|
invoke-virtual {v1}, Lco/discord/media_engine/internal/InboundVideo;->getQpSum()I
|
|
|
|
move-result v48
|
|
|
|
const-string v27, "video"
|
|
|
|
invoke-direct/range {v26 .. v48}, Lco/discord/media_engine/InboundRtpVideo;-><init>(Ljava/lang/String;ILco/discord/media_engine/StatsCodec;JIIFIILco/discord/media_engine/Resolution;Ljava/lang/String;IIIIIIIIII)V
|
|
|
|
invoke-interface {v4, v11, v6}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lco/discord/media_engine/InboundRtpVideo;
|
|
|
|
:cond_a
|
|
move-wide/from16 v16, v12
|
|
|
|
add-int/lit8 v9, v9, 0x1
|
|
|
|
const/4 v7, 0x0
|
|
|
|
goto/16 :goto_8
|
|
|
|
:cond_b
|
|
move-wide/from16 v52, v16
|
|
|
|
goto :goto_b
|
|
|
|
:cond_c
|
|
const-wide/16 v52, 0x0
|
|
|
|
:goto_b
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/NativeStats;->getTransport()Lco/discord/media_engine/internal/Transport;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_d
|
|
|
|
new-instance v1, Lco/discord/media_engine/Transport;
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/Transport;->getSendBandwidth()I
|
|
|
|
move-result v51
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/Transport;->getRtt()I
|
|
|
|
move-result v56
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/Transport;->getDecryptionFailures()Ljava/lang/Integer;
|
|
|
|
move-result-object v57
|
|
|
|
invoke-virtual {v0}, Lco/discord/media_engine/internal/Transport;->getLocalAddress()Ljava/lang/String;
|
|
|
|
move-result-object v58
|
|
|
|
move-object/from16 v50, v1
|
|
|
|
invoke-direct/range {v50 .. v58}, Lco/discord/media_engine/Transport;-><init>(IJJILjava/lang/Integer;Ljava/lang/String;)V
|
|
|
|
move-object/from16 v23, v1
|
|
|
|
goto :goto_c
|
|
|
|
:cond_d
|
|
new-instance v0, Lco/discord/media_engine/Transport;
|
|
|
|
const/16 v51, 0x0
|
|
|
|
const/16 v56, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-static {v1}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v57
|
|
|
|
const-string v58, ""
|
|
|
|
move-object/from16 v50, v0
|
|
|
|
invoke-direct/range {v50 .. v58}, Lco/discord/media_engine/Transport;-><init>(IJJILjava/lang/Integer;Ljava/lang/String;)V
|
|
|
|
move-object/from16 v23, v0
|
|
|
|
:goto_c
|
|
new-instance v0, Lco/discord/media_engine/Stats;
|
|
|
|
move-object/from16 v22, v0
|
|
|
|
move-object/from16 v26, v2
|
|
|
|
move-object/from16 v27, v4
|
|
|
|
invoke-direct/range {v22 .. v27}, Lco/discord/media_engine/Stats;-><init>(Lco/discord/media_engine/Transport;Lco/discord/media_engine/OutboundRtpAudio;Lco/discord/media_engine/OutboundRtpVideo;Ljava/util/Map;Ljava/util/Map;)V
|
|
|
|
return-object v0
|
|
|
|
:cond_e
|
|
const-string v0, "stats"
|
|
|
|
invoke-static {v0}, Lx/u/b/j;->a(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
throw v0
|
|
.end method
|