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

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: adding macro declaration 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/rtp_rtcp.gypi ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender.cc » ('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) 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(),
282 cumulative_loss_, ssrc_);
283 BWE_TEST_LOGGING_PLOT_WITH_SSRC(
284 1, "received_seq_max[pkts]", clock_->TimeInMilliseconds(),
285 (received_seq_max_ - received_seq_first_), ssrc_);
279 286
280 return stats; 287 return stats;
281 } 288 }
282 289
283 void StreamStatisticianImpl::GetDataCounters( 290 void StreamStatisticianImpl::GetDataCounters(
284 size_t* bytes_received, uint32_t* packets_received) const { 291 size_t* bytes_received, uint32_t* packets_received) const {
285 rtc::CritScope cs(&stream_lock_); 292 rtc::CritScope cs(&stream_lock_);
286 if (bytes_received) { 293 if (bytes_received) {
287 *bytes_received = receive_counters_.transmitted.payload_bytes + 294 *bytes_received = receive_counters_.transmitted.payload_bytes +
288 receive_counters_.transmitted.header_bytes + 295 receive_counters_.transmitted.header_bytes +
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 void NullReceiveStatistics::SetMaxReorderingThreshold( 510 void NullReceiveStatistics::SetMaxReorderingThreshold(
504 int max_reordering_threshold) {} 511 int max_reordering_threshold) {}
505 512
506 void NullReceiveStatistics::RegisterRtcpStatisticsCallback( 513 void NullReceiveStatistics::RegisterRtcpStatisticsCallback(
507 RtcpStatisticsCallback* callback) {} 514 RtcpStatisticsCallback* callback) {}
508 515
509 void NullReceiveStatistics::RegisterRtpStatisticsCallback( 516 void NullReceiveStatistics::RegisterRtpStatisticsCallback(
510 StreamDataCountersCallback* callback) {} 517 StreamDataCountersCallback* callback) {}
511 518
512 } // namespace webrtc 519 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/rtp_rtcp.gypi ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698