Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(608)

Unified Diff: content/renderer/media/media_stream_dependency_factory.cc

Issue 30983002: Switch from using internal constraints to use explicit PeerConnectionFactoryInterface::SetOptions t… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track_stop
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/renderer/media/rtc_media_constraints.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
}
« no previous file with comments | « no previous file | content/renderer/media/rtc_media_constraints.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698