| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 if (fps_variance_opt) { | 225 if (fps_variance_opt) { |
| 226 variance_threshold_.AddMeasurement(static_cast<int>(fps_variance)); | 226 variance_threshold_.AddMeasurement(static_cast<int>(fps_variance)); |
| 227 } | 227 } |
| 228 | 228 |
| 229 bool fps_bad = !fps_threshold_.IsHigh().value_or(true); | 229 bool fps_bad = !fps_threshold_.IsHigh().value_or(true); |
| 230 bool qp_bad = qp_threshold_.IsHigh().value_or(false); | 230 bool qp_bad = qp_threshold_.IsHigh().value_or(false); |
| 231 bool variance_bad = variance_threshold_.IsHigh().value_or(false); | 231 bool variance_bad = variance_threshold_.IsHigh().value_or(false); |
| 232 bool any_bad = fps_bad || qp_bad || variance_bad; | 232 bool any_bad = fps_bad || qp_bad || variance_bad; |
| 233 | 233 |
| 234 if (!prev_any_bad && any_bad) { | 234 if (!prev_any_bad && any_bad) { |
| 235 LOG(LS_WARNING) << "Bad call (any) start: " << now; | 235 LOG(LS_INFO) << "Bad call (any) start: " << now; |
| 236 } else if (prev_any_bad && !any_bad) { | 236 } else if (prev_any_bad && !any_bad) { |
| 237 LOG(LS_WARNING) << "Bad call (any) end: " << now; | 237 LOG(LS_INFO) << "Bad call (any) end: " << now; |
| 238 } | 238 } |
| 239 | 239 |
| 240 if (!prev_fps_bad && fps_bad) { | 240 if (!prev_fps_bad && fps_bad) { |
| 241 LOG(LS_WARNING) << "Bad call (fps) start: " << now; | 241 LOG(LS_INFO) << "Bad call (fps) start: " << now; |
| 242 } else if (prev_fps_bad && !fps_bad) { | 242 } else if (prev_fps_bad && !fps_bad) { |
| 243 LOG(LS_WARNING) << "Bad call (fps) end: " << now; | 243 LOG(LS_INFO) << "Bad call (fps) end: " << now; |
| 244 } | 244 } |
| 245 | 245 |
| 246 if (!prev_qp_bad && qp_bad) { | 246 if (!prev_qp_bad && qp_bad) { |
| 247 LOG(LS_WARNING) << "Bad call (qp) start: " << now; | 247 LOG(LS_INFO) << "Bad call (qp) start: " << now; |
| 248 } else if (prev_qp_bad && !qp_bad) { | 248 } else if (prev_qp_bad && !qp_bad) { |
| 249 LOG(LS_WARNING) << "Bad call (qp) end: " << now; | 249 LOG(LS_INFO) << "Bad call (qp) end: " << now; |
| 250 } | 250 } |
| 251 | 251 |
| 252 if (!prev_variance_bad && variance_bad) { | 252 if (!prev_variance_bad && variance_bad) { |
| 253 LOG(LS_WARNING) << "Bad call (variance) start: " << now; | 253 LOG(LS_INFO) << "Bad call (variance) start: " << now; |
| 254 } else if (prev_variance_bad && !variance_bad) { | 254 } else if (prev_variance_bad && !variance_bad) { |
| 255 LOG(LS_WARNING) << "Bad call (variance) end: " << now; | 255 LOG(LS_INFO) << "Bad call (variance) end: " << now; |
| 256 } | 256 } |
| 257 | 257 |
| 258 LOG(LS_INFO) << "SAMPLE: sample_length: " << (now - last_sample_time_) | 258 LOG(LS_VERBOSE) << "SAMPLE: sample_length: " << (now - last_sample_time_) |
| 259 << " fps: " << fps << " fps_bad: " << fps_bad << " qp: " << qp | 259 << " fps: " << fps << " fps_bad: " << fps_bad << " qp: " << qp |
| 260 << " qp_bad: " << qp_bad << " variance_bad: " << variance_bad | 260 << " qp_bad: " << qp_bad << " variance_bad: " << variance_bad |
| 261 << " fps_variance: " << fps_variance; | 261 << " fps_variance: " << fps_variance; |
| 262 | 262 |
| 263 last_sample_time_ = now; | 263 last_sample_time_ = now; |
| 264 qp_sample_.Reset(); | 264 qp_sample_.Reset(); |
| 265 } | 265 } |
| 266 | 266 |
| 267 VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const { | 267 VideoReceiveStream::Stats ReceiveStatisticsProxy::GetStats() const { |
| 268 rtc::CritScope lock(&crit_); | 268 rtc::CritScope lock(&crit_); |
| 269 return stats_; | 269 return stats_; |
| 270 } | 270 } |
| 271 | 271 |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 447 return -1; | 447 return -1; |
| 448 return sum / num_samples; | 448 return sum / num_samples; |
| 449 } | 449 } |
| 450 | 450 |
| 451 void ReceiveStatisticsProxy::SampleCounter::Reset() { | 451 void ReceiveStatisticsProxy::SampleCounter::Reset() { |
| 452 num_samples = 0; | 452 num_samples = 0; |
| 453 sum = 0; | 453 sum = 0; |
| 454 } | 454 } |
| 455 | 455 |
| 456 } // namespace webrtc | 456 } // namespace webrtc |
| OLD | NEW |