Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Side by Side Diff: content/renderer/media/webrtc/peer_connection_dependency_factory.cc

Issue 1273213004: Stop using TCP TURN servers as STUN servers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h" 5 #include "content/renderer/media/webrtc/peer_connection_dependency_factory.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/location.h" 10 #include "base/location.h"
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 } 140 }
141 for (size_t i = 0; i < turn_configurations.size(); ++i) { 141 for (size_t i = 0; i < turn_configurations.size(); ++i) {
142 P2PPortAllocator::Config::RelayServerConfig relay_config; 142 P2PPortAllocator::Config::RelayServerConfig relay_config;
143 relay_config.server_address = turn_configurations[i].server.hostname(); 143 relay_config.server_address = turn_configurations[i].server.hostname();
144 relay_config.port = turn_configurations[i].server.port(); 144 relay_config.port = turn_configurations[i].server.port();
145 relay_config.username = turn_configurations[i].username; 145 relay_config.username = turn_configurations[i].username;
146 relay_config.password = turn_configurations[i].password; 146 relay_config.password = turn_configurations[i].password;
147 relay_config.transport_type = turn_configurations[i].transport_type; 147 relay_config.transport_type = turn_configurations[i].transport_type;
148 relay_config.secure = turn_configurations[i].secure; 148 relay_config.secure = turn_configurations[i].secure;
149 config.relays.push_back(relay_config); 149 config.relays.push_back(relay_config);
150
151 // Use turn servers as stun servers.
152 config.stun_servers.insert(rtc::SocketAddress(
153 turn_configurations[i].server.hostname(),
154 turn_configurations[i].server.port()));
155 } 150 }
156 config.enable_multiple_routes = enable_multiple_routes_; 151 config.enable_multiple_routes = enable_multiple_routes_;
157 152
158 return new P2PPortAllocator( 153 return new P2PPortAllocator(
159 socket_dispatcher_.get(), network_manager_, 154 socket_dispatcher_.get(), network_manager_,
160 socket_factory_, config, origin_); 155 socket_factory_, config, origin_);
161 } 156 }
162 157
163 protected: 158 protected:
164 ~P2PPortAllocatorFactory() override {} 159 ~P2PPortAllocatorFactory() override {}
(...skipping 527 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 } 687 }
693 688
694 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { 689 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() {
695 if (audio_device_.get()) 690 if (audio_device_.get())
696 return; 691 return;
697 692
698 audio_device_ = new WebRtcAudioDeviceImpl(); 693 audio_device_ = new WebRtcAudioDeviceImpl();
699 } 694 }
700 695
701 } // namespace content 696 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698