From b0a8a3bfdd80f248bc476fe0106fbcfd9615e392 Mon Sep 17 00:00:00 2001 From: "stefan@webrtc.org" Date: Fri, 5 Oct 2012 08:15:37 +0000 Subject: [PATCH] Return bw_estimate / num-streams from the multi-stream estimator for now until updating ViE APIs. BUG= Review URL: https://webrtc-codereview.appspot.com/842006 git-svn-id: http://webrtc.googlecode.com/svn/trunk@2874 4adac7df-926f-26a2-2b94-8c16560cd09d --- .../remote_bitrate_estimator_multi_stream.cc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/modules/remote_bitrate_estimator/remote_bitrate_estimator_multi_stream.cc b/src/modules/remote_bitrate_estimator/remote_bitrate_estimator_multi_stream.cc index ebf767ce54..819266b084 100644 --- a/src/modules/remote_bitrate_estimator/remote_bitrate_estimator_multi_stream.cc +++ b/src/modules/remote_bitrate_estimator/remote_bitrate_estimator_multi_stream.cc @@ -145,7 +145,13 @@ bool RemoteBitrateEstimatorMultiStream::LatestEstimate( if (!remote_rate_.ValidEstimate()) { return false; } - *bitrate_bps = remote_rate_.LatestEstimate(); + // TODO(holmer): For now we're returning the estimate bandwidth per stream as + // it corresponds better to how the ViE API is designed. Will fix this when + // the API changes. + if (streams_.size() > 0) + *bitrate_bps = remote_rate_.LatestEstimate() / streams_.size(); + else + *bitrate_bps = 0; return true; }