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 <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 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 signaling_thread_ = jingle_glue::JingleThreadWrapper::current(); | 344 signaling_thread_ = jingle_glue::JingleThreadWrapper::current(); |
345 | 345 |
346 EnsureWebRtcAudioDeviceImpl(); | 346 EnsureWebRtcAudioDeviceImpl(); |
347 | 347 |
348 socket_factory_.reset( | 348 socket_factory_.reset( |
349 new IpcPacketSocketFactory(p2p_socket_dispatcher_.get())); | 349 new IpcPacketSocketFactory(p2p_socket_dispatcher_.get())); |
350 | 350 |
351 scoped_ptr<cricket::WebRtcVideoDecoderFactory> decoder_factory; | 351 scoped_ptr<cricket::WebRtcVideoDecoderFactory> decoder_factory; |
352 scoped_ptr<cricket::WebRtcVideoEncoderFactory> encoder_factory; | 352 scoped_ptr<cricket::WebRtcVideoEncoderFactory> encoder_factory; |
353 | 353 |
354 const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); | 354 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
355 if (gpu_factories.get()) { | 355 if (gpu_factories.get()) { |
356 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding)) | 356 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWDecoding)) |
357 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories)); | 357 decoder_factory.reset(new RTCVideoDecoderFactory(gpu_factories)); |
358 | 358 |
359 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) | 359 if (!cmd_line->HasSwitch(switches::kDisableWebRtcHWEncoding)) |
360 encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories)); | 360 encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories)); |
361 } | 361 } |
362 | 362 |
363 #if defined(OS_ANDROID) | 363 #if defined(OS_ANDROID) |
364 if (!media::MediaCodecBridge::SupportsSetParameters()) | 364 if (!media::MediaCodecBridge::SupportsSetParameters()) |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 } | 622 } |
623 | 623 |
624 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { | 624 void PeerConnectionDependencyFactory::EnsureWebRtcAudioDeviceImpl() { |
625 if (audio_device_.get()) | 625 if (audio_device_.get()) |
626 return; | 626 return; |
627 | 627 |
628 audio_device_ = new WebRtcAudioDeviceImpl(); | 628 audio_device_ = new WebRtcAudioDeviceImpl(); |
629 } | 629 } |
630 | 630 |
631 } // namespace content | 631 } // namespace content |
OLD | NEW |