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

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

Issue 187913002: Support the Aec dump for the APM in chrome (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 6 years, 10 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 be33d64dc5fe5744042734105fbf7b80226edfb8..1414de48429a0eaa0d036d427f7d47308d7b077c 100644
--- a/content/renderer/media/media_stream_dependency_factory.cc
+++ b/content/renderer/media/media_stream_dependency_factory.cc
@@ -753,6 +753,15 @@ bool MediaStreamDependencyFactory::OnControlMessageReceived(
void MediaStreamDependencyFactory::OnAecDumpFile(
IPC::PlatformFileForTransit file_handle) {
DCHECK_EQ(aec_dump_file_, base::kInvalidPlatformFileValue);
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAudioTrackProcessing)) {
+ EnsureWebRtcAudioDeviceImpl();
+ GetWebRtcAudioDevice()->EnableAecDump(file_handle);
Henrik Grunell 2014/03/06 10:12:20 Have WebRtcAudioDeviceImpl::EnableAecDump take a b
no longer working on chromium 2014/03/06 18:57:21 Done.
+ return;
+ }
+
+ // TODO(xians): Remove the following code after kEnableAudioTrackProcessing
Henrik Grunell 2014/03/06 10:12:20 It shouldn't be removed when the flag is on by def
no longer working on chromium 2014/03/06 18:57:21 Done.
+ // is on by default.
if (PeerConnectionFactoryCreated()) {
base::PlatformFile file =
IPC::PlatformFileForTransitToPlatformFile(file_handle);
@@ -765,6 +774,14 @@ void MediaStreamDependencyFactory::OnAecDumpFile(
}
void MediaStreamDependencyFactory::OnDisableAecDump() {
+ if (CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kEnableAudioTrackProcessing)) {
+ GetWebRtcAudioDevice()->DisableAecDump();
+ return;
+ }
+
+ // TODO(xians): Remove the following code after kEnableAudioTrackProcessing
+ // is on by default.
if (aec_dump_file_ != base::kInvalidPlatformFileValue)
base::ClosePlatformFile(aec_dump_file_);
aec_dump_file_ = base::kInvalidPlatformFileValue;

Powered by Google App Engine
This is Rietveld 408576698