OLD | NEW |
---|---|
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 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
715 return false; | 715 return false; |
716 } | 716 } |
717 | 717 |
718 template <class C> | 718 template <class C> |
719 static bool IsRtxCodec(const C& codec) { | 719 static bool IsRtxCodec(const C& codec) { |
720 return stricmp(codec.name.c_str(), kRtxCodecName) == 0; | 720 return stricmp(codec.name.c_str(), kRtxCodecName) == 0; |
721 } | 721 } |
722 | 722 |
723 static TransportOptions GetTransportOptions(const MediaSessionOptions& options, | 723 static TransportOptions GetTransportOptions(const MediaSessionOptions& options, |
724 const std::string& content_name) { | 724 const std::string& content_name) { |
725 TransportOptions transport_options; | |
725 auto it = options.transport_options.find(content_name); | 726 auto it = options.transport_options.find(content_name); |
726 if (it == options.transport_options.end()) { | 727 if (it != options.transport_options.end()) { |
727 return TransportOptions(); | 728 transport_options = it->second; |
728 } | 729 } |
729 return it->second; | 730 transport_options.ice_renomination = options.ice_renomination; |
skvlad
2016/08/26 23:59:10
Is options.ice_renomination always supposed to ove
honghaiz3
2016/08/29 18:52:52
Good point. I think that is the reason I have not
| |
731 return transport_options; | |
730 } | 732 } |
731 | 733 |
732 // Create a media content to be offered in a session-initiate, | 734 // Create a media content to be offered in a session-initiate, |
733 // according to the given options.rtcp_mux, options.is_muc, | 735 // according to the given options.rtcp_mux, options.is_muc, |
734 // options.streams, codecs, secure_transport, crypto, and streams. If we don't | 736 // options.streams, codecs, secure_transport, crypto, and streams. If we don't |
735 // currently have crypto (in current_cryptos) and it is enabled (in | 737 // currently have crypto (in current_cryptos) and it is enabled (in |
736 // secure_policy), crypto is created (according to crypto_suites). If | 738 // secure_policy), crypto is created (according to crypto_suites). If |
737 // add_legacy_stream is true, and current_streams is empty, a legacy | 739 // add_legacy_stream is true, and current_streams is empty, a legacy |
738 // stream is created. The created content is added to the offer. | 740 // stream is created. The created content is added to the offer. |
739 template <class C> | 741 template <class C> |
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2194 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); | 2196 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_VIDEO)); |
2195 } | 2197 } |
2196 | 2198 |
2197 DataContentDescription* GetFirstDataContentDescription( | 2199 DataContentDescription* GetFirstDataContentDescription( |
2198 SessionDescription* sdesc) { | 2200 SessionDescription* sdesc) { |
2199 return static_cast<DataContentDescription*>( | 2201 return static_cast<DataContentDescription*>( |
2200 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); | 2202 GetFirstMediaContentDescription(sdesc, MEDIA_TYPE_DATA)); |
2201 } | 2203 } |
2202 | 2204 |
2203 } // namespace cricket | 2205 } // namespace cricket |
OLD | NEW |