OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1288 // Build the a=candidate lines. We don't include ufrag and pwd in the | 1288 // Build the a=candidate lines. We don't include ufrag and pwd in the |
1289 // candidates in the SDP to avoid redundancy. | 1289 // candidates in the SDP to avoid redundancy. |
1290 BuildCandidate(candidates, false, message); | 1290 BuildCandidate(candidates, false, message); |
1291 | 1291 |
1292 // Use the transport_info to build the media level ice-ufrag and ice-pwd. | 1292 // Use the transport_info to build the media level ice-ufrag and ice-pwd. |
1293 if (transport_info) { | 1293 if (transport_info) { |
1294 // RFC 5245 | 1294 // RFC 5245 |
1295 // ice-pwd-att = "ice-pwd" ":" password | 1295 // ice-pwd-att = "ice-pwd" ":" password |
1296 // ice-ufrag-att = "ice-ufrag" ":" ufrag | 1296 // ice-ufrag-att = "ice-ufrag" ":" ufrag |
1297 // ice-ufrag | 1297 // ice-ufrag |
1298 InitAttrLine(kAttributeIceUfrag, &os); | 1298 if (!transport_info->description.ice_ufrag.empty()) { |
1299 os << kSdpDelimiterColon << transport_info->description.ice_ufrag; | 1299 InitAttrLine(kAttributeIceUfrag, &os); |
1300 AddLine(os.str(), message); | 1300 os << kSdpDelimiterColon << transport_info->description.ice_ufrag; |
| 1301 AddLine(os.str(), message); |
| 1302 } |
1301 // ice-pwd | 1303 // ice-pwd |
1302 InitAttrLine(kAttributeIcePwd, &os); | 1304 if (!transport_info->description.ice_pwd.empty()) { |
1303 os << kSdpDelimiterColon << transport_info->description.ice_pwd; | 1305 InitAttrLine(kAttributeIcePwd, &os); |
1304 AddLine(os.str(), message); | 1306 os << kSdpDelimiterColon << transport_info->description.ice_pwd; |
| 1307 AddLine(os.str(), message); |
| 1308 } |
1305 | 1309 |
1306 // draft-petithuguenin-mmusic-ice-attributes-level-03 | 1310 // draft-petithuguenin-mmusic-ice-attributes-level-03 |
1307 BuildIceOptions(transport_info->description.transport_options, message); | 1311 BuildIceOptions(transport_info->description.transport_options, message); |
1308 | 1312 |
1309 // RFC 4572 | 1313 // RFC 4572 |
1310 // fingerprint-attribute = | 1314 // fingerprint-attribute = |
1311 // "fingerprint" ":" hash-func SP fingerprint | 1315 // "fingerprint" ":" hash-func SP fingerprint |
1312 if (fp) { | 1316 if (fp) { |
1313 // Insert the fingerprint attribute. | 1317 // Insert the fingerprint attribute. |
1314 InitAttrLine(kAttributeFingerprint, &os); | 1318 InitAttrLine(kAttributeFingerprint, &os); |
(...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3073 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( | 3077 UpdateCodec<AudioContentDescription, cricket::AudioCodec>( |
3074 media_desc, payload_type, feedback_param); | 3078 media_desc, payload_type, feedback_param); |
3075 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { | 3079 } else if (media_type == cricket::MEDIA_TYPE_VIDEO) { |
3076 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( | 3080 UpdateCodec<VideoContentDescription, cricket::VideoCodec>( |
3077 media_desc, payload_type, feedback_param); | 3081 media_desc, payload_type, feedback_param); |
3078 } | 3082 } |
3079 return true; | 3083 return true; |
3080 } | 3084 } |
3081 | 3085 |
3082 } // namespace webrtc | 3086 } // namespace webrtc |
OLD | NEW |