(Auto)update libjingle 72847605-> 72850595

git-svn-id: http://webrtc.googlecode.com/svn/trunk@6855 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
buildbot@webrtc.org 2014-08-07 22:46:01 +00:00
parent 65b98d12c3
commit 53df88c1bc
5 changed files with 52 additions and 0 deletions

View File

@ -95,6 +95,8 @@ const char MediaConstraintsInterface::kEnableVideoSuspendBelowMinBitrate[] =
"googSuspendBelowMinBitrate";
const char MediaConstraintsInterface::kImprovedWifiBwe[] =
"googImprovedWifiBwe";
const char MediaConstraintsInterface::kNumUnsignalledRecvStreams[] =
"googNumUnsignalledRecvStreams";
const char MediaConstraintsInterface::kScreencastMinBitrate[] =
"googScreencastMinBitrate";
// TODO(ronghuawu): Remove once cpu overuse detection is stable.

View File

@ -116,6 +116,8 @@ class MediaConstraintsInterface {
static const char kEnableVideoSuspendBelowMinBitrate[];
// googSuspendBelowMinBitrate
static const char kImprovedWifiBwe[]; // googImprovedWifiBwe
static const char kNumUnsignalledRecvStreams[];
// googNumUnsignalledRecvStreams
static const char kScreencastMinBitrate[]; // googScreencastMinBitrate
static const char kCpuOveruseDetection[]; // googCpuOveruseDetection
static const char kCpuUnderuseThreshold[]; // googCpuUnderuseThreshold

View File

@ -38,6 +38,7 @@
#include "talk/app/webrtc/mediastreamsignaling.h"
#include "talk/app/webrtc/peerconnectioninterface.h"
#include "talk/app/webrtc/webrtcsessiondescriptionfactory.h"
#include "webrtc/base/basictypes.h"
#include "webrtc/base/helpers.h"
#include "webrtc/base/logging.h"
#include "webrtc/base/stringencode.h"
@ -74,6 +75,7 @@ const char kSdpWithoutIceUfragPwd[] =
"Called with SDP without ice-ufrag and ice-pwd.";
const char kSessionError[] = "Session error code: ";
const char kSessionErrorDesc[] = "Session error description: ";
const int kMaxUnsignalledRecvStreams = 20;
// Compares |answer| against |offer|. Comparision is done
// for number of m-lines in answer against offer. If matches true will be
@ -589,6 +591,17 @@ bool WebRtcSession::Initialize(
video_options_.use_improved_wifi_bandwidth_estimator.Set(true);
}
SetOptionFromOptionalConstraint(constraints,
MediaConstraintsInterface::kNumUnsignalledRecvStreams,
&video_options_.unsignalled_recv_stream_limit);
if (video_options_.unsignalled_recv_stream_limit.IsSet()) {
int stream_limit;
video_options_.unsignalled_recv_stream_limit.Get(&stream_limit);
stream_limit = rtc::_min(kMaxUnsignalledRecvStreams, stream_limit);
stream_limit = rtc::_max(0, stream_limit);
video_options_.unsignalled_recv_stream_limit.Set(stream_limit);
}
SetOptionFromOptionalConstraint(constraints,
MediaConstraintsInterface::kHighStartBitrate,
&video_options_.video_start_bitrate);

View File

@ -73,6 +73,9 @@ extern const char kSdpWithoutIceUfragPwd[];
extern const char kSdpWithoutSdesAndDtlsDisabled[];
extern const char kSessionError[];
extern const char kSessionErrorDesc[];
// Maximum number of received video streams that will be processed by webrtc
// even if they are not signalled beforehand.
extern const int kMaxUnsignalledRecvStreams;
// ICE state callback interface.
class IceObserver {

View File

@ -98,6 +98,7 @@ using webrtc::kSdpWithoutDtlsFingerprint;
using webrtc::kSdpWithoutSdesCrypto;
using webrtc::kSessionError;
using webrtc::kSessionErrorDesc;
using webrtc::kMaxUnsignalledRecvStreams;
typedef PeerConnectionInterface::RTCOfferAnswerOptions RTCOfferAnswerOptions;
@ -537,6 +538,28 @@ class WebRtcSessionTest : public testing::Test {
VerifyCryptoParams(answer->description());
}
void SetAndVerifyNumUnsignalledRecvStreams(
int value_set, int value_expected) {
constraints_.reset(new FakeConstraints());
constraints_->AddOptional(
webrtc::MediaConstraintsInterface::kNumUnsignalledRecvStreams,
value_set);
session_.reset();
Init(NULL);
mediastream_signaling_.SendAudioVideoStream1();
SessionDescriptionInterface* offer = CreateOffer();
SetLocalDescriptionWithoutError(offer);
video_channel_ = media_engine_->GetVideoChannel(0);
ASSERT_TRUE(video_channel_ != NULL);
cricket::VideoOptions video_options;
EXPECT_TRUE(video_channel_->GetOptions(&video_options));
EXPECT_EQ(value_expected,
video_options.unsignalled_recv_stream_limit.GetWithDefaultIfUnset(-1));
}
void CompareIceUfragAndPassword(const cricket::SessionDescription* desc1,
const cricket::SessionDescription* desc2,
bool expect_equal) {
@ -3279,6 +3302,15 @@ TEST_F(WebRtcSessionTest, TestSuspendBelowMinBitrateConstraint) {
video_options.suspend_below_min_bitrate.GetWithDefaultIfUnset(false));
}
TEST_F(WebRtcSessionTest, TestNumUnsignalledRecvStreamsConstraint) {
// Number of unsignalled receiving streams should be between 0 and
// kMaxUnsignalledRecvStreams.
SetAndVerifyNumUnsignalledRecvStreams(10, 10);
SetAndVerifyNumUnsignalledRecvStreams(kMaxUnsignalledRecvStreams + 1,
kMaxUnsignalledRecvStreams);
SetAndVerifyNumUnsignalledRecvStreams(-1, 0);
}
// Tests that we can renegotiate new media content with ICE candidates in the
// new remote SDP.
TEST_F(WebRtcSessionTest, TestRenegotiateNewMediaWithCandidatesInSdp) {