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 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 } else if (stats_.qp_sum) { | 544 } else if (stats_.qp_sum) { |
545 LOG(LS_WARNING) | 545 LOG(LS_WARNING) |
546 << "QP sum was already set and no QP was given for a frame."; | 546 << "QP sum was already set and no QP was given for a frame."; |
547 stats_.qp_sum = rtc::Optional<uint64_t>(); | 547 stats_.qp_sum = rtc::Optional<uint64_t>(); |
548 } | 548 } |
549 last_content_type_ = content_type; | 549 last_content_type_ = content_type; |
550 decode_fps_estimator_.Update(1, now); | 550 decode_fps_estimator_.Update(1, now); |
551 if (last_decoded_frame_time_ms_) { | 551 if (last_decoded_frame_time_ms_) { |
552 int64_t interframe_delay_ms = now - *last_decoded_frame_time_ms_; | 552 int64_t interframe_delay_ms = now - *last_decoded_frame_time_ms_; |
553 RTC_DCHECK_GE(interframe_delay_ms, 0); | 553 RTC_DCHECK_GE(interframe_delay_ms, 0); |
| 554 stats_.interframe_delay_sum_ms += interframe_delay_ms; |
554 if (last_content_type_ == VideoContentType::SCREENSHARE) { | 555 if (last_content_type_ == VideoContentType::SCREENSHARE) { |
555 interframe_delay_counter_screenshare_.Add(interframe_delay_ms); | 556 interframe_delay_counter_screenshare_.Add(interframe_delay_ms); |
556 if (interframe_delay_max_ms_screenshare_ < interframe_delay_ms) { | 557 if (interframe_delay_max_ms_screenshare_ < interframe_delay_ms) { |
557 interframe_delay_max_ms_screenshare_ = interframe_delay_ms; | 558 interframe_delay_max_ms_screenshare_ = interframe_delay_ms; |
558 } | 559 } |
559 } else { | 560 } else { |
560 interframe_delay_counter_video_.Add(interframe_delay_ms); | 561 interframe_delay_counter_video_.Add(interframe_delay_ms); |
561 if (interframe_delay_max_ms_video_ < interframe_delay_ms) { | 562 if (interframe_delay_max_ms_video_ < interframe_delay_ms) { |
562 interframe_delay_max_ms_video_ = interframe_delay_ms; | 563 interframe_delay_max_ms_video_ = interframe_delay_ms; |
563 } | 564 } |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 sum = 0; | 679 sum = 0; |
679 } | 680 } |
680 | 681 |
681 void ReceiveStatisticsProxy::OnRttUpdate(int64_t avg_rtt_ms, | 682 void ReceiveStatisticsProxy::OnRttUpdate(int64_t avg_rtt_ms, |
682 int64_t max_rtt_ms) { | 683 int64_t max_rtt_ms) { |
683 rtc::CritScope lock(&crit_); | 684 rtc::CritScope lock(&crit_); |
684 avg_rtt_ms_ = avg_rtt_ms; | 685 avg_rtt_ms_ = avg_rtt_ms; |
685 } | 686 } |
686 | 687 |
687 } // namespace webrtc | 688 } // namespace webrtc |
OLD | NEW |