Move SSRC list to RemoteBitrateEstimator.

BUG=1105

Review URL: https://webrtc-codereview.appspot.com/965027

git-svn-id: http://webrtc.googlecode.com/svn/trunk@3130 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
stefan@webrtc.org
2012-11-19 10:09:20 +00:00
parent 5ac387c4d1
commit 4100b0402e
12 changed files with 132 additions and 114 deletions

View File

@ -230,8 +230,11 @@ WebRtc_Word32 ModuleRtpRtcpImpl::Process() {
remote_bitrate_->UpdateEstimate(_rtpReceiver.SSRC(), now);
if (TMMBR()) {
unsigned int target_bitrate = 0;
if (remote_bitrate_->LatestEstimate(_rtpReceiver.SSRC(),
&target_bitrate)) {
std::vector<unsigned int> ssrcs;
if (remote_bitrate_->LatestEstimate(&ssrcs, &target_bitrate)) {
if (!ssrcs.empty()) {
target_bitrate = target_bitrate / ssrcs.size();
}
_rtcpSender.SetTargetBitrate(target_bitrate);
}
}
@ -1936,10 +1939,13 @@ void ModuleRtpRtcpImpl::BitrateSent(WebRtc_UWord32* totalRate,
int ModuleRtpRtcpImpl::EstimatedReceiveBandwidth(
WebRtc_UWord32* available_bandwidth) const {
if (remote_bitrate_) {
if (!remote_bitrate_->LatestEstimate(_rtpReceiver.SSRC(),
available_bandwidth)) {
std::vector<unsigned int> ssrcs;
if (!remote_bitrate_->LatestEstimate(&ssrcs, available_bandwidth)) {
return -1;
}
if (!ssrcs.empty()) {
*available_bandwidth /= ssrcs.size();
}
return 0;
}
// No bandwidth receive-side bandwidth estimation is connected to this module.