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

Side by Side Diff: webrtc/pc/mediasession.cc

Issue 2224563004: Add signaling to support ICE renomination. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Merge Created 4 years, 3 months 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/pc/mediasession.h ('k') | webrtc/pc/mediasession_unittest.cc » ('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 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2004 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 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
679 return false; 679 return false;
680 } 680 }
681 681
682 template <class C> 682 template <class C>
683 static bool IsRtxCodec(const C& codec) { 683 static bool IsRtxCodec(const C& codec) {
684 return stricmp(codec.name.c_str(), kRtxCodecName) == 0; 684 return stricmp(codec.name.c_str(), kRtxCodecName) == 0;
685 } 685 }
686 686
687 static TransportOptions GetTransportOptions(const MediaSessionOptions& options, 687 static TransportOptions GetTransportOptions(const MediaSessionOptions& options,
688 const std::string& content_name) { 688 const std::string& content_name) {
689 TransportOptions transport_options;
689 auto it = options.transport_options.find(content_name); 690 auto it = options.transport_options.find(content_name);
690 if (it == options.transport_options.end()) { 691 if (it != options.transport_options.end()) {
691 return TransportOptions(); 692 transport_options = it->second;
692 } 693 }
693 return it->second; 694 transport_options.enable_ice_renomination = options.enable_ice_renomination;
695 return transport_options;
694 } 696 }
695 697
696 // Create a media content to be offered in a session-initiate, 698 // Create a media content to be offered in a session-initiate,
697 // according to the given options.rtcp_mux, options.is_muc, 699 // according to the given options.rtcp_mux, options.is_muc,
698 // options.streams, codecs, secure_transport, crypto, and streams. If we don't 700 // options.streams, codecs, secure_transport, crypto, and streams. If we don't
699 // currently have crypto (in current_cryptos) and it is enabled (in 701 // currently have crypto (in current_cryptos) and it is enabled (in
700 // secure_policy), crypto is created (according to crypto_suites). If 702 // secure_policy), crypto is created (according to crypto_suites). If
701 // add_legacy_stream is true, and current_streams is empty, a legacy 703 // add_legacy_stream is true, and current_streams is empty, a legacy
702 // stream is created. The created content is added to the offer. 704 // stream is created. The created content is added to the offer.
703 template <class C> 705 template <class C>
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after
2158 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); 2160 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO));
2159 } 2161 }
2160 2162
2161 DataContentDescription* GetFirstDataContentDescription( 2163 DataContentDescription* GetFirstDataContentDescription(
2162 SessionDescription* sdesc) { 2164 SessionDescription* sdesc) {
2163 return static_cast<DataContentDescription*>( 2165 return static_cast<DataContentDescription*>(
2164 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); 2166 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA));
2165 } 2167 }
2166 2168
2167 } // namespace cricket 2169 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/pc/mediasession.h ('k') | webrtc/pc/mediasession_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698