Disable reduced-size RTCP in default config.

Verifies that reduced-size isn't configured in WebRtcVideoEngine2
without explicit configuration (which doesn't exist). Also disables REMB
in the default config because it requires reconfiguration.

Adds default-config tests to make sure that they don't contain
parameters that need to be negotiated between clients.

BUG=chromium:497103, webrtc:4745
R=mflodman@webrtc.org, stefan@webrtc.org

Review URL: https://codereview.webrtc.org/1171533002

Cr-Commit-Position: refs/heads/master@{#9384}
This commit is contained in:
Peter Boström 2015-06-05 14:09:38 +02:00
parent fe55c38eff
commit d7da120b40
6 changed files with 56 additions and 2 deletions

View File

@ -1267,6 +1267,11 @@ TEST_F(WebRtcVideoChannel2Test, AddRecvStreamOnlyUsesOneReceiveStream) {
EXPECT_EQ(1u, fake_call_->GetVideoReceiveStreams().size());
}
TEST_F(WebRtcVideoChannel2Test, RtcpIsCompoundByDefault) {
FakeVideoReceiveStream* stream = AddRecvStream();
EXPECT_EQ(webrtc::newapi::kRtcpCompound, stream->GetConfig().rtp.rtcp_mode);
}
TEST_F(WebRtcVideoChannel2Test, RembIsEnabledByDefault) {
FakeVideoReceiveStream* stream = AddRecvStream();
EXPECT_TRUE(stream->GetConfig().rtp.remb);

View File

@ -108,6 +108,7 @@ void CallTest::CreateMatchingReceiveConfigs() {
assert(receive_configs_.empty());
assert(allocated_decoders_.empty());
VideoReceiveStream::Config config;
config.rtp.remb = true;
config.rtp.local_ssrc = kReceiverLocalSsrc;
for (const RtpExtension& extension : send_config_.rtp.extensions)
config.rtp.extensions.push_back(extension);

View File

@ -151,6 +151,7 @@ class BitrateEstimatorTest : public test::CallTest {
// receive_config_.decoders will be set by every stream separately.
receive_config_.rtp.remote_ssrc = send_config_.rtp.ssrcs[0];
receive_config_.rtp.local_ssrc = kReceiverLocalSsrc;
receive_config_.rtp.remb = true;
receive_config_.rtp.extensions.push_back(
RtpExtension(RtpExtension::kTOffset, kTOFExtensionId));
receive_config_.rtp.extensions.push_back(

View File

@ -2789,4 +2789,50 @@ TEST_F(EndToEndTest, CanCreateAndDestroyManyVideoStreams) {
call->DestroyVideoReceiveStream(receive_stream);
}
}
void VerifyEmptyNackConfig(const NackConfig& config) {
EXPECT_EQ(0, config.rtp_history_ms)
<< "Enabling NACK requires rtcp-fb: nack negotiation.";
}
void VerifyEmptyFecConfig(const FecConfig& config) {
EXPECT_EQ(-1, config.ulpfec_payload_type)
<< "Enabling FEC requires rtpmap: ulpfec negotiation.";
EXPECT_EQ(-1, config.red_payload_type)
<< "Enabling FEC requires rtpmap: red negotiation.";
EXPECT_EQ(-1, config.red_rtx_payload_type)
<< "Enabling RTX in FEC requires rtpmap: rtx negotiation.";
}
TEST_F(EndToEndTest, VerifyDefaultSendConfigParameters) {
VideoSendStream::Config default_send_config;
EXPECT_EQ(0, default_send_config.rtp.nack.rtp_history_ms)
<< "Enabling NACK require rtcp-fb: nack negotiation.";
EXPECT_TRUE(default_send_config.rtp.rtx.ssrcs.empty())
<< "Enabling RTX requires rtpmap: rtx negotiation.";
EXPECT_TRUE(default_send_config.rtp.extensions.empty())
<< "Enabling RTP extensions require negotiation.";
VerifyEmptyNackConfig(default_send_config.rtp.nack);
VerifyEmptyFecConfig(default_send_config.rtp.fec);
}
TEST_F(EndToEndTest, VerifyDefaultReceiveConfigParameters) {
VideoReceiveStream::Config default_receive_config;
EXPECT_EQ(newapi::kRtcpCompound, default_receive_config.rtp.rtcp_mode)
<< "Reduced-size RTCP require rtcp-rsize to be negotiated.";
EXPECT_FALSE(default_receive_config.rtp.remb)
<< "REMB require rtcp-fb: goog-remb to be negotiated.";
EXPECT_FALSE(
default_receive_config.rtp.rtcp_xr.receiver_reference_time_report)
<< "RTCP XR settings require rtcp-xr to be negotiated.";
EXPECT_TRUE(default_receive_config.rtp.rtx.empty())
<< "Enabling RTX requires rtpmap: rtx negotiation.";
EXPECT_TRUE(default_receive_config.rtp.extensions.empty())
<< "Enabling RTP extensions require negotiation.";
VerifyEmptyNackConfig(default_receive_config.rtp.nack);
VerifyEmptyFecConfig(default_receive_config.rtp.fec);
}
} // namespace webrtc

View File

@ -115,6 +115,7 @@ void Loopback::Run() {
receive_config.rtp.remote_ssrc = send_config.rtp.ssrcs[0];
receive_config.rtp.local_ssrc = kReceiverLocalSsrc;
receive_config.rtp.nack.rtp_history_ms = 1000;
receive_config.rtp.remb = true;
receive_config.rtp.rtx[kVideoPayloadType].ssrc = kSendRtxSsrc;
receive_config.rtp.rtx[kVideoPayloadType].payload_type = kRtxVideoPayloadType;
receive_config.rtp.extensions.push_back(

View File

@ -107,8 +107,8 @@ class VideoReceiveStream {
Rtp()
: remote_ssrc(0),
local_ssrc(0),
rtcp_mode(newapi::kRtcpReducedSize),
remb(true) {}
rtcp_mode(newapi::kRtcpCompound),
remb(false) {}
std::string ToString() const;
// Synchronization source (stream identifier) to be received.