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/webrtcsdp.h b/webrtc/api/webrtcsdp.h
index 2b22b62..e7fdb34 100644
--- a/webrtc/api/webrtcsdp.h
+++ b/webrtc/api/webrtcsdp.h
@@ -22,8 +22,11 @@
#include <string>
-namespace webrtc {
+namespace cricket {
+class Candidate;
+} // namespace cricket
+namespace webrtc {
class IceCandidateInterface;
class JsepIceCandidate;
class JsepSessionDescription;
@@ -42,6 +45,10 @@
// candidate - The candidate to be serialized.
std::string SdpSerializeCandidate(const IceCandidateInterface& candidate);
+// Serializes a cricket Candidate.
+// candidate - The candidate to be serialized.
+std::string SdpSerializeCandidate(const cricket::Candidate& candidate);
+
// Deserializes the passed in SDP string to a JsepSessionDescription.
// message - SDP string to be Deserialized.
// jdesc - The JsepSessionDescription deserialized from the SDP string.
@@ -61,6 +68,20 @@
bool SdpDeserializeCandidate(const std::string& message,
JsepIceCandidate* candidate,
SdpParseError* error);
+
+// Deserializes the passed in SDP string to a cricket Candidate.
+// The first line must be a=candidate line and only the first line will be
+// parsed.
+// transport_name - The transport name (MID) of the candidate.
+// message - The SDP string to be deserialized.
+// candidate - The cricket Candidate from the SDP string.
+// error - The detail error information when parsing fails.
+// return - true on success, false on failure.
+bool SdpDeserializeCandidate(const std::string& transport_name,
+ const std::string& message,
+ cricket::Candidate* candidate,
+ SdpParseError* error);
+
} // namespace webrtc
#endif // WEBRTC_API_WEBRTCSDP_H_