Revert "Wire up non-sender RTT for audio, and implement related standardized stats."

This reverts commit fb0dca6c055cbf9e43af665d3c437eba6f43372e.

Reason for revert: Speculative revert due to failing stats test in chromium. Possibly because the chromium test expected the metrics to not be supported, and now they are. Reverting just to unblock the webrtc roll into chromium.

Original change's description:
> Wire up non-sender RTT for audio, and implement related standardized stats.
>
> The implemented stats are:
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
> - https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
>
> Bug: webrtc:12951, webrtc:12714
> Change-Id: Ia362d5c4b0456140e32da79d40edc06ab9ce2a2c
> Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/226956
> Commit-Queue: Ivo Creusen <ivoc@webrtc.org>
> Reviewed-by: Henrik Boström <hbos@webrtc.org>
> Reviewed-by: Harald Alvestrand <hta@webrtc.org>
> Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
> Cr-Commit-Position: refs/heads/main@{#34861}

# Not skipping CQ checks because original CL landed > 1 day ago.

TBR=hta,hbos,minyue

Bug: webrtc:12951, webrtc:12714
Change-Id: If07ad63286eea9cdde88271e61cc28f4b268b290
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/231001
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Ivo Creusen <ivoc@webrtc.org>
Reviewed-by: Olga Sharonova <olka@webrtc.org>
Commit-Queue: Björn Terelius <terelius@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#34897}
This commit is contained in:
Björn Terelius
2021-09-01 16:03:26 +00:00
committed by WebRTC LUCI CQ
parent 78a8ce0a4c
commit 2c41cbae37
30 changed files with 27 additions and 552 deletions

View File

@ -16,10 +16,8 @@
#include <string>
#include <vector>
#include "absl/types/optional.h"
#include "api/array_view.h"
#include "api/sequence_checker.h"
#include "api/units/time_delta.h"
#include "modules/rtp_rtcp/include/report_block_data.h"
#include "modules/rtp_rtcp/include/rtcp_statistics.h"
#include "modules/rtp_rtcp/include/rtp_rtcp_defines.h"
@ -60,35 +58,6 @@ class RTCPReceiver final {
protected:
virtual ~ModuleRtpRtcp() = default;
};
// Standardized stats derived from the non-sender RTT.
class NonSenderRttStats {
public:
NonSenderRttStats() = default;
NonSenderRttStats(const NonSenderRttStats&) = default;
NonSenderRttStats& operator=(const NonSenderRttStats&) = default;
~NonSenderRttStats() = default;
void Update(TimeDelta non_sender_rtt_seconds) {
round_trip_time_ = non_sender_rtt_seconds;
total_round_trip_time_ += non_sender_rtt_seconds;
round_trip_time_measurements_++;
}
void Invalidate() { round_trip_time_.reset(); }
// https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptime
absl::optional<TimeDelta> round_trip_time() const {
return round_trip_time_;
}
// https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-totalroundtriptime
TimeDelta total_round_trip_time() const { return total_round_trip_time_; }
// https://www.w3.org/TR/webrtc-stats/#dom-rtcremoteoutboundrtpstreamstats-roundtriptimemeasurements
int round_trip_time_measurements() const {
return round_trip_time_measurements_;
}
private:
absl::optional<TimeDelta> round_trip_time_;
TimeDelta total_round_trip_time_ = TimeDelta::Zero();
int round_trip_time_measurements_ = 0;
};
RTCPReceiver(const RtpRtcpInterface::Configuration& config,
ModuleRtpRtcp* owner);
@ -139,9 +108,6 @@ class RTCPReceiver final {
int64_t* min_rtt_ms,
int64_t* max_rtt_ms) const;
// Returns non-sender RTT metrics for the remote SSRC.
NonSenderRttStats GetNonSenderRTT() const;
void SetNonSenderRttMeasurement(bool enabled);
bool GetAndResetXrRrRtt(int64_t* rtt_ms);
@ -311,16 +277,14 @@ class RTCPReceiver final {
RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_);
void HandleXr(const rtcp::CommonHeader& rtcp_block,
PacketInformation* packet_information,
bool& contains_dlrr,
uint32_t& ssrc)
PacketInformation* packet_information)
RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_);
void HandleXrReceiveReferenceTime(uint32_t sender_ssrc,
const rtcp::Rrtr& rrtr)
RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_);
void HandleXrDlrrReportBlock(uint32_t ssrc, const rtcp::ReceiveTimeInfo& rti)
void HandleXrDlrrReportBlock(const rtcp::ReceiveTimeInfo& rti)
RTC_EXCLUSIVE_LOCKS_REQUIRED(rtcp_receiver_lock_);
void HandleXrTargetBitrate(uint32_t ssrc,
@ -418,9 +382,6 @@ class RTCPReceiver final {
// Round-Trip Time per remote sender ssrc.
flat_map<uint32_t, RttStats> rtts_ RTC_GUARDED_BY(rtcp_receiver_lock_);
// Non-sender Round-trip time per remote ssrc.
flat_map<uint32_t, NonSenderRttStats> non_sender_rtts_
RTC_GUARDED_BY(rtcp_receiver_lock_);
// Report blocks per local source ssrc.
flat_map<uint32_t, ReportBlockData> received_report_blocks_