| 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/rtc_peer_connection_handler.h" | 5 #include "content/renderer/media/rtc_peer_connection_handler.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 DCHECK(frame_); | 344 DCHECK(frame_); |
| 345 | 345 |
| 346 peer_connection_tracker_ = | 346 peer_connection_tracker_ = |
| 347 RenderThreadImpl::current()->peer_connection_tracker(); | 347 RenderThreadImpl::current()->peer_connection_tracker(); |
| 348 | 348 |
| 349 webrtc::PeerConnectionInterface::IceServers servers; | 349 webrtc::PeerConnectionInterface::IceServers servers; |
| 350 GetNativeIceServers(server_configuration, &servers); | 350 GetNativeIceServers(server_configuration, &servers); |
| 351 | 351 |
| 352 RTCMediaConstraints constraints(options); | 352 RTCMediaConstraints constraints(options); |
| 353 | 353 |
| 354 if (!CommandLine::ForCurrentProcess()->HasSwitch( | |
| 355 switches::kDisableSCTPDataChannels)) { | |
| 356 constraints.AddOptional( | |
| 357 webrtc::MediaConstraintsInterface::kEnableSctpDataChannels, "true"); | |
| 358 } | |
| 359 | |
| 360 native_peer_connection_ = | 354 native_peer_connection_ = |
| 361 dependency_factory_->CreatePeerConnection( | 355 dependency_factory_->CreatePeerConnection( |
| 362 servers, &constraints, frame_, this); | 356 servers, &constraints, frame_, this); |
| 363 if (!native_peer_connection_.get()) { | 357 if (!native_peer_connection_.get()) { |
| 364 LOG(ERROR) << "Failed to initialize native PeerConnection."; | 358 LOG(ERROR) << "Failed to initialize native PeerConnection."; |
| 365 return false; | 359 return false; |
| 366 } | 360 } |
| 367 if (peer_connection_tracker_) | 361 if (peer_connection_tracker_) |
| 368 peer_connection_tracker_->RegisterPeerConnection( | 362 peer_connection_tracker_->RegisterPeerConnection( |
| 369 this, servers, constraints, frame_); | 363 this, servers, constraints, frame_); |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 780 webrtc::SessionDescriptionInterface* native_desc = | 774 webrtc::SessionDescriptionInterface* native_desc = |
| 781 dependency_factory_->CreateSessionDescription(type, sdp, error); | 775 dependency_factory_->CreateSessionDescription(type, sdp, error); |
| 782 | 776 |
| 783 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." | 777 LOG_IF(ERROR, !native_desc) << "Failed to create native session description." |
| 784 << " Type: " << type << " SDP: " << sdp; | 778 << " Type: " << type << " SDP: " << sdp; |
| 785 | 779 |
| 786 return native_desc; | 780 return native_desc; |
| 787 } | 781 } |
| 788 | 782 |
| 789 } // namespace content | 783 } // namespace content |
| OLD | NEW |