Reland the CL to remove candidates when doing continual gathering
When doing candidate re-gathering in the same ICE generation, signal the remote side to remove its remote candidates.
Fixed the pure virtual method in jsep.h
BUG=
R=glaznev@webrtc.org, pthatcher@webrtc.org
Review URL: https://codereview.webrtc.org/1788703003 .
Cr-Commit-Position: refs/heads/master@{#11985}
diff --git a/webrtc/api/peerconnection.cc b/webrtc/api/peerconnection.cc
index e4ab40e..54e76d4 100644
--- a/webrtc/api/peerconnection.cc
+++ b/webrtc/api/peerconnection.cc
@@ -1205,6 +1205,12 @@
return session_->ProcessIceMessage(ice_candidate);
}
+bool PeerConnection::RemoveIceCandidates(
+ const std::vector<cricket::Candidate>& candidates) {
+ TRACE_EVENT0("webrtc", "PeerConnection::RemoveIceCandidates");
+ return session_->RemoveRemoteIceCandidates(candidates);
+}
+
void PeerConnection::RegisterUMAObserver(UMAObserver* observer) {
TRACE_EVENT0("webrtc", "PeerConnection::RegisterUmaObserver");
uma_observer_ = observer;
@@ -1384,6 +1390,12 @@
observer_->OnIceCandidate(candidate);
}
+void PeerConnection::OnIceCandidatesRemoved(
+ const std::vector<cricket::Candidate>& candidates) {
+ RTC_DCHECK(signaling_thread()->IsCurrent());
+ observer_->OnIceCandidatesRemoved(candidates);
+}
+
void PeerConnection::OnIceConnectionReceivingChange(bool receiving) {
RTC_DCHECK(signaling_thread()->IsCurrent());
observer_->OnIceConnectionReceivingChange(receiving);