| 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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 { StatsReport::kStatsValueNameNacksReceived, info.nacks_rcvd }, | 303 { StatsReport::kStatsValueNameNacksReceived, info.nacks_rcvd }, |
| 304 { StatsReport::kStatsValueNamePacketsLost, info.packets_lost }, | 304 { StatsReport::kStatsValueNamePacketsLost, info.packets_lost }, |
| 305 { StatsReport::kStatsValueNamePacketsSent, info.packets_sent }, | 305 { StatsReport::kStatsValueNamePacketsSent, info.packets_sent }, |
| 306 { StatsReport::kStatsValueNamePlisReceived, info.plis_rcvd }, | 306 { StatsReport::kStatsValueNamePlisReceived, info.plis_rcvd }, |
| 307 { StatsReport::kStatsValueNameFramesEncoded, info.frames_encoded }, | 307 { StatsReport::kStatsValueNameFramesEncoded, info.frames_encoded }, |
| 308 }; | 308 }; |
| 309 | 309 |
| 310 for (const auto& i : ints) | 310 for (const auto& i : ints) |
| 311 report->AddInt(i.name, i.value); | 311 report->AddInt(i.name, i.value); |
| 312 report->AddString(StatsReport::kStatsValueNameMediaType, "video"); | 312 report->AddString(StatsReport::kStatsValueNameMediaType, "video"); |
| 313 report->AddString( |
| 314 StatsReport::kStatsValueNameContentType, |
| 315 webrtc::videocontenttypehelpers::ToString(info.content_type)); |
| 313 } | 316 } |
| 314 | 317 |
| 315 void ExtractStats(const cricket::BandwidthEstimationInfo& info, | 318 void ExtractStats(const cricket::BandwidthEstimationInfo& info, |
| 316 double stats_gathering_started, | 319 double stats_gathering_started, |
| 317 StatsReport* report) { | 320 StatsReport* report) { |
| 318 RTC_DCHECK(report->type() == StatsReport::kStatsReportTypeBwe); | 321 RTC_DCHECK(report->type() == StatsReport::kStatsReportTypeBwe); |
| 319 | 322 |
| 320 report->set_timestamp(stats_gathering_started); | 323 report->set_timestamp(stats_gathering_started); |
| 321 const IntForAdd ints[] = { | 324 const IntForAdd ints[] = { |
| 322 { StatsReport::kStatsValueNameAvailableSendBandwidth, | 325 { StatsReport::kStatsValueNameAvailableSendBandwidth, |
| (...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 StatsReport* report = entry.second; | 1033 StatsReport* report = entry.second; |
| 1031 report->set_timestamp(stats_gathering_started_); | 1034 report->set_timestamp(stats_gathering_started_); |
| 1032 } | 1035 } |
| 1033 } | 1036 } |
| 1034 | 1037 |
| 1035 void StatsCollector::ClearUpdateStatsCacheForTest() { | 1038 void StatsCollector::ClearUpdateStatsCacheForTest() { |
| 1036 stats_gathering_started_ = 0; | 1039 stats_gathering_started_ = 0; |
| 1037 } | 1040 } |
| 1038 | 1041 |
| 1039 } // namespace webrtc | 1042 } // namespace webrtc |
| OLD | NEW |