(Auto)update libjingle 69337301-> 69359922

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6457 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
buildbot@webrtc.org 2014-06-17 07:49:15 +00:00
parent 9f36c087f1
commit 44a317a698
6 changed files with 46 additions and 25 deletions

View File

@ -118,6 +118,8 @@ const char MediaConstraintsInterface::kHighBitrate[] =
"googHighBitrate";
const char MediaConstraintsInterface::kVeryHighBitrate[] =
"googVeryHighBitrate";
const char MediaConstraintsInterface::kPayloadPadding[] = "googPayloadPadding";
// Set |value| to the value associated with the first appearance of |key|, or
// return false if |key| is not found.

View File

@ -132,6 +132,7 @@ class MediaConstraintsInterface {
static const char kHighStartBitrate[]; // googHighStartBitrate
static const char kHighBitrate[]; // googHighBitrate
static const char kVeryHighBitrate[]; // googVeryHighBitrate
static const char kPayloadPadding[]; // googPayloadPadding
// The prefix of internal-only constraints whose JS set values should be
// stripped by Chrome before passed down to Libjingle.

View File

@ -371,14 +371,15 @@ static std::string MakeTdErrorString(const std::string& desc) {
// Set |option| to the highest-priority value of |key| in the optional
// constraints if the key is found and has a valid value.
template<typename T>
static void SetOptionFromOptionalConstraint(
const MediaConstraintsInterface* constraints,
const std::string& key, cricket::Settable<int>* option) {
const std::string& key, cricket::Settable<T>* option) {
if (!constraints) {
return;
}
std::string string_value;
int value;
T value;
if (constraints->GetOptional().FindFirst(key, &string_value)) {
if (talk_base::FromString(string_value, &value)) {
option->Set(value);
@ -564,6 +565,12 @@ bool WebRtcSession::Initialize(
SetOptionFromOptionalConstraint(constraints,
MediaConstraintsInterface::kCpuOveruseThreshold,
&video_options_.cpu_overuse_threshold);
SetOptionFromOptionalConstraint(constraints,
MediaConstraintsInterface::kCpuOveruseDetection,
&video_options_.cpu_overuse_detection);
SetOptionFromOptionalConstraint(constraints,
MediaConstraintsInterface::kCpuOveruseEncodeUsage,
&video_options_.cpu_overuse_encode_usage);
SetOptionFromOptionalConstraint(constraints,
MediaConstraintsInterface::kCpuUnderuseEncodeRsdThreshold,
&video_options_.cpu_underuse_encode_rsd_threshold);
@ -571,20 +578,10 @@ bool WebRtcSession::Initialize(
MediaConstraintsInterface::kCpuOveruseEncodeRsdThreshold,
&video_options_.cpu_overuse_encode_rsd_threshold);
if (FindConstraint(
constraints,
MediaConstraintsInterface::kCpuOveruseDetection,
&value,
NULL)) {
video_options_.cpu_overuse_detection.Set(value);
}
if (FindConstraint(
constraints,
MediaConstraintsInterface::kCpuOveruseEncodeUsage,
&value,
NULL)) {
video_options_.cpu_overuse_encode_usage.Set(value);
}
// Find payload padding constraint.
SetOptionFromOptionalConstraint(constraints,
MediaConstraintsInterface::kPayloadPadding,
&video_options_.use_payload_padding);
// Find improved wifi bwe constraint.
if (FindConstraint(
@ -598,13 +595,9 @@ bool WebRtcSession::Initialize(
video_options_.use_improved_wifi_bandwidth_estimator.Set(true);
}
if (FindConstraint(
constraints,
MediaConstraintsInterface::kHighStartBitrate,
&value,
NULL)) {
video_options_.video_start_bitrate.Set(cricket::kHighStartBitrate);
}
SetOptionFromOptionalConstraint(constraints,
MediaConstraintsInterface::kHighStartBitrate,
&video_options_.video_start_bitrate);
if (FindConstraint(
constraints,

View File

@ -335,6 +335,7 @@ struct VideoOptions {
screencast_min_bitrate.SetFrom(change.screencast_min_bitrate);
use_improved_wifi_bandwidth_estimator.SetFrom(
change.use_improved_wifi_bandwidth_estimator);
use_payload_padding.SetFrom(change.use_payload_padding);
}
bool operator==(const VideoOptions& o) const {
@ -374,7 +375,8 @@ struct VideoOptions {
skip_encoding_unused_streams == o.skip_encoding_unused_streams &&
screencast_min_bitrate == o.screencast_min_bitrate &&
use_improved_wifi_bandwidth_estimator ==
o.use_improved_wifi_bandwidth_estimator;
o.use_improved_wifi_bandwidth_estimator &&
use_payload_padding == o.use_payload_padding;
}
std::string ToString() const {
@ -421,6 +423,7 @@ struct VideoOptions {
ost << ToStringIfSet("screencast min bitrate", screencast_min_bitrate);
ost << ToStringIfSet("improved wifi bwe",
use_improved_wifi_bandwidth_estimator);
ost << ToStringIfSet("payload padding", use_payload_padding);
ost << "}";
return ost.str();
}
@ -501,6 +504,8 @@ struct VideoOptions {
Settable<int> screencast_min_bitrate;
// Enable improved bandwidth estiamtor on wifi.
Settable<bool> use_improved_wifi_bandwidth_estimator;
// Enable payload padding.
Settable<bool> use_payload_padding;
};
// A class for playing out soundclips.

View File

@ -1000,6 +1000,10 @@ class FakeWebRtcVideoEngine
return 0;
}
#ifdef USE_WEBRTC_DEV_BRANCH
WEBRTC_STUB(SetPadWithRedundantPayloads, (int, bool));
#endif
WEBRTC_FUNC(SetRtxReceivePayloadType, (const int channel,
const uint8 payload_type)) {
WEBRTC_CHECK_CHANNEL(channel);
@ -1111,7 +1115,7 @@ class FakeWebRtcVideoEngine
channels_[channel]->transmission_smoothing_ = enable;
return 0;
}
WEBRTC_FUNC(SetReservedTransmitBitrate, (int channel,
WEBRTC_FUNC(SetReservedTransmitBitrate, (int channel,
unsigned int reserved_transmit_bitrate_bps)) {
WEBRTC_CHECK_CHANNEL(channel);
channels_[channel]->reserved_transmit_bitrate_bps_ =

View File

@ -2988,6 +2988,11 @@ bool WebRtcVideoMediaChannel::SetOptions(const VideoOptions &options) {
options_.use_improved_wifi_bandwidth_estimator !=
options.use_improved_wifi_bandwidth_estimator;
#ifdef USE_WEBRTC_DEV_BRANCH
bool payload_padding_changed = options.use_payload_padding.IsSet() &&
options_.use_payload_padding != options.use_payload_padding;
#endif
// Save the options, to be interpreted where appropriate.
// Use options_.SetAll() instead of assignment so that unset value in options
@ -3120,6 +3125,17 @@ bool WebRtcVideoMediaChannel::SetOptions(const VideoOptions &options) {
it->second->channel_id(), config);
}
}
#ifdef USE_WEBRTC_DEV_BRANCH
if (payload_padding_changed) {
LOG(LS_INFO) << "Payload-based padding called.";
for (SendChannelMap::iterator it = send_channels_.begin();
it != send_channels_.end(); ++it) {
engine()->vie()->rtp()->SetPadWithRedundantPayloads(
it->second->channel_id(),
options_.use_payload_padding.GetWithDefaultIfUnset(false));
}
}
#endif
webrtc::CpuOveruseOptions overuse_options;
if (GetCpuOveruseOptions(options_, &overuse_options)) {
for (SendChannelMap::iterator it = send_channels_.begin();