| Index: webrtc/voice_engine/channel.cc
|
| diff --git a/webrtc/voice_engine/channel.cc b/webrtc/voice_engine/channel.cc
|
| index 8f196c6d3148b1838ebdeb8231eed21d88bf09e1..97132995ba1fe8723d54240ee9d9892fa652b7b7 100644
|
| --- a/webrtc/voice_engine/channel.cc
|
| +++ b/webrtc/voice_engine/channel.cc
|
| @@ -157,6 +157,34 @@ class RtcEventLogProxy final : public webrtc::RtcEventLog {
|
| RTC_DISALLOW_COPY_AND_ASSIGN(RtcEventLogProxy);
|
| };
|
|
|
| +class RtcpRttStatsProxy final : public RtcpRttStats {
|
| + public:
|
| + RtcpRttStatsProxy() : rtcp_rtt_stats_(nullptr) {}
|
| +
|
| + void OnRttUpdate(int64_t rtt) override {
|
| + rtc::CritScope lock(&crit_);
|
| + if (rtcp_rtt_stats_)
|
| + rtcp_rtt_stats_->OnRttUpdate(rtt);
|
| + }
|
| +
|
| + int64_t LastProcessedRtt() const override {
|
| + rtc::CritScope lock(&crit_);
|
| + if (rtcp_rtt_stats_ == nullptr)
|
| + return 0;
|
| + return rtcp_rtt_stats_->LastProcessedRtt();
|
| + }
|
| +
|
| + void SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) {
|
| + rtc::CritScope lock(&crit_);
|
| + rtcp_rtt_stats_ = rtcp_rtt_stats;
|
| + }
|
| +
|
| + private:
|
| + rtc::CriticalSection crit_;
|
| + RtcpRttStats* rtcp_rtt_stats_ GUARDED_BY(crit_);
|
| + RTC_DISALLOW_COPY_AND_ASSIGN(RtcpRttStatsProxy);
|
| +};
|
| +
|
| class TransportFeedbackProxy : public TransportFeedbackObserver {
|
| public:
|
| TransportFeedbackProxy() : feedback_observer_(nullptr) {
|
| @@ -815,6 +843,7 @@ Channel::Channel(int32_t channelId,
|
| : _instanceId(instanceId),
|
| _channelId(channelId),
|
| event_log_proxy_(new RtcEventLogProxy()),
|
| + rtcp_rtt_stats_proxy_(new RtcpRttStatsProxy()),
|
| rtp_header_parser_(RtpHeaderParser::Create()),
|
| rtp_payload_registry_(
|
| new RTPPayloadRegistry(RTPPayloadStrategy::CreateStrategy(true))),
|
| @@ -900,6 +929,7 @@ Channel::Channel(int32_t channelId,
|
| configuration.transport_feedback_callback = feedback_observer_proxy_.get();
|
| }
|
| configuration.event_log = &(*event_log_proxy_);
|
| + configuration.rtt_stats = &(*rtcp_rtt_stats_proxy_);
|
| configuration.retransmission_rate_limiter =
|
| retransmission_rate_limiter_.get();
|
|
|
| @@ -2811,6 +2841,10 @@ void Channel::SetRtcEventLog(RtcEventLog* event_log) {
|
| event_log_proxy_->SetEventLog(event_log);
|
| }
|
|
|
| +void Channel::SetRtcpRttStats(RtcpRttStats* rtcp_rtt_stats) {
|
| + rtcp_rtt_stats_proxy_->SetRtcpRttStats(rtcp_rtt_stats);
|
| +}
|
| +
|
| int Channel::RegisterExternalMediaProcessing(ProcessingTypes type,
|
| VoEMediaProcess& processObject) {
|
| WEBRTC_TRACE(kTraceInfo, kTraceVoice, VoEId(_instanceId, _channelId),
|
|
|