diff --git a/api/stats/rtcstats_objects.h b/api/stats/rtcstats_objects.h index ff99df53a3..0c864cdeb3 100644 --- a/api/stats/rtcstats_objects.h +++ b/api/stats/rtcstats_objects.h @@ -419,7 +419,6 @@ class RTC_EXPORT RTCInboundRTPStreamStats final : public RTCRTPStreamStats { // TODO(hbos): Collect and populate this value for both "audio" and "video", // currently not collected for "video". https://bugs.webrtc.org/7065 RTCStatsMember jitter; - RTCStatsMember fraction_lost; // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 RTCStatsMember round_trip_time; // TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065 diff --git a/audio/audio_receive_stream.cc b/audio/audio_receive_stream.cc index 32617aa76d..0ff2b0c0e3 100644 --- a/audio/audio_receive_stream.cc +++ b/audio/audio_receive_stream.cc @@ -188,7 +188,6 @@ webrtc::AudioReceiveStream::Stats AudioReceiveStream::GetStats() const { stats.bytes_rcvd = call_stats.bytesReceived; stats.packets_rcvd = call_stats.packetsReceived; stats.packets_lost = call_stats.cumulativeLost; - stats.fraction_lost = Q8ToFloat(call_stats.fractionLost); stats.capture_start_ntp_time_ms = call_stats.capture_start_ntp_time_ms_; stats.last_packet_received_timestamp_ms = call_stats.last_packet_received_timestamp_ms; diff --git a/audio/audio_receive_stream_unittest.cc b/audio/audio_receive_stream_unittest.cc index b97217ca5b..7a6b31e732 100644 --- a/audio/audio_receive_stream_unittest.cc +++ b/audio/audio_receive_stream_unittest.cc @@ -61,8 +61,7 @@ const unsigned int kSpeechOutputLevel = 99; const double kTotalOutputEnergy = 0.25; const double kTotalOutputDuration = 0.5; -const CallReceiveStatistics kCallStats = {345, 678, 901, 234, - -12, 567, 890, 123}; +const CallReceiveStatistics kCallStats = {678, 901, 234, -12, 567, 890, 123}; const std::pair kReceiveCodec = { 123, {"codec_name_recv", 96000, 0}}; @@ -270,7 +269,6 @@ TEST(AudioReceiveStreamTest, GetStats) { EXPECT_EQ(static_cast(kCallStats.packetsReceived), stats.packets_rcvd); EXPECT_EQ(kCallStats.cumulativeLost, stats.packets_lost); - EXPECT_EQ(Q8ToFloat(kCallStats.fractionLost), stats.fraction_lost); EXPECT_EQ(kReceiveCodec.second.name, stats.codec_name); EXPECT_EQ(kCallStats.extendedMax, stats.ext_seqnum); EXPECT_EQ( diff --git a/audio/channel_receive.cc b/audio/channel_receive.cc index 25f4ac8a94..8b9dd2d7f2 100644 --- a/audio/channel_receive.cc +++ b/audio/channel_receive.cc @@ -756,7 +756,6 @@ CallReceiveStatistics ChannelReceive::GetRTCPStatistics() const { _rtpRtcpModule->RTCP() == RtcpMode::kOff); } - stats.fractionLost = statistics.fraction_lost; stats.cumulativeLost = statistics.packets_lost; stats.extendedMax = statistics.extended_highest_sequence_number; stats.jitterSamples = statistics.jitter; diff --git a/audio/channel_receive.h b/audio/channel_receive.h index d29f624d0e..1b0c81c314 100644 --- a/audio/channel_receive.h +++ b/audio/channel_receive.h @@ -50,7 +50,6 @@ class RtpPacketReceived; class RtpRtcp; struct CallReceiveStatistics { - unsigned short fractionLost; // NOLINT unsigned int cumulativeLost; unsigned int extendedMax; unsigned int jitterSamples; diff --git a/audio/test/audio_stats_test.cc b/audio/test/audio_stats_test.cc index 556a16dfa6..c45e3c1484 100644 --- a/audio/test/audio_stats_test.cc +++ b/audio/test/audio_stats_test.cc @@ -69,7 +69,6 @@ class NoLossTest : public AudioEndToEndTest { EXPECT_PRED2(IsNear, kBytesSent, recv_stats.bytes_rcvd); EXPECT_PRED2(IsNear, kPacketsSent, recv_stats.packets_rcvd); EXPECT_EQ(0u, recv_stats.packets_lost); - EXPECT_EQ(0.0f, recv_stats.fraction_lost); EXPECT_EQ("opus", send_stats.codec_name); // recv_stats.jitter_ms // recv_stats.jitter_buffer_ms diff --git a/call/audio_receive_stream.h b/call/audio_receive_stream.h index 911b38e87b..1829228181 100644 --- a/call/audio_receive_stream.h +++ b/call/audio_receive_stream.h @@ -41,7 +41,6 @@ class AudioReceiveStream { uint64_t fec_packets_received = 0; uint64_t fec_packets_discarded = 0; uint32_t packets_lost = 0; - float fraction_lost = 0.0f; std::string codec_name; absl::optional codec_payload_type; uint32_t ext_seqnum = 0; diff --git a/media/base/media_channel.h b/media/base/media_channel.h index 123b2893a8..e98da00adf 100644 --- a/media/base/media_channel.h +++ b/media/base/media_channel.h @@ -450,6 +450,8 @@ struct MediaReceiverInfo { int64_t bytes_rcvd = 0; int packets_rcvd = 0; int packets_lost = 0; + // TODO(bugs.webrtc.org/10679): Unused, delete as soon as downstream code is + // updated. float fraction_lost = 0.0f; // The timestamp at which the last packet was received, i.e. the time of the // local clock when it was received - not the RTP timestamp of that packet. diff --git a/media/engine/webrtc_video_engine.cc b/media/engine/webrtc_video_engine.cc index d650f3ae94..b95b40e43a 100644 --- a/media/engine/webrtc_video_engine.cc +++ b/media/engine/webrtc_video_engine.cc @@ -2723,8 +2723,6 @@ WebRtcVideoChannel::WebRtcVideoReceiveStream::GetVideoReceiverInfo( stats.rtp_stats.transmitted.padding_bytes; info.packets_rcvd = stats.rtp_stats.transmitted.packets; info.packets_lost = stats.rtcp_stats.packets_lost; - info.fraction_lost = - static_cast(stats.rtcp_stats.fraction_lost) / (1 << 8); info.framerate_rcvd = stats.network_frame_rate; info.framerate_decoded = stats.decode_frame_rate; diff --git a/media/engine/webrtc_video_engine_unittest.cc b/media/engine/webrtc_video_engine_unittest.cc index dc94f5dd89..f7b2a2fd4c 100644 --- a/media/engine/webrtc_video_engine_unittest.cc +++ b/media/engine/webrtc_video_engine_unittest.cc @@ -1610,7 +1610,6 @@ TEST_F(WebRtcVideoChannelBaseTest, GetStats) { EXPECT_EQ(DefaultCodec().id, *info.receivers[0].codec_payload_type); EXPECT_EQ(NumRtpBytes(), info.receivers[0].bytes_rcvd); EXPECT_EQ(NumRtpPackets(), info.receivers[0].packets_rcvd); - EXPECT_EQ(0.0, info.receivers[0].fraction_lost); EXPECT_EQ(0, info.receivers[0].packets_lost); // TODO(asapersson): Not set for webrtc. Handle missing stats. // EXPECT_EQ(0, info.receivers[0].packets_concealed); @@ -5117,8 +5116,6 @@ TEST_F(WebRtcVideoChannelTest, GetStatsTranslatesReceivePacketStatsCorrectly) { EXPECT_EQ(stats.rtp_stats.transmitted.packets, rtc::checked_cast(info.receivers[0].packets_rcvd)); EXPECT_EQ(stats.rtcp_stats.packets_lost, info.receivers[0].packets_lost); - EXPECT_EQ(rtc::checked_cast(stats.rtcp_stats.fraction_lost) / (1 << 8), - info.receivers[0].fraction_lost); } TEST_F(WebRtcVideoChannelTest, TranslatesCallStatsCorrectly) { diff --git a/media/engine/webrtc_voice_engine.cc b/media/engine/webrtc_voice_engine.cc index 46e219f1e9..9fe6f79056 100644 --- a/media/engine/webrtc_voice_engine.cc +++ b/media/engine/webrtc_voice_engine.cc @@ -2247,7 +2247,6 @@ bool WebRtcVoiceMediaChannel::GetStats(VoiceMediaInfo* info) { rinfo.fec_packets_received = stats.fec_packets_received; rinfo.fec_packets_discarded = stats.fec_packets_discarded; rinfo.packets_lost = stats.packets_lost; - rinfo.fraction_lost = stats.fraction_lost; rinfo.codec_name = stats.codec_name; rinfo.codec_payload_type = stats.codec_payload_type; rinfo.ext_seqnum = stats.ext_seqnum; diff --git a/media/engine/webrtc_voice_engine_unittest.cc b/media/engine/webrtc_voice_engine_unittest.cc index 3cbad9fa62..42d6145c58 100644 --- a/media/engine/webrtc_voice_engine_unittest.cc +++ b/media/engine/webrtc_voice_engine_unittest.cc @@ -645,7 +645,6 @@ class WebRtcVoiceEngineTestFake : public ::testing::Test { stats.bytes_rcvd = 456; stats.packets_rcvd = 768; stats.packets_lost = 101; - stats.fraction_lost = 23.45f; stats.codec_name = "codec_name_recv"; stats.codec_payload_type = 42; stats.ext_seqnum = 678; @@ -688,7 +687,6 @@ class WebRtcVoiceEngineTestFake : public ::testing::Test { stats.packets_rcvd); EXPECT_EQ(rtc::checked_cast(info.packets_lost), stats.packets_lost); - EXPECT_EQ(info.fraction_lost, stats.fraction_lost); EXPECT_EQ(info.codec_name, stats.codec_name); EXPECT_EQ(info.codec_payload_type, stats.codec_payload_type); EXPECT_EQ(rtc::checked_cast(info.ext_seqnum), diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc index d6ade5bd91..5e0986d12e 100644 --- a/pc/rtc_stats_collector.cc +++ b/pc/rtc_stats_collector.cc @@ -259,8 +259,6 @@ void SetInboundRTPStreamStatsFromMediaReceiverInfo( static_cast(media_receiver_info.bytes_rcvd); inbound_stats->packets_lost = static_cast(media_receiver_info.packets_lost); - inbound_stats->fraction_lost = - static_cast(media_receiver_info.fraction_lost); } void SetInboundRTPStreamStatsFromVoiceReceiverInfo( diff --git a/pc/rtc_stats_collector_unittest.cc b/pc/rtc_stats_collector_unittest.cc index be4f2b985e..11500d6081 100644 --- a/pc/rtc_stats_collector_unittest.cc +++ b/pc/rtc_stats_collector_unittest.cc @@ -1728,7 +1728,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCInboundRTPStreamStats_Audio) { voice_media_info.receivers[0].bytes_rcvd = 3; voice_media_info.receivers[0].codec_payload_type = 42; voice_media_info.receivers[0].jitter_ms = 4500; - voice_media_info.receivers[0].fraction_lost = 5.5f; voice_media_info.receivers[0].last_packet_received_timestamp_ms = absl::nullopt; @@ -1766,7 +1765,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCInboundRTPStreamStats_Audio) { expected_audio.packets_lost = -1; // |expected_audio.last_packet_received_timestamp| should be undefined. expected_audio.jitter = 4.5; - expected_audio.fraction_lost = 5.5; ASSERT_TRUE(report->Get(expected_audio.id())); EXPECT_EQ( report->Get(expected_audio.id())->cast_to(), @@ -1798,7 +1796,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCInboundRTPStreamStats_Video) { video_media_info.receivers[0].packets_rcvd = 2; video_media_info.receivers[0].packets_lost = 42; video_media_info.receivers[0].bytes_rcvd = 3; - video_media_info.receivers[0].fraction_lost = 4.5f; video_media_info.receivers[0].codec_payload_type = 42; video_media_info.receivers[0].firs_sent = 5; video_media_info.receivers[0].plis_sent = 6; @@ -1839,7 +1836,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCInboundRTPStreamStats_Video) { expected_video.packets_received = 2; expected_video.bytes_received = 3; expected_video.packets_lost = 42; - expected_video.fraction_lost = 4.5; expected_video.frames_decoded = 8; // |expected_video.qp_sum| should be undefined. // |expected_video.last_packet_received_timestamp| should be undefined. diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc index c21c796f14..4f10a1d085 100644 --- a/pc/rtc_stats_integrationtest.cc +++ b/pc/rtc_stats_integrationtest.cc @@ -789,7 +789,7 @@ class RTCStatsReportVerifier { } else { verifier.TestMemberIsNonNegative(inbound_stream.jitter); } - verifier.TestMemberIsNonNegative(inbound_stream.fraction_lost); + verifier.TestMemberIsUndefined(inbound_stream.round_trip_time); verifier.TestMemberIsUndefined(inbound_stream.packets_discarded); verifier.TestMemberIsUndefined(inbound_stream.packets_repaired); diff --git a/pc/stats_collector_unittest.cc b/pc/stats_collector_unittest.cc index 3118ef9cb5..6b75184585 100644 --- a/pc/stats_collector_unittest.cc +++ b/pc/stats_collector_unittest.cc @@ -562,8 +562,6 @@ void InitVoiceReceiverInfo(cricket::VoiceReceiverInfo* voice_receiver_info) { voice_receiver_info->add_ssrc(kSsrcOfTrack); voice_receiver_info->bytes_rcvd = 110; voice_receiver_info->packets_rcvd = 111; - voice_receiver_info->packets_lost = 112; - voice_receiver_info->fraction_lost = 113; voice_receiver_info->packets_lost = 114; voice_receiver_info->ext_seqnum = 115; voice_receiver_info->jitter_ms = 116; diff --git a/stats/rtcstats_objects.cc b/stats/rtcstats_objects.cc index 8098707113..43c1d231e3 100644 --- a/stats/rtcstats_objects.cc +++ b/stats/rtcstats_objects.cc @@ -602,7 +602,6 @@ WEBRTC_RTCSTATS_IMPL( &packets_lost, &last_packet_received_timestamp, &jitter, - &fraction_lost, &round_trip_time, &packets_discarded, &packets_repaired, @@ -632,7 +631,6 @@ RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(std::string&& id, packets_lost("packetsLost"), last_packet_received_timestamp("lastPacketReceivedTimestamp"), jitter("jitter"), - fraction_lost("fractionLost"), round_trip_time("roundTripTime"), packets_discarded("packetsDiscarded"), packets_repaired("packetsRepaired"), @@ -657,7 +655,6 @@ RTCInboundRTPStreamStats::RTCInboundRTPStreamStats( packets_lost(other.packets_lost), last_packet_received_timestamp(other.last_packet_received_timestamp), jitter(other.jitter), - fraction_lost(other.fraction_lost), round_trip_time(other.round_trip_time), packets_discarded(other.packets_discarded), packets_repaired(other.packets_repaired),