Chromium Code Reviews| Index: talk/app/webrtc/webrtcsdp.cc |
| diff --git a/talk/app/webrtc/webrtcsdp.cc b/talk/app/webrtc/webrtcsdp.cc |
| index f5fb7f78e3334edd7f320d6f3e89f49b25132c4f..77df706c736d375c1ff1721620af4a8ce2b8c1dc 100644 |
| --- a/talk/app/webrtc/webrtcsdp.cc |
| +++ b/talk/app/webrtc/webrtcsdp.cc |
| @@ -169,8 +169,7 @@ static const char kValueConference[] = "conference"; |
| // Candidate |
| static const char kCandidateHost[] = "host"; |
| static const char kCandidateSrflx[] = "srflx"; |
| -// TODO: How to map the prflx with circket candidate type |
| -// static const char kCandidatePrflx[] = "prflx"; |
| +static const char kCandidatePrflx[] = "prflx"; |
| static const char kCandidateRelay[] = "relay"; |
| static const char kTcpCandidateType[] = "tcptype"; |
| @@ -1029,6 +1028,10 @@ bool ParseCandidate(const std::string& message, Candidate* candidate, |
| candidate_type = cricket::STUN_PORT_TYPE; |
| } else if (type == kCandidateRelay) { |
| candidate_type = cricket::RELAY_PORT_TYPE; |
| + } else if (type == kCandidatePrflx) { |
| + candidate_type = cricket::PRFLX_PORT_TYPE; |
| + // Peer reflexive candidate is only signaled to be removed with priority 0. |
| + ASSERT(priority == 0); |
| } else { |
| return ParseFailed(first_line, "Unsupported candidate type.", error); |
| } |
| @@ -1741,6 +1744,8 @@ void BuildCandidate(const std::vector<Candidate>& candidates, |
| type = kCandidateSrflx; |
| } else if (it->type() == cricket::RELAY_PORT_TYPE) { |
| type = kCandidateRelay; |
| + } else if (it->type() == cricket::PRFLX_PORT_TYPE) { |
| + type = kCandidatePrflx; |
|
pthatcher1
2016/02/10 00:01:40
I need to think about this some more, if it makes
honghaiz3
2016/02/10 19:22:43
OK. Let me know.
I think it need and can be remov
pthatcher1
2016/02/11 20:25:51
I think it makes sense to signal a prflx in a remo
|
| } else { |
| ASSERT(false); |
| // Never write out candidates if we don't know the type. |