Default enable abs send time bwe for CallTest

Using the single stream bwe is really bad for the screenshare
test case in particular, but would probably help in other
cases as well so enabling it by default in CallTest setup.

BUG=
R=pbos@webrtc.org, stefan@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/43089004

Cr-Commit-Position: refs/heads/master@{#8971}
This commit is contained in:
Erik Språng 2015-04-10 11:58:49 +02:00
parent 09bf1a169b
commit 9526187dde
4 changed files with 11 additions and 5 deletions

View File

@ -94,6 +94,8 @@ void CallTest::CreateSendConfig(size_t num_streams) {
send_config_.encoder_settings.encoder = &fake_encoder_;
send_config_.encoder_settings.payload_name = "FAKE";
send_config_.encoder_settings.payload_type = kFakeSendPayloadType;
send_config_.rtp.extensions.push_back(
RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
encoder_config_.streams = test::CreateVideoStreams(num_streams);
for (size_t i = 0; i < num_streams; ++i)
send_config_.rtp.ssrcs.push_back(kSendSsrcs[i]);
@ -107,6 +109,8 @@ void CallTest::CreateMatchingReceiveConfigs() {
assert(allocated_decoders_.empty());
VideoReceiveStream::Config config;
config.rtp.local_ssrc = kReceiverLocalSsrc;
for (const RtpExtension& extension : send_config_.rtp.extensions)
config.rtp.extensions.push_back(extension);
for (size_t i = 0; i < send_config_.rtp.ssrcs.size(); ++i) {
VideoReceiveStream::Decoder decoder =
test::CreateMatchingDecoder(send_config_.encoder_settings);
@ -162,6 +166,7 @@ const uint32_t CallTest::kSendRtxSsrcs[kNumSsrcs] = {0xBADCAFD, 0xBADCAFE,
const uint32_t CallTest::kSendSsrcs[kNumSsrcs] = {0xC0FFED, 0xC0FFEE, 0xC0FFEF};
const uint32_t CallTest::kReceiverLocalSsrc = 0x123456;
const int CallTest::kNackRtpHistoryMs = 1000;
const int CallTest::kAbsSendTimeExtensionId = 7;
BaseTest::BaseTest(unsigned int timeout_ms) : RtpRtcpObserver(timeout_ms) {
}

View File

@ -42,6 +42,7 @@ class CallTest : public ::testing::Test {
static const uint32_t kSendSsrcs[kNumSsrcs];
static const uint32_t kReceiverLocalSsrc;
static const int kNackRtpHistoryMs;
static const int kAbsSendTimeExtensionId;
protected:
void RunBaseTest(BaseTest* test);

View File

@ -380,6 +380,7 @@ void RampUpTest::RunRampUpTest(bool rtx,
}
CreateSendConfig(num_streams);
send_config_.rtp.extensions.clear();
rtc::scoped_ptr<RemoteBitrateEstimatorFactory> rbe_factory;
RateControlType control_type;

View File

@ -155,6 +155,7 @@ TEST_F(VideoSendStreamTest, SupportsAbsoluteSendTime) {
void ModifyConfigs(VideoSendStream::Config* send_config,
std::vector<VideoReceiveStream::Config>* receive_configs,
VideoEncoderConfig* encoder_config) override {
send_config->rtp.extensions.clear();
send_config->rtp.extensions.push_back(
RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
}
@ -593,11 +594,9 @@ void VideoSendStreamTest::TestPacketFragmentationSize(VideoFormat format,
send_config->rtp.max_packet_size = kMaxPacketSize;
send_config->post_encode_callback = this;
// Add an extension header, to make the RTP header larger than the base
// length of 12 bytes.
static const uint8_t kAbsSendTimeExtensionId = 13;
send_config->rtp.extensions.push_back(
RtpExtension(RtpExtension::kAbsSendTime, kAbsSendTimeExtensionId));
// Make sure there is at least one extension header, to make the RTP
// header larger than the base length of 12 bytes.
EXPECT_FALSE(send_config->rtp.extensions.empty());
}
void PerformTest() override {