| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 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 13 matching lines...) Expand all Loading... |
| 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #import "talk/app/webrtc/objc/RTCPeerConnectionInterface+Internal.h" | 28 #import "talk/app/webrtc/objc/RTCPeerConnectionInterface+Internal.h" |
| 29 | 29 |
| 30 #import "talk/app/webrtc/objc/RTCEnumConverter.h" | 30 #import "talk/app/webrtc/objc/RTCEnumConverter.h" |
| 31 #import "talk/app/webrtc/objc/RTCICEServer+Internal.h" | 31 #import "talk/app/webrtc/objc/RTCICEServer+Internal.h" |
| 32 #import "talk/app/webrtc/objc/public/RTCLogging.h" | 32 #import "talk/app/webrtc/objc/public/RTCLogging.h" |
| 33 | 33 |
| 34 #include <memory> |
| 35 |
| 34 @implementation RTCConfiguration | 36 @implementation RTCConfiguration |
| 35 | 37 |
| 36 @synthesize iceTransportsType = _iceTransportsType; | 38 @synthesize iceTransportsType = _iceTransportsType; |
| 37 @synthesize iceServers = _iceServers; | 39 @synthesize iceServers = _iceServers; |
| 38 @synthesize bundlePolicy = _bundlePolicy; | 40 @synthesize bundlePolicy = _bundlePolicy; |
| 39 @synthesize rtcpMuxPolicy = _rtcpMuxPolicy; | 41 @synthesize rtcpMuxPolicy = _rtcpMuxPolicy; |
| 40 @synthesize tcpCandidatePolicy = _tcpCandidatePolicy; | 42 @synthesize tcpCandidatePolicy = _tcpCandidatePolicy; |
| 41 @synthesize audioJitterBufferMaxPackets = _audioJitterBufferMaxPackets; | 43 @synthesize audioJitterBufferMaxPackets = _audioJitterBufferMaxPackets; |
| 42 @synthesize iceConnectionReceivingTimeout = _iceConnectionReceivingTimeout; | 44 @synthesize iceConnectionReceivingTimeout = _iceConnectionReceivingTimeout; |
| 43 @synthesize iceBackupCandidatePairPingInterval = _iceBackupCandidatePairPingInte
rval; | 45 @synthesize iceBackupCandidatePairPingInterval = _iceBackupCandidatePairPingInte
rval; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 nativeConfig.servers.push_back(iceServer.iceServer); | 90 nativeConfig.servers.push_back(iceServer.iceServer); |
| 89 } | 91 } |
| 90 nativeConfig.bundle_policy = [RTCEnumConverter nativeEnumForBundlePolicy:_bund
lePolicy]; | 92 nativeConfig.bundle_policy = [RTCEnumConverter nativeEnumForBundlePolicy:_bund
lePolicy]; |
| 91 nativeConfig.rtcp_mux_policy = [RTCEnumConverter nativeEnumForRtcpMuxPolicy:_r
tcpMuxPolicy]; | 93 nativeConfig.rtcp_mux_policy = [RTCEnumConverter nativeEnumForRtcpMuxPolicy:_r
tcpMuxPolicy]; |
| 92 nativeConfig.tcp_candidate_policy = | 94 nativeConfig.tcp_candidate_policy = |
| 93 [RTCEnumConverter nativeEnumForTcpCandidatePolicy:_tcpCandidatePolicy]; | 95 [RTCEnumConverter nativeEnumForTcpCandidatePolicy:_tcpCandidatePolicy]; |
| 94 nativeConfig.audio_jitter_buffer_max_packets = _audioJitterBufferMaxPackets; | 96 nativeConfig.audio_jitter_buffer_max_packets = _audioJitterBufferMaxPackets; |
| 95 nativeConfig.ice_connection_receiving_timeout = _iceConnectionReceivingTimeout
; | 97 nativeConfig.ice_connection_receiving_timeout = _iceConnectionReceivingTimeout
; |
| 96 nativeConfig.ice_backup_candidate_pair_ping_interval = _iceBackupCandidatePair
PingInterval; | 98 nativeConfig.ice_backup_candidate_pair_ping_interval = _iceBackupCandidatePair
PingInterval; |
| 97 if (_keyType == kRTCEncryptionKeyTypeECDSA) { | 99 if (_keyType == kRTCEncryptionKeyTypeECDSA) { |
| 98 rtc::scoped_ptr<rtc::SSLIdentity> identity( | 100 std::unique_ptr<rtc::SSLIdentity> identity( |
| 99 rtc::SSLIdentity::Generate(webrtc::kIdentityName, rtc::KT_ECDSA)); | 101 rtc::SSLIdentity::Generate(webrtc::kIdentityName, rtc::KT_ECDSA)); |
| 100 if (identity) { | 102 if (identity) { |
| 101 nativeConfig.certificates.push_back( | 103 nativeConfig.certificates.push_back( |
| 102 rtc::RTCCertificate::Create(std::move(identity))); | 104 rtc::RTCCertificate::Create( |
| 105 rtc::UniqueToScoped(std::move(identity)))); |
| 103 } else { | 106 } else { |
| 104 RTCLogWarning(@"Failed to generate ECDSA identity. RSA will be used."); | 107 RTCLogWarning(@"Failed to generate ECDSA identity. RSA will be used."); |
| 105 } | 108 } |
| 106 } | 109 } |
| 107 return nativeConfig; | 110 return nativeConfig; |
| 108 } | 111 } |
| 109 | 112 |
| 110 @end | 113 @end |
| OLD | NEW |