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

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: Rebase 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | 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 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);
tommi (sloooow) - chröme 2013/05/14 09:53:29 since the constant only exists when ENABLE_WEBRTC
Henrik Grunell 2013/05/14 10:08:44 This file is only compiled if WebRTC is enabled, i
tommi (sloooow) - chröme 2013/05/14 12:10:26 ah, lgtm then :)
+
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));
if (factory)
pc_factory_ = factory;
else
« no previous file with comments | « content/public/common/content_switches.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698