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

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

Issue 14893006: Add flag for enabling WebRTC AEC debug recordings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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
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 0f626513a4a7bb327a440672b3cc5df1650c7619..fe2e42ddf12740d21219209693089ebc272f2b93 100644
--- a/content/renderer/media/media_stream_dependency_factory.cc
+++ b/content/renderer/media/media_stream_dependency_factory.cc
@@ -6,8 +6,10 @@
#include <vector>
+#include "base/command_line.h"
#include "base/synchronization/waitable_event.h"
#include "base/utf_string_conversions.h"
+#include "content/public/common/content_switches.h"
#include "content/renderer/media/media_stream_source_extra_data.h"
#include "content/renderer/media/rtc_media_constraints.h"
#include "content/renderer/media/rtc_peer_connection_handler.h"
@@ -456,12 +458,19 @@ bool MediaStreamDependencyFactory::RemoveNativeMediaStreamTrack(
bool MediaStreamDependencyFactory::CreatePeerConnectionFactory() {
DVLOG(1) << "MediaStreamDependencyFactory::CreatePeerConnectionFactory()";
+
if (!pc_factory_) {
DCHECK(!audio_device_);
audio_device_ = new WebRtcAudioDeviceImpl();
+
+ const CommandLine& command_line = *CommandLine::ForCurrentProcess();
+ bool enable_aec_recording =
+ command_line.HasSwitch(switches::kEnableWebRtcAecRecordings);
+
scoped_refptr<webrtc::PeerConnectionFactoryInterface> factory(
webrtc::CreatePeerConnectionFactory(
- worker_thread_, signaling_thread_, audio_device_, NULL, NULL));
+ worker_thread_, signaling_thread_, audio_device_, NULL, NULL,
+ enable_aec_recording));
tommi (sloooow) - chröme 2013/05/13 14:56:23 does this depend on a new roll? if so, can you ad
Henrik Grunell 2013/05/14 08:39:06 Yes it does, added that info.
if (factory)
pc_factory_ = factory;
else
« content/public/common/content_switches.cc ('K') | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698