(Auto)update libjingle 77701902-> 77709729

git-svn-id: http://webrtc.googlecode.com/svn/trunk@7450 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
buildbot@webrtc.org 2014-10-14 22:39:24 +00:00
parent 1ecbe45c7e
commit 81ddc78536
8 changed files with 19 additions and 111 deletions

View File

@ -66,9 +66,6 @@ const char MediaConstraintsInterface::kAudioMirroring[] = "googAudioMirroring";
// 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[] =

View File

@ -85,9 +85,6 @@ class MediaConstraintsInterface {
// 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

View File

@ -179,10 +179,7 @@ bool NewFormatWithConstraints(
// 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 @@ bool ExtractVideoOptions(const MediaConstraintsInterface* all_constraints,
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;
}

View File

@ -366,21 +366,12 @@ TEST_F(VideoSourceTest, InvalidOptionalConstraint) {
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 @@ TEST_F(VideoSourceTest, MandatoryOptionOverridesOptional) {
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, InvalidOptionKeyMandatory) {
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 @@ TEST_F(VideoSourceTest, InvalidOptionValueMandatory) {
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 @@ TEST_F(VideoSourceTest, MixedOptionsAndConstraints) {
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

View File

@ -306,9 +306,6 @@ struct VideoOptions {
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 @@ struct VideoOptions {
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 @@ struct VideoOptions {
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 @@ struct VideoOptions {
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

View File

@ -2964,24 +2964,6 @@ bool WebRtcVideoMediaChannel::SetOptions(const VideoOptions &options) {
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 @@ bool WebRtcVideoMediaChannel::ConfigureSending(int channel_id,
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 @@ bool WebRtcVideoMediaChannel::MaybeResetVieSendCodec(
}
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 @@ bool WebRtcVideoMediaChannel::MaybeResetVieSendCodec(
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) {

View File

@ -944,29 +944,10 @@ TEST_F(WebRtcVideoEngineTestFake, LeakyBucketTest) {
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, BufferedModeLatency) {
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 @@ TEST_F(WebRtcVideoEngineTestFake, AdditiveVideoOptions) {
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) {

View File

@ -1981,7 +1981,7 @@ class VideoChannelTest
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));