Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(16)

Side by Side Diff: webrtc/video/receive_statistics_proxy.cc

Issue 2965033002: Report interframe delay sum in old GetStats (Closed)
Patch Set: Rebase Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/pc/statscollector.cc ('k') | webrtc/video/receive_statistics_proxy_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 555 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 } else if (stats_.qp_sum) { 566 } else if (stats_.qp_sum) {
567 LOG(LS_WARNING) 567 LOG(LS_WARNING)
568 << "QP sum was already set and no QP was given for a frame."; 568 << "QP sum was already set and no QP was given for a frame.";
569 stats_.qp_sum = rtc::Optional<uint64_t>(); 569 stats_.qp_sum = rtc::Optional<uint64_t>();
570 } 570 }
571 last_content_type_ = content_type; 571 last_content_type_ = content_type;
572 decode_fps_estimator_.Update(1, now); 572 decode_fps_estimator_.Update(1, now);
573 if (last_decoded_frame_time_ms_) { 573 if (last_decoded_frame_time_ms_) {
574 int64_t interframe_delay_ms = now - *last_decoded_frame_time_ms_; 574 int64_t interframe_delay_ms = now - *last_decoded_frame_time_ms_;
575 RTC_DCHECK_GE(interframe_delay_ms, 0); 575 RTC_DCHECK_GE(interframe_delay_ms, 0);
576 stats_.interframe_delay_sum_ms += interframe_delay_ms;
576 if (last_content_type_ == VideoContentType::SCREENSHARE) { 577 if (last_content_type_ == VideoContentType::SCREENSHARE) {
577 interframe_delay_counter_screenshare_.Add(interframe_delay_ms); 578 interframe_delay_counter_screenshare_.Add(interframe_delay_ms);
578 if (interframe_delay_max_ms_screenshare_ < interframe_delay_ms) { 579 if (interframe_delay_max_ms_screenshare_ < interframe_delay_ms) {
579 interframe_delay_max_ms_screenshare_ = interframe_delay_ms; 580 interframe_delay_max_ms_screenshare_ = interframe_delay_ms;
580 } 581 }
581 } else { 582 } else {
582 interframe_delay_counter_video_.Add(interframe_delay_ms); 583 interframe_delay_counter_video_.Add(interframe_delay_ms);
583 if (interframe_delay_max_ms_video_ < interframe_delay_ms) { 584 if (interframe_delay_max_ms_video_ < interframe_delay_ms) {
584 interframe_delay_max_ms_video_ = interframe_delay_ms; 585 interframe_delay_max_ms_video_ = interframe_delay_ms;
585 } 586 }
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 sum = 0; 701 sum = 0;
701 } 702 }
702 703
703 void ReceiveStatisticsProxy::OnRttUpdate(int64_t avg_rtt_ms, 704 void ReceiveStatisticsProxy::OnRttUpdate(int64_t avg_rtt_ms,
704 int64_t max_rtt_ms) { 705 int64_t max_rtt_ms) {
705 rtc::CritScope lock(&crit_); 706 rtc::CritScope lock(&crit_);
706 avg_rtt_ms_ = avg_rtt_ms; 707 avg_rtt_ms_ = avg_rtt_ms;
707 } 708 }
708 709
709 } // namespace webrtc 710 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/pc/statscollector.cc ('k') | webrtc/video/receive_statistics_proxy_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698