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

Side by Side Diff: content/renderer/media/rtc_peer_connection_handler.cc

Issue 30983002: Switch from using internal constraints to use explicit PeerConnectionFactoryInterface::SetOptions t… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track_stop
Patch Set: Created 7 years, 2 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
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698