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 1014 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1025 return false; | 1025 return false; |
1026 } | 1026 } |
1027 const std::string& connection_address = fields[4]; | 1027 const std::string& connection_address = fields[4]; |
1028 int port = 0; | 1028 int port = 0; |
1029 if (!GetValueFromString(first_line, fields[5], &port, error)) { | 1029 if (!GetValueFromString(first_line, fields[5], &port, error)) { |
1030 return false; | 1030 return false; |
1031 } | 1031 } |
1032 SocketAddress address(connection_address, port); | 1032 SocketAddress address(connection_address, port); |
1033 | 1033 |
1034 cricket::ProtocolType protocol; | 1034 cricket::ProtocolType protocol; |
1035 if (!StringToProto(transport.c_str(), &protocol)) { | 1035 if (!StringToProto(transport.c_str(), &protocol) || |
1036 protocol == cricket::PROTO_TLS) { | |
pthatcher1
2016/12/07 21:29:35
It seems like we should have StringToProtocol and
Taylor Brandstetter
2016/12/08 01:36:40
I don't follow this comment. What does different t
pthatcher1
2016/12/08 02:36:13
Nevermind. I misunderstood this code.
hnsl1
2016/12/12 16:08:13
Acknowledged.
| |
1036 return ParseFailed(first_line, "Unsupported transport type.", error); | 1037 return ParseFailed(first_line, "Unsupported transport type.", error); |
1037 } | 1038 } |
1038 | 1039 |
1039 std::string candidate_type; | 1040 std::string candidate_type; |
1040 const std::string& type = fields[7]; | 1041 const std::string& type = fields[7]; |
1041 if (type == kCandidateHost) { | 1042 if (type == kCandidateHost) { |
1042 candidate_type = cricket::LOCAL_PORT_TYPE; | 1043 candidate_type = cricket::LOCAL_PORT_TYPE; |
1043 } else if (type == kCandidateSrflx) { | 1044 } else if (type == kCandidateSrflx) { |
1044 candidate_type = cricket::STUN_PORT_TYPE; | 1045 candidate_type = cricket::STUN_PORT_TYPE; |
1045 } else if (type == kCandidateRelay) { | 1046 } else if (type == kCandidateRelay) { |
(...skipping 2128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3174 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( | 3175 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( |
3175 media_desc, payload_type, feedback_param); | 3176 media_desc, payload_type, feedback_param); |
3176 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { | 3177 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { |
3177 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( | 3178 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( |
3178 media_desc, payload_type, feedback_param); | 3179 media_desc, payload_type, feedback_param); |
3179 } | 3180 } |
3180 return true; | 3181 return true; |
3181 } | 3182 } |
3182 | 3183 |
3183 } // namespace webrtc | 3184 } // namespace webrtc |
OLD | NEW |