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 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 std::vector<std::string> sub_fields; | 1172 std::vector<std::string> sub_fields; |
1173 rtc::split(value_direction, kSdpDelimiterSlash, &sub_fields); | 1173 rtc::split(value_direction, kSdpDelimiterSlash, &sub_fields); |
1174 int value = 0; | 1174 int value = 0; |
1175 if (!GetValueFromString(line, sub_fields[0], &value, error)) { | 1175 if (!GetValueFromString(line, sub_fields[0], &value, error)) { |
1176 return false; | 1176 return false; |
1177 } | 1177 } |
1178 | 1178 |
1179 bool encrypted = false; | 1179 bool encrypted = false; |
1180 if (uri == RtpExtension::kEncryptHeaderExtensionsUri) { | 1180 if (uri == RtpExtension::kEncryptHeaderExtensionsUri) { |
1181 // RFC 6904 | 1181 // RFC 6904 |
1182 // a=extmap:<value["/"<direction>] urn:ietf:params:rtp-hdrext:encrypt \ | 1182 // a=extmap:<value["/"<direction>] urn:ietf:params:rtp-hdrext:encrypt <URI>
<extensionattributes> |
1183 // <URI> <extensionattributes> | |
1184 const size_t expected_min_fields_encrypted = expected_min_fields + 1; | 1183 const size_t expected_min_fields_encrypted = expected_min_fields + 1; |
1185 if (fields.size() < expected_min_fields_encrypted) { | 1184 if (fields.size() < expected_min_fields_encrypted) { |
1186 return ParseFailedExpectMinFieldNum(line, expected_min_fields_encrypted, | 1185 return ParseFailedExpectMinFieldNum(line, expected_min_fields_encrypted, |
1187 error); | 1186 error); |
1188 } | 1187 } |
1189 | 1188 |
1190 encrypted = true; | 1189 encrypted = true; |
1191 uri = fields[2]; | 1190 uri = fields[2]; |
1192 if (uri == RtpExtension::kEncryptHeaderExtensionsUri) { | 1191 if (uri == RtpExtension::kEncryptHeaderExtensionsUri) { |
1193 return ParseFailed(line, "Recursive encrypted header.", error); | 1192 return ParseFailed(line, "Recursive encrypted header.", error); |
(...skipping 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3315 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( | 3314 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( |
3316 media_desc, payload_type, feedback_param); | 3315 media_desc, payload_type, feedback_param); |
3317 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { | 3316 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { |
3318 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( | 3317 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( |
3319 media_desc, payload_type, feedback_param); | 3318 media_desc, payload_type, feedback_param); |
3320 } | 3319 } |
3321 return true; | 3320 return true; |
3322 } | 3321 } |
3323 | 3322 |
3324 } // namespace webrtc | 3323 } // namespace webrtc |
OLD | NEW |