Index: content/renderer/media/media_stream_dependency_factory.cc |
diff --git a/content/renderer/media/media_stream_dependency_factory.cc b/content/renderer/media/media_stream_dependency_factory.cc |
index 9e6aef9c63cb8d8279ceff6017185606cb3d78f8..1d8f483f4f68ec3f42743f73e4d872a70211d113 100644 |
--- a/content/renderer/media/media_stream_dependency_factory.cc |
+++ b/content/renderer/media/media_stream_dependency_factory.cc |
@@ -304,11 +304,6 @@ void MediaStreamDependencyFactory::CreateNativeMediaSources( |
ApplyFixedAudioConstraints(&native_audio_constraints); |
WebKit::WebVector<WebKit::WebMediaStreamTrack> audio_tracks; |
web_stream->audioTracks(audio_tracks); |
- const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
- if (command_line.HasSwitch(switches::kEnableWebRtcAecRecordings)) { |
- native_audio_constraints.AddOptional( |
- RTCMediaConstraints::kInternalAecDump, "true"); |
- } |
for (size_t i = 0; i < audio_tracks.size(); ++i) { |
const WebKit::WebMediaStreamSource& source = audio_tracks[i].source(); |
MediaStreamSourceExtraData* source_data = |
@@ -544,16 +539,26 @@ bool MediaStreamDependencyFactory::CreatePeerConnectionFactory() { |
encoder_factory.reset(new RTCVideoEncoderFactory(gpu_factories)); |
} |
+ |
scoped_refptr<webrtc::PeerConnectionFactoryInterface> factory( |
webrtc::CreatePeerConnectionFactory(worker_thread_, |
signaling_thread_, |
audio_device_.get(), |
encoder_factory.release(), |
decoder_factory.release())); |
- if (factory.get()) |
- pc_factory_ = factory; |
- else |
+ if (!factory.get()) { |
audio_device_ = NULL; |
+ return false; |
+ } |
+ |
+ pc_factory_ = factory; |
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
+ PeerConnectionFactoryInterface::Options factory_options; |
+ factory_options.enable_aec_dump = |
+ cmd_line->HasSwitch(switches::kEnableWebRtcAecRecordings); |
+ factory_options.disable_sctp_data_channels= |
+ cmd_line->HasSwitch(switches::kDisableSCTPDataChannels); |
+ pc_factory_->SetOptions(factory_options); |
} |
return pc_factory_.get() != NULL; |
Ami GONE FROM CHROMIUM
2013/10/20 20:32:11
Isn't this unconditionally true now?
perkj_chrome
2013/10/21 09:56:58
yes.... I rewrote the if statement.
|
} |