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:
@ -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.
|
||||
|
||||
Reference in New Issue
Block a user