This gives clients a clear way to create an IceCandidateInterface
instance for use with PeerConnection from a parsed
cricket::Candidate structure.
Previously, the only way was with the JsepIceCandidate constructor,
but this CL will allow us to move that class out of the API.
Bug: webrtc:9544
Change-Id: Idfc1f1e0f5ee4c68d94599aae3fb824b23189a7c
Reviewed-on: https://webrtc-review.googlesource.com/90121
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#24074}
This is a no-op change because rtc::Optional is an alias to absl::optional
This CL generated by running script with parameter 'pc'
find $@ -type f \( -name \*.h -o -name \*.cc \) \
-exec sed -i 's|rtc::Optional|absl::optional|g' {} \+ \
-exec sed -i 's|rtc::nullopt|absl::nullopt|g' {} \+ \
-exec sed -i 's|#include "api/optional.h"|#include "absl/types/optional.h"|' {} \+
find $@ -type f -name BUILD.gn \
-exec sed -r -i 's|"[\./api]*:optional"|"//third_party/abseil-cpp/absl/types:optional"|' {} \+;
git cl format
Bug: webrtc:9078
Change-Id: Ide3b9eb32df7f25991f898ac58fcb119c9f8ae12
Reviewed-on: https://webrtc-review.googlesource.com/84181
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23669}
Running clang-format with chromium's style guide.
The goal is n-fold:
* providing consistency and readability (that's what code guidelines are for)
* preventing noise with presubmit checks and git cl format
* building on the previous point: making it easier to automatically fix format issues
* you name it
Please consider using git-hyper-blame to ignore this commit.
Bug: webrtc:9340
Change-Id: I694567c4cdf8cee2860958cfe82bfaf25848bb87
Reviewed-on: https://webrtc-review.googlesource.com/81185
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23660}
To prepare for making the software codecs optional and injectable, these
codec factories provide a way to pass in identical factories as were the
default old behaviour.
Bug: webrtc:7925
Change-Id: I0c70fa3c56c999e9d1af6e172eff2fbba849e921
Reviewed-on: https://webrtc-review.googlesource.com/71162
Commit-Queue: Anders Carlsson <andersc@webrtc.org>
Reviewed-by: Magnus Jedvert <magjed@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23096}
This attempts to make it more clear that an offer or answer with
no transports will no start ICE.
Bug: None
Change-Id: Ifb8d9e445b8fbef1fb1590477dd6bdb4fc651a90
Reviewed-on: https://webrtc-review.googlesource.com/73640
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23070}
This brings the implementations in line with the WebRTC
specification.
Bug: chromium:829238
Change-Id: I7ef64e7b6ccf0e9f60f017443565494239ff19cc
Reviewed-on: https://webrtc-review.googlesource.com/71961
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Seth Hampson <shampson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#23013}
This was working before, but somewhat by accident (because an error
wasn't being surfaced).
This CL also starts surfacing that error, from
JsepTransportController::AddRemoteCandidates to PeerConnection.
Bug: None
Change-Id: Ib48c9c00ea2a5baa5f7e3210c5dc7a339498b2d0
Reviewed-on: https://webrtc-review.googlesource.com/69015
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22830}
This prepares us for removing them altogether.
Bug: webrtc:8982
Change-Id: I66002cc8d4bf0e07925766d568d2498422f0f38e
Reviewed-on: https://webrtc-review.googlesource.com/64142
Commit-Queue: Jonas Olsson <jonasolsson@webrtc.org>
Reviewed-by: Henrik Grunell <henrikg@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Reviewed-by: Per Kjellander <perkj@webrtc.org>
Reviewed-by: Henrik Lundin <henrik.lundin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22707}
The TransportController will be replaced by the JsepTransportController
and JsepTransport will be replace be JsepTransport2.
The JsepTransportController will take the entire SessionDescription
and handle the RtcpMux, Sdes and BUNDLE internally.
The ownership model is also changed. The P2P layer transports are not
ref-counted and will be owned by the JsepTransport2.
In ORTC aspect, RtpTransportAdapter is now a wrapper over RtpTransport
or SrtpTransport and it implements the public and internal interface
by calling the transport underneath.
Bug: webrtc:8587
Change-Id: Ia7fa61288a566f211f8560072ea0eecaf19e48df
Reviewed-on: https://webrtc-review.googlesource.com/59586
Commit-Queue: Zhi Huang <zhihuang@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22693}
candidate keepalive intervals.
StunStats for a STUN candidate cannot be updated after the initial report
in the stats collector. This is caused by the early return of cached
candidate reports for future queries after the initial report creation.
The STUN keepalive interval cannot be configured for UDPPort because of
incorrect type screening, where only StunPort was supported.
TBR=pthatcher@webrtc.org
Bug: webrtc:8951
Change-Id: I0c9c414f43e6327985be6e541e17b5d6f248a79d
Reviewed-on: https://webrtc-review.googlesource.com/58560
Commit-Queue: Qingsi Wang <qingsi@google.com>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22278}
Original change's description:
> Set session error if SetLocal/RemoteDescription ever fails
>
> This changes SetLocalDescription/SetRemoteDescription to set a
> session error which will cause any future calls to fail early if
> there is an error when applying a session description.
>
> This is needed since until better error recovery is implemented
> failing a call to SetLocalDescription or SetRemoteDescription
> could leave the PeerConnection in an inconsistent state.
>
> Bug: chromium:800775
> Change-Id: If06fd73d6e902af15d072dc562bbe830d3b11ad5
> Reviewed-on: https://webrtc-review.googlesource.com/54061
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22061}
Bug: chromium:800775
Change-Id: I0016108264e013452e9d34239c012baf23240e99
Reviewed-on: https://webrtc-review.googlesource.com/54720
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22067}
This reverts commit 71439a60e7.
Reason for revert: https://ci.chromium.org/buildbot/chromium.webrtc.fyi/Mac%20Tester/47796
Original change's description:
> Set session error if SetLocal/RemoteDescription ever fails
>
> This changes SetLocalDescription/SetRemoteDescription to set a
> session error which will cause any future calls to fail early if
> there is an error when applying a session description.
>
> This is needed since until better error recovery is implemented
> failing a call to SetLocalDescription or SetRemoteDescription
> could leave the PeerConnection in an inconsistent state.
>
> Bug: chromium:800775
> Change-Id: If06fd73d6e902af15d072dc562bbe830d3b11ad5
> Reviewed-on: https://webrtc-review.googlesource.com/54061
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#22061}
TBR=steveanton@webrtc.org,deadbeef@webrtc.org
Change-Id: I8af271f2b6dd6a896e390a6fe736e809329b4f4a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:800775
Reviewed-on: https://webrtc-review.googlesource.com/54700
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22063}
This changes SetLocalDescription/SetRemoteDescription to set a
session error which will cause any future calls to fail early if
there is an error when applying a session description.
This is needed since until better error recovery is implemented
failing a call to SetLocalDescription or SetRemoteDescription
could leave the PeerConnection in an inconsistent state.
Bug: chromium:800775
Change-Id: If06fd73d6e902af15d072dc562bbe830d3b11ad5
Reviewed-on: https://webrtc-review.googlesource.com/54061
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22061}
This changes the StatsCollector to handle stats from multiple
MediaChannels of the same type (e.g., audio or video).
Bug: webrtc:8764
Change-Id: I91ba50d10cf469420189a311acdafbf6f78579b2
Reviewed-on: https://webrtc-review.googlesource.com/49560
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22009}
Media type is not part of the WebRTC spec for RtpTransceiver, but it is
handy and the RtpSender/RtpReceiver also have it.
Bug: webrtc:7600
Change-Id: I8350069502588bff478db4dc1318329626dcf9be
Reviewed-on: https://webrtc-review.googlesource.com/50560
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21988}
This changes CreateAnswer to become compliant with the WebRTC 1.0
specification which details that createAnswer should fail if the
PeerConnection is in a state other than 'have-remote-offer' or
'have-local-pranswer'.
Bug: webrtc:8813
Change-Id: I7ca41bdebda1ea163aec8815267c1bbfd7d6d11e
Reviewed-on: https://webrtc-review.googlesource.com/47581
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21923}
Original change's description:
> Parameterize PeerConnection signaling tests for Unified Plan
>
> This also changes the behavior of CreateAnswer to fail unless
> the signaling state is kHaveRemoteOffer or kHaveLocalPranswer,
> as per the WebRTC specification.
>
> Bug: webrtc:8765
> Change-Id: I60ac67cd92b17fcbff964afc14d049481e816a28
> Reviewed-on: https://webrtc-review.googlesource.com/41042
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21779}
Bug: webrtc:8813
Change-Id: I9f608fcd0b7aca00b4c1092e271dbd9cd710c38a
Reviewed-on: https://webrtc-review.googlesource.com/46861
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21860}
This reverts commit 65c0a60302.
Reason for revert: Breaking downstream test which was calling CreateAnswer in stable state. Will reland after fixing test.
Original change's description:
> Parameterize PeerConnection signaling tests for Unified Plan
>
> This also changes the behavior of CreateAnswer to fail unless
> the signaling state is kHaveRemoteOffer or kHaveLocalPranswer,
> as per the WebRTC specification.
>
> Bug: webrtc:8765
> Change-Id: I60ac67cd92b17fcbff964afc14d049481e816a28
> Reviewed-on: https://webrtc-review.googlesource.com/41042
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#21779}
TBR=steveanton@webrtc.org,deadbeef@webrtc.org,pthatcher@webrtc.org
Change-Id: I90eacadb217353a7e098826563f5aeaaced52452
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: webrtc:8765
Reviewed-on: https://webrtc-review.googlesource.com/44581
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Taylor Brandstetter <deadbeef@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21781}
This also changes the behavior of CreateAnswer to fail unless
the signaling state is kHaveRemoteOffer or kHaveLocalPranswer,
as per the WebRTC specification.
Bug: webrtc:8765
Change-Id: I60ac67cd92b17fcbff964afc14d049481e816a28
Reviewed-on: https://webrtc-review.googlesource.com/41042
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#21779}
When the initial offer side uses the ICE lite implementation, and
initiates a peer connection with an endpoint with the full
implementation, the offer side assumes the controlled ICE role per
RFC5245 and the remote endpoint MUST take the controlling role.
This logic was partially implemented in SetRemoteTransportDescription in
reflection where the endpoint switches its role to the controlling after
receiving the offer. The bug was caused by the following
SetLocalDescription at the remote endpoint after creating the answer,
which overrides the role to the controlled since it has no initial offer
and the role is not reflected in SetLocalTransportDescription. This
results in no nomination of candidate pairs and timeout of establishing
the peer connection.
The fix adds reflection on one's ICE role in SetLocalTransportDescription.
This fix also takes into account the case when both sides use the lite
implementation of ICE and the initial offer side MUST take the controlling
role per RFC5245 in this case, which is the default behavior in the
current implementation.
Bug: webrtc:8531
Change-Id: I65edd296c155bff51fcdb28709975e6837f302d5
Reviewed-on: https://webrtc-review.googlesource.com/26780
Reviewed-by: Steve Anton <steveanton@webrtc.org>
Reviewed-by: Peter Thatcher <pthatcher@webrtc.org>
Commit-Queue: Qingsi Wang <qingsi@google.com>
Cr-Commit-Position: refs/heads/master@{#21053}
This is a reland of 3df5dcac9b
Original change's description:
> Rewrite WebRtcSession media tests as PeerConnection tests
>
> Bug: webrtc:8222
> Change-Id: I782a3227e30de70eb8f6c26a48723cb3510a84ad
> Reviewed-on: https://webrtc-review.googlesource.com/6640
> Commit-Queue: Steve Anton <steveanton@webrtc.org>
> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
> Cr-Commit-Position: refs/heads/master@{#20364}
Bug: webrtc:8222
Change-Id: I0a5398170d469eb9223bc781bfb417a85a72a2d2
Reviewed-on: https://webrtc-review.googlesource.com/14380
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Steve Anton <steveanton@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20377}
They're about to be removed.
BUG=webrtc:8396
Change-Id: Ie9a45f4c0dccb4414d2a2f939aa5f142edc6e4b6
Reviewed-on: https://webrtc-review.googlesource.com/12280
Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org>
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20328}