Set rtcp_send_transport for AudioReceiveStreams. This was forgotten in https://codereview.webrtc.org/1909333002/.

BUG=webrtc:4690, webrtc:5079, webrtc:5762

Review-Url: https://codereview.webrtc.org/1951833002
Cr-Commit-Position: refs/heads/master@{#12640}
This commit is contained in:
solenberg 2016-05-06 02:13:12 -07:00 committed by Commit bot
parent 3a334656de
commit 31fec40482
2 changed files with 33 additions and 2 deletions

View File

@ -1262,12 +1262,14 @@ class WebRtcVoiceMediaChannel::WebRtcAudioReceiveStream {
bool use_transport_cc,
const std::string& sync_group,
const std::vector<webrtc::RtpExtension>& extensions,
webrtc::Call* call)
webrtc::Call* call,
webrtc::Transport* rtcp_send_transport)
: call_(call), config_() {
RTC_DCHECK_GE(ch, 0);
RTC_DCHECK(call);
config_.rtp.remote_ssrc = remote_ssrc;
config_.rtp.local_ssrc = local_ssrc;
config_.rtcp_send_transport = rtcp_send_transport;
config_.voe_channel_id = ch;
config_.sync_group = sync_group;
RecreateAudioReceiveStream(use_transport_cc, extensions);
@ -2099,7 +2101,7 @@ bool WebRtcVoiceMediaChannel::AddRecvStream(const StreamParams& sp) {
ssrc, new WebRtcAudioReceiveStream(channel, ssrc, receiver_reports_ssrc_,
recv_transport_cc_enabled_,
sp.sync_label, recv_rtp_extensions_,
call_)));
call_, this)));
SetNack(channel, send_codec_spec_.nack_enabled);
SetPlayout(channel, playout_);

View File

@ -494,6 +494,35 @@ TEST_F(WebRtcVoiceEngineTestFake, CreateChannel) {
EXPECT_TRUE(SetupChannel());
}
// Test that we can add a send stream and that it has the correct defaults.
TEST_F(WebRtcVoiceEngineTestFake, CreateSendStream) {
EXPECT_TRUE(SetupChannel());
EXPECT_TRUE(
channel_->AddSendStream(cricket::StreamParams::CreateLegacy(kSsrc1)));
const webrtc::AudioSendStream::Config& config = GetSendStreamConfig(kSsrc1);
EXPECT_EQ(kSsrc1, config.rtp.ssrc);
EXPECT_EQ("", config.rtp.c_name);
EXPECT_EQ(0u, config.rtp.extensions.size());
EXPECT_EQ(static_cast<cricket::WebRtcVoiceMediaChannel*>(channel_),
config.send_transport);
}
// Test that we can add a receive stream and that it has the correct defaults.
TEST_F(WebRtcVoiceEngineTestFake, CreateRecvStream) {
EXPECT_TRUE(SetupChannel());
EXPECT_TRUE(
channel_->AddRecvStream(cricket::StreamParams::CreateLegacy(kSsrc1)));
const webrtc::AudioReceiveStream::Config& config =
GetRecvStreamConfig(kSsrc1);
EXPECT_EQ(kSsrc1, config.rtp.remote_ssrc);
EXPECT_EQ(0xFA17FA17, config.rtp.local_ssrc);
EXPECT_FALSE(config.rtp.transport_cc);
EXPECT_EQ(0u, config.rtp.extensions.size());
EXPECT_EQ(static_cast<cricket::WebRtcVoiceMediaChannel*>(channel_),
config.rtcp_send_transport);
EXPECT_EQ("", config.sync_group);
}
// Tests that the list of supported codecs is created properly and ordered
// correctly (such that opus appears first).
TEST_F(WebRtcVoiceEngineTestFake, CodecOrder) {