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 "content/renderer/media/video_capture_impl_manager.h" | 9 #include "content/renderer/media/video_capture_impl_manager.h" |
10 #include "content/renderer/media/video_capture_module_impl.h" | 10 #include "content/renderer/media/video_capture_module_impl.h" |
(...skipping 16 matching lines...) Expand all Loading... |
27 } | 27 } |
28 | 28 |
29 virtual cricket::PortAllocator* CreatePortAllocator( | 29 virtual cricket::PortAllocator* CreatePortAllocator( |
30 const std::vector<StunConfiguration>& stun_servers, | 30 const std::vector<StunConfiguration>& stun_servers, |
31 const std::vector<TurnConfiguration>& turn_configurations) OVERRIDE { | 31 const std::vector<TurnConfiguration>& turn_configurations) OVERRIDE { |
32 WebKit::WebFrame* web_frame = WebKit::WebFrame::frameForCurrentContext(); | 32 WebKit::WebFrame* web_frame = WebKit::WebFrame::frameForCurrentContext(); |
33 if (!web_frame) { | 33 if (!web_frame) { |
34 LOG(ERROR) << "WebFrame is NULL."; | 34 LOG(ERROR) << "WebFrame is NULL."; |
35 return NULL; | 35 return NULL; |
36 } | 36 } |
37 webkit_glue::P2PTransport::Config config; | 37 content::P2PPortAllocator::Config config; |
38 if (stun_servers.size() > 0) { | 38 if (stun_servers.size() > 0) { |
39 config.stun_server = stun_servers[0].server.hostname(); | 39 config.stun_server = stun_servers[0].server.hostname(); |
40 config.stun_server_port = stun_servers[0].server.port(); | 40 config.stun_server_port = stun_servers[0].server.port(); |
41 } | 41 } |
42 if (turn_configurations.size() > 0) { | 42 if (turn_configurations.size() > 0) { |
43 config.relay_server = turn_configurations[0].server.hostname(); | 43 config.relay_server = turn_configurations[0].server.hostname(); |
44 config.relay_server_port = turn_configurations[0].server.port(); | 44 config.relay_server_port = turn_configurations[0].server.port(); |
45 config.relay_username = turn_configurations[0].username; | 45 config.relay_username = turn_configurations[0].username; |
46 config.relay_password = turn_configurations[0].password; | 46 config.relay_password = turn_configurations[0].password; |
47 } | 47 } |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 MediaStreamDependencyFactory::CreateSessionDescription(const std::string& sdp) { | 143 MediaStreamDependencyFactory::CreateSessionDescription(const std::string& sdp) { |
144 return webrtc::CreateSessionDescription(sdp); | 144 return webrtc::CreateSessionDescription(sdp); |
145 } | 145 } |
146 | 146 |
147 webrtc::IceCandidateInterface* MediaStreamDependencyFactory::CreateIceCandidate( | 147 webrtc::IceCandidateInterface* MediaStreamDependencyFactory::CreateIceCandidate( |
148 const std::string& sdp_mid, | 148 const std::string& sdp_mid, |
149 int sdp_mline_index, | 149 int sdp_mline_index, |
150 const std::string& sdp) { | 150 const std::string& sdp) { |
151 return webrtc::CreateIceCandidate(sdp_mid, sdp_mline_index, sdp); | 151 return webrtc::CreateIceCandidate(sdp_mid, sdp_mline_index, sdp); |
152 } | 152 } |
OLD | NEW |