Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2698)

Unified Diff: talk/media/webrtc/webrtcvoiceengine_unittest.cc

Issue 1415563003: Create AudioSendStreams in WVoE. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@wvoe_default_send_channel
Patch Set: rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: talk/media/webrtc/webrtcvoiceengine_unittest.cc
diff --git a/talk/media/webrtc/webrtcvoiceengine_unittest.cc b/talk/media/webrtc/webrtcvoiceengine_unittest.cc
index 85094f8de823063dfd2055ba31549ad108b2d43b..84e7ac5dddb73282942eec7bb1908ede6812cba2 100644
--- a/talk/media/webrtc/webrtcvoiceengine_unittest.cc
+++ b/talk/media/webrtc/webrtcvoiceengine_unittest.cc
@@ -1868,27 +1868,29 @@ TEST_F(WebRtcVoiceEngineTestFake, CreateAndDeleteMultipleSendStreams) {
EXPECT_TRUE(channel_->SetSend(cricket::SEND_MICROPHONE));
for (unsigned int i = 0; i < ARRAY_SIZE(kSsrcs4); ++i) {
+ uint32_t ssrc = kSsrcs4[i];
+
EXPECT_TRUE(channel_->AddSendStream(
- cricket::StreamParams::CreateLegacy(kSsrcs4[i])));
+ cricket::StreamParams::CreateLegacy(ssrc)));
+ EXPECT_NE(nullptr, call_.GetAudioSendStream(ssrc));
// Verify that we are in a sending state for all the created streams.
- int channel_num = voe_.GetChannelFromLocalSsrc(kSsrcs4[i]);
+ int channel_num = voe_.GetChannelFromLocalSsrc(ssrc);
EXPECT_TRUE(voe_.GetSend(channel_num));
}
+ EXPECT_EQ(ARRAY_SIZE(kSsrcs4), call_.GetAudioSendStreams().size());
- // Remove the first send channel, which is the default channel. It will only
- // recycle the default channel but not delete it.
- EXPECT_TRUE(channel_->RemoveSendStream(kSsrcs4[0]));
- // Stream should already be Removed from the send stream list.
- EXPECT_FALSE(channel_->RemoveSendStream(kSsrcs4[0]));
+ // Delete the send streams.
+ for (unsigned int i = 0; i < ARRAY_SIZE(kSsrcs4); ++i) {
+ uint32_t ssrc = kSsrcs4[i];
kwiberg-webrtc 2015/10/21 14:04:40 for (uint32_t ssrc : kSsrcs4)
the sun 2015/10/21 14:42:24 Thanks!
- // Delete the rest of send channel streams.
- for (unsigned int i = 1; i < ARRAY_SIZE(kSsrcs4); ++i) {
- EXPECT_TRUE(channel_->RemoveSendStream(kSsrcs4[i]));
+ EXPECT_TRUE(channel_->RemoveSendStream(ssrc));
+ EXPECT_EQ(nullptr, call_.GetAudioSendStream(ssrc));
// Stream should already be deleted.
- EXPECT_FALSE(channel_->RemoveSendStream(kSsrcs4[i]));
- EXPECT_EQ(-1, voe_.GetChannelFromLocalSsrc(kSsrcs4[i]));
+ EXPECT_FALSE(channel_->RemoveSendStream(ssrc));
+ EXPECT_EQ(-1, voe_.GetChannelFromLocalSsrc(ssrc));
}
+ EXPECT_EQ(0u, call_.GetAudioSendStreams().size());
}
// Test SetSendCodecs correctly configure the codecs in all send streams.
« talk/media/webrtc/webrtcvoiceengine.cc ('K') | « talk/media/webrtc/webrtcvoiceengine.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698