Don't return an estimated receive BW for channels not receiving video.
BUG=1834 TEST=ViE RTP autotest R=stefan@webrtc.org Review URL: https://webrtc-codereview.appspot.com/1572004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4121 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
4079c31c0a
commit
a066cbf37c
@ -297,6 +297,16 @@ void ViEAutoTest::ViERtpRtcpStandardTest()
|
||||
tbChannel.videoChannel,
|
||||
&estimated_bandwidth));
|
||||
EXPECT_GT(estimated_bandwidth, 0u);
|
||||
|
||||
int passive_channel = -1;
|
||||
EXPECT_EQ(ViE.base->CreateReceiveChannel(passive_channel,
|
||||
tbChannel.videoChannel), 0);
|
||||
EXPECT_EQ(ViE.base->StartReceive(passive_channel), 0);
|
||||
EXPECT_EQ(
|
||||
ViE.rtp_rtcp->GetEstimatedReceiveBandwidth(passive_channel,
|
||||
&estimated_bandwidth),
|
||||
0);
|
||||
EXPECT_EQ(estimated_bandwidth, 0u);
|
||||
}
|
||||
|
||||
// Check that rec stats extended max is greater than what we've sent.
|
||||
|
@ -278,7 +278,8 @@ void ViEReceiver::EstimatedReceiveBandwidth(
|
||||
// LatestEstimate returns an error if there is no valid bitrate estimate, but
|
||||
// ViEReceiver instead returns a zero estimate.
|
||||
remote_bitrate_estimator_->LatestEstimate(&ssrcs, available_bandwidth);
|
||||
if (!ssrcs.empty()) {
|
||||
if (std::find(ssrcs.begin(), ssrcs.end(), rtp_rtcp_->RemoteSSRC()) !=
|
||||
ssrcs.end()) {
|
||||
*available_bandwidth /= ssrcs.size();
|
||||
} else {
|
||||
*available_bandwidth = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user