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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const { | 68 VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const { |
69 rtc::CritScope lock(&crit_); | 69 rtc::CritScope lock(&crit_); |
70 return stats_; | 70 return stats_; |
71 } | 71 } |
72 | 72 |
73 void ReceiveStatisticsProxy::OnIncomingPayloadType(int payload_type) { | 73 void ReceiveStatisticsProxy::OnIncomingPayloadType(int payload_type) { |
74 rtc::CritScope lock(&crit_); | 74 rtc::CritScope lock(&crit_); |
75 stats_.current_payload_type = payload_type; | 75 stats_.current_payload_type = payload_type; |
76 } | 76 } |
77 | 77 |
| 78 void ReceiveStatisticsProxy::OnDecoderImplementationName( |
| 79 const char* implementation_name) { |
| 80 rtc::CritScope lock(&crit_); |
| 81 stats_.decoder_implementation_name = implementation_name; |
| 82 } |
78 void ReceiveStatisticsProxy::OnIncomingRate(unsigned int framerate, | 83 void ReceiveStatisticsProxy::OnIncomingRate(unsigned int framerate, |
79 unsigned int bitrate_bps) { | 84 unsigned int bitrate_bps) { |
80 rtc::CritScope lock(&crit_); | 85 rtc::CritScope lock(&crit_); |
81 stats_.network_frame_rate = framerate; | 86 stats_.network_frame_rate = framerate; |
82 stats_.total_bitrate_bps = bitrate_bps; | 87 stats_.total_bitrate_bps = bitrate_bps; |
83 } | 88 } |
84 | 89 |
85 void ReceiveStatisticsProxy::OnDecoderTiming(int decode_ms, | 90 void ReceiveStatisticsProxy::OnDecoderTiming(int decode_ms, |
86 int max_decode_ms, | 91 int max_decode_ms, |
87 int current_delay_ms, | 92 int current_delay_ms, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 ++num_samples; | 190 ++num_samples; |
186 } | 191 } |
187 | 192 |
188 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { | 193 int ReceiveStatisticsProxy::SampleCounter::Avg(int min_required_samples) const { |
189 if (num_samples < min_required_samples || num_samples == 0) | 194 if (num_samples < min_required_samples || num_samples == 0) |
190 return -1; | 195 return -1; |
191 return sum / num_samples; | 196 return sum / num_samples; |
192 } | 197 } |
193 | 198 |
194 } // namespace webrtc | 199 } // namespace webrtc |
OLD | NEW |