| OLD | NEW |
| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc); | 411 VideoSendStream::StreamStats* stats = GetStatsEntry(ssrc); |
| 412 if (!stats) | 412 if (!stats) |
| 413 return; | 413 return; |
| 414 | 414 |
| 415 stats->total_bitrate_bps = 0; | 415 stats->total_bitrate_bps = 0; |
| 416 stats->retransmit_bitrate_bps = 0; | 416 stats->retransmit_bitrate_bps = 0; |
| 417 stats->height = 0; | 417 stats->height = 0; |
| 418 stats->width = 0; | 418 stats->width = 0; |
| 419 } | 419 } |
| 420 | 420 |
| 421 void SendStatisticsProxy::OnSetRates(uint32_t bitrate_bps, int framerate) { | 421 void SendStatisticsProxy::OnSetEncoderTargetRate(uint32_t bitrate_bps) { |
| 422 rtc::CritScope lock(&crit_); | 422 rtc::CritScope lock(&crit_); |
| 423 stats_.target_media_bitrate_bps = bitrate_bps; | 423 stats_.target_media_bitrate_bps = bitrate_bps; |
| 424 } | 424 } |
| 425 | 425 |
| 426 void SendStatisticsProxy::OnSendEncodedImage( | 426 void SendStatisticsProxy::OnSendEncodedImage( |
| 427 const EncodedImage& encoded_image, | 427 const EncodedImage& encoded_image, |
| 428 const CodecSpecificInfo* codec_info) { | 428 const CodecSpecificInfo* codec_info) { |
| 429 size_t simulcast_idx = 0; | 429 size_t simulcast_idx = 0; |
| 430 | 430 |
| 431 if (codec_info) { | 431 if (codec_info) { |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 627 return Fraction(min_required_samples, 1000.0f); | 627 return Fraction(min_required_samples, 1000.0f); |
| 628 } | 628 } |
| 629 | 629 |
| 630 int SendStatisticsProxy::BoolSampleCounter::Fraction( | 630 int SendStatisticsProxy::BoolSampleCounter::Fraction( |
| 631 int min_required_samples, float multiplier) const { | 631 int min_required_samples, float multiplier) const { |
| 632 if (num_samples < min_required_samples || num_samples == 0) | 632 if (num_samples < min_required_samples || num_samples == 0) |
| 633 return -1; | 633 return -1; |
| 634 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); | 634 return static_cast<int>((sum * multiplier / num_samples) + 0.5f); |
| 635 } | 635 } |
| 636 } // namespace webrtc | 636 } // namespace webrtc |
| OLD | NEW |