OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/media_stream_dependency_factory.h" | 5 #include "content/renderer/media/media_stream_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/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 config.stun_server_port = stun_servers[0].server.port(); | 110 config.stun_server_port = stun_servers[0].server.port(); |
111 } | 111 } |
112 config.legacy_relay = false; | 112 config.legacy_relay = false; |
113 for (size_t i = 0; i < turn_configurations.size(); ++i) { | 113 for (size_t i = 0; i < turn_configurations.size(); ++i) { |
114 P2PPortAllocator::Config::RelayServerConfig relay_config; | 114 P2PPortAllocator::Config::RelayServerConfig relay_config; |
115 relay_config.server_address = turn_configurations[i].server.hostname(); | 115 relay_config.server_address = turn_configurations[i].server.hostname(); |
116 relay_config.port = turn_configurations[i].server.port(); | 116 relay_config.port = turn_configurations[i].server.port(); |
117 relay_config.username = turn_configurations[i].username; | 117 relay_config.username = turn_configurations[i].username; |
118 relay_config.password = turn_configurations[i].password; | 118 relay_config.password = turn_configurations[i].password; |
119 relay_config.transport_type = turn_configurations[i].transport_type; | 119 relay_config.transport_type = turn_configurations[i].transport_type; |
| 120 relay_config.secure = turn_configurations[i].secure; |
120 config.relays.push_back(relay_config); | 121 config.relays.push_back(relay_config); |
121 } | 122 } |
122 | 123 |
123 // Use first turn server as the stun server. | 124 // Use first turn server as the stun server. |
124 if (turn_configurations.size() > 0) { | 125 if (turn_configurations.size() > 0) { |
125 config.stun_server = config.relays[0].server_address; | 126 config.stun_server = config.relays[0].server_address; |
126 config.stun_server_port = config.relays[0].port; | 127 config.stun_server_port = config.relays[0].port; |
127 } | 128 } |
128 | 129 |
129 return new P2PPortAllocator( | 130 return new P2PPortAllocator( |
(...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
816 } | 817 } |
817 | 818 |
818 // Add the capturer to the WebRtcAudioDeviceImpl if it is a new capturer. | 819 // Add the capturer to the WebRtcAudioDeviceImpl if it is a new capturer. |
819 if (is_new_capturer) | 820 if (is_new_capturer) |
820 GetWebRtcAudioDevice()->AddAudioCapturer(capturer); | 821 GetWebRtcAudioDevice()->AddAudioCapturer(capturer); |
821 | 822 |
822 return capturer; | 823 return capturer; |
823 } | 824 } |
824 | 825 |
825 } // namespace content | 826 } // namespace content |
OLD | NEW |