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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
494 // us from ever correctly displaying frame rate of 0. | 494 // us from ever correctly displaying frame rate of 0. |
495 int64_t now_ms = clock_->TimeInMilliseconds(); | 495 int64_t now_ms = clock_->TimeInMilliseconds(); |
496 UpdateFramerate(now_ms); | 496 UpdateFramerate(now_ms); |
497 stats_.render_frame_rate = renders_fps_estimator_.Rate(now_ms).value_or(0); | 497 stats_.render_frame_rate = renders_fps_estimator_.Rate(now_ms).value_or(0); |
498 stats_.decode_frame_rate = decode_fps_estimator_.Rate(now_ms).value_or(0); | 498 stats_.decode_frame_rate = decode_fps_estimator_.Rate(now_ms).value_or(0); |
499 stats_.total_bitrate_bps = | 499 stats_.total_bitrate_bps = |
500 static_cast<int>(total_byte_tracker_.ComputeRate() * 8); | 500 static_cast<int>(total_byte_tracker_.ComputeRate() * 8); |
501 stats_.interframe_delay_max_ms = | 501 stats_.interframe_delay_max_ms = |
502 interframe_delay_max_moving_.Max(now_ms).value_or(-1); | 502 interframe_delay_max_moving_.Max(now_ms).value_or(-1); |
503 stats_.timing_frame_info = timing_frame_info_counter_.Max(now_ms); | 503 stats_.timing_frame_info = timing_frame_info_counter_.Max(now_ms); |
| 504 stats_.content_type = last_content_type_; |
504 return stats_; | 505 return stats_; |
505 } | 506 } |
506 | 507 |
507 void ReceiveStatisticsProxy::OnIncomingPayloadType(int payload_type) { | 508 void ReceiveStatisticsProxy::OnIncomingPayloadType(int payload_type) { |
508 rtc::CritScope lock(&crit_); | 509 rtc::CritScope lock(&crit_); |
509 stats_.current_payload_type = payload_type; | 510 stats_.current_payload_type = payload_type; |
510 } | 511 } |
511 | 512 |
512 void ReceiveStatisticsProxy::OnDecoderImplementationName( | 513 void ReceiveStatisticsProxy::OnDecoderImplementationName( |
513 const char* implementation_name) { | 514 const char* implementation_name) { |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 flow_duration_ms += other.flow_duration_ms; | 795 flow_duration_ms += other.flow_duration_ms; |
795 total_media_bytes += other.total_media_bytes; | 796 total_media_bytes += other.total_media_bytes; |
796 received_height.Add(other.received_height); | 797 received_height.Add(other.received_height); |
797 received_width.Add(other.received_width); | 798 received_width.Add(other.received_width); |
798 qp_counter.Add(other.qp_counter); | 799 qp_counter.Add(other.qp_counter); |
799 frame_counts.key_frames += other.frame_counts.key_frames; | 800 frame_counts.key_frames += other.frame_counts.key_frames; |
800 frame_counts.delta_frames += other.frame_counts.delta_frames; | 801 frame_counts.delta_frames += other.frame_counts.delta_frames; |
801 } | 802 } |
802 | 803 |
803 } // namespace webrtc | 804 } // namespace webrtc |
OLD | NEW |