Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl.cc

Issue 1669623004: Use CallStats for RTT in Call, rather than VideoSendStream::GetRtt() (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comment, rebase Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/video/call_stats.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 int64_t rtt_ms; 175 int64_t rtt_ms;
176 if (rtt_stats_ && rtcp_receiver_.GetAndResetXrRrRtt(&rtt_ms)) { 176 if (rtt_stats_ && rtcp_receiver_.GetAndResetXrRrRtt(&rtt_ms)) {
177 rtt_stats_->OnRttUpdate(rtt_ms); 177 rtt_stats_->OnRttUpdate(rtt_ms);
178 } 178 }
179 } 179 }
180 } 180 }
181 181
182 // Get processed rtt. 182 // Get processed rtt.
183 if (process_rtt) { 183 if (process_rtt) {
184 last_rtt_process_time_ = now; 184 last_rtt_process_time_ = now;
185 if (rtt_stats_) 185 if (rtt_stats_) {
186 set_rtt_ms(rtt_stats_->LastProcessedRtt()); 186 // Make sure we have a valid RTT before setting.
187 int64_t last_rtt = rtt_stats_->LastProcessedRtt();
188 if (last_rtt >= 0)
189 set_rtt_ms(last_rtt);
190 }
187 } 191 }
188 192
189 // For sending streams, make sure to not send a SR before media has been sent. 193 // For sending streams, make sure to not send a SR before media has been sent.
190 if (rtcp_sender_.TimeToSendRTCPReport()) { 194 if (rtcp_sender_.TimeToSendRTCPReport()) {
191 RTCPSender::FeedbackState state = GetFeedbackState(); 195 RTCPSender::FeedbackState state = GetFeedbackState();
192 // Prevent sending streams to send SR before any media has been sent. 196 // Prevent sending streams to send SR before any media has been sent.
193 if (!rtcp_sender_.Sending() || state.packets_sent > 0) 197 if (!rtcp_sender_.Sending() || state.packets_sent > 0)
194 rtcp_sender_.SendRTCP(state, kRtcpReport); 198 rtcp_sender_.SendRTCP(state, kRtcpReport);
195 } 199 }
196 200
(...skipping 787 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback( 988 void ModuleRtpRtcpImpl::RegisterSendChannelRtpStatisticsCallback(
985 StreamDataCountersCallback* callback) { 989 StreamDataCountersCallback* callback) {
986 rtp_sender_.RegisterRtpStatisticsCallback(callback); 990 rtp_sender_.RegisterRtpStatisticsCallback(callback);
987 } 991 }
988 992
989 StreamDataCountersCallback* 993 StreamDataCountersCallback*
990 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const { 994 ModuleRtpRtcpImpl::GetSendChannelRtpStatisticsCallback() const {
991 return rtp_sender_.GetRtpStatisticsCallback(); 995 return rtp_sender_.GetRtpStatisticsCallback();
992 } 996 }
993 } // namespace webrtc 997 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/call/call.cc ('k') | webrtc/video/call_stats.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698