Index: webrtc/media/engine/webrtcvideoengine2.cc |
diff --git a/webrtc/media/engine/webrtcvideoengine2.cc b/webrtc/media/engine/webrtcvideoengine2.cc |
index 03e97f776bfe7f42a063fd8a5b53410403915f50..4f3c2839394bfff6f203c2ca3c6aaffebd6b6c99 100644 |
--- a/webrtc/media/engine/webrtcvideoengine2.cc |
+++ b/webrtc/media/engine/webrtcvideoengine2.cc |
@@ -1379,8 +1379,9 @@ bool WebRtcVideoChannel2::GetStats(VideoMediaInfo* info) { |
FillSenderStats(info, log_stats); |
FillReceiverStats(info, log_stats); |
FillSendAndReceiveCodecStats(info); |
+ // TODO(holmer): We should either have rtt available as a metric on |
+ // VideoSend/ReceiveStreams, or we should remove rtt from VideoSenderInfo. |
webrtc::Call::Stats stats = call_->GetStats(); |
- FillBandwidthEstimationStats(stats, info); |
if (stats.rtt_ms != -1) { |
for (size_t i = 0; i < info->senders.size(); ++i) { |
info->senders[i].rtt_ms = stats.rtt_ms; |
@@ -1415,22 +1416,13 @@ void WebRtcVideoChannel2::FillReceiverStats(VideoMediaInfo* video_media_info, |
} |
} |
-void WebRtcVideoChannel2::FillBandwidthEstimationStats( |
- const webrtc::Call::Stats& stats, |
- VideoMediaInfo* video_media_info) { |
- BandwidthEstimationInfo bwe_info; |
- bwe_info.available_send_bandwidth = stats.send_bandwidth_bps; |
- bwe_info.available_recv_bandwidth = stats.recv_bandwidth_bps; |
- bwe_info.bucket_delay = stats.pacer_delay_ms; |
- |
- // Get send stream bitrate stats. |
+void WebRtcVideoChannel2::FillBitrateInfo(BandwidthEstimationInfo* bwe_info) { |
rtc::CritScope stream_lock(&stream_crit_); |
for (std::map<uint32_t, WebRtcVideoSendStream*>::iterator stream = |
send_streams_.begin(); |
stream != send_streams_.end(); ++stream) { |
- stream->second->FillBandwidthEstimationInfo(&bwe_info); |
+ stream->second->FillBitrateInfo(bwe_info); |
} |
- video_media_info->bw_estimations.push_back(bwe_info); |
} |
void WebRtcVideoChannel2::FillSendAndReceiveCodecStats( |
@@ -2149,7 +2141,7 @@ VideoSenderInfo WebRtcVideoChannel2::WebRtcVideoSendStream::GetVideoSenderInfo( |
return info; |
} |
-void WebRtcVideoChannel2::WebRtcVideoSendStream::FillBandwidthEstimationInfo( |
+void WebRtcVideoChannel2::WebRtcVideoSendStream::FillBitrateInfo( |
BandwidthEstimationInfo* bwe_info) { |
RTC_DCHECK_RUN_ON(&thread_checker_); |
if (stream_ == NULL) { |