From 0a1e7e0b004628344e95f0300e7de6bb8418594a Mon Sep 17 00:00:00 2001 From: "buildbot@webrtc.org" Date: Mon, 16 Jun 2014 08:34:09 +0000 Subject: [PATCH] (Auto)update libjingle 69276003-> 69278008 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6442 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/media/webrtc/webrtcvideoengine.cc | 9 ++++--- .../webrtc/webrtcvideoengine_unittest.cc | 26 ++++++++++++------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/talk/media/webrtc/webrtcvideoengine.cc b/talk/media/webrtc/webrtcvideoengine.cc index eeff90fc5a..0dfa9d01ec 100644 --- a/talk/media/webrtc/webrtcvideoengine.cc +++ b/talk/media/webrtc/webrtcvideoengine.cc @@ -3028,10 +3028,13 @@ bool WebRtcVideoMediaChannel::SetOptions(const VideoOptions &options) { if (leaky_bucket_changed) { bool enable_leaky_bucket = - options_.video_leaky_bucket.GetWithDefaultIfUnset(false); + options_.video_leaky_bucket.GetWithDefaultIfUnset(true); LOG(LS_INFO) << "Leaky bucket is enabled? " << enable_leaky_bucket; for (SendChannelMap::iterator it = send_channels_.begin(); it != send_channels_.end(); ++it) { + // TODO(holmer): This API will be removed as we move to the new + // webrtc::Call API. We should clean up this experiment when that is + // happening. if (engine()->vie()->rtp()->SetTransmissionSmoothingStatus( it->second->channel_id(), enable_leaky_bucket) != 0) { LOG_RTCERR2(SetTransmissionSmoothingStatus, it->second->channel_id(), @@ -3574,7 +3577,7 @@ bool WebRtcVideoMediaChannel::ConfigureSending(int channel_id, return false; } - if (options_.video_leaky_bucket.GetWithDefaultIfUnset(false)) { + if (options_.video_leaky_bucket.GetWithDefaultIfUnset(true)) { if (engine()->vie()->rtp()->SetTransmissionSmoothingStatus(channel_id, true) != 0) { LOG_RTCERR2(SetTransmissionSmoothingStatus, channel_id, true); @@ -3966,7 +3969,7 @@ bool WebRtcVideoMediaChannel::MaybeResetVieSendCodec( options_.video_noise_reduction.GetWithDefaultIfUnset(false); int screencast_min_bitrate = options_.screencast_min_bitrate.GetWithDefaultIfUnset(0); - bool leaky_bucket = options_.video_leaky_bucket.GetWithDefaultIfUnset(false); + bool leaky_bucket = options_.video_leaky_bucket.GetWithDefaultIfUnset(true); bool denoising = !is_screencast && enable_denoising; bool reset_send_codec = target_width != cur_width || target_height != cur_height || diff --git a/talk/media/webrtc/webrtcvideoengine_unittest.cc b/talk/media/webrtc/webrtcvideoengine_unittest.cc index d0d564a91e..91a994cefa 100644 --- a/talk/media/webrtc/webrtcvideoengine_unittest.cc +++ b/talk/media/webrtc/webrtcvideoengine_unittest.cc @@ -959,17 +959,17 @@ TEST_F(WebRtcVideoEngineTestFake, RecvAbsoluteSendTimeHeaderExtensions) { TEST_F(WebRtcVideoEngineTestFake, LeakyBucketTest) { EXPECT_TRUE(SetupEngine()); - // Verify this is off by default. + // Verify this is on by default. EXPECT_TRUE(channel_->AddSendStream(cricket::StreamParams::CreateLegacy(1))); int first_send_channel = vie_.GetLastChannel(); - EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); + EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); - // Enable the experiment and verify. + // Disable the experiment and verify. cricket::VideoOptions options; options.conference_mode.Set(true); - options.video_leaky_bucket.Set(true); + options.video_leaky_bucket.Set(false); EXPECT_TRUE(channel_->SetOptions(options)); - EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); + EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); // Add a receive channel and verify leaky bucket isn't enabled. EXPECT_TRUE(channel_->AddRecvStream(cricket::StreamParams::CreateLegacy(2))); @@ -977,10 +977,16 @@ TEST_F(WebRtcVideoEngineTestFake, LeakyBucketTest) { EXPECT_NE(first_send_channel, recv_channel_num); EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(recv_channel_num)); - // Add a new send stream and verify leaky bucket is enabled from start. + // Add a new send stream and verify leaky bucket is disabled from start. EXPECT_TRUE(channel_->AddSendStream(cricket::StreamParams::CreateLegacy(3))); int second_send_channel = vie_.GetLastChannel(); EXPECT_NE(first_send_channel, second_send_channel); + EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(second_send_channel)); + + // Reenable leaky bucket. + options.video_leaky_bucket.Set(true); + EXPECT_TRUE(channel_->SetOptions(options)); + EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(second_send_channel)); } @@ -1062,12 +1068,12 @@ TEST_F(WebRtcVideoEngineTestFake, AdditiveVideoOptions) { EXPECT_TRUE(channel_->SetOptions(options1)); EXPECT_EQ(100, vie_.GetSenderTargetDelay(first_send_channel)); EXPECT_EQ(100, vie_.GetReceiverTargetDelay(first_send_channel)); - EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); + EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); cricket::VideoOptions options2; - options2.video_leaky_bucket.Set(true); + options2.video_leaky_bucket.Set(false); EXPECT_TRUE(channel_->SetOptions(options2)); - EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); + EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); // The buffered_mode_latency still takes effect. EXPECT_EQ(100, vie_.GetSenderTargetDelay(first_send_channel)); EXPECT_EQ(100, vie_.GetReceiverTargetDelay(first_send_channel)); @@ -1077,7 +1083,7 @@ TEST_F(WebRtcVideoEngineTestFake, AdditiveVideoOptions) { EXPECT_EQ(50, vie_.GetSenderTargetDelay(first_send_channel)); EXPECT_EQ(50, vie_.GetReceiverTargetDelay(first_send_channel)); // The video_leaky_bucket still takes effect. - EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); + EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); } TEST_F(WebRtcVideoEngineTestFake, SetCpuOveruseOptionsWithCaptureJitterMethod) {