OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
360 std::vector<PortAllocatorFactoryInterface::TurnConfiguration> turn_config; | 360 std::vector<PortAllocatorFactoryInterface::TurnConfiguration> turn_config; |
361 if (!ParseIceServers(configuration.servers, &stun_config, &turn_config)) { | 361 if (!ParseIceServers(configuration.servers, &stun_config, &turn_config)) { |
362 return false; | 362 return false; |
363 } | 363 } |
364 port_allocator_.reset( | 364 port_allocator_.reset( |
365 allocator_factory->CreatePortAllocator(stun_config, turn_config)); | 365 allocator_factory->CreatePortAllocator(stun_config, turn_config)); |
366 | 366 |
367 // To handle both internal and externally created port allocator, we will | 367 // To handle both internal and externally created port allocator, we will |
368 // enable BUNDLE here. | 368 // enable BUNDLE here. |
369 int portallocator_flags = port_allocator_->flags(); | 369 int portallocator_flags = port_allocator_->flags(); |
370 portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_SHARED_UFRAG | | 370 portallocator_flags |= cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET | |
371 cricket::PORTALLOCATOR_ENABLE_SHARED_SOCKET | | |
372 cricket::PORTALLOCATOR_ENABLE_IPV6; | 371 cricket::PORTALLOCATOR_ENABLE_IPV6; |
373 bool value; | 372 bool value; |
374 // If IPv6 flag was specified, we'll not override it by experiment. | 373 // If IPv6 flag was specified, we'll not override it by experiment. |
375 if (FindConstraint( | 374 if (FindConstraint( |
376 constraints, MediaConstraintsInterface::kEnableIPv6, &value, NULL)) { | 375 constraints, MediaConstraintsInterface::kEnableIPv6, &value, NULL)) { |
377 if (!value) { | 376 if (!value) { |
378 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); | 377 portallocator_flags &= ~(cricket::PORTALLOCATOR_ENABLE_IPV6); |
379 } | 378 } |
380 } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") == | 379 } else if (webrtc::field_trial::FindFullName("WebRTC-IPv6Default") == |
381 "Disabled") { | 380 "Disabled") { |
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
907 if (ice_gathering_state_ != kIceGatheringComplete) { | 906 if (ice_gathering_state_ != kIceGatheringComplete) { |
908 ice_gathering_state_ = kIceGatheringComplete; | 907 ice_gathering_state_ = kIceGatheringComplete; |
909 observer_->OnIceGatheringChange(ice_gathering_state_); | 908 observer_->OnIceGatheringChange(ice_gathering_state_); |
910 } | 909 } |
911 } | 910 } |
912 observer_->OnSignalingChange(signaling_state_); | 911 observer_->OnSignalingChange(signaling_state_); |
913 observer_->OnStateChange(PeerConnectionObserver::kSignalingState); | 912 observer_->OnStateChange(PeerConnectionObserver::kSignalingState); |
914 } | 913 } |
915 | 914 |
916 } // namespace webrtc | 915 } // namespace webrtc |
OLD | NEW |