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

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

Issue 2296253002: Enable BWE logging to command line when rtc_enable_bwe_test_logging is set to true (Closed)
Patch Set: Added plot function which considers ssrc Created 4 years, 3 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) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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
11 #include "webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h" 11 #include "webrtc/modules/rtp_rtcp/source/receive_statistics_impl.h"
12 12
13 #include <math.h> 13 #include <math.h>
14 14
15 #include <cstdlib> 15 #include <cstdlib>
16 16
17 #include "webrtc/modules/remote_bitrate_estimator/test/bwe_test_logging.h"
17 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h" 18 #include "webrtc/modules/rtp_rtcp/source/rtp_rtcp_config.h"
18 #include "webrtc/modules/rtp_rtcp/source/time_util.h" 19 #include "webrtc/modules/rtp_rtcp/source/time_util.h"
19 20
20 namespace webrtc { 21 namespace webrtc {
21 22
22 const int64_t kStatisticsTimeoutMs = 8000; 23 const int64_t kStatisticsTimeoutMs = 8000;
23 const int64_t kStatisticsProcessIntervalMs = 1000; 24 const int64_t kStatisticsProcessIntervalMs = 1000;
24 25
25 StreamStatistician::~StreamStatistician() {} 26 StreamStatistician::~StreamStatistician() {}
26 27
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 270
270 // Store this report. 271 // Store this report.
271 last_reported_statistics_ = stats; 272 last_reported_statistics_ = stats;
272 273
273 // Only for report blocks in RTCP SR and RR. 274 // Only for report blocks in RTCP SR and RR.
274 last_report_inorder_packets_ = 275 last_report_inorder_packets_ =
275 receive_counters_.transmitted.packets - 276 receive_counters_.transmitted.packets -
276 receive_counters_.retransmitted.packets; 277 receive_counters_.retransmitted.packets;
277 last_report_old_packets_ = receive_counters_.retransmitted.packets; 278 last_report_old_packets_ = receive_counters_.retransmitted.packets;
278 last_report_seq_max_ = received_seq_max_; 279 last_report_seq_max_ = received_seq_max_;
280 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "cumulative_loss[pkts]", \
281 clock_->TimeInMilliseconds(), cumulative_loss_, ssrc_);
282 BWE_TEST_LOGGING_PLOT_WITH_SSRC(1, "received_seq_max[pkts]", \
283 clock_->TimeInMilliseconds(), \
284 (received_seq_max_ - received_seq_first_), ssrc_);
stefan-webrtc 2016/09/02 11:13:04 Remove all \ as they aren't needed.
279 285
280 return stats; 286 return stats;
281 } 287 }
282 288
283 void StreamStatisticianImpl::GetDataCounters( 289 void StreamStatisticianImpl::GetDataCounters(
284 size_t* bytes_received, uint32_t* packets_received) const { 290 size_t* bytes_received, uint32_t* packets_received) const {
285 rtc::CritScope cs(&stream_lock_); 291 rtc::CritScope cs(&stream_lock_);
286 if (bytes_received) { 292 if (bytes_received) {
287 *bytes_received = receive_counters_.transmitted.payload_bytes + 293 *bytes_received = receive_counters_.transmitted.payload_bytes +
288 receive_counters_.transmitted.header_bytes + 294 receive_counters_.transmitted.header_bytes +
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 void NullReceiveStatistics::SetMaxReorderingThreshold( 509 void NullReceiveStatistics::SetMaxReorderingThreshold(
504 int max_reordering_threshold) {} 510 int max_reordering_threshold) {}
505 511
506 void NullReceiveStatistics::RegisterRtcpStatisticsCallback( 512 void NullReceiveStatistics::RegisterRtcpStatisticsCallback(
507 RtcpStatisticsCallback* callback) {} 513 RtcpStatisticsCallback* callback) {}
508 514
509 void NullReceiveStatistics::RegisterRtpStatisticsCallback( 515 void NullReceiveStatistics::RegisterRtpStatisticsCallback(
510 StreamDataCountersCallback* callback) {} 516 StreamDataCountersCallback* callback) {}
511 517
512 } // namespace webrtc 518 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698