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 "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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 audio_device.get(), | 615 audio_device.get(), |
616 encoder_factory.release(), | 616 encoder_factory.release(), |
617 decoder_factory.release())); | 617 decoder_factory.release())); |
618 if (!factory.get()) { | 618 if (!factory.get()) { |
619 return false; | 619 return false; |
620 } | 620 } |
621 | 621 |
622 audio_device_ = audio_device; | 622 audio_device_ = audio_device; |
623 pc_factory_ = factory; | 623 pc_factory_ = factory; |
624 webrtc::PeerConnectionFactoryInterface::Options factory_options; | 624 webrtc::PeerConnectionFactoryInterface::Options factory_options; |
625 factory_options.enable_aec_dump = | |
626 cmd_line->HasSwitch(switches::kEnableWebRtcAecRecordings); | |
627 factory_options.disable_sctp_data_channels = | 625 factory_options.disable_sctp_data_channels = |
628 cmd_line->HasSwitch(switches::kDisableSCTPDataChannels); | 626 cmd_line->HasSwitch(switches::kDisableSCTPDataChannels); |
629 factory_options.disable_encryption = | 627 factory_options.disable_encryption = |
630 cmd_line->HasSwitch(switches::kDisableWebRtcEncryption); | 628 cmd_line->HasSwitch(switches::kDisableWebRtcEncryption); |
631 pc_factory_->SetOptions(factory_options); | 629 pc_factory_->SetOptions(factory_options); |
632 return true; | 630 return true; |
633 } | 631 } |
634 | 632 |
635 bool MediaStreamDependencyFactory::PeerConnectionFactoryCreated() { | 633 bool MediaStreamDependencyFactory::PeerConnectionFactoryCreated() { |
636 return pc_factory_.get() != NULL; | 634 return pc_factory_.get() != NULL; |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
952 MediaStreamDependencyFactory::GetNativeMediaStreamTrack( | 950 MediaStreamDependencyFactory::GetNativeMediaStreamTrack( |
953 const blink::WebMediaStreamTrack& track) { | 951 const blink::WebMediaStreamTrack& track) { |
954 if (track.isNull()) | 952 if (track.isNull()) |
955 return NULL; | 953 return NULL; |
956 MediaStreamTrackExtraData* extra_data = | 954 MediaStreamTrackExtraData* extra_data = |
957 static_cast<MediaStreamTrackExtraData*>(track.extraData()); | 955 static_cast<MediaStreamTrackExtraData*>(track.extraData()); |
958 return extra_data ? extra_data->track().get() : NULL; | 956 return extra_data ? extra_data->track().get() : NULL; |
959 } | 957 } |
960 | 958 |
961 } // namespace content | 959 } // namespace content |
OLD | NEW |