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

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

Issue 3009793002: Implement googContentType GetStats metric reported on receive side. (Closed)
Patch Set: Fix broken tests on ASAN Created 3 years, 3 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 483 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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