| OLD | NEW |
| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 worker_thread_, signaling_thread_, audio_device_.get(), | 254 worker_thread_, signaling_thread_, audio_device_.get(), |
| 255 webrtc::CreateBuiltinAudioEncoderFactory(), | 255 webrtc::CreateBuiltinAudioEncoderFactory(), |
| 256 webrtc::CreateBuiltinAudioDecoderFactory(), encoder_factory.release(), | 256 webrtc::CreateBuiltinAudioDecoderFactory(), encoder_factory.release(), |
| 257 decoder_factory.release()); | 257 decoder_factory.release()); |
| 258 CHECK(pc_factory_.get()); | 258 CHECK(pc_factory_.get()); |
| 259 | 259 |
| 260 webrtc::PeerConnectionFactoryInterface::Options factory_options; | 260 webrtc::PeerConnectionFactoryInterface::Options factory_options; |
| 261 factory_options.disable_sctp_data_channels = false; | 261 factory_options.disable_sctp_data_channels = false; |
| 262 factory_options.disable_encryption = | 262 factory_options.disable_encryption = |
| 263 cmd_line->HasSwitch(switches::kDisableWebRtcEncryption); | 263 cmd_line->HasSwitch(switches::kDisableWebRtcEncryption); |
| 264 | 264 factory_options.crypto_options.enable_gcm_crypto_suites = |
| 265 cmd_line->HasSwitch(switches::kEnableWebRtcSrtpAesGcm); |
| 265 pc_factory_->SetOptions(factory_options); | 266 pc_factory_->SetOptions(factory_options); |
| 266 | 267 |
| 267 event->Signal(); | 268 event->Signal(); |
| 268 } | 269 } |
| 269 | 270 |
| 270 bool PeerConnectionDependencyFactory::PeerConnectionFactoryCreated() { | 271 bool PeerConnectionDependencyFactory::PeerConnectionFactoryCreated() { |
| 271 return pc_factory_.get() != NULL; | 272 return pc_factory_.get() != NULL; |
| 272 } | 273 } |
| 273 | 274 |
| 274 scoped_refptr<webrtc::PeerConnectionInterface> | 275 scoped_refptr<webrtc::PeerConnectionInterface> |
| (...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 | 554 |
| 554 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 555 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
| 555 DCHECK(CalledOnValidThread()); | 556 DCHECK(CalledOnValidThread()); |
| 556 if (audio_device_.get()) | 557 if (audio_device_.get()) |
| 557 return; | 558 return; |
| 558 | 559 |
| 559 audio_device_ = new WebRtcAudioDeviceImpl(); | 560 audio_device_ = new WebRtcAudioDeviceImpl(); |
| 560 } | 561 } |
| 561 | 562 |
| 562 } // namespace content | 563 } // namespace content |
| OLD | NEW |