From 3f3f428d2ba733b78368034c46da0653ba867ef6 Mon Sep 17 00:00:00 2001 From: "buildbot@webrtc.org" Date: Thu, 12 Jun 2014 21:36:26 +0000 Subject: [PATCH] (Auto)update libjingle 69097619-> 69099564 git-svn-id: http://webrtc.googlecode.com/svn/trunk@6419 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/media/webrtc/webrtcvideoengine.cc | 9 +++---- .../webrtc/webrtcvideoengine_unittest.cc | 26 +++++++------------ 2 files changed, 13 insertions(+), 22 deletions(-) diff --git a/talk/media/webrtc/webrtcvideoengine.cc b/talk/media/webrtc/webrtcvideoengine.cc index 8cba8dc77..64435787e 100644 --- a/talk/media/webrtc/webrtcvideoengine.cc +++ b/talk/media/webrtc/webrtcvideoengine.cc @@ -3027,13 +3027,10 @@ bool WebRtcVideoMediaChannel::SetOptions(const VideoOptions &options) { if (leaky_bucket_changed) { bool enable_leaky_bucket = - options_.video_leaky_bucket.GetWithDefaultIfUnset(true); + options_.video_leaky_bucket.GetWithDefaultIfUnset(false); 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(), @@ -3576,7 +3573,7 @@ bool WebRtcVideoMediaChannel::ConfigureSending(int channel_id, return false; } - if (options_.video_leaky_bucket.GetWithDefaultIfUnset(true)) { + if (options_.video_leaky_bucket.GetWithDefaultIfUnset(false)) { if (engine()->vie()->rtp()->SetTransmissionSmoothingStatus(channel_id, true) != 0) { LOG_RTCERR2(SetTransmissionSmoothingStatus, channel_id, true); @@ -3968,7 +3965,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(true); + bool leaky_bucket = options_.video_leaky_bucket.GetWithDefaultIfUnset(false); 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 91a994cef..d0d564a91 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 on by default. + // Verify this is off by default. EXPECT_TRUE(channel_->AddSendStream(cricket::StreamParams::CreateLegacy(1))); int first_send_channel = vie_.GetLastChannel(); - EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); + EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); - // Disable the experiment and verify. + // Enable the experiment and verify. cricket::VideoOptions options; options.conference_mode.Set(true); - options.video_leaky_bucket.Set(false); + options.video_leaky_bucket.Set(true); EXPECT_TRUE(channel_->SetOptions(options)); - EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); + EXPECT_TRUE(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,16 +977,10 @@ 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 disabled from start. + // Add a new send stream and verify leaky bucket is enabled 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)); } @@ -1068,12 +1062,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_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); + EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); cricket::VideoOptions options2; - options2.video_leaky_bucket.Set(false); + options2.video_leaky_bucket.Set(true); EXPECT_TRUE(channel_->SetOptions(options2)); - EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); + EXPECT_TRUE(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)); @@ -1083,7 +1077,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_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); + EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel)); } TEST_F(WebRtcVideoEngineTestFake, SetCpuOveruseOptionsWithCaptureJitterMethod) {