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

Unified Diff: webrtc/media/engine/webrtcvideoengine2.cc

Issue 2863123002: Wire up BWE stats through WebrtcSession so that they are filled in both for audio and video calls. (Closed)
Patch Set: Comments addressed." Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.h ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.h ('k') | webrtc/media/engine/webrtcvideoengine2_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698