Add CreateIceCandidate overload which takes a cricket::Candidate
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}
diff --git a/api/jsep.h b/api/jsep.h
index b07f858..cbc0a6c 100644
--- a/api/jsep.h
+++ b/api/jsep.h
@@ -78,6 +78,12 @@
const std::string& sdp,
SdpParseError* error);
+// Creates an IceCandidateInterface based on a parsed candidate structure.
+std::unique_ptr<IceCandidateInterface> CreateIceCandidate(
+ const std::string& sdp_mid,
+ int sdp_mline_index,
+ const cricket::Candidate& candidate);
+
// This class represents a collection of candidates for a specific m= section.
// Used in SessionDescriptionInterface.
class IceCandidateCollection {