// Metro module 12878 (f12879). import TypedEventEmitter from "../_bundle/TypedEventEmitter"; import NetworkQuality from "./NetworkQuality"; import { TimeStampProducer, DurationEnabled } from "../_bundle/sleep"; import { Histogram } from "./Histogram"; import { BaseConnectionEvent, MediaEngineContextTypes } from "../_bundle/Module4286"; import { OutboundStats, InboundStats, VideoStoppedReasons, CodecTypes, Encoders, Decoders, RawVideoStats } from "./VideoQualityStats"; import Module12 from "../_bundle/Module12"; import * as _PlatformUtils from "../utils/PlatformUtils"; import { isIOS, isAndroid } from "../utils/PlatformUtils"; import SnowflakeUtils from "../utils/SnowflakeUtils"; import { areSetsEqual } from "../_bundle/Module1414"; import { HermesBuiltin } from "../_hermes/prelude"; let c8878_4; const round = function round(a0) { let r2 = void 0 === void 0 ? 0 : void 0; if (a0 != null) { r2 = Math.round(a0); } return r2; }; c8878_4 = { FpsUpdate: "fps-update" }; class VideoQuality extends TypedEventEmitter { constructor(a0, timestampProducer = TimeStampProducer) { super(); this.networkQuality = new NetworkQuality(); this.pausedCount = 0; this.simulcastQualityChanges = 0; this.cameraToggles = 0; this.callUserIdsCount = 0; this.numWindowOcclusionChanges = 0; this.outboundStats = {}; this.inboundStats = {}; this.symmetricCodecUpdates = 0; this.asymmetricCodecUpdates = 0; this.statCollectionPausedUsers = new Set(); this.sampleStats = (a0) => { if (a0 != null) { const r3 = this.timestampProducer.now(); this.networkQuality.incrementNetworkStats(r3); this.updateSystemResourceStats(); this.updateVideoEffectStats(a0); if (a0 != null) { this.receivedStats(r3, a0, this.connection.getStreamParameters()); } } }; this.connection = a0; this.timestampProducer = timestampProducer; this.paused = new DurationEnabled(false, timestampProducer); this.zeroReceivers = new DurationEnabled(false, timestampProducer); this.videoStopped = new DurationEnabled(false, timestampProducer); this.videoEffectDuration = new DurationEnabled(false, timestampProducer); this.hqSimulcastStreamEncoded = new DurationEnabled(false, timestampProducer); this.lqSimulcastStreamEncoded = new DurationEnabled(false, timestampProducer); this.bothSimulcastStreamsEncoded = new DurationEnabled(false, timestampProducer); this.hqSimulcastStreamWatched = new DurationEnabled(false, timestampProducer); this.lqSimulcastStreamWatched = new DurationEnabled(false, timestampProducer); this.hqSimulcastStreamEligible = new DurationEnabled(false, timestampProducer); this.lqSimulcastStreamEligible = new DurationEnabled(false, timestampProducer); this.windowOccluded = new DurationEnabled(false, timestampProducer); this.videoStoppedForOcclusion = new DurationEnabled(false, timestampProducer); this.bandwidthLimitedFramerate = new DurationEnabled(false, timestampProducer); this.bandwidthLimitedResolution = new DurationEnabled(false, timestampProducer); this.cameraDuration = new DurationEnabled(false, timestampProducer); this.cameraOpportunityDuration = new DurationEnabled(false, timestampProducer); this.cameraSendDuration = new DurationEnabled(false, timestampProducer); this.videoEntropy = new Histogram(); } addUserToStatsCollectionPausedSet(a0) { this.statCollectionPausedUsers.add(a0); } removeUserFromStatsCollectionPausedSet(a0) { this.statCollectionPausedUsers.delete(a0); } start() { this.streamStart = this.timestampProducer.now(); this.connection.on(BaseConnectionEvent.Stats, this.sampleStats); } setOutboundSsrc(a0) { if (this.outboundStats[a0] == null) { this.outboundStats[a0] = new OutboundStats(this.timestampProducer); } } getOrCreateInboundStats(a0) { if (this.inboundStats[a0] == null) { this.inboundStats[a0] = new InboundStats(this.timestampProducer); } return this.inboundStats[a0]; } updateCallUserIdsCount(a0) { this.callUserIdsCount = a0; } setInboundUser(a0, a1) { this.getOrCreateInboundStats(a0).setVideoStopped(a1 === 0, VideoStoppedReasons.SenderStopped); } setUserVideoDisabled(a0, a1) { const orCreateInboundStats = this.getOrCreateInboundStats(a0); orCreateInboundStats.setVideoStopped(a1, VideoStoppedReasons.ClientSideDisableVideo); if ((a1 ? !a1 : orCreateInboundStats.statsWindow.length > 0) && orCreateInboundStats.statsWindow[0].packets === 0) { orCreateInboundStats.startTime = this.timestampProducer.now(); } } setOcclusionIncomingVideoEnabled(a0) { this.videoStoppedForOcclusion.value = !a0; } setWindowOcclusionState(a0) { if (a0 !== this.windowOccluded.value) { this.numWindowOcclusionChanges = this.numWindowOcclusionChanges + 1; } this.windowOccluded.value = a0; } pause() { if (!this.paused.value) { this.pausedCount = this.pausedCount + 1; } Module12.forEach(this.outboundStats, (a0) => { a0.statsWindow = []; }); Module12.forEach(this.inboundStats, (a0) => { a0.statsWindow = []; }); this.updateSendState({ paused: true }); } resume() { this.updateSendState({ paused: false }); } stop() { this.connection.off(BaseConnectionEvent.Stats, this.sampleStats); this.streamEnd = this.timestampProducer.now(); this.removeAllListeners(); } setViewedSimulcastQuality(a0) { if (a0 !== this.hqSimulcastStreamWatched.value && (this.hqSimulcastStreamWatched.totalDuration() > 0 || this.lqSimulcastStreamWatched.totalDuration() > 0)) { this.simulcastQualityChanges = this.simulcastQualityChanges + 1; } this.hqSimulcastStreamWatched.value = a0; this.lqSimulcastStreamWatched.value = !a0; } setEligibleSimulcastQuality(a0) { this.hqSimulcastStreamEligible.value = a0; this.lqSimulcastStreamEligible.value = !a0; } getNetworkStats() { return this.networkQuality.getStats(); } getEncoderUsageStats() { const map2 = new Map(); const outboundStats = this.outboundStats; for (const key in outboundStats) { const map = new Map(); for (const item of this.outboundStats[key].getCodecsUsed()) { const r17 = item.toUpperCase(); map.set(r17, round(this.outboundStats[key].codecBuckets[r17])); map2.set(parseInt(key), map); } } return map2; } getDecoderUsageStats() { const map2 = new Map(); const inboundStats = this.inboundStats; for (const key in inboundStats) { const map = new Map(); for (const item of this.inboundStats[key].getCodecsUsed()) { const r17 = item.toUpperCase(); map.set(r17, round(this.inboundStats[key].codecBuckets[r17])); map2.set(key, map); } } return map2; } getCodecUsageStats(a0, a1) { const codec_asymmetric_session = this.asymmetricCodecUpdates > this.symmetricCodecUpdates; let r22 = new Map(); if (a0 !== "sender" && a0 !== "streamer") { const decoderUsageStats = this.getDecoderUsageStats(); const r11 = decoderUsageStats.has(a1) ? decoderUsageStats.get(a1) : r22; let codec_h264_decode_duration_sec = r11.get(CodecTypes.H264); if (codec_h264_decode_duration_sec == null) { codec_h264_decode_duration_sec = 0; } let codec_h265_decode_duration_sec = r11.get(CodecTypes.H265); if (codec_h265_decode_duration_sec == null) { codec_h265_decode_duration_sec = 0; } let codec_vp8_decode_duration_sec = r11.get(CodecTypes.VP8); if (codec_vp8_decode_duration_sec == null) { codec_vp8_decode_duration_sec = 0; } let codec_vp9_decode_duration_sec = r11.get(CodecTypes.VP9); if (codec_vp9_decode_duration_sec == null) { codec_vp9_decode_duration_sec = 0; } let codec_av1_decode_duration_sec = r11.get(CodecTypes.AV1); if (codec_av1_decode_duration_sec == null) { codec_av1_decode_duration_sec = 0; } let codec_unknown_decode_duration_sec = r11.get(CodecTypes.UNKNOWN); if (codec_unknown_decode_duration_sec == null) { codec_unknown_decode_duration_sec = 0; } return { codec_asymmetric_session, codec_h264_decode_duration_sec, codec_h265_decode_duration_sec, codec_vp8_decode_duration_sec, codec_vp9_decode_duration_sec, codec_av1_decode_duration_sec, codec_unknown_decode_duration_sec }; } const encoderUsageStats = this.getEncoderUsageStats(); if (encoderUsageStats.size > 0) { r22 = encoderUsageStats.get([...encoderUsageStats.keys()].sort()[0]); } let codec_h264_encode_duration_sec = r22.get(CodecTypes.H264); if (codec_h264_encode_duration_sec == null) { codec_h264_encode_duration_sec = 0; } let codec_h265_encode_duration_sec = r22.get(CodecTypes.H265); if (codec_h265_encode_duration_sec == null) { codec_h265_encode_duration_sec = 0; } let codec_vp8_encode_duration_sec = r22.get(CodecTypes.VP8); if (codec_vp8_encode_duration_sec == null) { codec_vp8_encode_duration_sec = 0; } let codec_vp9_encode_duration_sec = r22.get(CodecTypes.VP9); if (codec_vp9_encode_duration_sec == null) { codec_vp9_encode_duration_sec = 0; } let codec_av1_encode_duration_sec = r22.get(CodecTypes.AV1); if (codec_av1_encode_duration_sec == null) { codec_av1_encode_duration_sec = 0; } let codec_unknown_encode_duration_sec = r22.get(CodecTypes.UNKNOWN); if (codec_unknown_encode_duration_sec == null) { codec_unknown_encode_duration_sec = 0; } return { codec_asymmetric_session, codec_h264_encode_duration_sec, codec_h265_encode_duration_sec, codec_vp8_encode_duration_sec, codec_vp9_encode_duration_sec, codec_av1_encode_duration_sec, codec_unknown_encode_duration_sec }; } getCameraDurationStats() { return { camera_enabled_duration: Math.round(this.cameraDuration.totalDurationSeconds()), camera_send_opportunity_duration: Math.round(this.cameraOpportunityDuration.totalDurationSeconds()), camera_send_duration: Math.round(this.cameraSendDuration.totalDurationSeconds()), num_camera_on_toggles: this.cameraToggles }; } getOutboundStats() { const r1 = []; let c20285_0 = r1; Module12.forEach(this.outboundStats, (a0, c27376_0) => { let quality; const connection = this.connection; const r8 = connection == null ? void 0 : connection.getStreamParameters(); if (r8.length > 1) { r8.forEach((item) => { if (parseInt(c27376_0) === item.ssrc) { let quality2 = item.quality; if (quality2 == null) { quality2 = 50; } quality = quality2; } }); } const r9 = [1, 5, 10, 25, 50, 75]; const r31 = [1, 5, 10, 25, 50, 75, 99]; const report3 = a0.vmafHistogram.getReport(r9); const report2 = a0.psnrHistogram.getReport(r9); const report5 = a0.targetBitrateHistogram.getReport(r31); const report4 = a0.outboundBandwidthSurplus.getReport(r31); const report = this.videoEntropy.getReport(r31); const r1 = a0.aggregationDuration / 1000; const r17 = !_PlatformUtils.isWeb() && (!isIOS() && !isAndroid()) ? a0.aggregatedProperties.screenshareFramesUnique : a0.aggregatedProperties.framesCodec; const r62 = { ...this.getStats(a0) }; let target_fps = 0; if (0 < r1) { const r22 = Math; let targetFrames = a0.targetFrames; if (targetFrames == null) { targetFrames = 0; } target_fps = r22.round(targetFrames / r1); } r62.target_fps = target_fps; r62.unique_captured_fps = this.connection?.context === MediaEngineContextTypes.STREAM ? 0 < r1 ? r17 / r1 : null : null; let target_bitrate_network = 0; if (0 < r1) { const r78 = Math; let targetBytesNetwork = a0.targetBytesNetwork; if (targetBytesNetwork == null) { targetBytesNetwork = 0; } target_bitrate_network = r78.round(8 * targetBytesNetwork / r1); } r62.target_bitrate_network = target_bitrate_network; r62.target_bitrate_network_percentile1 = report5.count > 0 ? report5.percentiles[1] : null; r62.target_bitrate_network_percentile5 = report5.count > 0 ? report5.percentiles[5] : null; r62.target_bitrate_network_percentile10 = report5.count > 0 ? report5.percentiles[10] : null; r62.target_bitrate_network_percentile25 = report5.count > 0 ? report5.percentiles[25] : null; r62.target_bitrate_network_percentile50 = report5.count > 0 ? report5.percentiles[50] : null; r62.target_bitrate_network_percentile75 = report5.count > 0 ? report5.percentiles[75] : null; r62.target_bitrate_network_percentile99 = report5.count > 0 ? report5.percentiles[99] : null; let target_bitrate_max = 0; if (0 < r1) { const r114 = Math; let targetBytesMax = a0.targetBytesMax; if (targetBytesMax == null) { targetBytesMax = 0; } target_bitrate_max = r114.round(8 * targetBytesMax / r1); } r62.target_bitrate_max = target_bitrate_max; let outbound_bandwidth_estimate = 0; if (0 < r1) { const r122 = Math; let outboundBytesAvailable = a0.outboundBytesAvailable; if (outboundBytesAvailable == null) { outboundBytesAvailable = 0; } outbound_bandwidth_estimate = r122.round(8 * outboundBytesAvailable / r1); } r62.outbound_bandwidth_estimate = outbound_bandwidth_estimate; r62.outbound_bandwidth_surplus_percentile1 = report4.count > 0 ? report4.percentiles[1] : null; r62.outbound_bandwidth_surplus_percentile5 = report4.count > 0 ? report4.percentiles[5] : null; r62.outbound_bandwidth_surplus_percentile10 = report4.count > 0 ? report4.percentiles[10] : null; r62.outbound_bandwidth_surplus_percentile25 = report4.count > 0 ? report4.percentiles[25] : null; r62.outbound_bandwidth_surplus_percentile50 = report4.count > 0 ? report4.percentiles[50] : null; r62.outbound_bandwidth_surplus_percentile75 = report4.count > 0 ? report4.percentiles[75] : null; r62.outbound_bandwidth_surplus_percentile99 = report4.count > 0 ? report4.percentiles[99] : null; const r161 = a0.encoderBuckets[Encoders.NVIDIA_CUDA]; r62.duration_encoder_nvidia_cuda = r161 != null ? Math.round(r161) : 0; const r172 = a0.encoderBuckets[Encoders.NVIDIA_DIRECT_3D]; r62.duration_encoder_nvidia_direct3d = r172 != null ? Math.round(r172) : 0; const r183 = a0.encoderBuckets[Encoders.NVIDIA_VULKAN]; r62.duration_encoder_nvidia_vulkan = r183 != null ? Math.round(r183) : 0; const r194 = a0.encoderBuckets[Encoders.OPENH264]; r62.duration_encoder_openh264 = r194 != null ? Math.round(r194) : 0; const r205 = a0.encoderBuckets[Encoders.VIDEOTOOLBOX]; r62.duration_encoder_videotoolbox = r205 != null ? Math.round(r205) : 0; const r216 = a0.encoderBuckets[Encoders.AMD_DIRECT_3D]; r62.duration_encoder_amd_direct3d = r216 != null ? Math.round(r216) : 0; const r227 = a0.encoderBuckets[Encoders.AMD_VAAPI]; r62.duration_encoder_amd_vaapi = r227 != null ? Math.round(r227) : 0; const r238 = a0.encoderBuckets[Encoders.INTEL]; r62.duration_encoder_intel = r238 != null ? Math.round(r238) : 0; const r249 = a0.encoderBuckets[Encoders.INTEL_DIRECT_3D]; r62.duration_encoder_intel_direct3d = r249 != null ? Math.round(r249) : 0; const r260 = a0.encoderBuckets[Encoders.INTEL_VAAPI]; r62.duration_encoder_intel_vaapi = r260 != null ? Math.round(r260) : 0; const r271 = a0.encoderBuckets[Encoders.VP8_LIBVPX]; r62.duration_encoder_vp8_libvpx = r271 != null ? Math.round(r271) : 0; const r282 = a0.encoderBuckets[Encoders.UNCATEGORIZED]; r62.duration_encoder_uncategorized = r282 != null ? Math.round(r282) : 0; const r293 = a0.encoderBuckets[Encoders.WMF_CHROME]; r62.duration_encoder_wmf_chrome = r293 != null ? Math.round(r293) : 0; const r304 = a0.encoderBuckets[Encoders.UNKNOWN]; r62.duration_encoder_unknown = r304 != null ? Math.round(r304) : 0; r62.quality = quality; r62.average_encode_time_ms = a0.averageEncodeTime; r62.average_encoder_vmaf_score = a0.vmafScoreNum > 0 ? a0.vmafScoreSum / a0.vmafScoreNum : null; r62.encoder_vmaf_score_percentile1 = report3.count > 0 ? report3.percentiles[1] : null; r62.encoder_vmaf_score_percentile5 = report3.count > 0 ? report3.percentiles[5] : null; r62.encoder_vmaf_score_percentile10 = report3.count > 0 ? report3.percentiles[10] : null; r62.encoder_vmaf_score_percentile25 = report3.count > 0 ? report3.percentiles[25] : null; r62.encoder_vmaf_score_percentile50 = report3.count > 0 ? report3.percentiles[50] : null; r62.encoder_vmaf_score_percentile75 = report3.count > 0 ? report3.percentiles[75] : null; r62.average_encoder_psnr_db = a0.psnrDbNum > 0 ? a0.psnrDbSum / a0.psnrDbNum : null; r62.encoder_psnr_db_percentile1 = report2.count > 0 ? report2.percentiles[1] : null; r62.encoder_psnr_db_percentile5 = report2.count > 0 ? report2.percentiles[5] : null; r62.encoder_psnr_db_percentile10 = report2.count > 0 ? report2.percentiles[10] : null; r62.encoder_psnr_db_percentile25 = report2.count > 0 ? report2.percentiles[25] : null; r62.encoder_psnr_db_percentile50 = report2.count > 0 ? report2.percentiles[50] : null; r62.encoder_psnr_db_percentile75 = report2.count > 0 ? report2.percentiles[75] : null; r62.average_outbound_want = a0.outboundSinkWantNum > 0 ? a0.outboundSinkWantSum / a0.outboundSinkWantNum : null; r62.frames_dropped_rate_limiter = a0.framesDroppedRateLimiter; r62.frames_dropped_encoder_queue = a0.framesDroppedEncoderQueue; r62.frames_dropped_congestion_window = a0.framesDroppedCongestionWindow; r62.frames_dropped_encoder = a0.framesDroppedEncoder; const r381 = this.hqSimulcastStreamEncoded.totalDurationSeconds(); r62.duration_hq_simulcast_stream_encoded = r381 != null ? Math.round(r381) : 0; const r389 = this.lqSimulcastStreamEncoded.totalDurationSeconds(); r62.duration_lq_simulcast_stream_encoded = r389 != null ? Math.round(r389) : 0; const r397 = this.bothSimulcastStreamsEncoded.totalDurationSeconds(); r62.duration_both_simulcast_streams_encoded = r397 != null ? Math.round(r397) : 0; const r405 = this.bandwidthLimitedFramerate.totalDurationSeconds(); r62.duration_fps_bandwidth_limited = r405 != null ? Math.round(r405) : 0; const r413 = this.bandwidthLimitedResolution.totalDurationSeconds(); r62.duration_resolution_bandwidth_limited = r413 != null ? Math.round(r413) : 0; r62.video_entropy_percentile1 = report.count > 0 ? report.percentiles[1] : null; r62.video_entropy_percentile5 = report.count > 0 ? report.percentiles[5] : null; r62.video_entropy_percentile10 = report.count > 0 ? report.percentiles[10] : null; r62.video_entropy_percentile25 = report.count > 0 ? report.percentiles[25] : null; r62.video_entropy_percentile50 = report.count > 0 ? report.percentiles[50] : null; r62.video_entropy_percentile75 = report.count > 0 ? report.percentiles[75] : null; r62.video_entropy_percentile99 = report.count > 0 ? report.percentiles[99] : null; const r452 = a0.encoderBuckets[Encoders.EXYNOS]; r62.duration_encoder_exynos = r452 != null ? Math.round(r452) : 0; const r463 = a0.encoderBuckets[Encoders.QUALCOMM]; r62.duration_encoder_qualcomm = r463 != null ? Math.round(r463) : 0; const r474 = a0.encoderBuckets[Encoders.MEDIATEK]; r62.duration_encoder_mediatek = r474 != null ? Math.round(r474) : 0; const r485 = a0.encoderBuckets[Encoders.WMF_SW]; r62.duration_encoder_wmf_sw = r485 != null ? Math.round(r485) : 0; const r496 = a0.encoderBuckets[Encoders.WMF_HW]; r62.duration_encoder_wmf_hw = r496 != null ? Math.round(r496) : 0; const r507 = a0.encoderBuckets[Encoders.WMF_DIRECT_3D]; r62.duration_encoder_wmf_direct3d = r507 != null ? Math.round(r507) : 0; c20285_0.push(r62); }); return r1; } getInboundStats(a0) { return this.getStats(this.inboundStats[a0]); } destroyUser(a0) { delete this.inboundStats[a0]; } getInboundParticipants() { return SnowflakeUtils.keys(this.inboundStats); } updateSendState(a0) { if (a0.paused != null) { this.paused.value = a0.paused; } if (a0.receivers != null) { this.zeroReceivers.value = a0.receivers === 0; } const value2 = this.paused.value || this.zeroReceivers.value; const value = this.videoStopped.value; this.videoStopped.value = value2; if (value2 !== value) { Module12.forEach(this.outboundStats, (a0) => { const statsWindow = []; a0.statsWindow = statsWindow; return statsWindow; }); } } getStats(a0) { if (a0 == null) { return null; } const r46 = Number(this.streamStart); const r16 = this.streamEnd != null ? this.streamEnd - r46 : this.timestampProducer.now() - r46; const r3 = Math.max(a0.aggregationDuration, 0) / 1000; const r55 = [1, 5, 10, 25, 50, 75]; const report3 = a0.fpsHistogram.getReport(r55); const report2 = a0.bitrateHistogram.getReport([1, 5, 10, 25, 50, 75, 99]); const report = a0.resolutionHistogram.getReport(r55); const report4 = a0.inboundBitrateEstimateHistogram.getReport([1, 5, 10, 25, 50, 75, 99]); const report5 = a0.localWantHistogram.getReport([1, 5, 10, 25, 50, 75, 90, 95]); const stats = a0.systemResources.getStats(); const r33 = { duration: Math.floor(r16 / 1000), duration_aggregation: Math.round(r3), duration_stopped_receiving: null, duration_stream_under_8mbps: null, duration_stream_under_7mbps: null, duration_stream_under_6mbps: null, duration_stream_under_5mbps: null, duration_stream_under_4mbps: null, duration_stream_under_3mbps: null, duration_stream_under_2mbps: null, duration_stream_under_1_5mbps: null, duration_stream_under_1mbps: null, duration_stream_under_0_5mbps: null, duration_stream_at_0mbps: null, duration_fps_under_60: null, duration_fps_under_55: null, duration_fps_under_50: null, duration_fps_under_45: null, duration_fps_under_40: null, duration_fps_under_35: null, duration_fps_under_30: null, duration_fps_under_25: null, duration_fps_under_20: null, duration_fps_under_15: null, duration_fps_under_10: null, duration_fps_under_5: null, duration_fps_at_0: null, avg_resolution: null, avg_minor_resolution: null, avg_major_resolution: null, min_resolution_width: null, min_resolution_height: null, duration_resolution_under_720: null, duration_resolution_under_480: null, duration_resolution_under_360: null, num_pauses: null, duration_paused: null, duration_zero_receivers: null, duration_video_stopped: null, duration_hq_simulcast_stream_watched: null, duration_lq_simulcast_stream_watched: null, duration_hq_simulcast_stream_eligible: null, duration_lq_simulcast_stream_eligible: null, num_quality_changes: null, duration_window_occluded: null, duration_incoming_video_stopped_for_occlusion: null, num_window_occlusion_changes: null, fps_percentile1: null, fps_percentile5: null, fps_percentile10: null, fps_percentile25: null, fps_percentile50: null, fps_percentile75: null, bitrate_percentile1: null, bitrate_percentile5: null, bitrate_percentile10: null, bitrate_percentile25: null, bitrate_percentile50: null, bitrate_percentile75: null, bitrate_percentile99: null, resolution_percentile1: null, resolution_percentile5: null, resolution_percentile10: null, resolution_percentile25: null, resolution_percentile50: null, resolution_percentile75: null, inbound_bitrate_estimate_percentile1: null, inbound_bitrate_estimate_percentile5: null, inbound_bitrate_estimate_percentile10: null, inbound_bitrate_estimate_percentile25: null, inbound_bitrate_estimate_percentile50: null, inbound_bitrate_estimate_percentile75: null, inbound_bitrate_estimate_percentile99: null, local_want_percentile1: null, local_want_percentile5: null, local_want_percentile10: null, local_want_percentile25: null, local_want_percentile50: null, local_want_percentile75: null, local_want_percentile90: null, local_want_percentile95: null, average_local_want: null, duration_video_effect: null, cryptor_max_attempts: null, duration_decoder_ffmpeg: null, duration_decoder_dav1d: null, duration_decoder_vp8_libvpx: null, duration_decoder_electron: null, duration_decoder_videotoolbox: null, duration_decoder_uncategorized: null, duration_decoder_unknown: null, duration_decoder_exynos: null, duration_decoder_webrtc: null, duration_decoder_qualcomm: null, duration_decoder_mediatek: null, duration_decoder_d3d11videodecoder: null, duration_decoder_android: null }; const r17 = a0.videoStoppedDuration.asSeconds(); r33.duration_stopped_receiving = r17 != null ? Math.round(r17) : 0; const r85 = a0.bitrateBuckets[8000000]; r33.duration_stream_under_8mbps = r85 != null ? Math.round(r85) : 0; const r92 = a0.bitrateBuckets[7000000]; r33.duration_stream_under_7mbps = r92 != null ? Math.round(r92) : 0; const r99 = a0.bitrateBuckets[6000000]; r33.duration_stream_under_6mbps = r99 != null ? Math.round(r99) : 0; const r106 = a0.bitrateBuckets[5000000]; r33.duration_stream_under_5mbps = r106 != null ? Math.round(r106) : 0; const r113 = a0.bitrateBuckets[4000000]; r33.duration_stream_under_4mbps = r113 != null ? Math.round(r113) : 0; const r120 = a0.bitrateBuckets[3000000]; r33.duration_stream_under_3mbps = r120 != null ? Math.round(r120) : 0; const r127 = a0.bitrateBuckets[2000000]; r33.duration_stream_under_2mbps = r127 != null ? Math.round(r127) : 0; const r134 = a0.bitrateBuckets[1500000]; r33.duration_stream_under_1_5mbps = r134 != null ? Math.round(r134) : 0; const r141 = a0.bitrateBuckets[1000000]; r33.duration_stream_under_1mbps = r141 != null ? Math.round(r141) : 0; const r148 = a0.bitrateBuckets[500000]; r33.duration_stream_under_0_5mbps = r148 != null ? Math.round(r148) : 0; const r154 = a0.bitrateBuckets[0]; r33.duration_stream_at_0mbps = r154 != null ? Math.round(r154) : 0; const r160 = a0.fpsBuckets[60]; r33.duration_fps_under_60 = r160 != null ? Math.round(r160) : 0; const r166 = a0.fpsBuckets[55]; r33.duration_fps_under_55 = r166 != null ? Math.round(r166) : 0; const r172 = a0.fpsBuckets[50]; r33.duration_fps_under_50 = r172 != null ? Math.round(r172) : 0; const r178 = a0.fpsBuckets[45]; r33.duration_fps_under_45 = r178 != null ? Math.round(r178) : 0; const r184 = a0.fpsBuckets[40]; r33.duration_fps_under_40 = r184 != null ? Math.round(r184) : 0; const r190 = a0.fpsBuckets[35]; r33.duration_fps_under_35 = r190 != null ? Math.round(r190) : 0; const r196 = a0.fpsBuckets[30]; r33.duration_fps_under_30 = r196 != null ? Math.round(r196) : 0; const r202 = a0.fpsBuckets[25]; r33.duration_fps_under_25 = r202 != null ? Math.round(r202) : 0; const r208 = a0.fpsBuckets[20]; r33.duration_fps_under_20 = r208 != null ? Math.round(r208) : 0; const r214 = a0.fpsBuckets[15]; r33.duration_fps_under_15 = r214 != null ? Math.round(r214) : 0; const r220 = a0.fpsBuckets[10]; r33.duration_fps_under_10 = r220 != null ? Math.round(r220) : 0; const r226 = a0.fpsBuckets[5]; r33.duration_fps_under_5 = r226 != null ? Math.round(r226) : 0; const r232 = a0.fpsBuckets[0]; r33.duration_fps_at_0 = r232 != null ? Math.round(r232) : 0; r33.avg_resolution = a0.intervalTotal > 0 ? Math.round(a0.resolutionTotal / a0.intervalTotal) : 0; r33.avg_minor_resolution = a0.intervalTotal > 0 ? Math.round(a0.minorResolutionTotal / a0.intervalTotal) : 0; r33.avg_major_resolution = a0.intervalTotal > 0 ? Math.round(a0.majorResolutionTotal / a0.intervalTotal) : 0; let minWidth = a0.minWidth; if (minWidth == null) { minWidth = null; } r33.min_resolution_width = minWidth; let minHeight = a0.minHeight; if (minHeight == null) { minHeight = null; } r33.min_resolution_height = minHeight; const r264 = a0.resolutionBuckets[720]; r33.duration_resolution_under_720 = r264 != null ? Math.round(r264) : 0; const r271 = a0.resolutionBuckets[480]; r33.duration_resolution_under_480 = r271 != null ? Math.round(r271) : 0; const r278 = a0.resolutionBuckets[360]; r33.duration_resolution_under_360 = r278 != null ? Math.round(r278) : 0; r33.num_pauses = this.pausedCount; r33.duration_paused = Math.round(this.paused.totalDuration() / 1000); r33.duration_zero_receivers = Math.round(this.zeroReceivers.totalDuration() / 1000); r33.duration_video_stopped = Math.round(this.videoStopped.totalDuration() / 1000); const r307 = this.hqSimulcastStreamWatched.totalDurationSeconds(); r33.duration_hq_simulcast_stream_watched = r307 != null ? Math.round(r307) : 0; const r314 = this.lqSimulcastStreamWatched.totalDurationSeconds(); r33.duration_lq_simulcast_stream_watched = r314 != null ? Math.round(r314) : 0; const r321 = this.hqSimulcastStreamEligible.totalDurationSeconds(); r33.duration_hq_simulcast_stream_eligible = r321 != null ? Math.round(r321) : 0; const r328 = this.lqSimulcastStreamEligible.totalDurationSeconds(); r33.duration_lq_simulcast_stream_eligible = r328 != null ? Math.round(r328) : 0; r33.num_quality_changes = this.simulcastQualityChanges; const r336 = this.windowOccluded.totalDurationSeconds(); r33.duration_window_occluded = r336 != null ? Math.round(r336) : 0; const r343 = this.videoStoppedForOcclusion.totalDurationSeconds(); r33.duration_incoming_video_stopped_for_occlusion = r343 != null ? Math.round(r343) : 0; r33.num_window_occlusion_changes = this.numWindowOcclusionChanges; r33.fps_percentile1 = report3.percentiles[1]; r33.fps_percentile5 = report3.percentiles[5]; r33.fps_percentile10 = report3.percentiles[10]; r33.fps_percentile25 = report3.percentiles[25]; r33.fps_percentile50 = report3.percentiles[50]; r33.fps_percentile75 = report3.percentiles[75]; r33.bitrate_percentile1 = report2.percentiles[1]; r33.bitrate_percentile5 = report2.percentiles[5]; r33.bitrate_percentile10 = report2.percentiles[10]; r33.bitrate_percentile25 = report2.percentiles[25]; r33.bitrate_percentile50 = report2.percentiles[50]; r33.bitrate_percentile75 = report2.percentiles[75]; r33.bitrate_percentile99 = report2.percentiles[99]; r33.resolution_percentile1 = report.percentiles[1]; r33.resolution_percentile5 = report.percentiles[5]; r33.resolution_percentile10 = report.percentiles[10]; r33.resolution_percentile25 = report.percentiles[25]; r33.resolution_percentile50 = report.percentiles[50]; r33.resolution_percentile75 = report.percentiles[75]; r33.inbound_bitrate_estimate_percentile1 = report4.percentiles[1]; r33.inbound_bitrate_estimate_percentile5 = report4.percentiles[5]; r33.inbound_bitrate_estimate_percentile10 = report4.percentiles[10]; r33.inbound_bitrate_estimate_percentile25 = report4.percentiles[25]; r33.inbound_bitrate_estimate_percentile50 = report4.percentiles[50]; r33.inbound_bitrate_estimate_percentile75 = report4.percentiles[75]; r33.inbound_bitrate_estimate_percentile99 = report4.percentiles[99]; r33.local_want_percentile1 = report5.percentiles[1]; r33.local_want_percentile5 = report5.percentiles[5]; r33.local_want_percentile10 = report5.percentiles[10]; r33.local_want_percentile25 = report5.percentiles[25]; r33.local_want_percentile50 = report5.percentiles[50]; r33.local_want_percentile75 = report5.percentiles[75]; r33.local_want_percentile90 = report5.percentiles[90]; r33.local_want_percentile95 = report5.percentiles[95]; r33.average_local_want = report5.mean; r33.duration_video_effect = Math.round(this.videoEffectDuration.totalDuration() / 1000); r33.cryptor_max_attempts = a0.cryptorMaxAttempts; const r432 = a0.decoderBuckets[Decoders.FFMPEG]; r33.duration_decoder_ffmpeg = r432 != null ? Math.round(r432) : 0; const r442 = a0.decoderBuckets[Decoders.DAV1D]; r33.duration_decoder_dav1d = r442 != null ? Math.round(r442) : 0; const r452 = a0.decoderBuckets[Decoders.VP8_LIBVPX]; r33.duration_decoder_vp8_libvpx = r452 != null ? Math.round(r452) : 0; const r462 = a0.decoderBuckets[Decoders.ELECTRON]; r33.duration_decoder_electron = r462 != null ? Math.round(r462) : 0; const r472 = a0.decoderBuckets[Decoders.VIDEOTOOLBOX]; r33.duration_decoder_videotoolbox = r472 != null ? Math.round(r472) : 0; const r482 = a0.decoderBuckets[Decoders.UNCATEGORIZED]; r33.duration_decoder_uncategorized = r482 != null ? Math.round(r482) : 0; const r492 = a0.decoderBuckets[Decoders.UNKNOWN]; r33.duration_decoder_unknown = r492 != null ? Math.round(r492) : 0; const r502 = a0.decoderBuckets[Decoders.EXYNOS]; r33.duration_decoder_exynos = r502 != null ? Math.round(r502) : 0; const r512 = a0.decoderBuckets[Decoders.WEBRTC]; r33.duration_decoder_webrtc = r512 != null ? Math.round(r512) : 0; const r522 = a0.decoderBuckets[Decoders.QUALCOMM]; r33.duration_decoder_qualcomm = r522 != null ? Math.round(r522) : 0; const r532 = a0.decoderBuckets[Decoders.MEDIATEK]; r33.duration_decoder_mediatek = r532 != null ? Math.round(r532) : 0; const r542 = a0.decoderBuckets[Decoders.D3D11VIDEODECODER]; r33.duration_decoder_d3d11videodecoder = r542 != null ? Math.round(r542) : 0; const r552 = a0.decoderBuckets[Decoders.ANDROID]; r33.duration_decoder_android = r552 != null ? Math.round(r552) : 0; HermesBuiltin.copyDataProperties(r33, stats); const aggregatedProperties = a0.aggregatedProperties; const { bytes, framesDropped, networkFramesDropped, framesCodecError } = aggregatedProperties; let framesCodec = aggregatedProperties.framesCodec; const { framesNetwork, packets, packetsLost, nackCount, pliCount, qpSum, pauseCount, freezeCount, totalPausesDuration, totalFreezesDuration, totalFramesDuration, totalDecodeTime, keyframes, passthroughCount, cryptorSuccessCount, cryptorFailureCount, cryptorDuration, cryptorAttempts, cryptorMissingKeyCount, cryptorInvalidNonceCount, qualityDecodeErrors, qualityDecoderReboots, qualityScoreErrors, qualityFrameDrops, qualitySizeMismatches } = aggregatedProperties; let r43 = cryptorFailureCount; if (r43 == null) { r43 = 0; } let cryptorFailureBeforeSuccessCount = a0.cryptorFailureBeforeSuccessCount; if (cryptorFailureBeforeSuccessCount == null) { cryptorFailureBeforeSuccessCount = 0; } const cryptor_failure_after_success_count = r43 - cryptorFailureBeforeSuccessCount; if (a0 instanceof OutboundStats) { r33.sender_freeze_count = freezeCount; r33.sender_total_freezes_duration = totalFreezesDuration; r33.sender_total_frames_duration = totalFramesDuration; r33.consecutive_static_color_frames_max = a0.consecutiveStaticColorFramesMax; } else { r33.receiver_freeze_count = freezeCount; r33.receiver_total_freezes_duration = totalFreezesDuration; r33.receiver_total_frames_duration = totalFramesDuration; r33.receiver_pause_count = pauseCount; r33.receiver_total_pauses_duration = totalPausesDuration; r33.total_decode_time_ms = totalDecodeTime; r33.frames_dropped_network = networkFramesDropped; if (!_PlatformUtils.isWeb()) { r33.frames_dropped_render = framesDropped; } } let avg_bitrate = 0; if (0 < r3) { const r586 = Math; let r588 = bytes; if (r588 == null) { r588 = 0; } avg_bitrate = r586.round(8 * r588 / r3); } let avg_fps = 0; if (0 < r3) { const r593 = Math; if (framesCodec == null) { framesCodec = 0; } avg_fps = r593.round(framesCodec / r3); } return { ...r33, avg_bitrate, avg_fps, num_bytes: bytes, num_packets_lost: packetsLost, num_packets: packets, num_frames: framesNetwork, num_frames_codec_error: framesCodecError, time_to_first_frame_ms: a0.timeToFirstFrame, num_frames_dropped: framesDropped + networkFramesDropped, num_nacks: nackCount, num_plis: pliCount, qp_sum: qpSum, num_keyframes: keyframes, cryptor_passthrough_count: passthroughCount, cryptor_success_count: cryptorSuccessCount, cryptor_failure_count: cryptorFailureCount, cryptor_duration: cryptorDuration, cryptor_attempts: cryptorAttempts, cryptor_missing_key_count: cryptorMissingKeyCount, cryptor_invalid_nonce_count: cryptorInvalidNonceCount, cryptor_failure_after_success_count, encoder_quality_decode_errors: qualityDecodeErrors, encoder_quality_decoder_reboots: qualityDecoderReboots, encoder_quality_score_errors: qualityScoreErrors, encoder_quality_frame_drops: qualityFrameDrops, encoder_quality_size_mismatches: qualitySizeMismatches }; } receivedStats(c20286_1, a1, a2) { let videoEntropy; let c20286_2 = a1; const transport = a1.transport; const isWeb = _PlatformUtils.isWeb(); let receivers = 1; if (!isWeb) { let r26 = transport.receiverReports?.length; if (r26 == null) { r26 = 0; } receivers = r26; } const set = new Set(); let c20286_5 = set; const set2 = new Set(); let c20286_6 = set2; this.updateSendState({ receivers }); const value = this.cameraDuration.value; this.cameraDuration.value = this.connection.context === MediaEngineContextTypes.DEFAULT && a1.camera != null; this.cameraOpportunityDuration.value = this.connection.context === MediaEngineContextTypes.DEFAULT && a1.camera != null && this.callUserIdsCount > 1; this.cameraSendDuration.value = this.connection.context === MediaEngineContextTypes.DEFAULT && a1.camera != null && receivers > 0; if (this.cameraDuration.value && !value) { this.cameraToggles = this.cameraToggles + 1; } let c20286_7 = Module12.max(a2.map((item) => item.quality)); videoEntropy = a1.rtp.outbound.filter((item) => item.type === "video" && item?.videoEntropy != null)[0]?.videoEntropy; a1.rtp.outbound.filter((item) => item.type === "video").forEach((item) => { let r117; if (item != null) { const ssrc = item.ssrc; let r23 = this.outboundStats[ssrc]; if (r23 == null) { const outboundStats = new OutboundStats(this.timestampProducer); this.outboundStats[ssrc] = outboundStats; r23 = outboundStats; } let r32 = r23.timeToFirstFrame == null; if (r32) { let r3 = item.framesEncoded > 0; if (!r3) { let frameRateInput = item.frameRateInput; if (frameRateInput == null) { frameRateInput = 0; } r3 = frameRateInput > 0; } r32 = r3; } if (r32) { r23.timeToFirstFrame = Math.max(0, c20286_1 - r23.startTime); } if (videoEntropy != null && videoEntropy >= 0) { this.videoEntropy.addSample(videoEntropy); } const r51 = a2.find((item) => item.ssrc === ssrc); const context = this.connection.context; const STREAM = MediaEngineContextTypes.STREAM; let r62 = true; if (context === STREAM) { let r65 = this.connection.getRemoteVideoSinkWants(ssrc); if (!(r65 != null && r65 !== 0 || r51?.quality !== c20286_7)) { r65 = this.connection.getRemoteVideoSinkWants("any"); } if (r65 == null) { r65 = 0; } r62 = r65 > 0; } const r74 = this.videoStopped.value || !r62; if (r74 !== r23.isVideoStopped) { r23.setVideoStopped(r74, VideoStoppedReasons.SenderStopped); } if (!r74) { const r91 = RawVideoStats.parseOutboundStats(item, c20286_1); if (this.connection.context === MediaEngineContextTypes.STREAM) { const screenshare = c20286_2.screenshare; let framesCodec = r91.framesCodec; if (screenshare != null) { if (screenshare.hybridDxgiFramesUnique == null && (screenshare.hybridGdiBitBltFramesUnique == null && (screenshare.hybridGdiPrintWindowFramesUnique == null && (screenshare.hybridVideohookFramesUnique == null && screenshare.hybridGraphicsCaptureFramesUnique == null)))) { let screenshareFrames = screenshare.screenshareFrames; if (screenshareFrames == null) { screenshareFrames = 0; } let videohookFrames = screenshare.videohookFrames; if (videohookFrames == null) { videohookFrames = 0; } const r109 = screenshareFrames + videohookFrames; let quartzFrames = screenshare.quartzFrames; if (quartzFrames == null) { quartzFrames = 0; } const r111 = r109 + quartzFrames; let screenCaptureKitFrames = screenshare.screenCaptureKitFrames; if (screenCaptureKitFrames == null) { screenCaptureKitFrames = 0; } const r113 = r111 + screenCaptureKitFrames; let x11Frames = screenshare.x11Frames; if (x11Frames == null) { x11Frames = 0; } const r115 = r113 + x11Frames; let pipewireFrames = screenshare.pipewireFrames; if (pipewireFrames == null) { pipewireFrames = 0; } r117 = r115 + pipewireFrames; } else { let hybridDxgiFramesUnique = screenshare.hybridDxgiFramesUnique; if (hybridDxgiFramesUnique == null) { hybridDxgiFramesUnique = 0; } let hybridGdiBitBltFramesUnique = screenshare.hybridGdiBitBltFramesUnique; if (hybridGdiBitBltFramesUnique == null) { hybridGdiBitBltFramesUnique = 0; } const r119 = hybridDxgiFramesUnique + hybridGdiBitBltFramesUnique; let hybridGdiPrintWindowFramesUnique = screenshare.hybridGdiPrintWindowFramesUnique; if (hybridGdiPrintWindowFramesUnique == null) { hybridGdiPrintWindowFramesUnique = 0; } const r121 = r119 + hybridGdiPrintWindowFramesUnique; let hybridVideohookFramesUnique = screenshare.hybridVideohookFramesUnique; if (hybridVideohookFramesUnique == null) { hybridVideohookFramesUnique = 0; } const r123 = r121 + hybridVideohookFramesUnique; let hybridGraphicsCaptureFramesUnique = screenshare.hybridGraphicsCaptureFramesUnique; if (hybridGraphicsCaptureFramesUnique == null) { hybridGraphicsCaptureFramesUnique = 0; } r117 = r123 + hybridGraphicsCaptureFramesUnique; } framesCodec = r117; } r91.screenshareFramesUnique = framesCodec; } r23.appendAndIncrementStats(r91); if (item.minResolutionWidth != null && item.minResolutionWidth > 0 && (r23.minWidth == null || item.minResolutionWidth < r23.minWidth)) { r23.minWidth = item.minResolutionWidth; } if (item.minResolutionHeight != null && item.minResolutionHeight > 0 && (r23.minHeight == null || item.minResolutionHeight < r23.minHeight)) { r23.minHeight = item.minResolutionHeight; } if (r23.encoderCodec !== CodecTypes.UNKNOWN) { c20286_5.add(r23.encoderCodec); } const maxBitrate = r51?.maxBitrate; const appendTargetRates = r23.appendTargetRates; const maxFrameRate = r51?.maxFrameRate; let bitrateTarget = item.bitrateTarget; if (bitrateTarget == null) { const r163 = Math; let availableOutgoingBitrate = transport.availableOutgoingBitrate; if (availableOutgoingBitrate == null) { availableOutgoingBitrate = 0; } let r167 = maxBitrate; if (r167 == null) { r167 = 0; } bitrateTarget = r163.min(availableOutgoingBitrate, r167); } appendTargetRates.call(r23, maxFrameRate, bitrateTarget, maxBitrate, transport.availableOutgoingBitrate); let averageEncodeTime = item.averageEncodeTime; if (averageEncodeTime == null) { averageEncodeTime = 0; } r23.averageEncodeTime = averageEncodeTime; let framesDroppedRateLimiter = item.framesDroppedRateLimiter; if (framesDroppedRateLimiter == null) { framesDroppedRateLimiter = null; } r23.framesDroppedRateLimiter = framesDroppedRateLimiter; let framesDroppedEncoderQueue = item.framesDroppedEncoderQueue; if (framesDroppedEncoderQueue == null) { framesDroppedEncoderQueue = null; } r23.framesDroppedEncoderQueue = framesDroppedEncoderQueue; let framesDroppedCongestionWindow = item.framesDroppedCongestionWindow; if (framesDroppedCongestionWindow == null) { framesDroppedCongestionWindow = null; } r23.framesDroppedCongestionWindow = framesDroppedCongestionWindow; let framesDroppedEncoder = item.framesDroppedEncoder; if (framesDroppedEncoder == null) { framesDroppedEncoder = null; } r23.framesDroppedEncoder = framesDroppedEncoder; const hqSimulcastStreamEncoded = this.hqSimulcastStreamEncoded; let hqSimulcastStreamEncoded2 = item.hqSimulcastStreamEncoded; if (hqSimulcastStreamEncoded2 == null) { hqSimulcastStreamEncoded2 = false; } hqSimulcastStreamEncoded.value = hqSimulcastStreamEncoded2; const lqSimulcastStreamEncoded = this.lqSimulcastStreamEncoded; let lqSimulcastStreamEncoded2 = item.lqSimulcastStreamEncoded; if (lqSimulcastStreamEncoded2 == null) { lqSimulcastStreamEncoded2 = false; } lqSimulcastStreamEncoded.value = lqSimulcastStreamEncoded2; this.bothSimulcastStreamsEncoded.value = this.hqSimulcastStreamEncoded.value && this.lqSimulcastStreamEncoded.value; const bandwidthLimitedResolution = this.bandwidthLimitedResolution; let bandwidthLimitedResolution2 = item.bandwidthLimitedResolution; if (bandwidthLimitedResolution2 == null) { bandwidthLimitedResolution2 = false; } bandwidthLimitedResolution.value = bandwidthLimitedResolution2; const bandwidthLimitedFramerate = this.bandwidthLimitedFramerate; let bandwidthLimitedFrameRate = item.bandwidthLimitedFrameRate; if (bandwidthLimitedFrameRate == null) { bandwidthLimitedFrameRate = false; } bandwidthLimitedFramerate.value = bandwidthLimitedFrameRate; } } }); if (!this.paused.value) { Module12.forEach(a1.rtp.inbound, (a0, a1) => { const r22 = a0.find((item) => item.type === "video"); if (r22 != null) { let r24 = this.inboundStats[a1]; if (r24 == null) { const inboundStats = new InboundStats(this.timestampProducer); this.inboundStats[a1] = inboundStats; r24 = inboundStats; } const r40 = RawVideoStats.parseInboundStats(r22, c20286_1); if (!this.statCollectionPausedUsers.has(a1)) { r24.appendAndIncrementStats(r40); r24.appendTransportStats(transport); } if (r22.minResolutionWidth != null && r22.minResolutionWidth > 0 && (r24.minWidth == null || r22.minResolutionWidth < r24.minWidth)) { r24.minWidth = r22.minResolutionWidth; } if (r22.minResolutionHeight != null && r22.minResolutionHeight > 0 && (r24.minHeight == null || r22.minResolutionHeight < r24.minHeight)) { r24.minHeight = r22.minResolutionHeight; } if (r40.packets > 0) { this.emit(c8878_4.FpsUpdate, a1, r40.framesCodec, r40.timestamp); } if (r24.decoderCodec !== CodecTypes.UNKNOWN) { c20286_6.add(r24.decoderCodec); } if (r24.timeToFirstFrame == null && r22.framesDecoded > 0) { r24.timeToFirstFrame = c20286_1 - r24.startTime; } } }); } if (set.size !== 0 && set2.size !== 0) { if (areSetsEqual(set, set2)) { this.symmetricCodecUpdates = this.symmetricCodecUpdates + 1; } else { this.asymmetricCodecUpdates = this.asymmetricCodecUpdates + 1; } } } updateSystemResourceStats() { const outboundStats = this.outboundStats; for (const key in outboundStats) { this.outboundStats[key].addSystemResources(); } const inboundStats = this.inboundStats; for (const key2 in inboundStats) { this.inboundStats[key2].addSystemResources(); } } updateVideoEffectStats(a0) { const r4 = a0 == null ? void 0 : a0.rtp.outbound.find((item) => item.type === "video"); this.videoEffectDuration.value = r4?.type === "video" && r4.filter != null; } } export { c8878_4 as VideoQualityEvent }; export { VideoQuality };