496 Commits

Author SHA1 Message Date
Steve Anton
038834f40c Reinstate "Add additional check when setting RTCConfiguration"
This reverts commit 26d5e2e2809558148dc1e977ec1bc8318a2047bc.

Reverted originally because it dependend on a CL which was reverted. That CL has been reinstated in: https://chromium-review.googlesource.com/#/c/572070/

Bug: webrtc:7969
Change-Id: I404c3a42ad447312d981646dca0aa4cf0ec3134e
Reviewed-on: https://chromium-review.googlesource.com/572403
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19034}
2017-07-14 23:40:53 +00:00
Steve Anton
300bf8e14b Reinstate "API for periodically regathering ICE candidates"
Use rtc::SystemTimeNanos() instead of std::random_device() for PRNG seed
to avoid crashing when /dev/urandom is unavailable.

This reverts commit 3beb20720db349f651c2c04970c45b1b171c025c.

Bug: webrtc:7969
Change-Id: I5ed58a789939ee4caa99ac3abf9cab18e3e19c69
Reviewed-on: https://chromium-review.googlesource.com/572070
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19033}
2017-07-14 22:26:05 +00:00
Magnus Jedvert
3beb20720d Revert "API for periodically regathering ICE candidates"
This reverts commit aa41f0cfa64ece911ae2ecee83fc3190d4a42935.

Reason for revert:
Apparently, use of std::random_device() causes chromium on Linux to fail with this error:
terminating with uncaught exception of type std::__1::system_error: random_device failed to open /dev/urandom: Operation not permitted

Link to bot with failure:
https://build.chromium.org/p/chromium.webrtc.fyi/builders/Linux%20Tester/builds/37563

Original change's description:
> API for periodically regathering ICE candidates
> 
> Adds to the RTCConfiguration `ice_regather_interval_range` which, when
> set, specifies the randomized delay between automatic runs of ICE
> regathering. The regathering will occur on all networks and re-use the
> existing ICE ufrag/password. New connections are established once the
> candidates come back and WebRTC will automatically switch to the new
> connection that corresponds to the currently selected connection.
> 
> Bug: webrtc:7969
> Change-Id: I6bbf5439a48e285f704aed9f408631cba038c82b
> Reviewed-on: https://chromium-review.googlesource.com/562505
> Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#18978}

TBR=pthatcher@webrtc.org,deadbeef@webrtc.org,steveanton@webrtc.org

No-Try: true
Bug: webrtc:7969
Change-Id: I86ef99e9f1070d3ac265398831317b68f562c614
Reviewed-on: https://chromium-review.googlesource.com/571008
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19024}
2017-07-14 15:42:02 +00:00
Magnus Jedvert
26d5e2e280 Revert "Add additional check when setting RTCConfiguration"
This reverts commit 8110beda7f98623e4510f99ed51a05d126437642.

Reason for revert:
Blocks reverting https://chromium-review.googlesource.com/c/562505


Original change's description:
> Add additional check when setting RTCConfiguration
> 
> Check that ice_regather_interval_range is set only when continual
> regathering is also set.
> 
> Bug: webrtc:7969
> Change-Id: Ifcfeee744d817cf00914418d7e682f11528faf05
> Reviewed-on: https://chromium-review.googlesource.com/569358
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#19009}

TBR=pthatcher@webrtc.org,deadbeef@webrtc.org,steveanton@webrtc.org

Change-Id: I95955bb6ab0c5d0625e55a136e3773e9b90d74e2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:7969
Reviewed-on: https://chromium-review.googlesource.com/571009
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Commit-Queue: Magnus Jedvert <magjed@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19022}
2017-07-14 14:26:45 +00:00
Steve Anton
8110beda7f Add additional check when setting RTCConfiguration
Check that ice_regather_interval_range is set only when continual
regathering is also set.

Bug: webrtc:7969
Change-Id: Ifcfeee744d817cf00914418d7e682f11528faf05
Reviewed-on: https://chromium-review.googlesource.com/569358
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#19009}
2017-07-13 21:05:28 +00:00
Steve Anton
aa41f0cfa6 API for periodically regathering ICE candidates
Adds to the RTCConfiguration `ice_regather_interval_range` which, when
set, specifies the randomized delay between automatic runs of ICE
regathering. The regathering will occur on all networks and re-use the
existing ICE ufrag/password. New connections are established once the
candidates come back and WebRTC will automatically switch to the new
connection that corresponds to the currently selected connection.

Bug: webrtc:7969
Change-Id: I6bbf5439a48e285f704aed9f408631cba038c82b
Reviewed-on: https://chromium-review.googlesource.com/562505
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18978}
2017-07-11 21:49:38 +00:00
jbauch
7d0a77eef4 Handle case where UDP packet contains multiple DTLS records.
Our DTLS implementation doesn't do this, but other implementations may; see https://tools.ietf.org/html/rfc6347#section-4.1.1.

BUG=chromium:537189

Review-Url: https://codereview.webrtc.org/2970883005
Cr-Commit-Position: refs/heads/master@{#18934}
2017-07-07 20:44:07 +00:00
Edward Lemur
c20978e581 Rename webrtc/base -> webrtc/rtc_base
NOPRESUBMIT=True # cpplint errors that aren't caused by this CL.
NOTRY=True
NOTREECHECKS=True
TBR=kwiberg@webrtc.org, kjellander@webrtc.org

Bug: webrtc:7634
Change-Id: I3cca0fbaa807b563c95979cccd6d1bec32055f36
Reviewed-on: https://chromium-review.googlesource.com/562156
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18919}
2017-07-06 19:11:40 +00:00
Henrik Kjellander
a80c16a67c Revert "Update includes for webrtc/{base => rtc_base} rename (2/3)"
This reverts commit c3771cc4d37f5573fe53b7c7cff295a4f0f9560f.
(breaks downstream internal project)

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2972463002 .
Cr-Commit-Position: refs/heads/master@{#18873}
2017-07-01 14:48:18 +00:00
kjellander
c3771cc4d3 Update includes for webrtc/{base => rtc_base} rename (2/3)
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`

BUG=webrtc:7634
NOPRESUBMIT=True # cpplint errors that aren't caused by this CL.

Review-Url: https://codereview.webrtc.org/2969623003
Cr-Commit-Position: refs/heads/master@{#18870}
2017-06-30 20:42:44 +00:00
jbauch
5869f50f7a Support encrypted RTP extensions (RFC 6904)
Can be enabled by setting "enable_encrypted_rtp_header_extensions" in
"crypto_options" of "PeerConnectionFactoryInterface::Options" and will
only be used if both peers support it.

BUG=webrtc:3411

Review-Url: https://codereview.webrtc.org/2761143002
Cr-Commit-Position: refs/heads/master@{#18842}
2017-06-29 19:31:36 +00:00
deadbeef
86c40a14b4 Fixing RTCIceCandidatePairStats.nominated for ICE controlling agent.
Was only working when the nonstandard "renomination" extension to ICE
is enabled, which chromium doesn't use.

BUG=chromium:734094

Review-Url: https://codereview.webrtc.org/2957303002
Cr-Commit-Position: refs/heads/master@{#18814}
2017-06-28 16:37:23 +00:00
Emad Omara
dab1d2d34e Enable SNI in ssl adapter.
Bug: webrtc:6973
Change-Id: I13d28cf41c586880bd7fea523005233921794cdf
Reviewed-on: https://chromium-review.googlesource.com/523024
Reviewed-by: Zeke Chin <tkchin@webrtc.org>
Reviewed-by: Sami Kalliomäki <sakal@webrtc.org>
Reviewed-by: Justin Uberti <juberti@chromium.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Emad Omara <emadomara@google.com>
Cr-Commit-Position: refs/heads/master@{#18640}
2017-06-16 23:30:48 +00:00
deadbeef
1ee2125909 Adding PortAllocator option to support cases where sockets can't be bound.
This CL adds the flag "PORTALLOCATOR_ENABLE_ANY_ADDRESS_PORTS", which will
force the creation of ports not bound to any specific network interface.
These are normally only used when network enumeration fails or is disabled,
but in some circumstances (such as the one the test case adds), they're the
only thing that works.

This will result in extra ports being gathered, which is why it's only enabled
behind a flag for now. In the future, we could probably introduce more
sophisticated "pruning" logic that would lessen the impact of the extra ports
when they're redundant, and make the flag the default.

Some other minor changes that were required to make this use case work:

* Allow a TCPPort to be used for outgoing connections even if it tries and
  fails to create a server socket.
* Allow Bind to fail if being called before Connect, and the IP is an "any"
  address (0.0.0.0 or ::), since this bind would have been mostly pointless
  anyway.
* Prevent P2PTransprotChannel from keeping a "backup" candidate pair using
  an "any address" network; we only want this for actual networks.

BUG=webrtc:7798

Review-Url: https://codereview.webrtc.org/2936553003
Cr-Commit-Position: refs/heads/master@{#18578}
2017-06-13 22:49:45 +00:00
kwiberg
0703856b53 Add SafeClamp(), which accepts args of different types
Specifically, just like SafeMin() and SafeMax() it handles all
combinations of integer and all
combinations of floating-point arguments by picking a
result type that is guaranteed to be able to hold the result.

This CL also replaces a bunch of std::min + std:max call pairs with
calls to SafeClamp()---the ones that could easily be found by grep
because "min" and "max" were on the same line. :-)

BUG=webrtc:7459

Review-Url: https://codereview.webrtc.org/2808513003
Cr-Commit-Position: refs/heads/master@{#18542}
2017-06-12 18:40:47 +00:00
deadbeef
b56671e051 Fix issue with send-side bandwidth estimation over TURN TCP connections.
AsyncStunTCPSocket wasn't firing SignalSentPacket, which the bandwidth
estimator requires for every packet in order to look up send times when
feedback arrives. If the signal isn't fired, it always assumes feedback
is arriving extremely late, and decreases the bandwidth by a factor of
2 until it reaches the minimum of 10kbps.

BUG=webrtc:7717
TBR=pthatcher@webrtc.org

Review-Url: https://codereview.webrtc.org/2912523003
Cr-Commit-Position: refs/heads/master@{#18279}
2017-05-27 01:40:05 +00:00
deadbeef
98e186c71c Remove VirtualSocketServer's dependency on PhysicalSocketServer.
The only thing the physical socket server was used for was
"Wait"/"WakeUp", but it could be replaced by a simple rtc::Event.

So, removing this dependency makes things less confusing; the fact that
VirtualSocketServer takes a PhysicalSocketServer may lead someone to
think it uses real sockets internally, when it doesn't.

BUG=None

Review-Url: https://codereview.webrtc.org/2883313003
Cr-Commit-Position: refs/heads/master@{#18172}
2017-05-17 01:00:06 +00:00
deadbeef
9a6f4d4316 Get tests working on systems that only support IPv6.
For every failing test, the solution was either to do a "has IPv4" check
before the test is run, or avoid depending on real network interfaces
altogether.

This specifically fixes rtc_unittests, peerconnection_unittests, and
webrtc_nonparallel_tests.

BUG=None

Review-Url: https://codereview.webrtc.org/2881973002
Cr-Commit-Position: refs/heads/master@{#18155}
2017-05-16 02:43:33 +00:00
nisse
7eaa4ea75f Delete method MessageQueue::set_socketserver
Instead, make the pointer to the associated socket server a
construction time const, and delete its lock.

Introduces a helper class AutoSocketServerThread for code
(mainly tests) which need a socket server associated with
the current thread.

BUG=webrtc:7501

Review-Url: https://codereview.webrtc.org/2828223002
Cr-Commit-Position: refs/heads/master@{#18047}
2017-05-08 12:25:41 +00:00
nisse
32f2505185 Refactor TestClient to use std::unique_ptr, and fix VirtualSocketServerTest leaks.
BUG=None

Review-Url: https://codereview.webrtc.org/2859373003
Cr-Commit-Position: refs/heads/master@{#18043}
2017-05-08 08:57:18 +00:00
deadbeef
bbe2a370f7 Fixing DCHECK in turnport.cc that was broken by refactoring.
"PROTO_TCP + secure bit" was turned into "PROTO_TLS" by this CL:
https://codereview.webrtc.org/2568833002

But a "DCHECK(proto == PROTO_TCP)" wasn't updated to take this into
account.

BUG=NONE
TBR=pthatcher@webrtc.org

Review-Url: https://codereview.webrtc.org/2859763003
Cr-Commit-Position: refs/heads/master@{#18000}
2017-05-03 16:48:35 +00:00
deadbeef
996fc6bdb7 Don't crash if STUN error message is missing ERROR-CODE attribute.
This is something a well-behaving STUN server shouldn't do, but we shouldn't
crash if it does happen.

Also adding helper function for the common operation of extracting just
the error code out of a STUN packet.

BUG=chromium:708469

Review-Url: https://codereview.webrtc.org/2837133003
Cr-Commit-Position: refs/heads/master@{#17892}
2017-04-26 16:21:22 +00:00
deadbeef
0687829794 Fixing SignalSentPacket for TCP connections.
The signal was only being hooked up for incoming connections, not
outgoing connections.

As a result, the bandwidth estimator didn't know when packets were sent
and couldn't calculate delays.

BUG=webrtc:7509

Review-Url: https://codereview.webrtc.org/2834083002
Cr-Commit-Position: refs/heads/master@{#17817}
2017-04-21 21:22:23 +00:00
deadbeef
7914b8cb41 Negotiate the same SRTP crypto suites for every DTLS association formed.
Before this CL, we would negotiate:
- No crypto suites for data m= sections.
- A full set for audio m= sections.
- The full set, minus SRTP_AES128_CM_SHA1_32 for video m= sections.

However, this doesn't make sense with BUNDLE, since any DTLS
association could end up being used for any type of media. If
video is "bundled on" the audio transport (which is typical), it
will actually end up using SRTP_AES128_CM_SHA1_32.

So, this CL moves the responsibility of deciding SRTP crypto suites out
of BaseChannel and into DtlsTransport. The only two possibilities are
now "normal set" or "normal set + GCM", if enabled by the PC factory
options.

This fixes an issue (see linked bug) that was occurring when audio/video
were "bundled onto" the data transport. Since the data transport
wasn't negotiating any SRTP crypto suites, none were available to use
for audio/video, so the application would get black video/no audio.

This CL doesn't affect the SDES SRTP crypto suite negotiation;
it only affects the negotiation in the DLTS handshake, through
the use_srtp extension.

BUG=chromium:711243

Review-Url: https://codereview.webrtc.org/2815513012
Cr-Commit-Position: refs/heads/master@{#17810}
2017-04-21 10:23:33 +00:00
deadbeef
30952b460f Add "ice-option:trickle" to generated offers/answers.
BUG=webrtc:7443

Review-Url: https://codereview.webrtc.org/2808913003
Cr-Commit-Position: refs/heads/master@{#17809}
2017-04-21 09:41:29 +00:00
deadbeef
897d08ef1b Fixing bug that results in incorrect ICE role with ICE lite endpoints.
There's some code that resets the ICE role on an ICE restart (behavior
that's specified in ICE, but removed from ICEbis). And it wasn't taking
into account that the remote endpoint may be an ICE lite endpoint, in
which case the WebRTC endpoint's role should always be "controlling".

BUG=chromium:710760

Review-Url: https://codereview.webrtc.org/2812173003
Cr-Commit-Position: refs/heads/master@{#17779}
2017-04-20 07:57:25 +00:00
steweg
4b37127414 Fix compilation issues of std::unique_ptr
This patch fixes compilation issues related to usage of std::unique_ptr
and NULL instead of nullptr. This issue pops up once you would try to
compile whole webrtc with using C++14 and gcc-4.9

BUG=webrtc:7461

Review-Url: https://codereview.webrtc.org/2806693004
Cr-Commit-Position: refs/heads/master@{#17600}
2017-04-09 16:09:06 +00:00
deadbeef
225bfc0971 Make PacketTransportInternal inherit from PacketTransportInterface.
Was just overlooked in an earlier CL.

BUG=webrtc:7013
TBR=pthatcher@webrtc.org

Review-Url: https://codereview.webrtc.org/2806463003
Cr-Commit-Position: refs/heads/master@{#17579}
2017-04-07 04:47:33 +00:00
aleloi
d49d3873ce Disable possibly flaky AudioCodingModuleTest.TestPacketLossStereo for Linux.
It failed after unrelated https://codereview.webrtc.org/2752233002.

TBR=tommi@webrtc.org
NOTRY=true
BUG=webrtc:7416

Review-Url: https://codereview.webrtc.org/2779913002
Cr-Commit-Position: refs/heads/master@{#17412}
2017-03-28 10:00:07 +00:00
zstein
f42cc9d8d9 Add MakeUnique from chromium and change StunMessage::AddAttribute to take a unique_ptr.
BUG=NONE

Review-Url: https://codereview.webrtc.org/2757893003
Cr-Commit-Position: refs/heads/master@{#17403}
2017-03-27 23:17:19 +00:00
deadbeef
d8cfa1af38 Accept remote offers with current DTLS role, rather than "actpass".
JSEP implementations are required to always generate offers with
"actpass", but remote endpoints are not. So we should accept remote
offers with the current negotiated DTLS role.

This was recently clarified in dtls-sdp; it was somewhat ambiguous
before.

Also doing a bit of refactoring of JsepTransport (making a method
private that should have been private, fixing unit tests that were
directly calling said method).

BUG=webrtc:7072

Review-Url: https://codereview.webrtc.org/2770903003
Cr-Commit-Position: refs/heads/master@{#17396}
2017-03-27 17:33:26 +00:00
deadbeef
f137e97adb Revert of Removing HTTPS and SOCKS proxy server code. (patchset #2 id:20001 of https://codereview.webrtc.org/2731673002/ )
Also needed to revert these CLs, which removed code used by the
code being un-removed:
https://codereview.webrtc.org/2745523004
https://codereview.webrtc.org/2754033003
https://codereview.webrtc.org/2758943002

Reason for revert:
This code is still being used by native application developers, so we should send a PSA announcing the deprecation and suggest an alternative before removing it.

Original issue's description:
> Removing HTTPS and SOCKS proxy server code.
>
> This isn't used any more so there's no point in maintaining it.
>
> BUG=None
>
> Review-Url: https://codereview.webrtc.org/2731673002
> Cr-Commit-Position: refs/heads/master@{#17016}
> Committed: a1991c5175

TBR=pthatcher@webrtc.org
NOPRESUBMIT=true
NOTRY=true
BUG=None

Review-Url: https://codereview.webrtc.org/2766063005
Cr-Commit-Position: refs/heads/master@{#17369}
2017-03-23 22:45:49 +00:00
zhihuang
38989e593c Parse the connection data in SDP (c= line).
Extract the remote addresses from SDP c= line on both session level and
media level. The media level address will overwrite the session level one if
exists.

WebRTC is not using c= and this is used for new SDP parsing API.

BUG=webrtc:7311

Review-Url: https://codereview.webrtc.org/2742903002
Cr-Commit-Position: refs/heads/master@{#17326}
2017-03-21 18:04:53 +00:00
zstein
abbacbf489 Measure packet loss so we can use it to select ICE candidate pairs.
BUG=webrtc:7028

Review-Url: https://codereview.webrtc.org/2722933002
Cr-Commit-Position: refs/heads/master@{#17313}
2017-03-20 17:53:12 +00:00
deadbeef
42a4263728 Making candidate pool size behave as decided in JSEP.
To simplify things, the candidate pool is only used in the first
offer/answer.

After setting a local description, the size is frozen, and changing ICE
servers won't refresh the pool.

After setting an answer, the pooled candidates are discarded.

BUG=webrtc:5180

Review-Url: https://codereview.webrtc.org/2717893003
Cr-Commit-Position: refs/heads/master@{#17178}
2017-03-10 23:18:00 +00:00
deadbeef
8f33fb3419 Replace "timout" with "timeout" in log message.
BUG=None
TBR=pthatcher@webrtc.org
NOTRY=True

Review-Url: https://codereview.webrtc.org/2742883002
Cr-Commit-Position: refs/heads/master@{#17155}
2017-03-09 23:54:22 +00:00
zhihuang
b09b3f9a62 Add the option to disable IPv6 ICE candidates on WiFi.
Add an attribute to the RTCConfiguration which can be used by specific
mobile devices so that the IPv6 ICE candidates on WiFi will not be collected.

BUG=b/35725283

Review-Url: https://codereview.webrtc.org/2731813002
Cr-Commit-Position: refs/heads/master@{#17100}
2017-03-07 22:40:51 +00:00
zstein
ad94c4c5d9 Replace StunMessage's vector<StunAttribute*>* with a
vector<unique_ptr<StunAttribute>> as suggested in a TODO.

BUG=NONE

Review-Url: https://codereview.webrtc.org/2735523002
Cr-Commit-Position: refs/heads/master@{#17076}
2017-03-06 21:36:05 +00:00
deadbeef
a1991c5175 Removing HTTPS and SOCKS proxy server code.
This isn't used any more so there's no point in maintaining it.

BUG=None

Review-Url: https://codereview.webrtc.org/2731673002
Cr-Commit-Position: refs/heads/master@{#17016}
2017-03-03 18:23:08 +00:00
zhihuang
2c48d0c531 Relanding: Remove the IceTransportInternal2.
Introduing IceTransportInternal2 is a temporary fix to switch the base
class of P2PTransportChannel to IceTransportInternal without breaking
Chromium. It is removed in this CL.

Reland this CL after Chromium doesn't depend on this.

BUG=webrtc:6951

Review-Url: https://codereview.webrtc.org/2632563002
Cr-Original-Commit-Position: refs/heads/master@{#16131}
Committed: c7953fa716
Review-Url: https://codereview.webrtc.org/2632563002
Cr-Commit-Position: refs/heads/master@{#16960}
2017-03-02 06:47:18 +00:00
hbos
bf8d3e572c RTCIceCandidatePairStats.[total/current]RoundTripTime collected.
Collected in accordance with the spec:
https://w3c.github.io/webrtc-stats/#candidatepair-dict*

totalRoundTripTime is collected as the sum of rtt measurements, it was
previously not collected.
currentRoundTripTime is collected as the latest rtt measurement, it
was previously collected as a smoothed value, which was incorrect.

Connection is updated to collect these values which are surfaced
through ConnectionInfo.

BUG=webrtc:7062, webrtc:7204

Review-Url: https://codereview.webrtc.org/2719523002
Cr-Commit-Position: refs/heads/master@{#16905}
2017-02-28 14:34:47 +00:00
hbos
92eaec6104 RTCIceCandidatePairStats.nominated collected.
Connection::nominated() is updated to mean
(remote_nomination_ || acked_nomination_), which means both a
controlling and controlled agent can be said to be "nominated".
Previously this was (remote_nomination_ > 0) which only applies to the
controlling agent.

PortTest.TestNomination added to test nomination values and nomination
stat.

This value is surfaced through cricket::ConnectionInfo::nominated.
RTCStatsCollector uses this value in its collection of
RTCIceCandidatePairStats.

RTCStatsCollectorTest.CollectRTCIceCandidatePairStats updated to test
that ConnectionInfo::nominated is surfaced using mocks.
rtcstats_integrationtest.cc updated to expect nomination set without
using mocks.

Spec: https://w3c.github.io/webrtc-stats/#dom-rtcicecandidatepairstats-nominated

BUG=webrtc:7062, webrtc:7204

Review-Url: https://codereview.webrtc.org/2709293004
Cr-Commit-Position: refs/heads/master@{#16855}
2017-02-27 09:38:08 +00:00
deadbeef
e814a0dee0 Adding "adapter" ORTC objects on top of ChannelManager/BaseChannel/etc.
This CL adds the following interfaces:
* RtpTransportController
* RtpTransport
* RtpSender
* RtpReceiver

They're implemented on top of the "BaseChannel" object, which is normally used
in a PeerConnection, and roughly corresponds to an SDP "m=" section. As a result
of this, there are several limitations:

* You can only have one of each type of sender and receiver (audio/video) on top
  of the same transport controller.
* The sender/receiver with the same media type must use the same RTP transport.
* You can't change the transport after creating the sender or receiver.
* Some of the parameters aren't supported.

Later, these "adapter" objects will be gradually replaced by real objects that don't
have these limitations, as "BaseChannel", "MediaChannel" and related code is
restructured. In this CL, we essentially have:

ORTC adapter objects -> BaseChannel -> Media engine
PeerConnection -> BaseChannel -> Media engine

And later we hope to have simply:

PeerConnection -> "Real" ORTC objects -> Media engine

See the linked bug for more context.

BUG=webrtc:7013
TBR=stefan@webrtc.org

Review-Url: https://codereview.webrtc.org/2675173003
Cr-Commit-Position: refs/heads/master@{#16842}
2017-02-26 02:15:09 +00:00
deadbeef
b789253661 Accept SDP with TRANSPORT attributes missing from bundled m= sections.
Where "TRANSPORT attributes" refers to:
https://tools.ietf.org/html/draft-ietf-mmusic-sdp-mux-attributes-16

The BUNDLE draft now says that these attributes can
(in fact, MUST) be omitted when m= sections are bundled
(they only need to go in one of the bundled m= sections),
so we should start accepting that SDP.

This CL doesn't fix "a=rtcp-mux", unfortunately. That will be easier
to fix once we've split apart an "RtpTransport" object from
BaseChannel.

BUG=webrtc:6351

Review-Url: https://codereview.webrtc.org/2647593003
Cr-Commit-Position: refs/heads/master@{#16782}
2017-02-23 03:35:18 +00:00
deadbeef
8d517c4170 Rewrite of sigslot that avoids vtables.
This reduces binary size considerably and solves some other problems.

Also rewrote using variadic templates.

Initial patch contributed by andrey.semashev@gmail.com.

BUG=webrtc:2305

Review-Url: https://codereview.webrtc.org/2509733003
Cr-Commit-Position: refs/heads/master@{#16703}
2017-02-19 22:12:24 +00:00
deadbeef
dbeeb701a2 Use rtc::ToString instead of std::to_string.
std::to_string isn't usable in some versions of the Android NDK.

BUG=webrtc:7174
TBR=pthatcher@webrtc.org

Review-Url: https://codereview.webrtc.org/2697313003
Cr-Commit-Position: refs/heads/master@{#16651}
2017-02-16 19:10:51 +00:00
Peter Boström
2758c664b4 Fix the build break by keeping the old Port::AddAddress method since the
downstream application depends on it.
Mark the old Port::AddAddress deprecated and will be removed after the
applications stop replying on it.

BUG=None.
R=deadbeef@webrtc.org

Review-Url: https://codereview.webrtc.org/2694103003 .
Cr-Commit-Position: refs/heads/master@{#16598}
2017-02-14 01:33:27 +00:00
zhihuang
26d99c2e28 Add the URL attribute to cricket::Candiate.
The URL of the ICE server will be reconstructed by the Port and the URL
attribute is added to the cricket::Candidate struct so that we can tell
which ICE server the candidate was gathered from.

This CL only changes the native C++ code. The Java and Objc wrapper will
be created in separate CLs.

BUG=webrtc::7128

Review-Url: https://codereview.webrtc.org/2685053004
Cr-Commit-Position: refs/heads/master@{#16591}
2017-02-13 20:47:27 +00:00
deadbeef
5bd5ca344e Rename "PacketTransportInterface" to "PacketTransportInternal".
This is the naming scheme we've been using for internal interfaces.

Also, this CL will introduce a PacketTransportInterface in the webrtc namespace,
which would get too easily confused with the rtc:: one:
https://codereview.webrtc.org/2675173003/

BUG=None

Review-Url: https://codereview.webrtc.org/2679103006
Cr-Commit-Position: refs/heads/master@{#16539}
2017-02-10 19:31:50 +00:00
pthatcher
94a2f21c05 Increase STUN RTOs to work better on poor networks, such as 2G networks.
BUG=b/34822484

Review-Url: https://codereview.webrtc.org/2677743002
Cr-Commit-Position: refs/heads/master@{#16503}
2017-02-08 22:42:22 +00:00