summaryrefslogtreecommitdiff
path: root/video_engine/test
diff options
context:
space:
mode:
authorstefan@webrtc.org <stefan@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-05-02 12:35:37 +0000
committerstefan@webrtc.org <stefan@webrtc.org@4adac7df-926f-26a2-2b94-8c16560cd09d>2014-05-02 12:35:37 +0000
commit4d61a36f75c53123503db049da999b831955451a (patch)
tree93bec537d593141268c4499090c5fde878f9761d /video_engine/test
parentc1878acc3e95341cb3c183ffadd2cec9ebe6e149 (diff)
downloadwebrtc-4d61a36f75c53123503db049da999b831955451a.tar.gz
Change GetEstimatedSend/RecvBandwidth to return the total bandwidth of a channel group instead of splitting it up among channels.
This fixes an issue where the user doesn't know which channels are "active" and therefore can't properly sum the estimates for all channels. R=pbos@webrtc.org Review URL: https://webrtc-codereview.appspot.com/12469004 git-svn-id: http://webrtc.googlecode.com/svn/trunk/webrtc@6041 4adac7df-926f-26a2-2b94-8c16560cd09d
Diffstat (limited to 'video_engine/test')
-rw-r--r--video_engine/test/auto_test/automated/vie_network_test.cc21
1 files changed, 17 insertions, 4 deletions
diff --git a/video_engine/test/auto_test/automated/vie_network_test.cc b/video_engine/test/auto_test/automated/vie_network_test.cc
index efb9013d..c7e44192 100644
--- a/video_engine/test/auto_test/automated/vie_network_test.cc
+++ b/video_engine/test/auto_test/automated/vie_network_test.cc
@@ -112,10 +112,6 @@ class ViENetworkTest : public testing::Test {
}
virtual void TearDown() {
- unsigned int bandwidth = 0;
- EXPECT_EQ(0, vie_.rtp_rtcp->GetEstimatedReceiveBandwidth(channel_,
- &bandwidth));
- EXPECT_EQ(bandwidth, 0u);
EXPECT_EQ(0, vie_.network->DeregisterSendTransport(channel_));
}
@@ -156,6 +152,9 @@ TEST_F(ViENetworkTest, ReceiveBWEPacket_NoExtension) {
webrtc::SleepMs(kIntervalMs);
}
EXPECT_FALSE(transport.FindREMBFor(kSsrc1, 0.0));
+ unsigned int bandwidth = 0;
+ EXPECT_EQ(-1, vie_.rtp_rtcp->GetEstimatedReceiveBandwidth(channel_,
+ &bandwidth));
}
TEST_F(ViENetworkTest, ReceiveBWEPacket_TOF) {
@@ -173,6 +172,9 @@ TEST_F(ViENetworkTest, ReceiveBWEPacket_TOF) {
webrtc::SleepMs(kIntervalMs);
}
EXPECT_FALSE(transport.FindREMBFor(kSsrc1, 0.0));
+ unsigned int bandwidth = 0;
+ EXPECT_EQ(-1, vie_.rtp_rtcp->GetEstimatedReceiveBandwidth(channel_,
+ &bandwidth));
}
TEST_F(ViENetworkTest, ReceiveBWEPacket_AST) {
@@ -180,6 +182,10 @@ TEST_F(ViENetworkTest, ReceiveBWEPacket_AST) {
1));
ReceiveASTPacketsForBWE();
EXPECT_TRUE(transport.FindREMBFor(kSsrc1, 100000.0));
+ unsigned int bandwidth = 0;
+ EXPECT_EQ(0, vie_.rtp_rtcp->GetEstimatedReceiveBandwidth(channel_,
+ &bandwidth));
+ EXPECT_GT(bandwidth, 0u);
}
TEST_F(ViENetworkTest, ReceiveBWEPacket_ASTx2) {
@@ -202,6 +208,10 @@ TEST_F(ViENetworkTest, ReceiveBWEPacket_ASTx2) {
}
EXPECT_TRUE(transport.FindREMBFor(kSsrc1, 200000.0));
EXPECT_TRUE(transport.FindREMBFor(kSsrc2, 200000.0));
+ unsigned int bandwidth = 0;
+ EXPECT_EQ(0, vie_.rtp_rtcp->GetEstimatedReceiveBandwidth(channel_,
+ &bandwidth));
+ EXPECT_GT(bandwidth, 0u);
}
TEST_F(ViENetworkTest, ReceiveBWEPacket_AST_DisabledReceive) {
@@ -209,5 +219,8 @@ TEST_F(ViENetworkTest, ReceiveBWEPacket_AST_DisabledReceive) {
1));
ReceiveASTPacketsForBWE();
EXPECT_FALSE(transport.FindREMBFor(kSsrc1, 0.0));
+ unsigned int bandwidth = 0;
+ EXPECT_EQ(-1, vie_.rtp_rtcp->GetEstimatedReceiveBandwidth(channel_,
+ &bandwidth));
}
} // namespace