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

Side by Side Diff: webrtc/tools/event_log_visualizer/analyzer.cc

Issue 2422063002: Use bayesian estimate of acked bitrate. (Closed)
Patch Set: . Created 4 years, 2 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 983
984 auto NextProcessTime = [&]() { 984 auto NextProcessTime = [&]() {
985 if (rtcp_iterator != incoming_rtcp.end() || 985 if (rtcp_iterator != incoming_rtcp.end() ||
986 rtp_iterator != outgoing_rtp.end()) { 986 rtp_iterator != outgoing_rtp.end()) {
987 return clock.TimeInMicroseconds() + 987 return clock.TimeInMicroseconds() +
988 std::max<int64_t>(cc.TimeUntilNextProcess() * 1000, 0); 988 std::max<int64_t>(cc.TimeUntilNextProcess() * 1000, 0);
989 } 989 }
990 return std::numeric_limits<int64_t>::max(); 990 return std::numeric_limits<int64_t>::max();
991 }; 991 };
992 992
993 RateStatistics acked_bitrate(1000, 8000); 993 RateStatistics acked_bitrate(250, 8000);
994 994
995 int64_t time_us = std::min(NextRtpTime(), NextRtcpTime()); 995 int64_t time_us = std::min(NextRtpTime(), NextRtcpTime());
996 while (time_us != std::numeric_limits<int64_t>::max()) { 996 while (time_us != std::numeric_limits<int64_t>::max()) {
997 clock.AdvanceTimeMicroseconds(time_us - clock.TimeInMicroseconds()); 997 clock.AdvanceTimeMicroseconds(time_us - clock.TimeInMicroseconds());
998 if (clock.TimeInMicroseconds() >= NextRtcpTime()) { 998 if (clock.TimeInMicroseconds() >= NextRtcpTime()) {
999 RTC_DCHECK_EQ(clock.TimeInMicroseconds(), NextRtcpTime()); 999 RTC_DCHECK_EQ(clock.TimeInMicroseconds(), NextRtcpTime());
1000 const LoggedRtcpPacket& rtcp = *rtcp_iterator->second; 1000 const LoggedRtcpPacket& rtcp = *rtcp_iterator->second;
1001 if (rtcp.type == kRtcpTransportFeedback) { 1001 if (rtcp.type == kRtcpTransportFeedback) {
1002 TransportFeedbackObserver* observer = cc.GetTransportFeedbackObserver(); 1002 TransportFeedbackObserver* observer = cc.GetTransportFeedbackObserver();
1003 observer->OnTransportFeedback(*static_cast<rtcp::TransportFeedback*>( 1003 observer->OnTransportFeedback(*static_cast<rtcp::TransportFeedback*>(
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
1168 point.y -= estimated_base_delay_ms; 1168 point.y -= estimated_base_delay_ms;
1169 // Add the data set to the plot. 1169 // Add the data set to the plot.
1170 plot->series_list_.push_back(std::move(time_series)); 1170 plot->series_list_.push_back(std::move(time_series));
1171 1171
1172 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); 1172 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin);
1173 plot->SetSuggestedYAxis(0, 10, "Delay (ms)", kBottomMargin, kTopMargin); 1173 plot->SetSuggestedYAxis(0, 10, "Delay (ms)", kBottomMargin, kTopMargin);
1174 plot->SetTitle("Network Delay Change."); 1174 plot->SetTitle("Network Delay Change.");
1175 } 1175 }
1176 } // namespace plotting 1176 } // namespace plotting
1177 } // namespace webrtc 1177 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698