| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2011 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 return false; | 1027 return false; |
| 1028 } | 1028 } |
| 1029 const std::string& connection_address = fields[4]; | 1029 const std::string& connection_address = fields[4]; |
| 1030 int port = 0; | 1030 int port = 0; |
| 1031 if (!GetValueFromString(first_line, fields[5], &port, error)) { | 1031 if (!GetValueFromString(first_line, fields[5], &port, error)) { |
| 1032 return false; | 1032 return false; |
| 1033 } | 1033 } |
| 1034 SocketAddress address(connection_address, port); | 1034 SocketAddress address(connection_address, port); |
| 1035 | 1035 |
| 1036 cricket::ProtocolType protocol; | 1036 cricket::ProtocolType protocol; |
| 1037 if (!StringToProto(transport.c_str(), &protocol) || | 1037 if (!StringToProto(transport.c_str(), &protocol)) { |
| 1038 protocol == cricket::PROTO_TLS) { | |
| 1039 return ParseFailed(first_line, "Unsupported transport type.", error); | 1038 return ParseFailed(first_line, "Unsupported transport type.", error); |
| 1040 } | 1039 } |
| 1040 switch (protocol) { |
| 1041 case cricket::PROTO_UDP: |
| 1042 case cricket::PROTO_TCP: |
| 1043 case cricket::PROTO_SSLTCP: |
| 1044 // Supported protocol. |
| 1045 break; |
| 1046 default: |
| 1047 return ParseFailed(first_line, "Unsupported transport type.", error); |
| 1048 } |
| 1041 | 1049 |
| 1042 std::string candidate_type; | 1050 std::string candidate_type; |
| 1043 const std::string& type = fields[7]; | 1051 const std::string& type = fields[7]; |
| 1044 if (type == kCandidateHost) { | 1052 if (type == kCandidateHost) { |
| 1045 candidate_type = cricket::LOCAL_PORT_TYPE; | 1053 candidate_type = cricket::LOCAL_PORT_TYPE; |
| 1046 } else if (type == kCandidateSrflx) { | 1054 } else if (type == kCandidateSrflx) { |
| 1047 candidate_type = cricket::STUN_PORT_TYPE; | 1055 candidate_type = cricket::STUN_PORT_TYPE; |
| 1048 } else if (type == kCandidateRelay) { | 1056 } else if (type == kCandidateRelay) { |
| 1049 candidate_type = cricket::RELAY_PORT_TYPE; | 1057 candidate_type = cricket::RELAY_PORT_TYPE; |
| 1050 } else if (type == kCandidatePrflx) { | 1058 } else if (type == kCandidatePrflx) { |
| (...skipping 2160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3211 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( | 3219 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( |
| 3212 media_desc, payload_type, feedback_param); | 3220 media_desc, payload_type, feedback_param); |
| 3213 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { | 3221 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { |
| 3214 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( | 3222 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( |
| 3215 media_desc, payload_type, feedback_param); | 3223 media_desc, payload_type, feedback_param); |
| 3216 } | 3224 } |
| 3217 return true; | 3225 return true; |
| 3218 } | 3226 } |
| 3219 | 3227 |
| 3220 } // namespace webrtc | 3228 } // namespace webrtc |
| OLD | NEW |