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

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

Issue 2827333005: Moving overhead counting to bitrate estimators.
Patch Set: Created 3 years, 8 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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1098 } 1098 }
1099 ++rtcp_iterator; 1099 ++rtcp_iterator;
1100 } 1100 }
1101 if (clock.TimeInMicroseconds() >= NextRtpTime()) { 1101 if (clock.TimeInMicroseconds() >= NextRtpTime()) {
1102 RTC_DCHECK_EQ(clock.TimeInMicroseconds(), NextRtpTime()); 1102 RTC_DCHECK_EQ(clock.TimeInMicroseconds(), NextRtpTime());
1103 const LoggedRtpPacket& rtp = *rtp_iterator->second; 1103 const LoggedRtpPacket& rtp = *rtp_iterator->second;
1104 if (rtp.header.extension.hasTransportSequenceNumber) { 1104 if (rtp.header.extension.hasTransportSequenceNumber) {
1105 RTC_DCHECK(rtp.header.extension.hasTransportSequenceNumber); 1105 RTC_DCHECK(rtp.header.extension.hasTransportSequenceNumber);
1106 cc.AddPacket(rtp.header.ssrc, 1106 cc.AddPacket(rtp.header.ssrc,
1107 rtp.header.extension.transportSequenceNumber, 1107 rtp.header.extension.transportSequenceNumber,
1108 rtp.total_length, PacedPacketInfo()); 1108 rtp.total_length - rtp.header.headerLength,
1109 rtp.header.headerLength, PacedPacketInfo());
1109 rtc::SentPacket sent_packet( 1110 rtc::SentPacket sent_packet(
1110 rtp.header.extension.transportSequenceNumber, rtp.timestamp / 1000); 1111 rtp.header.extension.transportSequenceNumber, rtp.timestamp / 1000);
1111 cc.OnSentPacket(sent_packet); 1112 cc.OnSentPacket(sent_packet);
1112 } 1113 }
1113 ++rtp_iterator; 1114 ++rtp_iterator;
1114 } 1115 }
1115 if (clock.TimeInMicroseconds() >= NextProcessTime()) { 1116 if (clock.TimeInMicroseconds() >= NextProcessTime()) {
1116 RTC_DCHECK_EQ(clock.TimeInMicroseconds(), NextProcessTime()); 1117 RTC_DCHECK_EQ(clock.TimeInMicroseconds(), NextProcessTime());
1117 cc.Process(); 1118 cc.Process();
1118 } 1119 }
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
1198 } 1199 }
1199 ++rtcp_iterator; 1200 ++rtcp_iterator;
1200 } 1201 }
1201 if (clock.TimeInMicroseconds() >= NextRtpTime()) { 1202 if (clock.TimeInMicroseconds() >= NextRtpTime()) {
1202 RTC_DCHECK_EQ(clock.TimeInMicroseconds(), NextRtpTime()); 1203 RTC_DCHECK_EQ(clock.TimeInMicroseconds(), NextRtpTime());
1203 const LoggedRtpPacket& rtp = *rtp_iterator->second; 1204 const LoggedRtpPacket& rtp = *rtp_iterator->second;
1204 if (rtp.header.extension.hasTransportSequenceNumber) { 1205 if (rtp.header.extension.hasTransportSequenceNumber) {
1205 RTC_DCHECK(rtp.header.extension.hasTransportSequenceNumber); 1206 RTC_DCHECK(rtp.header.extension.hasTransportSequenceNumber);
1206 feedback_adapter.AddPacket(rtp.header.ssrc, 1207 feedback_adapter.AddPacket(rtp.header.ssrc,
1207 rtp.header.extension.transportSequenceNumber, 1208 rtp.header.extension.transportSequenceNumber,
1208 rtp.total_length, PacedPacketInfo()); 1209 rtp.total_length - rtp.header.headerLength,
1210 rtp.header.headerLength, PacedPacketInfo());
1209 feedback_adapter.OnSentPacket( 1211 feedback_adapter.OnSentPacket(
1210 rtp.header.extension.transportSequenceNumber, rtp.timestamp / 1000); 1212 rtp.header.extension.transportSequenceNumber, rtp.timestamp / 1000);
1211 } 1213 }
1212 ++rtp_iterator; 1214 ++rtp_iterator;
1213 } 1215 }
1214 time_us = std::min(NextRtpTime(), NextRtcpTime()); 1216 time_us = std::min(NextRtpTime(), NextRtcpTime());
1215 } 1217 }
1216 // We assume that the base network delay (w/o queues) is the min delay 1218 // We assume that the base network delay (w/o queues) is the min delay
1217 // observed during the call. 1219 // observed during the call.
1218 for (TimeSeriesPoint& point : time_series.points) 1220 for (TimeSeriesPoint& point : time_series.points)
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
1388 }, 1390 },
1389 audio_network_adaptation_events_, begin_time_, &time_series); 1391 audio_network_adaptation_events_, begin_time_, &time_series);
1390 plot->AppendTimeSeries(std::move(time_series)); 1392 plot->AppendTimeSeries(std::move(time_series));
1391 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin); 1393 plot->SetXAxis(0, call_duration_s_, "Time (s)", kLeftMargin, kRightMargin);
1392 plot->SetSuggestedYAxis(0, 1, "Number of channels (1 (mono)/2 (stereo))", 1394 plot->SetSuggestedYAxis(0, 1, "Number of channels (1 (mono)/2 (stereo))",
1393 kBottomMargin, kTopMargin); 1395 kBottomMargin, kTopMargin);
1394 plot->SetTitle("Reported audio encoder number of channels"); 1396 plot->SetTitle("Reported audio encoder number of channels");
1395 } 1397 }
1396 } // namespace plotting 1398 } // namespace plotting
1397 } // namespace webrtc 1399 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698