Delete RTCInboundRTPStreamStats::fraction_lost

And delete corresponding plumbing via the internal stats attribute
MediaReceiverInfo::fraction_lost. The latter attribute is not deleted
yet, since downstream projects have to be updated first.

Bug: webrtc:10744
Change-Id: Id5401aeee7e5637a406ddf2fa33fbfe336abec9f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/143178
Commit-Queue: Niels Moller <nisse@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Oskar Sundbom <ossu@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#28385}
This commit is contained in:
Niels Möller 2019-06-24 12:18:03 +02:00 committed by Commit Bot
parent 1d20185afd
commit 3472b9ae22
17 changed files with 4 additions and 29 deletions

View File

@ -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<double> jitter;
RTCStatsMember<double> fraction_lost;
// TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065
RTCStatsMember<double> round_trip_time;
// TODO(hbos): Collect and populate this value. https://bugs.webrtc.org/7065

View File

@ -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;

View File

@ -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<int, SdpAudioFormat> kReceiveCodec = {
123,
{"codec_name_recv", 96000, 0}};
@ -270,7 +269,6 @@ TEST(AudioReceiveStreamTest, GetStats) {
EXPECT_EQ(static_cast<uint32_t>(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(

View File

@ -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;

View File

@ -50,7 +50,6 @@ class RtpPacketReceived;
class RtpRtcp;
struct CallReceiveStatistics {
unsigned short fractionLost; // NOLINT
unsigned int cumulativeLost;
unsigned int extendedMax;
unsigned int jitterSamples;

View File

@ -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

View File

@ -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<int> codec_payload_type;
uint32_t ext_seqnum = 0;

View File

@ -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.

View File

@ -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<float>(stats.rtcp_stats.fraction_lost) / (1 << 8);
info.framerate_rcvd = stats.network_frame_rate;
info.framerate_decoded = stats.decode_frame_rate;

View File

@ -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<unsigned int>(info.receivers[0].packets_rcvd));
EXPECT_EQ(stats.rtcp_stats.packets_lost, info.receivers[0].packets_lost);
EXPECT_EQ(rtc::checked_cast<float>(stats.rtcp_stats.fraction_lost) / (1 << 8),
info.receivers[0].fraction_lost);
}
TEST_F(WebRtcVideoChannelTest, TranslatesCallStatsCorrectly) {

View File

@ -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;

View File

@ -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<unsigned int>(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<unsigned int>(info.ext_seqnum),

View File

@ -259,8 +259,6 @@ void SetInboundRTPStreamStatsFromMediaReceiverInfo(
static_cast<uint64_t>(media_receiver_info.bytes_rcvd);
inbound_stats->packets_lost =
static_cast<int32_t>(media_receiver_info.packets_lost);
inbound_stats->fraction_lost =
static_cast<double>(media_receiver_info.fraction_lost);
}
void SetInboundRTPStreamStatsFromVoiceReceiverInfo(

View File

@ -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<RTCInboundRTPStreamStats>(),
@ -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.

View File

@ -789,7 +789,7 @@ class RTCStatsReportVerifier {
} else {
verifier.TestMemberIsNonNegative<double>(inbound_stream.jitter);
}
verifier.TestMemberIsNonNegative<double>(inbound_stream.fraction_lost);
verifier.TestMemberIsUndefined(inbound_stream.round_trip_time);
verifier.TestMemberIsUndefined(inbound_stream.packets_discarded);
verifier.TestMemberIsUndefined(inbound_stream.packets_repaired);

View File

@ -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;

View File

@ -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),