diff --git a/api/stats/rtcstats_objects.h b/api/stats/rtcstats_objects.h index 43f4be92d4..60ff8c29fe 100644 --- a/api/stats/rtcstats_objects.h +++ b/api/stats/rtcstats_objects.h @@ -161,6 +161,7 @@ class RTC_EXPORT RTCIceCandidatePairStats final : public RTCStats { // TODO(hbos): Support enum types? // "RTCStatsMember"? RTCStatsMember state; + // Obsolete: priority RTCStatsMember priority; RTCStatsMember nominated; // TODO(hbos): Collect this the way the spec describes it. We have a value for @@ -208,6 +209,7 @@ class RTC_EXPORT RTCIceCandidateStats : public RTCStats { ~RTCIceCandidateStats() override; RTCStatsMember transport_id; + // Obsolete: is_remote RTCStatsMember is_remote; RTCStatsMember network_type; RTCStatsMember ip; @@ -220,9 +222,6 @@ class RTC_EXPORT RTCIceCandidateStats : public RTCStats { RTCStatsMember priority; // TODO(hbos): Not collected by |RTCStatsCollector|. crbug.com/632723 RTCStatsMember url; - // TODO(hbos): |deleted = true| case is not supported by |RTCStatsCollector|. - // crbug.com/632723 - RTCStatsMember deleted; // = false protected: RTCIceCandidateStats(const std::string& id, @@ -376,6 +375,7 @@ class RTC_EXPORT RTCRTPStreamStats : public RTCStats { RTCStatsMember ssrc; RTCStatsMember kind; + // Obsolete: track_id RTCStatsMember track_id; RTCStatsMember transport_id; RTCStatsMember codec_id; @@ -505,9 +505,6 @@ class RTC_EXPORT RTCInboundRTPStreamStats final // audio and video but is only defined in the "video" case. crbug.com/657856 RTCStatsMember nack_count; RTCStatsMember qp_sum; - - // Obsolete - RTCStatsMember is_remote; // = false }; // https://w3c.github.io/webrtc-stats/#outboundrtpstats-dict* @@ -563,9 +560,6 @@ class RTC_EXPORT RTCOutboundRTPStreamStats final : public RTCRTPStreamStats { // audio and video but is only defined in the "video" case. crbug.com/657856 RTCStatsMember nack_count; RTCStatsMember qp_sum; - - // Obsolete - RTCStatsMember is_remote; // = false }; // https://w3c.github.io/webrtc-stats/#remoteinboundrtpstats-dict* diff --git a/pc/rtc_stats_collector.cc b/pc/rtc_stats_collector.cc index 4c9dfa489e..3f00a9c5c8 100644 --- a/pc/rtc_stats_collector.cc +++ b/pc/rtc_stats_collector.cc @@ -314,8 +314,6 @@ void SetInboundRTPStreamStatsFromMediaReceiverInfo( RTCInboundRTPStreamStats* inbound_stats) { RTC_DCHECK(inbound_stats); inbound_stats->ssrc = media_receiver_info.ssrc(); - // TODO(hbos): Support the remote case. https://crbug.com/657855 - inbound_stats->is_remote = false; inbound_stats->packets_received = static_cast(media_receiver_info.packets_rcvd); inbound_stats->bytes_received = @@ -496,8 +494,6 @@ void SetOutboundRTPStreamStatsFromMediaSenderInfo( RTCOutboundRTPStreamStats* outbound_stats) { RTC_DCHECK(outbound_stats); outbound_stats->ssrc = media_sender_info.ssrc(); - // TODO(hbos): Support the remote case. https://crbug.com/657856 - outbound_stats->is_remote = false; outbound_stats->packets_sent = static_cast(media_sender_info.packets_sent); outbound_stats->retransmitted_packets_sent = diff --git a/pc/rtc_stats_collector_unittest.cc b/pc/rtc_stats_collector_unittest.cc index 655f7e6315..3ccdde0056 100644 --- a/pc/rtc_stats_collector_unittest.cc +++ b/pc/rtc_stats_collector_unittest.cc @@ -1235,7 +1235,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) { expected_a_remote_srflx.protocol = "remote_srflx's protocol"; expected_a_remote_srflx.candidate_type = "srflx"; expected_a_remote_srflx.priority = 1; - expected_a_remote_srflx.deleted = false; EXPECT_TRUE(*expected_a_remote_srflx.is_remote); std::unique_ptr a_local_prflx = CreateFakeCandidate( @@ -1251,7 +1250,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) { expected_a_local_prflx.protocol = "a_local_prflx's protocol"; expected_a_local_prflx.candidate_type = "prflx"; expected_a_local_prflx.priority = 2; - expected_a_local_prflx.deleted = false; EXPECT_FALSE(*expected_a_local_prflx.is_remote); std::unique_ptr a_remote_relay = CreateFakeCandidate( @@ -1266,7 +1264,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) { expected_a_remote_relay.protocol = "a_remote_relay's protocol"; expected_a_remote_relay.candidate_type = "relay"; expected_a_remote_relay.priority = 3; - expected_a_remote_relay.deleted = false; EXPECT_TRUE(*expected_a_remote_relay.is_remote); std::unique_ptr a_local_relay = CreateFakeCandidate( @@ -1284,7 +1281,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) { expected_a_local_relay.relay_protocol = "tcp"; expected_a_local_relay.candidate_type = "relay"; expected_a_local_relay.priority = 1; - expected_a_local_relay.deleted = false; EXPECT_TRUE(*expected_a_local_relay.is_remote); // Candidates in the second transport stats. @@ -1301,7 +1297,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) { expected_b_local.protocol = "b_local's protocol"; expected_b_local.candidate_type = "host"; expected_b_local.priority = 42; - expected_b_local.deleted = false; EXPECT_FALSE(*expected_b_local.is_remote); std::unique_ptr b_remote = CreateFakeCandidate( @@ -1316,7 +1311,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidateStats) { expected_b_remote.protocol = "b_remote's protocol"; expected_b_remote.candidate_type = "host"; expected_b_remote.priority = 42; - expected_b_remote.deleted = false; EXPECT_TRUE(*expected_b_remote.is_remote); // Add candidate pairs to connection. @@ -1518,7 +1512,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidatePairStats) { expected_local_candidate.protocol = "protocol"; expected_local_candidate.candidate_type = "host"; expected_local_candidate.priority = 42; - expected_local_candidate.deleted = false; EXPECT_FALSE(*expected_local_candidate.is_remote); ASSERT_TRUE(report->Get(expected_local_candidate.id())); EXPECT_EQ(expected_local_candidate, @@ -1534,7 +1527,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCIceCandidatePairStats) { expected_remote_candidate.protocol = "protocol"; expected_remote_candidate.candidate_type = "host"; expected_remote_candidate.priority = 42; - expected_remote_candidate.deleted = false; EXPECT_TRUE(*expected_remote_candidate.is_remote); ASSERT_TRUE(report->Get(expected_remote_candidate.id())); EXPECT_EQ(expected_remote_candidate, @@ -1973,7 +1965,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCInboundRTPStreamStats_Audio) { RTCInboundRTPStreamStats expected_audio("RTCInboundRTPAudioStream_1", report->timestamp_us()); expected_audio.ssrc = 1; - expected_audio.is_remote = false; expected_audio.media_type = "audio"; expected_audio.kind = "audio"; expected_audio.track_id = stats_of_track_type[0]->id(); @@ -2072,7 +2063,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCInboundRTPStreamStats_Video) { RTCInboundRTPStreamStats expected_video("RTCInboundRTPVideoStream_1", report->timestamp_us()); expected_video.ssrc = 1; - expected_video.is_remote = false; expected_video.media_type = "video"; expected_video.kind = "video"; expected_video.track_id = IdForType(report); @@ -2161,7 +2151,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCOutboundRTPStreamStats_Audio) { expected_audio.media_source_id = "RTCAudioSource_50"; // |expected_audio.remote_id| should be undefined. expected_audio.ssrc = 1; - expected_audio.is_remote = false; expected_audio.media_type = "audio"; expected_audio.kind = "audio"; expected_audio.track_id = IdForType(report); @@ -2245,7 +2234,6 @@ TEST_F(RTCStatsCollectorTest, CollectRTCOutboundRTPStreamStats_Video) { expected_video.media_source_id = "RTCVideoSource_50"; // |expected_video.remote_id| should be undefined. expected_video.ssrc = 1; - expected_video.is_remote = false; expected_video.media_type = "video"; expected_video.kind = "video"; expected_video.track_id = stats_of_track_type[0]->id(); @@ -2555,7 +2543,6 @@ TEST_F(RTCStatsCollectorTest, CollectNoStreamRTCOutboundRTPStreamStats_Audio) { report->timestamp_us()); expected_audio.media_source_id = "RTCAudioSource_50"; expected_audio.ssrc = 1; - expected_audio.is_remote = false; expected_audio.media_type = "audio"; expected_audio.kind = "audio"; expected_audio.track_id = IdForType(report); diff --git a/pc/rtc_stats_integrationtest.cc b/pc/rtc_stats_integrationtest.cc index 8b12c671c5..4dd75a8bcb 100644 --- a/pc/rtc_stats_integrationtest.cc +++ b/pc/rtc_stats_integrationtest.cc @@ -537,7 +537,6 @@ class RTCStatsReportVerifier { verifier.TestMemberIsDefined(candidate.candidate_type); verifier.TestMemberIsNonNegative(candidate.priority); verifier.TestMemberIsUndefined(candidate.url); - verifier.TestMemberIsDefined(candidate.deleted); verifier.TestMemberIsUndefined(candidate.relay_protocol); return verifier.ExpectAllMembersSuccessfullyTested(); } @@ -830,7 +829,6 @@ class RTCStatsReportVerifier { // this test. See RFC 3550. verifier.TestMemberIsNonNegative(inbound_stream.packets_lost); verifier.TestMemberIsDefined(inbound_stream.last_packet_received_timestamp); - verifier.TestMemberIsDefined(inbound_stream.is_remote); if (inbound_stream.frames_received.ValueOrDefault(0) > 0) { verifier.TestMemberIsNonNegative(inbound_stream.frame_width); verifier.TestMemberIsNonNegative(inbound_stream.frame_height); @@ -961,7 +959,6 @@ class RTCStatsReportVerifier { RTCAudioSourceStats::kType); verifier.TestMemberIsUndefined(outbound_stream.qp_sum); } - verifier.TestMemberIsDefined(outbound_stream.is_remote); verifier.TestMemberIsOptionalIDReference( outbound_stream.remote_id, RTCRemoteInboundRtpStreamStats::kType); verifier.TestMemberIsNonNegative(outbound_stream.packets_sent); diff --git a/stats/rtcstats_objects.cc b/stats/rtcstats_objects.cc index 656cb4a8d3..6b811bae65 100644 --- a/stats/rtcstats_objects.cc +++ b/stats/rtcstats_objects.cc @@ -265,8 +265,7 @@ WEBRTC_RTCSTATS_IMPL(RTCIceCandidateStats, RTCStats, "abstract-ice-candidate", &relay_protocol, &candidate_type, &priority, - &url, - &deleted) + &url) // clang-format on RTCIceCandidateStats::RTCIceCandidateStats(const std::string& id, @@ -288,8 +287,7 @@ RTCIceCandidateStats::RTCIceCandidateStats(std::string&& id, relay_protocol("relayProtocol"), candidate_type("candidateType"), priority("priority"), - url("url"), - deleted("deleted", false) {} + url("url") {} RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other) : RTCStats(other.id(), other.timestamp_us()), @@ -303,8 +301,7 @@ RTCIceCandidateStats::RTCIceCandidateStats(const RTCIceCandidateStats& other) relay_protocol(other.relay_protocol), candidate_type(other.candidate_type), priority(other.priority), - url(other.url), - deleted(other.deleted) {} + url(other.url) {} RTCIceCandidateStats::~RTCIceCandidateStats() {} @@ -679,8 +676,7 @@ WEBRTC_RTCSTATS_IMPL( &fir_count, &pli_count, &nack_count, - &qp_sum, - &is_remote) + &qp_sum) // clang-format on RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(const std::string& id, @@ -736,8 +732,7 @@ RTCInboundRTPStreamStats::RTCInboundRTPStreamStats(std::string&& id, fir_count("firCount"), pli_count("pliCount"), nack_count("nackCount"), - qp_sum("qpSum"), - is_remote("isRemote") {} + qp_sum("qpSum") {} RTCInboundRTPStreamStats::RTCInboundRTPStreamStats( const RTCInboundRTPStreamStats& other) @@ -789,8 +784,7 @@ RTCInboundRTPStreamStats::RTCInboundRTPStreamStats( fir_count(other.fir_count), pli_count(other.pli_count), nack_count(other.nack_count), - qp_sum(other.qp_sum), - is_remote(other.is_remote) {} + qp_sum(other.qp_sum) {} RTCInboundRTPStreamStats::~RTCInboundRTPStreamStats() {} @@ -823,8 +817,7 @@ WEBRTC_RTCSTATS_IMPL( &fir_count, &pli_count, &nack_count, - &qp_sum, - &is_remote) + &qp_sum) // clang-format on RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(const std::string& id, @@ -861,8 +854,7 @@ RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats(std::string&& id, fir_count("firCount"), pli_count("pliCount"), nack_count("nackCount"), - qp_sum("qpSum"), - is_remote("isRemote") {} + qp_sum("qpSum") {} RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats( const RTCOutboundRTPStreamStats& other) @@ -894,8 +886,7 @@ RTCOutboundRTPStreamStats::RTCOutboundRTPStreamStats( fir_count(other.fir_count), pli_count(other.pli_count), nack_count(other.nack_count), - qp_sum(other.qp_sum), - is_remote(other.is_remote) {} + qp_sum(other.qp_sum) {} RTCOutboundRTPStreamStats::~RTCOutboundRTPStreamStats() {}