(Auto)update libjingle 77701902-> 77709729
git-svn-id: http://webrtc.googlecode.com/svn/trunk@7450 4adac7df-926f-26a2-2b94-8c16560cd09d
diff --git a/talk/app/webrtc/mediaconstraintsinterface.cc b/talk/app/webrtc/mediaconstraintsinterface.cc
index a7b88aa..9b4e5a5 100644
--- a/talk/app/webrtc/mediaconstraintsinterface.cc
+++ b/talk/app/webrtc/mediaconstraintsinterface.cc
@@ -66,9 +66,6 @@
// Google-specific constraint keys for a local video source (getUserMedia).
const char MediaConstraintsInterface::kNoiseReduction[] = "googNoiseReduction";
-const char MediaConstraintsInterface::kLeakyBucket[] = "googLeakyBucket";
-const char MediaConstraintsInterface::kTemporalLayeredScreencast[] =
- "googTemporalLayeredScreencast";
// Constraint keys for CreateOffer / CreateAnswer defined in W3C specification.
const char MediaConstraintsInterface::kOfferToReceiveAudio[] =
diff --git a/talk/app/webrtc/mediaconstraintsinterface.h b/talk/app/webrtc/mediaconstraintsinterface.h
index 045da79..ffa848c 100644
--- a/talk/app/webrtc/mediaconstraintsinterface.h
+++ b/talk/app/webrtc/mediaconstraintsinterface.h
@@ -85,9 +85,6 @@
// Google-specific constraint keys for a local video source
static const char kNoiseReduction[]; // googNoiseReduction
- static const char kLeakyBucket[]; // googLeakyBucket
- static const char kTemporalLayeredScreencast[];
- // googTemporalLayeredScreencast
// Constraint keys for CreateOffer / CreateAnswer
// Specified by the W3C PeerConnection spec
diff --git a/talk/app/webrtc/videosource.cc b/talk/app/webrtc/videosource.cc
index 589341d..321f18c 100644
--- a/talk/app/webrtc/videosource.cc
+++ b/talk/app/webrtc/videosource.cc
@@ -179,10 +179,7 @@
// Subtract 0.0005 to avoid rounding problems. Same as above.
const double kRoundingTruncation = 0.0005;
return (value >= ratio - kRoundingTruncation);
- } else if (constraint.key == MediaConstraintsInterface::kNoiseReduction ||
- constraint.key == MediaConstraintsInterface::kLeakyBucket ||
- constraint.key ==
- MediaConstraintsInterface::kTemporalLayeredScreencast) {
+ } else if (constraint.key == MediaConstraintsInterface::kNoiseReduction) {
// These are actually options, not constraints, so they can be satisfied
// regardless of the format.
return true;
@@ -294,12 +291,6 @@
all_valid &= ExtractOption(all_constraints,
MediaConstraintsInterface::kNoiseReduction,
&(options->video_noise_reduction));
- all_valid &= ExtractOption(all_constraints,
- MediaConstraintsInterface::kLeakyBucket,
- &(options->video_leaky_bucket));
- all_valid &= ExtractOption(all_constraints,
- MediaConstraintsInterface::kTemporalLayeredScreencast,
- &(options->video_temporal_layer_screencast));
return all_valid;
}
diff --git a/talk/app/webrtc/videosource_unittest.cc b/talk/app/webrtc/videosource_unittest.cc
index d9d8acf..48c9c14 100644
--- a/talk/app/webrtc/videosource_unittest.cc
+++ b/talk/app/webrtc/videosource_unittest.cc
@@ -366,21 +366,12 @@
TEST_F(VideoSourceTest, SetValidOptionValues) {
FakeConstraints constraints;
constraints.AddMandatory(MediaConstraintsInterface::kNoiseReduction, "false");
- constraints.AddMandatory(
- MediaConstraintsInterface::kTemporalLayeredScreencast, "false");
- constraints.AddOptional(
- MediaConstraintsInterface::kLeakyBucket, "true");
CreateVideoSource(&constraints);
bool value = true;
EXPECT_TRUE(source_->options()->video_noise_reduction.Get(&value));
EXPECT_FALSE(value);
- EXPECT_TRUE(source_->options()->
- video_temporal_layer_screencast.Get(&value));
- EXPECT_FALSE(value);
- EXPECT_TRUE(source_->options()->video_leaky_bucket.Get(&value));
- EXPECT_TRUE(value);
}
TEST_F(VideoSourceTest, OptionNotSet) {
@@ -402,7 +393,6 @@
bool value = false;
EXPECT_TRUE(source_->options()->video_noise_reduction.Get(&value));
EXPECT_TRUE(value);
- EXPECT_FALSE(source_->options()->video_leaky_bucket.Get(&value));
}
TEST_F(VideoSourceTest, InvalidOptionKeyOptional) {
@@ -437,18 +427,14 @@
TEST_F(VideoSourceTest, InvalidOptionValueOptional) {
FakeConstraints constraints;
constraints.AddOptional(
- MediaConstraintsInterface::kNoiseReduction, "true");
- constraints.AddOptional(
- MediaConstraintsInterface::kLeakyBucket, "not boolean");
+ MediaConstraintsInterface::kNoiseReduction, "not a boolean");
CreateVideoSource(&constraints);
EXPECT_EQ_WAIT(MediaSourceInterface::kLive, state_observer_->state(),
kMaxWaitMs);
bool value = false;
- EXPECT_TRUE(source_->options()->video_noise_reduction.Get(&value));
- EXPECT_TRUE(value);
- EXPECT_FALSE(source_->options()->video_leaky_bucket.Get(&value));
+ EXPECT_FALSE(source_->options()->video_noise_reduction.Get(&value));
}
TEST_F(VideoSourceTest, InvalidOptionValueMandatory) {
@@ -458,7 +444,7 @@
MediaConstraintsInterface::kNoiseReduction, "false");
// Values are case-sensitive and must be all lower-case.
constraints.AddMandatory(
- MediaConstraintsInterface::kLeakyBucket, "True");
+ MediaConstraintsInterface::kNoiseReduction, "True");
CreateVideoSource(&constraints);
@@ -491,7 +477,6 @@
bool value = true;
EXPECT_TRUE(source_->options()->video_noise_reduction.Get(&value));
EXPECT_FALSE(value);
- EXPECT_FALSE(source_->options()->video_leaky_bucket.Get(&value));
}
// Tests that the source starts video with the default resolution for
diff --git a/talk/media/base/mediachannel.h b/talk/media/base/mediachannel.h
index 81cfc2b..b1164b5 100644
--- a/talk/media/base/mediachannel.h
+++ b/talk/media/base/mediachannel.h
@@ -306,9 +306,6 @@
video_adapt_third.SetFrom(change.video_adapt_third);
video_noise_reduction.SetFrom(change.video_noise_reduction);
video_start_bitrate.SetFrom(change.video_start_bitrate);
- video_temporal_layer_screencast.SetFrom(
- change.video_temporal_layer_screencast);
- video_leaky_bucket.SetFrom(change.video_leaky_bucket);
video_highest_bitrate.SetFrom(change.video_highest_bitrate);
cpu_overuse_detection.SetFrom(change.cpu_overuse_detection);
cpu_underuse_threshold.SetFrom(change.cpu_underuse_threshold);
@@ -339,9 +336,6 @@
video_adapt_third == o.video_adapt_third &&
video_noise_reduction == o.video_noise_reduction &&
video_start_bitrate == o.video_start_bitrate &&
- video_temporal_layer_screencast ==
- o.video_temporal_layer_screencast &&
- video_leaky_bucket == o.video_leaky_bucket &&
video_highest_bitrate == o.video_highest_bitrate &&
cpu_overuse_detection == o.cpu_overuse_detection &&
cpu_underuse_threshold == o.cpu_underuse_threshold &&
@@ -373,9 +367,6 @@
ost << ToStringIfSet("video adapt third", video_adapt_third);
ost << ToStringIfSet("noise reduction", video_noise_reduction);
ost << ToStringIfSet("start bitrate", video_start_bitrate);
- ost << ToStringIfSet("video temporal layer screencast",
- video_temporal_layer_screencast);
- ost << ToStringIfSet("leaky bucket", video_leaky_bucket);
ost << ToStringIfSet("highest video bitrate", video_highest_bitrate);
ost << ToStringIfSet("cpu overuse detection", cpu_overuse_detection);
ost << ToStringIfSet("cpu underuse threshold", cpu_underuse_threshold);
@@ -413,10 +404,6 @@
Settable<bool> video_noise_reduction;
// Experimental: Enable WebRtc higher start bitrate?
Settable<int> video_start_bitrate;
- // Experimental: Enable WebRTC layered screencast.
- Settable<bool> video_temporal_layer_screencast;
- // Enable WebRTC leaky bucket when sending media packets.
- Settable<bool> video_leaky_bucket;
// Set highest bitrate mode for video.
Settable<HighestBitrate> video_highest_bitrate;
// Enable WebRTC Cpu Overuse Detection, which is a new version of the CPU
diff --git a/talk/media/webrtc/webrtcvideoengine.cc b/talk/media/webrtc/webrtcvideoengine.cc
index a42491f..4a4e29a 100644
--- a/talk/media/webrtc/webrtcvideoengine.cc
+++ b/talk/media/webrtc/webrtcvideoengine.cc
@@ -2964,24 +2964,6 @@
LogSendCodecChange("SetOptions()");
}
- bool enable_leaky_bucket;
- if (Changed(options.video_leaky_bucket,
- original.video_leaky_bucket,
- &enable_leaky_bucket)) {
- 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(),
- enable_leaky_bucket);
- }
- }
- }
-
int buffer_latency;
if (Changed(options.buffered_mode_latency,
original.buffered_mode_latency,
@@ -3509,12 +3491,10 @@
return false;
}
- if (options_.video_leaky_bucket.GetWithDefaultIfUnset(true)) {
- if (engine()->vie()->rtp()->SetTransmissionSmoothingStatus(channel_id,
- true) != 0) {
- LOG_RTCERR2(SetTransmissionSmoothingStatus, channel_id, true);
- return false;
- }
+ if (engine()->vie()->rtp()->SetTransmissionSmoothingStatus(channel_id,
+ true) != 0) {
+ LOG_RTCERR2(SetTransmissionSmoothingStatus, channel_id, true);
+ return false;
}
int buffer_latency =
@@ -3911,7 +3891,6 @@
}
int screencast_min_bitrate =
options_.screencast_min_bitrate.GetWithDefaultIfUnset(0);
- bool leaky_bucket = options_.video_leaky_bucket.GetWithDefaultIfUnset(true);
StreamParams* send_params = send_channel->stream_params();
bool reset_send_codec =
target_width != cur_width || target_height != cur_height;
@@ -3946,18 +3925,12 @@
if (is_screencast) {
engine()->vie()->rtp()->SetMinTransmitBitrate(channel_id,
screencast_min_bitrate);
- // If screencast and min bitrate set, force enable pacer.
- if (screencast_min_bitrate > 0) {
- engine()->vie()->rtp()->SetTransmissionSmoothingStatus(channel_id,
- true);
- }
} else {
// In case of switching from screencast to regular capture, set
// min bitrate padding and pacer back to defaults.
engine()->vie()->rtp()->SetMinTransmitBitrate(channel_id, 0);
- engine()->vie()->rtp()->SetTransmissionSmoothingStatus(channel_id,
- leaky_bucket);
}
+ engine()->vie()->rtp()->SetTransmissionSmoothingStatus(channel_id, true);
// TODO(sriniv): SetSendCodec already sets ssrc's like below.
// Consider removing.
if (send_params) {
diff --git a/talk/media/webrtc/webrtcvideoengine_unittest.cc b/talk/media/webrtc/webrtcvideoengine_unittest.cc
index b471ff7..4060493 100644
--- a/talk/media/webrtc/webrtcvideoengine_unittest.cc
+++ b/talk/media/webrtc/webrtcvideoengine_unittest.cc
@@ -944,29 +944,10 @@
int first_send_channel = vie_.GetLastChannel();
EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
- // Disable the experiment and verify.
- cricket::VideoOptions options;
- options.conference_mode.Set(true);
- options.video_leaky_bucket.Set(false);
- EXPECT_TRUE(channel_->SetOptions(options));
- 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)));
- int recv_channel_num = vie_.GetLastChannel();
- 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.
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));
}
@@ -1037,8 +1018,9 @@
TEST_F(WebRtcVideoEngineTestFake, AdditiveVideoOptions) {
EXPECT_TRUE(SetupEngine());
-
EXPECT_TRUE(channel_->AddSendStream(cricket::StreamParams::CreateLegacy(1)));
+ channel_->SetSendCodecs(engine_.codecs());
+
int first_send_channel = vie_.GetLastChannel();
EXPECT_EQ(0, vie_.GetSenderTargetDelay(first_send_channel));
EXPECT_EQ(0, vie_.GetReceiverTargetDelay(first_send_channel));
@@ -1050,20 +1032,16 @@
EXPECT_EQ(100, vie_.GetReceiverTargetDelay(first_send_channel));
EXPECT_TRUE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
+ int kBoostedStartBandwidthKbps = 1000;
cricket::VideoOptions options2;
- options2.video_leaky_bucket.Set(false);
+ options2.video_start_bitrate.Set(kBoostedStartBandwidthKbps);
EXPECT_TRUE(channel_->SetOptions(options2));
- EXPECT_FALSE(vie_.GetTransmissionSmoothingStatus(first_send_channel));
- // The buffered_mode_latency still takes effect.
+ // Check that start bitrate has changed to the new value.
+ VerifyVP8SendCodec(first_send_channel, kVP8Codec.width, kVP8Codec.height, 0,
+ kMaxBandwidthKbps, kMinBandwidthKbps, kBoostedStartBandwidthKbps);
+ // The buffered_mode_latency should still take effect.
EXPECT_EQ(100, vie_.GetSenderTargetDelay(first_send_channel));
EXPECT_EQ(100, vie_.GetReceiverTargetDelay(first_send_channel));
-
- options1.buffered_mode_latency.Set(50);
- EXPECT_TRUE(channel_->SetOptions(options1));
- 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));
}
TEST_F(WebRtcVideoEngineTestFake, SetCpuOveruseOptionsWithCaptureJitterMethod) {
diff --git a/talk/session/media/channel_unittest.cc b/talk/session/media/channel_unittest.cc
index 18f1b67..698a34a 100644
--- a/talk/session/media/channel_unittest.cc
+++ b/talk/session/media/channel_unittest.cc
@@ -1981,7 +1981,7 @@
EXPECT_TRUE(media_channel2_->GetOptions(&o2));
EXPECT_EQ(o1, o2);
- o1.video_leaky_bucket.Set(true);
+ o1.video_start_bitrate.Set(123);
channel1_->SetChannelOptions(o1);
channel2_->SetChannelOptions(o1);
EXPECT_TRUE(media_channel1_->GetOptions(&o2));