Chromium Code Reviews| Index: webrtc/api/webrtcsession.cc |
| diff --git a/webrtc/api/webrtcsession.cc b/webrtc/api/webrtcsession.cc |
| index 9801d58f174939ded34c1fdd99261f798cb21e4d..7fbf4e8d9db3526cd0e54a1d9e50086504ae7d4e 100644 |
| --- a/webrtc/api/webrtcsession.cc |
| +++ b/webrtc/api/webrtcsession.cc |
| @@ -1128,15 +1128,27 @@ bool WebRtcSession::RemoveRemoteIceCandidates( |
| cricket::IceConfig WebRtcSession::ParseIceConfig( |
| const PeerConnectionInterface::RTCConfiguration& config) const { |
| - cricket::IceConfig ice_config; |
| - ice_config.receiving_timeout = config.ice_connection_receiving_timeout; |
| - ice_config.prioritize_most_likely_candidate_pairs = |
| - config.prioritize_most_likely_ice_candidate_pairs; |
| - ice_config.backup_connection_ping_interval = |
| - config.ice_backup_candidate_pair_ping_interval; |
| - ice_config.gather_continually = (config.continual_gathering_policy == |
| - PeerConnectionInterface::GATHER_CONTINUALLY); |
| - return ice_config; |
| + cricket::ContinualGatheringPolicy gathering_policy; |
| + // TODO(honghaiz): Add the third continual gathering policy in |
| + // PeerConnectionInterface and map it to GATHER_CONTINUALLY_AND_RECOVER. |
| + switch (config.continual_gathering_policy) { |
| + case PeerConnectionInterface::GATHER_ONCE: |
| + gathering_policy = cricket::GATHER_ONCE; |
| + break; |
| + case PeerConnectionInterface::GATHER_CONTINUALLY: |
| + gathering_policy = cricket::GATHER_CONTINUALLY; |
| + break; |
| + default: |
| + RTC_DCHECK(false); |
| + gathering_policy = cricket::GATHER_ONCE; |
| + } |
| + return cricket::IceConfig( |
| + config.ice_connection_receiving_timeout, |
| + config.ice_backup_candidate_pair_ping_interval, gathering_policy, |
| + config.prioritize_most_likely_ice_candidate_pairs, |
| + -1 /* stable_writable_connection_ping_interval_ms */, |
| + false /* presumed_writable_when_fully_relayed */, |
| + -1 /* regather_on_failed_networks_interval */); |
|
pthatcher1
2016/06/29 18:53:27
This seems less readable to me. Setting them each
honghaiz3
2016/06/29 20:19:22
Done.
|
| } |
| void WebRtcSession::SetIceConfig(const cricket::IceConfig& config) { |