OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 { StatsReport::kStatsValueNamePacketsLost, info.packets_lost }, | 191 { StatsReport::kStatsValueNamePacketsLost, info.packets_lost }, |
192 { StatsReport::kStatsValueNamePacketsSent, info.packets_sent }, | 192 { StatsReport::kStatsValueNamePacketsSent, info.packets_sent }, |
193 }; | 193 }; |
194 | 194 |
195 for (const auto& i : ints) | 195 for (const auto& i : ints) |
196 report->AddInt(i.name, i.value); | 196 report->AddInt(i.name, i.value); |
197 } | 197 } |
198 | 198 |
199 void ExtractStats(const cricket::VideoReceiverInfo& info, StatsReport* report) { | 199 void ExtractStats(const cricket::VideoReceiverInfo& info, StatsReport* report) { |
200 ExtractCommonReceiveProperties(info, report); | 200 ExtractCommonReceiveProperties(info, report); |
| 201 report->AddString(StatsReport::kStatsValueNameDecoderImplementationName, |
| 202 info.decoder_implementation_name); |
201 report->AddInt64(StatsReport::kStatsValueNameBytesReceived, | 203 report->AddInt64(StatsReport::kStatsValueNameBytesReceived, |
202 info.bytes_rcvd); | 204 info.bytes_rcvd); |
203 report->AddInt64(StatsReport::kStatsValueNameCaptureStartNtpTimeMs, | 205 report->AddInt64(StatsReport::kStatsValueNameCaptureStartNtpTimeMs, |
204 info.capture_start_ntp_time_ms); | 206 info.capture_start_ntp_time_ms); |
205 const IntForAdd ints[] = { | 207 const IntForAdd ints[] = { |
206 { StatsReport::kStatsValueNameCurrentDelayMs, info.current_delay_ms }, | 208 { StatsReport::kStatsValueNameCurrentDelayMs, info.current_delay_ms }, |
207 { StatsReport::kStatsValueNameDecodeMs, info.decode_ms }, | 209 { StatsReport::kStatsValueNameDecodeMs, info.decode_ms }, |
208 { StatsReport::kStatsValueNameFirsSent, info.firs_sent }, | 210 { StatsReport::kStatsValueNameFirsSent, info.firs_sent }, |
209 { StatsReport::kStatsValueNameFrameHeightReceived, info.frame_height }, | 211 { StatsReport::kStatsValueNameFrameHeightReceived, info.frame_height }, |
210 { StatsReport::kStatsValueNameFrameRateDecoded, info.framerate_decoded }, | 212 { StatsReport::kStatsValueNameFrameRateDecoded, info.framerate_decoded }, |
(...skipping 12 matching lines...) Expand all Loading... |
223 { StatsReport::kStatsValueNameTargetDelayMs, info.target_delay_ms }, | 225 { StatsReport::kStatsValueNameTargetDelayMs, info.target_delay_ms }, |
224 }; | 226 }; |
225 | 227 |
226 for (const auto& i : ints) | 228 for (const auto& i : ints) |
227 report->AddInt(i.name, i.value); | 229 report->AddInt(i.name, i.value); |
228 } | 230 } |
229 | 231 |
230 void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) { | 232 void ExtractStats(const cricket::VideoSenderInfo& info, StatsReport* report) { |
231 ExtractCommonSendProperties(info, report); | 233 ExtractCommonSendProperties(info, report); |
232 | 234 |
| 235 report->AddString(StatsReport::kStatsValueNameEncoderImplementationName, |
| 236 info.encoder_implementation_name); |
233 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution, | 237 report->AddBoolean(StatsReport::kStatsValueNameBandwidthLimitedResolution, |
234 (info.adapt_reason & 0x2) > 0); | 238 (info.adapt_reason & 0x2) > 0); |
235 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution, | 239 report->AddBoolean(StatsReport::kStatsValueNameCpuLimitedResolution, |
236 (info.adapt_reason & 0x1) > 0); | 240 (info.adapt_reason & 0x1) > 0); |
237 report->AddBoolean(StatsReport::kStatsValueNameViewLimitedResolution, | 241 report->AddBoolean(StatsReport::kStatsValueNameViewLimitedResolution, |
238 (info.adapt_reason & 0x4) > 0); | 242 (info.adapt_reason & 0x4) > 0); |
239 | 243 |
240 const IntForAdd ints[] = { | 244 const IntForAdd ints[] = { |
241 { StatsReport::kStatsValueNameAdaptationChanges, info.adapt_changes }, | 245 { StatsReport::kStatsValueNameAdaptationChanges, info.adapt_changes }, |
242 { StatsReport::kStatsValueNameAvgEncodeMs, info.avg_encode_ms }, | 246 { StatsReport::kStatsValueNameAvgEncodeMs, info.avg_encode_ms }, |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 StatsReport* report = entry.second; | 940 StatsReport* report = entry.second; |
937 report->set_timestamp(stats_gathering_started_); | 941 report->set_timestamp(stats_gathering_started_); |
938 } | 942 } |
939 } | 943 } |
940 | 944 |
941 void StatsCollector::ClearUpdateStatsCacheForTest() { | 945 void StatsCollector::ClearUpdateStatsCacheForTest() { |
942 stats_gathering_started_ = 0; | 946 stats_gathering_started_ = 0; |
943 } | 947 } |
944 | 948 |
945 } // namespace webrtc | 949 } // namespace webrtc |
OLD | NEW |