diff --git a/pc/webrtc_sdp.cc b/pc/webrtc_sdp.cc index 094525a8b6..1b2ff158b4 100644 --- a/pc/webrtc_sdp.cc +++ b/pc/webrtc_sdp.cc @@ -335,10 +335,6 @@ static bool ParseFmtpParam(const std::string& line, std::string* parameter, std::string* value, SdpParseError* error); -static bool ParseCandidate(const std::string& message, - Candidate* candidate, - SdpParseError* error, - bool is_raw); static bool ParseRtcpFbAttribute(const std::string& line, const cricket::MediaType media_type, MediaContentDescription* media_desc, diff --git a/pc/webrtc_sdp.h b/pc/webrtc_sdp.h index 1d1e7aa4e6..3ba5c7f2be 100644 --- a/pc/webrtc_sdp.h +++ b/pc/webrtc_sdp.h @@ -84,6 +84,17 @@ RTC_EXPORT bool SdpDeserializeCandidate(const std::string& transport_name, cricket::Candidate* candidate, SdpParseError* error); +// Parses |message| according to the grammar defined in RFC 5245, Section 15.1 +// and, if successful, stores the result in |candidate| and returns true. +// If unsuccessful, returns false and stores error information in |error| if +// |error| is not null. +// If |is_raw| is false, |message| is expected to be prefixed with "a=". +// If |is_raw| is true, no prefix is expected in |messaage|. +RTC_EXPORT bool ParseCandidate(const std::string& message, + cricket::Candidate* candidate, + SdpParseError* error, + bool is_raw); + } // namespace webrtc #endif // PC_WEBRTC_SDP_H_