Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: webrtc/api/webrtcsessiondescriptionfactory.cc

Issue 2563153002: Implement the "needs-ice-restart" logic for SetConfiguration. (Closed)
Patch Set: Fixing signed/unsigned comparison warning. Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | webrtc/p2p/base/jseptransport.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2013 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 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 break; 331 break;
332 } 332 }
333 default: 333 default:
334 ASSERT(false); 334 ASSERT(false);
335 break; 335 break;
336 } 336 }
337 } 337 }
338 338
339 void WebRtcSessionDescriptionFactory::InternalCreateOffer( 339 void WebRtcSessionDescriptionFactory::InternalCreateOffer(
340 CreateSessionDescriptionRequest request) { 340 CreateSessionDescriptionRequest request) {
341 if (session_->local_description()) {
342 for (const cricket::TransportInfo& transport :
343 session_->local_description()->description()->transport_infos()) {
344 // If the needs-ice-restart flag is set as described by JSEP, we should
345 // generate an offer with a new ufrag/password to trigger an ICE restart.
346 if (session_->NeedsIceRestart(transport.content_name)) {
347 request.options.transport_options[transport.content_name].ice_restart =
348 true;
349 }
350 }
351 }
352
341 cricket::SessionDescription* desc(session_desc_factory_.CreateOffer( 353 cricket::SessionDescription* desc(session_desc_factory_.CreateOffer(
342 request.options, session_->local_description() 354 request.options, session_->local_description()
343 ? session_->local_description()->description() 355 ? session_->local_description()->description()
344 : nullptr)); 356 : nullptr));
345 // RFC 3264 357 // RFC 3264
346 // When issuing an offer that modifies the session, 358 // When issuing an offer that modifies the session,
347 // the "o=" line of the new SDP MUST be identical to that in the 359 // the "o=" line of the new SDP MUST be identical to that in the
348 // previous SDP, except that the version in the origin field MUST 360 // previous SDP, except that the version in the origin field MUST
349 // increment by one from the previous SDP. 361 // increment by one from the previous SDP.
350 362
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 if (create_session_description_requests_.front().type == 500 if (create_session_description_requests_.front().type ==
489 CreateSessionDescriptionRequest::kOffer) { 501 CreateSessionDescriptionRequest::kOffer) {
490 InternalCreateOffer(create_session_description_requests_.front()); 502 InternalCreateOffer(create_session_description_requests_.front());
491 } else { 503 } else {
492 InternalCreateAnswer(create_session_description_requests_.front()); 504 InternalCreateAnswer(create_session_description_requests_.front());
493 } 505 }
494 create_session_description_requests_.pop(); 506 create_session_description_requests_.pop();
495 } 507 }
496 } 508 }
497 } // namespace webrtc 509 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | webrtc/p2p/base/jseptransport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698