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

Side by Side Diff: webrtc/video/send_statistics_proxy.cc

Issue 2391963002: Rename FecConfig to UlpfecConfig in config.h. (Closed)
Patch Set: Rebase. 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
« no previous file with comments | « webrtc/video/rtp_stream_receiver.cc ('k') | webrtc/video/send_statistics_proxy_unittest.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
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 RTC_HISTOGRAMS_COUNTS_10000( 322 RTC_HISTOGRAMS_COUNTS_10000(
323 kIndex, uma_prefix_ + "RetransmittedBitrateSentInKbps", 323 kIndex, uma_prefix_ + "RetransmittedBitrateSentInKbps",
324 static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 / 324 static_cast<int>(rtp_rtx.retransmitted.TotalBytes() * 8 /
325 elapsed_sec / 1000)); 325 elapsed_sec / 1000));
326 if (!rtp_config.rtx.ssrcs.empty()) { 326 if (!rtp_config.rtx.ssrcs.empty()) {
327 RTC_HISTOGRAMS_COUNTS_10000( 327 RTC_HISTOGRAMS_COUNTS_10000(
328 kIndex, uma_prefix_ + "RtxBitrateSentInKbps", 328 kIndex, uma_prefix_ + "RtxBitrateSentInKbps",
329 static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec / 329 static_cast<int>(rtx.transmitted.TotalBytes() * 8 / elapsed_sec /
330 1000)); 330 1000));
331 } 331 }
332 if (rtp_config.fec.red_payload_type != -1) { 332 if (rtp_config.ulpfec.red_payload_type != -1) {
333 RTC_HISTOGRAMS_COUNTS_10000(kIndex, 333 RTC_HISTOGRAMS_COUNTS_10000(kIndex,
334 uma_prefix_ + "FecBitrateSentInKbps", 334 uma_prefix_ + "FecBitrateSentInKbps",
335 static_cast<int>(rtp_rtx.fec.TotalBytes() * 335 static_cast<int>(rtp_rtx.fec.TotalBytes() *
336 8 / elapsed_sec / 1000)); 336 8 / elapsed_sec / 1000));
337 } 337 }
338 } 338 }
339 } 339 }
340 } 340 }
341 341
342 void SendStatisticsProxy::OnEncoderReconfigured( 342 void SendStatisticsProxy::OnEncoderReconfigured(
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 return Fraction(min_required_samples, 1000.0f); 644 return Fraction(min_required_samples, 1000.0f);
645 } 645 }
646 646
647 int SendStatisticsProxy::BoolSampleCounter::Fraction( 647 int SendStatisticsProxy::BoolSampleCounter::Fraction(
648 int min_required_samples, float multiplier) const { 648 int min_required_samples, float multiplier) const {
649 if (num_samples < min_required_samples || num_samples == 0) 649 if (num_samples < min_required_samples || num_samples == 0)
650 return -1; 650 return -1;
651 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); 651 return static_cast<int>((sum * multiplier / num_samples) + 0.5f);
652 } 652 }
653 } // namespace webrtc 653 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/video/rtp_stream_receiver.cc ('k') | webrtc/video/send_statistics_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698