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 642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
653 audio_device.get(), | 653 audio_device.get(), |
654 encoder_factory.release(), | 654 encoder_factory.release(), |
655 decoder_factory.release())); | 655 decoder_factory.release())); |
656 if (!factory.get()) { | 656 if (!factory.get()) { |
657 return false; | 657 return false; |
658 } | 658 } |
659 | 659 |
660 audio_device_ = audio_device; | 660 audio_device_ = audio_device; |
661 pc_factory_ = factory; | 661 pc_factory_ = factory; |
662 webrtc::PeerConnectionFactoryInterface::Options factory_options; | 662 webrtc::PeerConnectionFactoryInterface::Options factory_options; |
663 factory_options.enable_aec_dump = | |
664 cmd_line->HasSwitch(switches::kEnableWebRtcAecRecordings); | |
665 factory_options.disable_sctp_data_channels = | 663 factory_options.disable_sctp_data_channels = |
666 cmd_line->HasSwitch(switches::kDisableSCTPDataChannels); | 664 cmd_line->HasSwitch(switches::kDisableSCTPDataChannels); |
667 factory_options.disable_encryption = | 665 factory_options.disable_encryption = |
668 cmd_line->HasSwitch(switches::kDisableWebRtcEncryption); | 666 cmd_line->HasSwitch(switches::kDisableWebRtcEncryption); |
669 pc_factory_->SetOptions(factory_options); | 667 pc_factory_->SetOptions(factory_options); |
670 return true; | 668 return true; |
671 } | 669 } |
672 | 670 |
673 bool MediaStreamDependencyFactory::PeerConnectionFactoryCreated() { | 671 bool MediaStreamDependencyFactory::PeerConnectionFactoryCreated() { |
674 return pc_factory_.get() != NULL; | 672 return pc_factory_.get() != NULL; |
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 MediaStreamDependencyFactory::GetNativeMediaStreamTrack( | 989 MediaStreamDependencyFactory::GetNativeMediaStreamTrack( |
992 const blink::WebMediaStreamTrack& track) { | 990 const blink::WebMediaStreamTrack& track) { |
993 if (track.isNull()) | 991 if (track.isNull()) |
994 return NULL; | 992 return NULL; |
995 MediaStreamTrackExtraData* extra_data = | 993 MediaStreamTrackExtraData* extra_data = |
996 static_cast<MediaStreamTrackExtraData*>(track.extraData()); | 994 static_cast<MediaStreamTrackExtraData*>(track.extraData()); |
997 return extra_data ? extra_data->track().get() : NULL; | 995 return extra_data ? extra_data->track().get() : NULL; |
998 } | 996 } |
999 | 997 |
1000 } // namespace content | 998 } // namespace content |
OLD | NEW |