21 Commits

Author SHA1 Message Date
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
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
deadbeef
d8cf08f166 Don't call CreateDtlsTransport_n from non-network thread in WebRtcSession
I'm not sure if it's possible to hit this code any more, but better
safe than sorry.

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

Review-Url: https://codereview.webrtc.org/2978573002
Cr-Commit-Position: refs/heads/master@{#18960}
2017-07-11 03:06:59 +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
zhihuang
38ede13042 Support building WebRTC without audio and video.
This CL makes the WebRTC more modular and allows the users to build
WebRTC without audio and video(DataChannel only).

The BUILD files in call/, logging/, media/ and pc/ are modified to
support modular WebRTC.

The dependencies on Call and RtcEventLog are removed from the
PeerConnection. Instead of being created internally, they would be
passed in by the PeerConnectionFactory.

Add the CreateModularPeerConnectionFactory function which allow the
users to create a PeerConnectionFactory with the modules they need.
If the users want to build WebRTC without audio and video, they can
pass in null pointers for modules they don't need. (MediaEngine,
VideoEncoderFactory etc.)

BUG=webrtc:7613

Review-Url: https://codereview.webrtc.org/2854123003
Cr-Commit-Position: refs/heads/master@{#18617}
2017-06-15 19:52:32 +00:00
stefan
f79ade1320 Revert "Revert of Wire up BWE stats through WebrtcSession so that they are filled in both for audio and video calls. (patchset #8 id:140001 of https://codereview.webrtc.org/2863123002/ )"
This reverts commit d72098a41971833e210bfdcffaab7a18ced4775f.

BUG=webrtc:5079

Review-Url: https://codereview.webrtc.org/2915263002
Cr-Commit-Position: refs/heads/master@{#18411}
2017-06-02 13:44:03 +00:00
charujain
d72098a419 Revert of Wire up BWE stats through WebrtcSession so that they are filled in both for audio and video calls. (patchset #8 id:140001 of https://codereview.webrtc.org/2863123002/ )
Reason for revert:
Broken downstream projects

Original issue's description:
> Wire up BWE stats through WebrtcSession so that they are filled in both for audio and video calls.
>
> Prior to this CL Call::Stats were collected via WebRtcVideoEngine2, but not via WebRtcVoiceEngine, causing these stats to be missing for audio-only calls. Call lives on the peerconnection/session level and should only be collected once independent on how many streams we have.
>
> BUG=webrtc:5079
> R=deadbeef@webrtc.org, hbos@webrtc.org
>
> Review-Url: https://codereview.webrtc.org/2863123002 .
> Cr-Commit-Position: refs/heads/master@{#18384}
> Committed: e80f4c91d0

TBR=hbos@webrtc.org,deadbeef@webrtc.org,holmer@google.com,stefan@webrtc.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=webrtc:5079

Review-Url: https://codereview.webrtc.org/2916793003
Cr-Commit-Position: refs/heads/master@{#18386}
2017-06-01 15:54:47 +00:00
Stefan Holmer
e80f4c91d0 Wire up BWE stats through WebrtcSession so that they are filled in both for audio and video calls.
Prior to this CL Call::Stats were collected via WebRtcVideoEngine2, but not via WebRtcVoiceEngine, causing these stats to be missing for audio-only calls. Call lives on the peerconnection/session level and should only be collected once independent on how many streams we have.

BUG=webrtc:5079
R=deadbeef@webrtc.org, hbos@webrtc.org

Review-Url: https://codereview.webrtc.org/2863123002 .
Cr-Commit-Position: refs/heads/master@{#18384}
2017-06-01 14:29:30 +00:00
nisse
eaabdf6259 Delete MediaController class, move Call ownership to PeerConnection.
BUG=webrtc:7135

Review-Url: https://codereview.webrtc.org/2794943002
Cr-Commit-Position: refs/heads/master@{#18026}
2017-05-05 09:23:02 +00:00
jbauch
81bf7b0725 Pass ownership of candidate to PeerConnection::OnIceCandidate
This will later allow calling the "PeerConnectionObserver::OnIceCandidate"
method asynchronously while keeping the object alive.

BUG=webrtc:3721

Review-Url: https://codereview.webrtc.org/2748253003
Cr-Commit-Position: refs/heads/master@{#17380}
2017-03-25 15:31:12 +00:00
zstein
6dfd53a81e Rename PeerConnection::OnIceConnectionChange to OnIceConnectionStateChange
for consistency with the WebRTC 1.0 standard as suggested in a TODO.

BUG=None

Review-Url: https://codereview.webrtc.org/2732663004
Cr-Commit-Position: refs/heads/master@{#17077}
2017-03-06 21:49:03 +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
1a2183d0c3 Removing unnecessary parameters from CreateXChannel methods.
"bundle_transport_name" is no longer relevant here, and
"rtcp_mux_required" is implied by whether or not an RTCP transport is
passed in.

BUG=None

Review-Url: https://codereview.webrtc.org/2689503002
Cr-Commit-Position: refs/heads/master@{#16551}
2017-02-11 07:44:49 +00:00
skvlad
5107246d4b Allow applications to limit the ICE check rate through RTCConfiguration
If an application sets a non-null value in RTCConfiguration.iceCheckMinInterval, we do not sent STUN pings more often than that. This is useful for bandwidth constrained scenarios.

This CL also increases the maximum STUN ping timeout to 60 seconds up from its previous value of 5 (which meant that a ping response received 5 seconds later would not be counted), and allows the RTT estimate to go up to 60 seconds from its previous limit of 3. RTTs above 3 seconds are possible on mobile links. (webrtc:7109)

This CL was originally written by pthatcher@, I am just submitting it after a minor cleanup.

BUG=webrtc:7082, webrtc:7109

Review-Url: https://codereview.webrtc.org/2670053002
Cr-Commit-Position: refs/heads/master@{#16421}
2017-02-02 19:50:14 +00:00
deadbeef
20cb0c1c85 Move DTMF sender to RtpSender (as opposed to WebRtcSession).
Previously in the spec, there was a createDtmfSender method on
PeerConnection, but that's been replaced by a "dtmf" attribute
on RtpSender, which allows getting a DTMF sender without having
an audio track.

This also simplifies the code slightly, since tracks are now not
necessary for identification.

BUG=webrtc:4180

Review-Url: https://codereview.webrtc.org/2666853002
Cr-Commit-Position: refs/heads/master@{#16409}
2017-02-02 04:27:00 +00:00
nisse
7ce109acd3 Replace the easy cases of VERIFY usage.
BUG=webrtc:6424

Review-Url: https://codereview.webrtc.org/2652653012
Cr-Commit-Position: refs/heads/master@{#16370}
2017-01-31 08:57:56 +00:00
ossu
7bb87ee4e8 Create //webrtc/api:libjingle_peerconnection_api + refactorings.
Create a new target //webrtc/api:libjingle_peerconnection_api and start moving
things into it. Move remaining parts of //webrtc/api:libjingle_peerconnection
to //webrtc/pc:libjingle_peerconnection.

Moved the RTCStatsCollectorCallback into its own header file, so that
PeerConnectionInterface can include that instead of pulling in
RTCStatsCollector and PeerConnection and everything.

Separated cricket::MediaType into its own header/source set, so that it
can be used in the api.

BUG=webrtc:5883

Review-Url: https://codereview.webrtc.org/2514883002
Cr-Commit-Position: refs/heads/master@{#16210}
2017-01-23 12:56:25 +00:00