Chromium Code Reviews| Index: webrtc/sdk/objc/Framework/Classes/RTCConfiguration.mm |
| diff --git a/webrtc/sdk/objc/Framework/Classes/RTCConfiguration.mm b/webrtc/sdk/objc/Framework/Classes/RTCConfiguration.mm |
| index b006319cae43ae81e1556cd9035b9051b1a16b62..6f4bf69961d0610ca3e19550c1e912d0199e7101 100644 |
| --- a/webrtc/sdk/objc/Framework/Classes/RTCConfiguration.mm |
| +++ b/webrtc/sdk/objc/Framework/Classes/RTCConfiguration.mm |
| @@ -24,6 +24,7 @@ |
| @synthesize bundlePolicy = _bundlePolicy; |
| @synthesize rtcpMuxPolicy = _rtcpMuxPolicy; |
| @synthesize tcpCandidatePolicy = _tcpCandidatePolicy; |
| +@synthesize continualGatheringPolicy = _continualGatheringPolicy; |
| @synthesize audioJitterBufferMaxPackets = _audioJitterBufferMaxPackets; |
| @synthesize iceConnectionReceivingTimeout = _iceConnectionReceivingTimeout; |
| @synthesize iceBackupCandidatePairPingInterval = |
| @@ -43,6 +44,9 @@ |
| [[self class] rtcpMuxPolicyForNativePolicy:config.rtcp_mux_policy]; |
| _tcpCandidatePolicy = [[self class] tcpCandidatePolicyForNativePolicy: |
| config.tcp_candidate_policy]; |
| + _continualGatheringPolicy = |
|
tkchin_webrtc
2016/05/10 23:00:35
nit: if it doesn't fit, put it in to a local var f
honghaiz3
2016/05/10 23:26:08
Done.
|
| + [[self class] continualGatheringPolicyForNativePolicy: |
| + config.continual_gathering_policy]; |
| _audioJitterBufferMaxPackets = config.audio_jitter_buffer_max_packets; |
| _iceConnectionReceivingTimeout = config.ice_connection_receiving_timeout; |
| _iceBackupCandidatePairPingInterval = |
| @@ -54,12 +58,14 @@ |
| - (NSString *)description { |
| return [NSString stringWithFormat: |
| - @"RTCConfiguration: {\n%@\n%@\n%@\n%@\n%@\n%d\n%d\n%d\n}\n", |
| + @"RTCConfiguration: {\n%@\n%@\n%@\n%@\n%@\n%@\n%d\n%d\n%d\n}\n", |
| _iceServers, |
| [[self class] stringForTransportPolicy:_iceTransportPolicy], |
| [[self class] stringForBundlePolicy:_bundlePolicy], |
| [[self class] stringForRtcpMuxPolicy:_rtcpMuxPolicy], |
| [[self class] stringForTcpCandidatePolicy:_tcpCandidatePolicy], |
| + [[self class] |
| + stringForContinualGatheringPolicy:_continualGatheringPolicy], |
| _audioJitterBufferMaxPackets, |
| _iceConnectionReceivingTimeout, |
| _iceBackupCandidatePairPingInterval]; |
| @@ -81,6 +87,8 @@ |
| [[self class] nativeRtcpMuxPolicyForPolicy:_rtcpMuxPolicy]; |
| nativeConfig.tcp_candidate_policy = |
| [[self class] nativeTcpCandidatePolicyForPolicy:_tcpCandidatePolicy]; |
| + nativeConfig.continual_gathering_policy = [[self class] |
| + nativeContinualGatheringPolicyForPolicy:_continualGatheringPolicy]; |
| nativeConfig.audio_jitter_buffer_max_packets = _audioJitterBufferMaxPackets; |
| nativeConfig.ice_connection_receiving_timeout = |
| _iceConnectionReceivingTimeout; |
| @@ -234,4 +242,35 @@ |
| } |
| } |
| ++ (webrtc::PeerConnectionInterface::ContinualGatheringPolicy) |
| + nativeContinualGatheringPolicyForPolicy: |
| + (RTCContinualGatheringPolicy)policy { |
| + switch (policy) { |
| + case RTCGatherOnce: |
| + return webrtc::PeerConnectionInterface::GATHER_ONCE; |
| + case RTCGatherContinually: |
| + return webrtc::PeerConnectionInterface::GATHER_CONTINUALLY; |
| + } |
| +} |
| + |
| ++ (RTCContinualGatheringPolicy) continualGatheringPolicyForNativePolicy: |
|
tkchin_webrtc
2016/05/10 23:00:35
nit: remove space
honghaiz3
2016/05/10 23:26:08
Done.
|
| + (webrtc::PeerConnectionInterface::ContinualGatheringPolicy)nativePolicy { |
| + switch (nativePolicy) { |
| + case webrtc::PeerConnectionInterface::GATHER_ONCE: |
| + return RTCGatherOnce; |
| + case webrtc::PeerConnectionInterface::GATHER_CONTINUALLY: |
| + return RTCGatherContinually; |
| + } |
| +} |
| + |
| ++ (NSString *) stringForContinualGatheringPolicy: |
|
tkchin_webrtc
2016/05/10 23:00:34
nit: remove space
honghaiz3
2016/05/10 23:26:08
Done.
|
| + (RTCContinualGatheringPolicy)policy { |
| + switch (policy) { |
| + case RTCGatherOnce: |
| + return @"GATHER_ONCE"; |
| + case RTCGatherContinually: |
| + return @"GATHER_CONTINUALLY"; |
| + } |
| +} |
| + |
| @end |