(Auto)update libjingle 69143161-> 69144530

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6432 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
buildbot@webrtc.org 2014-06-13 13:05:48 +00:00
parent f99c2f2dbc
commit db56390f7e
6 changed files with 42 additions and 23 deletions

View File

@ -114,6 +114,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

@ -126,6 +126,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,21 +565,17 @@ bool WebRtcSession::Initialize(
SetOptionFromOptionalConstraint(constraints,
MediaConstraintsInterface::kCpuOveruseThreshold,
&video_options_.cpu_overuse_threshold);
if (FindConstraint(
constraints,
SetOptionFromOptionalConstraint(constraints,
MediaConstraintsInterface::kCpuOveruseDetection,
&value,
NULL)) {
video_options_.cpu_overuse_detection.Set(value);
}
if (FindConstraint(
constraints,
&video_options_.cpu_overuse_detection);
SetOptionFromOptionalConstraint(constraints,
MediaConstraintsInterface::kCpuOveruseEncodeUsage,
&value,
NULL)) {
video_options_.cpu_overuse_encode_usage.Set(value);
}
&video_options_.cpu_overuse_encode_usage);
// Find payload padding constraint.
SetOptionFromOptionalConstraint(constraints,
MediaConstraintsInterface::kPayloadPadding,
&video_options_.use_payload_padding);
// Find improved wifi bwe constraint.
if (FindConstraint(
@ -592,13 +589,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

@ -331,6 +331,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 {
@ -366,7 +367,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 {
@ -409,6 +411,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();
}
@ -477,6 +480,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,8 @@ class FakeWebRtcVideoEngine
return 0;
}
WEBRTC_STUB(SetPadWithRedundantPayloads, (int, bool));
WEBRTC_FUNC(SetRtxReceivePayloadType, (const int channel,
const uint8 payload_type)) {
WEBRTC_CHECK_CHANNEL(channel);

View File

@ -2976,6 +2976,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
@ -3105,6 +3110,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();