[PeerConnection] Implement asynchronous version of AddIceCandidate().
This is the same as the existing version, except it uses the Operations Chain. As such, if an asynchronous operation that uses the chain is currently pending, such as CreateOffer() or CreateAnswer(), AddIceCandidate() will not happen until the previous operation completes. Bug: chromium:1019222 Change-Id: Ie6e5fc386fa9c29b5e2f8e3f65bfbaf9837d351c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/158741 Commit-Queue: Henrik Boström <hbos@webrtc.org> Reviewed-by: Steve Anton <steveanton@webrtc.org> Cr-Commit-Position: refs/heads/master@{#29704}
This commit is contained in:
committed by
Commit Bot
parent
1e6aa1f8bf
commit
ee6f4f67ef
@ -1039,7 +1039,14 @@ class RTC_EXPORT PeerConnectionInterface : public rtc::RefCountInterface {
|
||||
// A copy of the |candidate| will be created and added to the remote
|
||||
// description. So the caller of this method still has the ownership of the
|
||||
// |candidate|.
|
||||
// TODO(hbos): The spec mandates chaining this operation onto the operations
|
||||
// chain; deprecate and remove this version in favor of the callback-based
|
||||
// signature.
|
||||
virtual bool AddIceCandidate(const IceCandidateInterface* candidate) = 0;
|
||||
// TODO(hbos): Remove default implementation once implemented by downstream
|
||||
// projects.
|
||||
virtual void AddIceCandidate(std::unique_ptr<IceCandidateInterface> candidate,
|
||||
std::function<void(RTCError)> callback) {}
|
||||
|
||||
// Removes a group of remote candidates from the ICE agent. Needed mainly for
|
||||
// continual gathering, to avoid an ever-growing list of candidates as
|
||||
|
||||
Reference in New Issue
Block a user