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

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

Issue 3009793002: Implement googContentType GetStats metric reported on receive side. (Closed)
Patch Set: Fix ce 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
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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 // Get current frame rates here, as only updating them on new frames prevents 492 // Get current frame rates here, as only updating them on new frames prevents
493 // us from ever correctly displaying frame rate of 0. 493 // us from ever correctly displaying frame rate of 0.
494 int64_t now_ms = clock_->TimeInMilliseconds(); 494 int64_t now_ms = clock_->TimeInMilliseconds();
495 UpdateFramerate(now_ms); 495 UpdateFramerate(now_ms);
496 stats_.render_frame_rate = renders_fps_estimator_.Rate(now_ms).value_or(0); 496 stats_.render_frame_rate = renders_fps_estimator_.Rate(now_ms).value_or(0);
497 stats_.decode_frame_rate = decode_fps_estimator_.Rate(now_ms).value_or(0); 497 stats_.decode_frame_rate = decode_fps_estimator_.Rate(now_ms).value_or(0);
498 stats_.total_bitrate_bps = 498 stats_.total_bitrate_bps =
499 static_cast<int>(total_byte_tracker_.ComputeRate() * 8); 499 static_cast<int>(total_byte_tracker_.ComputeRate() * 8);
500 stats_.interframe_delay_max_ms = 500 stats_.interframe_delay_max_ms =
501 interframe_delay_max_moving_.Max(now_ms).value_or(-1); 501 interframe_delay_max_moving_.Max(now_ms).value_or(-1);
502 if (videocontenttypehelpers::IsScreenshare(last_content_type_)) {
503 stats_.content_type = "screen";
504 } else {
505 stats_.content_type = "realtime";
tommi 2017/08/30 15:03:28 fyi - the code generation for this statement gener
ilnik 2017/08/30 15:30:24 Done.
506 }
502 return stats_; 507 return stats_;
503 } 508 }
504 509
505 rtc::Optional<TimingFrameInfo> 510 rtc::Optional<TimingFrameInfo>
506 ReceiveStatisticsProxy::GetAndResetTimingFrameInfo() { 511 ReceiveStatisticsProxy::GetAndResetTimingFrameInfo() {
507 rtc::CritScope lock(&crit_); 512 rtc::CritScope lock(&crit_);
508 rtc::Optional<TimingFrameInfo> info = timing_frame_info_; 513 rtc::Optional<TimingFrameInfo> info = timing_frame_info_;
509 // Reset reported value to empty, so it will be always 514 // Reset reported value to empty, so it will be always
510 // overwritten in |OnTimingFrameInfoUpdated|, thus allowing to store new 515 // overwritten in |OnTimingFrameInfoUpdated|, thus allowing to store new
511 // value instead of reported one. 516 // value instead of reported one.
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
807 flow_duration_ms += other.flow_duration_ms; 812 flow_duration_ms += other.flow_duration_ms;
808 total_media_bytes += other.total_media_bytes; 813 total_media_bytes += other.total_media_bytes;
809 received_height.Add(other.received_height); 814 received_height.Add(other.received_height);
810 received_width.Add(other.received_width); 815 received_width.Add(other.received_width);
811 qp_counter.Add(other.qp_counter); 816 qp_counter.Add(other.qp_counter);
812 frame_counts.key_frames += other.frame_counts.key_frames; 817 frame_counts.key_frames += other.frame_counts.key_frames;
813 frame_counts.delta_frames += other.frame_counts.delta_frames; 818 frame_counts.delta_frames += other.frame_counts.delta_frames;
814 } 819 }
815 820
816 } // namespace webrtc 821 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698