OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 for (const auto& f : floats) { | 217 for (const auto& f : floats) { |
218 report->AddFloat(f.name, f.value); | 218 report->AddFloat(f.name, f.value); |
219 } | 219 } |
220 | 220 |
221 for (const auto& i : ints) { | 221 for (const auto& i : ints) { |
222 if (i.value >= 0) { | 222 if (i.value >= 0) { |
223 report->AddInt(i.name, i.value); | 223 report->AddInt(i.name, i.value); |
224 } | 224 } |
225 } | 225 } |
226 report->AddString(StatsReport::kStatsValueNameMediaType, "audio"); | 226 report->AddString(StatsReport::kStatsValueNameMediaType, "audio"); |
| 227 if (info.ana_statistics.bitrate_action_counter) { |
| 228 report->AddInt(StatsReport::kStatsValueNameAnaBitrateActionCounter, |
| 229 *info.ana_statistics.bitrate_action_counter); |
| 230 } |
| 231 if (info.ana_statistics.channel_action_counter) { |
| 232 report->AddInt(StatsReport::kStatsValueNameAnaChannelActionCounter, |
| 233 *info.ana_statistics.channel_action_counter); |
| 234 } |
| 235 if (info.ana_statistics.dtx_action_counter) { |
| 236 report->AddInt(StatsReport::kStatsValueNameAnaDtxActionCounter, |
| 237 *info.ana_statistics.dtx_action_counter); |
| 238 } |
| 239 if (info.ana_statistics.fec_action_counter) { |
| 240 report->AddInt(StatsReport::kStatsValueNameAnaFecActionCounter, |
| 241 *info.ana_statistics.fec_action_counter); |
| 242 } |
| 243 if (info.ana_statistics.frame_length_action_counter) { |
| 244 report->AddInt(StatsReport::kStatsValueNameAnaFrameLengthActionCounter, |
| 245 *info.ana_statistics.frame_length_action_counter); |
| 246 } |
227 } | 247 } |
228 | 248 |
229 void ExtractStats(const cricket::VideoReceiverInfo& info, StatsReport* report) { | 249 void ExtractStats(const cricket::VideoReceiverInfo& info, StatsReport* report) { |
230 ExtractCommonReceiveProperties(info, report); | 250 ExtractCommonReceiveProperties(info, report); |
231 report->AddString(StatsReport::kStatsValueNameCodecImplementationName, | 251 report->AddString(StatsReport::kStatsValueNameCodecImplementationName, |
232 info.decoder_implementation_name); | 252 info.decoder_implementation_name); |
233 report->AddInt64(StatsReport::kStatsValueNameBytesReceived, | 253 report->AddInt64(StatsReport::kStatsValueNameBytesReceived, |
234 info.bytes_rcvd); | 254 info.bytes_rcvd); |
235 if (info.capture_start_ntp_time_ms >= 0) { | 255 if (info.capture_start_ntp_time_ms >= 0) { |
236 report->AddInt64(StatsReport::kStatsValueNameCaptureStartNtpTimeMs, | 256 report->AddInt64(StatsReport::kStatsValueNameCaptureStartNtpTimeMs, |
(...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1033 StatsReport* report = entry.second; | 1053 StatsReport* report = entry.second; |
1034 report->set_timestamp(stats_gathering_started_); | 1054 report->set_timestamp(stats_gathering_started_); |
1035 } | 1055 } |
1036 } | 1056 } |
1037 | 1057 |
1038 void StatsCollector::ClearUpdateStatsCacheForTest() { | 1058 void StatsCollector::ClearUpdateStatsCacheForTest() { |
1039 stats_gathering_started_ = 0; | 1059 stats_gathering_started_ = 0; |
1040 } | 1060 } |
1041 | 1061 |
1042 } // namespace webrtc | 1062 } // namespace webrtc |
OLD | NEW |