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

Side by Side Diff: webrtc/pc/statscollector.cc

Issue 2943073002: Fix uploading of available send bitrate statistics. (Closed)
Patch Set: Fixes uploading of available send bitrate statistics and adds unit test verifying audio BWE reportiā€¦ Created 3 years, 6 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 | « no previous file | webrtc/pc/statscollector_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 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 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 762 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 if (pc_->session()->state() == WebRtcSession::State::STATE_CLOSED) 773 if (pc_->session()->state() == WebRtcSession::State::STATE_CLOSED)
774 return; 774 return;
775 775
776 webrtc::Call::Stats call_stats = pc_->session()->GetCallStats(); 776 webrtc::Call::Stats call_stats = pc_->session()->GetCallStats();
777 cricket::BandwidthEstimationInfo bwe_info; 777 cricket::BandwidthEstimationInfo bwe_info;
778 bwe_info.available_send_bandwidth = call_stats.send_bandwidth_bps; 778 bwe_info.available_send_bandwidth = call_stats.send_bandwidth_bps;
779 bwe_info.available_recv_bandwidth = call_stats.recv_bandwidth_bps; 779 bwe_info.available_recv_bandwidth = call_stats.recv_bandwidth_bps;
780 bwe_info.bucket_delay = call_stats.pacer_delay_ms; 780 bwe_info.bucket_delay = call_stats.pacer_delay_ms;
781 // Fill in target encoder bitrate, actual encoder bitrate, rtx bitrate, etc. 781 // Fill in target encoder bitrate, actual encoder bitrate, rtx bitrate, etc.
782 // TODO(holmer): Also fill this in for audio. 782 // TODO(holmer): Also fill this in for audio.
783 if (!pc_->session()->video_channel()) { 783 if (pc_->session()->video_channel()) {
784 return; 784 pc_->session()->video_channel()->FillBitrateInfo(&bwe_info);
785 } 785 }
786 pc_->session()->video_channel()->FillBitrateInfo(&bwe_info);
787 StatsReport::Id report_id(StatsReport::NewBandwidthEstimationId()); 786 StatsReport::Id report_id(StatsReport::NewBandwidthEstimationId());
788 StatsReport* report = reports_.FindOrAddNew(report_id); 787 StatsReport* report = reports_.FindOrAddNew(report_id);
789 ExtractStats(bwe_info, stats_gathering_started_, report); 788 ExtractStats(bwe_info, stats_gathering_started_, report);
790 } 789 }
791 790
792 void StatsCollector::ExtractVoiceInfo() { 791 void StatsCollector::ExtractVoiceInfo() {
793 RTC_DCHECK(pc_->session()->signaling_thread()->IsCurrent()); 792 RTC_DCHECK(pc_->session()->signaling_thread()->IsCurrent());
794 793
795 if (!pc_->session()->voice_channel()) { 794 if (!pc_->session()->voice_channel()) {
796 return; 795 return;
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 StatsReport* report = entry.second; 1001 StatsReport* report = entry.second;
1003 report->set_timestamp(stats_gathering_started_); 1002 report->set_timestamp(stats_gathering_started_);
1004 } 1003 }
1005 } 1004 }
1006 1005
1007 void StatsCollector::ClearUpdateStatsCacheForTest() { 1006 void StatsCollector::ClearUpdateStatsCacheForTest() {
1008 stats_gathering_started_ = 0; 1007 stats_gathering_started_ = 0;
1009 } 1008 }
1010 1009
1011 } // namespace webrtc 1010 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/pc/statscollector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698